]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
tg3: Fix tx mailbox initialization
authorMatt Carlson <mcarlson@broadcom.com>
Wed, 20 Jan 2010 16:58:08 +0000 (16:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Jan 2010 03:21:01 +0000 (19:21 -0800)
If a device supports MSI-X interrupts, the driver assumes TSS will be
available.  This is not true for the 57765.  This patch changes the code
so that only the default tx mailbox is initialized if TSS is not
available.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c

index 72d1e18a152c6a4fe6aabfadffb99907fdfde34e..dffa51a4aafb8d20c6f8b282a2eac23e5870a8e3 100644 (file)
@@ -7440,10 +7440,13 @@ static void tg3_rings_reset(struct tg3 *tp)
                for (i = 1; i < TG3_IRQ_MAX_VECS; i++) {
                        tp->napi[i].tx_prod = 0;
                        tp->napi[i].tx_cons = 0;
-                       tw32_mailbox(tp->napi[i].prodmbox, 0);
+                       if (tp->tg3_flags3 & TG3_FLG3_ENABLE_TSS)
+                               tw32_mailbox(tp->napi[i].prodmbox, 0);
                        tw32_rx_mbox(tp->napi[i].consmbox, 0);
                        tw32_mailbox_f(tp->napi[i].int_mbox, 1);
                }
+               if (!(tp->tg3_flags3 & TG3_FLG3_ENABLE_TSS))
+                       tw32_mailbox(tp->napi[0].prodmbox, 0);
        } else {
                tp->napi[0].tx_prod = 0;
                tp->napi[0].tx_cons = 0;