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)
commitdfee325ad23ff4714981c9d2a4df6386493a4475
tree744b2abe6cde55f5049f8eafe75c3bfa93dd2f82
parent761fab374e5b8efa6f7a8650ff546905578a482d
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