summaryrefslogtreecommitdiffstats
path: root/drivers/net/pcnet32.c
diff options
context:
space:
mode:
authorDon Fry <brazilnut@us.ibm.com>2005-11-01 22:13:35 +0100
committerJeff Garzik <jgarzik@pobox.com>2005-11-05 20:40:55 +0100
commit4371dc6c60705815dcfe0c2979f68a26d0b27bd4 (patch)
tree75a5ca9f987603b20b05fb718324e5edd7165a3e /drivers/net/pcnet32.c
parent[PATCH] pcnet32: AT2700/2701 and Bugzilla 2699 & 4551 (diff)
downloadlinux-4371dc6c60705815dcfe0c2979f68a26d0b27bd4.tar.xz
linux-4371dc6c60705815dcfe0c2979f68a26d0b27bd4.zip
[PATCH] pcnet32: Prevent hang with 79c976
Some boards using the 79c976 pcnet32 chip will hang the system if the ethtool --register-dump is performed with the device operational. The request to read bcr30 is retried by the PCI device infinitely without returning data, hanging the system. Tested ia32 and ppc64. Signed-off-by: Don Fry <brazilnut@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/pcnet32.c')
-rw-r--r--drivers/net/pcnet32.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index 549a07385884..be319229f543 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -988,7 +988,11 @@ static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs,
*buff++ = a->read_csr(ioaddr, 114);
/* read bus configuration registers */
- for (i=0; i<36; i++) {
+ for (i=0; i<30; i++) {
+ *buff++ = a->read_bcr(ioaddr, i);
+ }
+ *buff++ = 0; /* skip bcr30 so as not to hang 79C976 */
+ for (i=31; i<36; i++) {
*buff++ = a->read_bcr(ioaddr, i);
}