summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authortackerman <tackerman@FreeBSD.org>2005-01-01 19:57:23 +0000
committertackerman <tackerman@FreeBSD.org>2005-01-01 19:57:23 +0000
commite6938cd35d0f3206663c11e02de0c50acddbe157 (patch)
treec10a2823c09d8129730b34aadc041ead39acd2b5 /sys/dev
parente01f208ae1e85d836cd223222bf74630a7e164cb (diff)
downloadFreeBSD-src-e6938cd35d0f3206663c11e02de0c50acddbe157.zip
FreeBSD-src-e6938cd35d0f3206663c11e02de0c50acddbe157.tar.gz
Corrected a workaround that should only be applied to one adapter. Workaround
was causing device hangs when incorrectly applied to other adapters. PR: kern/66634
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/em/if_em.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index 6cf1a7f..2b233bb 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -3005,8 +3005,20 @@ em_enable_intr(struct adapter * adapter)
static void
em_disable_intr(struct adapter *adapter)
{
- E1000_WRITE_REG(&adapter->hw, IMC,
- (0xffffffff & ~E1000_IMC_RXSEQ));
+ /*
+ * The first version of 82542 had an errata where when link was forced it
+ * would stay up even up even if the cable was disconnected. Sequence errors
+ * were used to detect the disconnect and then the driver would unforce the link.
+ * This code in the in the ISR. For this to work correctly the Sequence error
+ * interrupt had to be enabled all the time.
+ */
+
+ if (adapter->hw.mac_type == em_82542_rev2_0)
+ E1000_WRITE_REG(&adapter->hw, IMC,
+ (0xffffffff & ~E1000_IMC_RXSEQ));
+ else
+ E1000_WRITE_REG(&adapter->hw, IMC,
+ 0xffffffff);
return;
}
OpenPOWER on IntegriCloud