summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_em.c
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2011-04-05 20:24:32 +0000
committerjsg <jsg@openbsd.org>2011-04-05 20:24:32 +0000
commit99d285a5a71f5f3ad19b37ab4f80ef226310f85b (patch)
treec9d849701c49cfd1d7073e1d2f4eeca99e6e82d8 /sys/dev/pci/if_em.c
parentwd_hibernate_io() is a standalone disk io writer which tries to not (diff)
downloadwireguard-openbsd-99d285a5a71f5f3ad19b37ab4f80ef226310f85b.tar.xz
wireguard-openbsd-99d285a5a71f5f3ad19b37ab4f80ef226310f85b.zip
We only use the io space in em_reset_hw() on a few MAC types
and it does not exist at all on newer hardware so only map it on those types we are interested in. Fixes "PRO/1000 PT (82575EB)" for Sylvain Desveaux and will also be required for at least 82580. ok claudio@
Diffstat (limited to 'sys/dev/pci/if_em.c')
-rw-r--r--sys/dev/pci/if_em.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index db15c098ebe..3f64601240b 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.252 2011/04/05 18:01:21 henning Exp $ */
+/* $OpenBSD: if_em.c,v 1.253 2011/04/05 20:24:32 jsg Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -1557,7 +1557,13 @@ em_allocate_pci_resources(struct em_softc *sc)
return (ENXIO);
}
- if (sc->hw.mac_type > em_82543) {
+ switch (sc->hw.mac_type) {
+ case em_82544:
+ case em_82540:
+ case em_82545:
+ case em_82546:
+ case em_82541:
+ case em_82541_rev_2:
/* Figure out where our I/O BAR is ? */
for (rid = PCI_MAPREG_START; rid < PCI_MAPREG_END;) {
val = pci_conf_read(pa->pa_pc, pa->pa_tag, rid);
@@ -1579,6 +1585,9 @@ em_allocate_pci_resources(struct em_softc *sc)
}
sc->hw.io_base = 0;
+ break;
+ default:
+ break;
}
/* for ICH8 and family we need to find the flash memory */