diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-04-13 14:44:42 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-04-13 14:44:42 +0000 |
commit | 5ad6ade5e85987b54b0e14483b27ed413a39ff2d (patch) | |
tree | 994b39a0991f3c1555628c557e4dc57865e79b78 /sys/dev/pci | |
parent | 05c098915e64978c768534c33db5f8902e731788 (diff) |
The integrated Atheros NICs found in IBM/Lenovo ThinkPads use the same
device ID for old AR5212-based 32bit and new AR5424-based 64bit (PCI
Express Mini Card) interfaces. Use an extra check to look if the card
is 64bit and attach it as a single chip device. This prevents a panic
when attaching the device on some laptops like the T60.
Tested on a T42 (old AR5212 Mini PCI interface),
Tested on a T60 (new AR5424 Mini Card interface)
Nevertheless, the AR5424 does not work yet.
Thanks to Stefan Konrath
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_ath_pci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/if_ath_pci.c b/sys/dev/pci/if_ath_pci.c index 190fbc74c24..3da62148cd2 100644 --- a/sys/dev/pci/if_ath_pci.c +++ b/sys/dev/pci/if_ath_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ath_pci.c,v 1.13 2006/08/03 02:29:33 brad Exp $ */ +/* $OpenBSD: if_ath_pci.c,v 1.14 2007/04/13 14:44:41 reyk Exp $ */ /* $NetBSD: if_ath_pci.c,v 1.7 2004/06/30 05:58:17 mycroft Exp $ */ /*- @@ -148,6 +148,8 @@ ath_pci_attach(struct device *parent, struct device *self, void *aux) printf(": bad PCI register type %d\n", (int)mem_type); goto bad; } + if (mem_type == PCI_MAPREG_MEM_TYPE_64BIT) + sc->sc_64bit = 1; if (pci_mapreg_map(pa, ATH_BAR0, mem_type, 0, &iot, &ioh, NULL, NULL, 0)) { printf(": cannot map register space\n"); |