Ramkrishna Vepa wrote:
- Added check to return from the traffic handling function, if the card status is DOWN.

Signed-off-by: Sivakumar Subramani <[EMAIL PROTECTED]>
Signed-off-by: Santosh Rastapur <[EMAIL PROTECTED]>
Signed-off-by: Ramkrishna Vepa <[EMAIL PROTECTED]>
---
diff -Nurp patch3/drivers/net/s2io.c patch4/drivers/net/s2io.c
--- patch3/drivers/net/s2io.c   2007-08-15 08:57:32.000000000 -0700
+++ patch4/drivers/net/s2io.c   2007-08-15 08:42:14.000000000 -0700
@@ -2927,6 +2927,11 @@ static int s2io_poll(struct net_device *
        int i;
atomic_inc(&nic->isr_cnt);
+       if (unlikely(atomic_read(&nic->card_state) == CARD_DOWN)) {
+               atomic_dec(&nic->isr_cnt);
+               return IRQ_NONE;
+       }
+
        mac_control = &nic->mac_control;
        config = &nic->config;

invalid return value, for this function

Overall, this looks quite racy -- why does the card state differ from net_device state in the first place?

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to