Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci If the extended configration size in the EXTCNFS...



details:   https://anonhg.NetBSD.org/src/rev/82c647b3f283
branches:  trunk
changeset: 361081:82c647b3f283
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Apr 12 03:13:04 2018 +0000

description:
If the extended configration size in the EXTCNFSIZE register is 0, don't
continue.

diffstat:

 sys/dev/pci/if_wm.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r be27662ff0d2 -r 82c647b3f283 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Thu Apr 12 03:09:24 2018 +0000
+++ b/sys/dev/pci/if_wm.c       Thu Apr 12 03:13:04 2018 +0000
@@ -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 @@
        
        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))



Home | Main Index | Thread Index | Old Index