Skip to content

Commit

Permalink
enic: do notify_check before returning credits
Browse files Browse the repository at this point in the history
We should complete notify_check before returning the credits. Once we return the
credits, adaptor may access the notify data.

Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sujith Sankar authored and David S. Miller committed Feb 27, 2015
1 parent 31639b9 commit 2b0c2e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/cisco/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ static irqreturn_t enic_isr_legacy(int irq, void *data)
}

if (ENIC_TEST_INTR(pba, notify_intr)) {
vnic_intr_return_all_credits(&enic->intr[notify_intr]);
enic_notify_check(enic);
vnic_intr_return_all_credits(&enic->intr[notify_intr]);
}

if (ENIC_TEST_INTR(pba, err_intr)) {
Expand Down Expand Up @@ -346,8 +346,8 @@ static irqreturn_t enic_isr_msix_notify(int irq, void *data)
struct enic *enic = data;
unsigned int intr = enic_msix_notify_intr(enic);

vnic_intr_return_all_credits(&enic->intr[intr]);
enic_notify_check(enic);
vnic_intr_return_all_credits(&enic->intr[intr]);

return IRQ_HANDLED;
}
Expand Down

0 comments on commit 2b0c2e2

Please sign in to comment.