summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2004-10-14 15:27:40 +0000
committerBrad Smith <brad@cvs.openbsd.org>2004-10-14 15:27:40 +0000
commit8e6b36fe4efd197b88161ee0840b9545fec5fae4 (patch)
treefcda09097451bc407091b52fded6204c7e9f583d /sys/dev
parent676f016b28efbea1be1a46a22bf74ce906d7e360 (diff)
Bail out quietly if the eeprom appears to be missing or empty. Fixes
support for D-Link DGE-530T adapters. From: FreeBSD via Blake Willis <blake at 2112 dot net> ok mcbride@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_sk.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c
index 560e3f4d4f0..fbd10d430d9 100644
--- a/sys/dev/pci/if_sk.c
+++ b/sys/dev/pci/if_sk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sk.c,v 1.46 2004/09/23 17:45:16 brad Exp $ */
+/* $OpenBSD: if_sk.c,v 1.47 2004/10/14 15:27:39 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -348,6 +348,12 @@ sk_vpd_read(struct sk_softc *sc)
sk_vpd_read_res(sc, &res, pos);
+ /*
+ * Bail out quietly if the eeprom appears to be missing or empty.
+ */
+ if (res.vr_id == 0xff && res.vr_len == 0xff && res.vr_pad == 0xff)
+ return;
+
if (res.vr_id != VPD_RES_ID) {
printf("%s: bad VPD resource id: expected %x got %x\n",
sc->sk_dev.dv_xname, VPD_RES_ID, res.vr_id);
@@ -536,8 +542,6 @@ sk_marv_miibus_statchg(dev)
SK_YU_READ_2(((struct sk_if_softc *)dev), YUKON_GPCR)));
}
-#define XMAC_POLY 0xEDB88320
-#define GMAC_POLY 0x04C11DB7L
#define HASH_BITS 6
u_int32_t