summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormsaitoh <msaitoh@NetBSD.org>2018-04-12 03:13:04 +0000
committermsaitoh <msaitoh@NetBSD.org>2018-04-12 03:13:04 +0000
commitd6cd4d37f83757e879e2f20a85287db3389130d3 (patch)
tree79bb130dcb0d577181e89af3fc28ee1451a6148e /sys/dev
parent9fad7b259a3ff5a2f8407185d3ae3174716a001e (diff)
If the extended configration size in the EXTCNFSIZE register is 0, don't
continue.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_wm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/if_wm.c b/sys/dev/pci/if_wm.c
index 395283acf7f..9b435226503 100644
--- a/sys/dev/pci/if_wm.c
+++ b/sys/dev/pci/if_wm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.568 2018/04/12 03:09:24 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.569 2018/04/12 03:13:04 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.568 2018/04/12 03:09:24 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.569 2018/04/12 03:13:04 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -3931,6 +3931,8 @@ wm_init_lcd_from_nvm(struct wm_softc *sc)
reg = CSR_READ(sc, WMREG_EXTCNFSIZE);
cnf_size = __SHIFTOUT(reg, EXTCNFSIZE_LENGTH);
+ if (cnf_size == 0)
+ goto release;
if (((sc->sc_type == WM_T_PCH)
&& ((extcnfctr & EXTCNFCTR_OEM_WRITE_ENABLE) == 0))