Module Name: src
Committed By: jmcneill
Date: Mon Oct 18 11:36:12 UTC 2021
Modified Files:
src/sys/dev/pci: if_wm.c
Log Message:
Only print an error about missing I/O BARs for chips that need it.
To generate a diff of this commit:
cvs rdiff -u -r1.708 -r1.709 src/sys/dev/pci/if_wm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.708 src/sys/dev/pci/if_wm.c:1.709
--- src/sys/dev/pci/if_wm.c:1.708 Wed Oct 13 08:12:36 2021
+++ src/sys/dev/pci/if_wm.c Mon Oct 18 11:36:11 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.708 2021/10/13 08:12:36 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.709 2021/10/18 11:36:11 jmcneill Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.708 2021/10/13 08:12:36 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.709 2021/10/18 11:36:11 jmcneill Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -2016,7 +2016,12 @@ wm_attach(device_t parent, device_t self
* this driver) to use it for normal operation, though it is
* required to work around bugs in some chip versions.
*/
- if (sc->sc_type >= WM_T_82544) {
+ switch (sc->sc_type) {
+ case WM_T_82544:
+ case WM_T_82541:
+ case WM_T_82541_2:
+ case WM_T_82547:
+ case WM_T_82547_2:
/* First we have to find the I/O BAR. */
for (i = PCI_MAPREG_START; i < PCI_MAPREG_END; i += 4) {
memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, i);
@@ -2049,7 +2054,9 @@ wm_attach(device_t parent, device_t self
aprint_error_dev(sc->sc_dev,
"WARNING: unable to map I/O space\n");
}
-
+ break;
+ default:
+ break;
}
/* Enable bus mastering. Disable MWI on the i82542 2.0. */