aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2011-07-20 06:20:55 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-03 14:40:46 -0400
commit352d0ff21f7a8ce23b0a70a80cd61e5ae566fe60 (patch)
treeccdb8996159842aabf477d1a134854a706965f67
parentf7838b55dc1708fa0bc3170851cddc3d900c310b (diff)
tg3: Fix int selftest for recent devices.
commit 3aa1cdf87c0b3f2345e75c474acc32ebbf0a4724 upstream. This patch fixes interrupt selftest failures for recent devices (57765, 5717, 5718. 5719, 5720) by disabling MSI one-shot mode and applying the status tag workaround to the selftest code. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/net/tg3.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 122bde5bb5a..38f68594f76 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -8982,7 +8982,7 @@ static int tg3_test_interrupt(struct tg3 *tp)
8982 * Turn off MSI one shot mode. Otherwise this test has no 8982 * Turn off MSI one shot mode. Otherwise this test has no
8983 * observable way to know whether the interrupt was delivered. 8983 * observable way to know whether the interrupt was delivered.
8984 */ 8984 */
8985 if (tg3_flag(tp, 57765_PLUS) && tg3_flag(tp, USING_MSI)) { 8985 if (tg3_flag(tp, 57765_PLUS)) {
8986 val = tr32(MSGINT_MODE) | MSGINT_MODE_ONE_SHOT_DISABLE; 8986 val = tr32(MSGINT_MODE) | MSGINT_MODE_ONE_SHOT_DISABLE;
8987 tw32(MSGINT_MODE, val); 8987 tw32(MSGINT_MODE, val);
8988 } 8988 }
@@ -9010,6 +9010,10 @@ static int tg3_test_interrupt(struct tg3 *tp)
9010 break; 9010 break;
9011 } 9011 }
9012 9012
9013 if (tg3_flag(tp, 57765_PLUS) &&
9014 tnapi->hw_status->status_tag != tnapi->last_tag)
9015 tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24);
9016
9013 msleep(10); 9017 msleep(10);
9014 } 9018 }
9015 9019
@@ -9024,7 +9028,7 @@ static int tg3_test_interrupt(struct tg3 *tp)
9024 9028
9025 if (intr_ok) { 9029 if (intr_ok) {
9026 /* Reenable MSI one shot mode. */ 9030 /* Reenable MSI one shot mode. */
9027 if (tg3_flag(tp, 57765_PLUS) && tg3_flag(tp, USING_MSI)) { 9031 if (tg3_flag(tp, 57765_PLUS)) {
9028 val = tr32(MSGINT_MODE) & ~MSGINT_MODE_ONE_SHOT_DISABLE; 9032 val = tr32(MSGINT_MODE) & ~MSGINT_MODE_ONE_SHOT_DISABLE;
9029 tw32(MSGINT_MODE, val); 9033 tw32(MSGINT_MODE, val);
9030 } 9034 }