diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2009-09-01 09:08:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-02 03:43:42 -0400 |
commit | 89aeb3bceaa1a02651206a76a7b9dcb8f3884702 (patch) | |
tree | ebdd17083599e5af4fa96f86668b654ace211bf3 /drivers/net/tg3.c | |
parent | f77a6a8e6cee17b21a43bdf6b853cc2fc0e2c4df (diff) |
tg3: Update intmbox and coal_now for msix
This patch fixes up two spots that need attention now that msix support
has been added.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 58a8986f3e0a..53896541f7d2 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -614,25 +614,33 @@ static void tg3_ape_unlock(struct tg3 *tp, int locknum) | |||
614 | 614 | ||
615 | static void tg3_disable_ints(struct tg3 *tp) | 615 | static void tg3_disable_ints(struct tg3 *tp) |
616 | { | 616 | { |
617 | int i; | ||
618 | |||
617 | tw32(TG3PCI_MISC_HOST_CTRL, | 619 | tw32(TG3PCI_MISC_HOST_CTRL, |
618 | (tp->misc_host_ctrl | MISC_HOST_CTRL_MASK_PCI_INT)); | 620 | (tp->misc_host_ctrl | MISC_HOST_CTRL_MASK_PCI_INT)); |
619 | tw32_mailbox_f(tp->napi[0].int_mbox, 0x00000001); | 621 | for (i = 0; i < tp->irq_max; i++) |
622 | tw32_mailbox_f(tp->napi[i].int_mbox, 0x00000001); | ||
620 | } | 623 | } |
621 | 624 | ||
622 | static void tg3_enable_ints(struct tg3 *tp) | 625 | static void tg3_enable_ints(struct tg3 *tp) |
623 | { | 626 | { |
624 | u32 coal_now; | 627 | int i; |
625 | struct tg3_napi *tnapi = &tp->napi[0]; | 628 | u32 coal_now = 0; |
629 | |||
626 | tp->irq_sync = 0; | 630 | tp->irq_sync = 0; |
627 | wmb(); | 631 | wmb(); |
628 | 632 | ||
629 | tw32(TG3PCI_MISC_HOST_CTRL, | 633 | tw32(TG3PCI_MISC_HOST_CTRL, |
630 | (tp->misc_host_ctrl & ~MISC_HOST_CTRL_MASK_PCI_INT)); | 634 | (tp->misc_host_ctrl & ~MISC_HOST_CTRL_MASK_PCI_INT)); |
631 | tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24); | 635 | |
632 | if (tp->tg3_flags2 & TG3_FLG2_1SHOT_MSI) | 636 | for (i = 0; i < tp->irq_cnt; i++) { |
637 | struct tg3_napi *tnapi = &tp->napi[i]; | ||
633 | tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24); | 638 | tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24); |
639 | if (tp->tg3_flags2 & TG3_FLG2_1SHOT_MSI) | ||
640 | tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24); | ||
634 | 641 | ||
635 | coal_now = tnapi->coal_now; | 642 | coal_now |= tnapi->coal_now; |
643 | } | ||
636 | 644 | ||
637 | /* Force an initial interrupt */ | 645 | /* Force an initial interrupt */ |
638 | if (!(tp->tg3_flags & TG3_FLAG_TAGGED_STATUS) && | 646 | if (!(tp->tg3_flags & TG3_FLAG_TAGGED_STATUS) && |