ixgbe: pass adapter struct instead of netdev for interrupt data
This change makes it so that we pass the adapter struct instead of the netdev for most of the basic interrupts that are not associated with q_vectors. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
c6af9c406c
commit
a65151ba20
1 changed files with 7 additions and 11 deletions
|
@ -1880,8 +1880,7 @@ static void ixgbe_check_lsc(struct ixgbe_adapter *adapter)
|
|||
|
||||
static irqreturn_t ixgbe_msix_lsc(int irq, void *data)
|
||||
{
|
||||
struct net_device *netdev = data;
|
||||
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
||||
struct ixgbe_adapter *adapter = data;
|
||||
struct ixgbe_hw *hw = &adapter->hw;
|
||||
u32 eicr;
|
||||
|
||||
|
@ -2376,7 +2375,7 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter)
|
|||
|
||||
sprintf(adapter->lsc_int_name, "%s:lsc", netdev->name);
|
||||
err = request_irq(adapter->msix_entries[vector].vector,
|
||||
ixgbe_msix_lsc, 0, adapter->lsc_int_name, netdev);
|
||||
ixgbe_msix_lsc, 0, adapter->lsc_int_name, adapter);
|
||||
if (err) {
|
||||
e_err(probe, "request_irq for msix_lsc failed: %d\n", err);
|
||||
goto free_queue_irqs;
|
||||
|
@ -2488,8 +2487,7 @@ static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter, bool queues,
|
|||
**/
|
||||
static irqreturn_t ixgbe_intr(int irq, void *data)
|
||||
{
|
||||
struct net_device *netdev = data;
|
||||
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
||||
struct ixgbe_adapter *adapter = data;
|
||||
struct ixgbe_hw *hw = &adapter->hw;
|
||||
struct ixgbe_q_vector *q_vector = adapter->q_vector[0];
|
||||
u32 eicr;
|
||||
|
@ -2586,10 +2584,10 @@ static int ixgbe_request_irq(struct ixgbe_adapter *adapter)
|
|||
err = ixgbe_request_msix_irqs(adapter);
|
||||
} else if (adapter->flags & IXGBE_FLAG_MSI_ENABLED) {
|
||||
err = request_irq(adapter->pdev->irq, ixgbe_intr, 0,
|
||||
netdev->name, netdev);
|
||||
netdev->name, adapter);
|
||||
} else {
|
||||
err = request_irq(adapter->pdev->irq, ixgbe_intr, IRQF_SHARED,
|
||||
netdev->name, netdev);
|
||||
netdev->name, adapter);
|
||||
}
|
||||
|
||||
if (err)
|
||||
|
@ -2600,15 +2598,13 @@ static int ixgbe_request_irq(struct ixgbe_adapter *adapter)
|
|||
|
||||
static void ixgbe_free_irq(struct ixgbe_adapter *adapter)
|
||||
{
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
|
||||
if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
|
||||
int i, q_vectors;
|
||||
|
||||
q_vectors = adapter->num_msix_vectors;
|
||||
|
||||
i = q_vectors - 1;
|
||||
free_irq(adapter->msix_entries[i].vector, netdev);
|
||||
free_irq(adapter->msix_entries[i].vector, adapter);
|
||||
|
||||
i--;
|
||||
for (; i >= 0; i--) {
|
||||
|
@ -2623,7 +2619,7 @@ static void ixgbe_free_irq(struct ixgbe_adapter *adapter)
|
|||
|
||||
ixgbe_reset_q_vectors(adapter);
|
||||
} else {
|
||||
free_irq(adapter->pdev->irq, netdev);
|
||||
free_irq(adapter->pdev->irq, adapter);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue