]> git.baikalelectronics.ru Git - kernel.git/commit
bna: MBOX IRQ Flag Check after Locking
authorRasesh Mody <rmody@brocade.com>
Tue, 30 Aug 2011 15:27:45 +0000 (15:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Sep 2011 19:36:33 +0000 (15:36 -0400)
commit123d2b4f51e773e62fb3bb73869f0054a6083ce0
tree744b2abe6cde55f5049f8eafe75c3bfa93dd2f82
parent1cea2cb0d6be98e5f89f9411475d2c37b3188957
bna: MBOX IRQ Flag Check after Locking

Change details:
 - Check the BNAD_RF_MBOX_IRQ_DISABLED flag after acquiring the bna_lock,
   since checking the flag and executing bna_mbox_handler needs to be atomic.
   If not, it opens up window where flag is reset when it was checked, but got
   set while spinning on the lock by the other thread which is actually
   holding the lock

Signed-off-by: Gurunatha Karaje <gkaraje@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/brocade/bna/bnad.c