Commit 75595536 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

iwlwifi: move irq to PCIe

Even if the variable might also be used by other
transports, there's no need for anything outside
of the transport itself to access it, so move it
into the private area.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 13df1aab
...@@ -231,6 +231,7 @@ struct iwl_tx_queue { ...@@ -231,6 +231,7 @@ struct iwl_tx_queue {
* @rxq: all the RX queue data * @rxq: all the RX queue data
* @rx_replenish: work that will be called when buffers need to be allocated * @rx_replenish: work that will be called when buffers need to be allocated
* @trans: pointer to the generic transport area * @trans: pointer to the generic transport area
* @irq - the irq number for the device
* @irq_requested: true when the irq has been requested * @irq_requested: true when the irq has been requested
* @scd_base_addr: scheduler sram base address in SRAM * @scd_base_addr: scheduler sram base address in SRAM
* @scd_bc_tbls: pointer to the byte count table of the scheduler * @scd_bc_tbls: pointer to the byte count table of the scheduler
...@@ -262,6 +263,7 @@ struct iwl_trans_pcie { ...@@ -262,6 +263,7 @@ struct iwl_trans_pcie {
struct tasklet_struct irq_tasklet; struct tasklet_struct irq_tasklet;
struct isr_statistics isr_stats; struct isr_statistics isr_stats;
unsigned int irq;
spinlock_t irq_lock; spinlock_t irq_lock;
u32 inta_mask; u32 inta_mask;
u32 scd_base_addr; u32 scd_base_addr;
......
...@@ -1294,7 +1294,7 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) ...@@ -1294,7 +1294,7 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); spin_unlock_irqrestore(&trans_pcie->irq_lock, flags);
/* wait to make sure we flush pending tasklet*/ /* wait to make sure we flush pending tasklet*/
synchronize_irq(trans->irq); synchronize_irq(trans_pcie->irq);
tasklet_kill(&trans_pcie->irq_tasklet); tasklet_kill(&trans_pcie->irq_tasklet);
cancel_work_sync(&trans_pcie->rx_replenish); cancel_work_sync(&trans_pcie->rx_replenish);
...@@ -1513,11 +1513,11 @@ static int iwl_trans_pcie_start_hw(struct iwl_trans *trans) ...@@ -1513,11 +1513,11 @@ static int iwl_trans_pcie_start_hw(struct iwl_trans *trans)
iwl_alloc_isr_ict(trans); iwl_alloc_isr_ict(trans);
err = request_irq(trans->irq, iwl_isr_ict, IRQF_SHARED, err = request_irq(trans_pcie->irq, iwl_isr_ict, IRQF_SHARED,
DRV_NAME, trans); DRV_NAME, trans);
if (err) { if (err) {
IWL_ERR(trans, "Error allocating IRQ %d\n", IWL_ERR(trans, "Error allocating IRQ %d\n",
trans->irq); trans_pcie->irq);
goto error; goto error;
} }
...@@ -1540,7 +1540,7 @@ static int iwl_trans_pcie_start_hw(struct iwl_trans *trans) ...@@ -1540,7 +1540,7 @@ static int iwl_trans_pcie_start_hw(struct iwl_trans *trans)
return err; return err;
err_free_irq: err_free_irq:
free_irq(trans->irq, trans); free_irq(trans_pcie->irq, trans);
error: error:
iwl_free_isr_ict(trans); iwl_free_isr_ict(trans);
tasklet_kill(&trans_pcie->irq_tasklet); tasklet_kill(&trans_pcie->irq_tasklet);
...@@ -1629,7 +1629,7 @@ static void iwl_trans_pcie_free(struct iwl_trans *trans) ...@@ -1629,7 +1629,7 @@ static void iwl_trans_pcie_free(struct iwl_trans *trans)
iwl_trans_pcie_rx_free(trans); iwl_trans_pcie_rx_free(trans);
#endif #endif
if (trans_pcie->irq_requested == true) { if (trans_pcie->irq_requested == true) {
free_irq(trans->irq, trans); free_irq(trans_pcie->irq, trans);
iwl_free_isr_ict(trans); iwl_free_isr_ict(trans);
} }
...@@ -2318,7 +2318,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct iwl_shared *shrd, ...@@ -2318,7 +2318,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct iwl_shared *shrd,
"pci_enable_msi failed(0X%x)", err); "pci_enable_msi failed(0X%x)", err);
trans->dev = &pdev->dev; trans->dev = &pdev->dev;
trans->irq = pdev->irq; trans_pcie->irq = pdev->irq;
trans_pcie->pci_dev = pdev; trans_pcie->pci_dev = pdev;
trans->hw_rev = iwl_read32(trans, CSR_HW_REV); trans->hw_rev = iwl_read32(trans, CSR_HW_REV);
trans->hw_id = (pdev->device << 16) + pdev->subsystem_device; trans->hw_id = (pdev->device << 16) + pdev->subsystem_device;
......
...@@ -334,7 +334,6 @@ enum iwl_trans_state { ...@@ -334,7 +334,6 @@ enum iwl_trans_state {
* @shrd - pointer to iwl_shared which holds shared data from the upper layer * @shrd - pointer to iwl_shared which holds shared data from the upper layer
* @reg_lock - protect hw register access * @reg_lock - protect hw register access
* @dev - pointer to struct device * that represents the device * @dev - pointer to struct device * that represents the device
* @irq - the irq number for the device
* @hw_id: a u32 with the ID of the device / subdevice. * @hw_id: a u32 with the ID of the device / subdevice.
* Set during transport allocation. * Set during transport allocation.
* @hw_id_str: a string with info about HW ID. Set during transport allocation. * @hw_id_str: a string with info about HW ID. Set during transport allocation.
...@@ -349,7 +348,6 @@ struct iwl_trans { ...@@ -349,7 +348,6 @@ struct iwl_trans {
spinlock_t reg_lock; spinlock_t reg_lock;
struct device *dev; struct device *dev;
unsigned int irq;
u32 hw_rev; u32 hw_rev;
u32 hw_id; u32 hw_id;
char hw_id_str[52]; char hw_id_str[52];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment