summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-09-17 00:47:41 +0000
committerwpaul <wpaul@FreeBSD.org>1999-09-17 00:47:41 +0000
commit2600195b6aa16ae0dd89bbb61802b1058238e31e (patch)
tree6d5286886ab75a650d298946b40e0e8d3011a0c2 /sys
parenta12ece1af8e8a375973b5cd4ea60516c4e61a819 (diff)
downloadFreeBSD-src-2600195b6aa16ae0dd89bbb61802b1058238e31e.zip
FreeBSD-src-2600195b6aa16ae0dd89bbb61802b1058238e31e.tar.gz
Fix sf_probe() to detect the card type properly. I botched the reading
of the subsystem ID when I converted to newbus. The driver still detects the chipset and still works but fails to identify the exact card.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sf/if_sf.c4
-rw-r--r--sys/pci/if_sf.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c
index e6c0b98..35d6f29 100644
--- a/sys/dev/sf/if_sf.c
+++ b/sys/dev/sf/if_sf.c
@@ -604,8 +604,8 @@ static int sf_probe(dev)
while(t->sf_name != NULL) {
if ((pci_get_vendor(dev) == t->sf_vid) &&
(pci_get_device(dev) == t->sf_did)) {
- switch(pci_read_config(dev,
- SF_PCI_SUBVEN_ID >> 16, 4) & 0x8FFF) {
+ switch((pci_read_config(dev,
+ SF_PCI_SUBVEN_ID, 4) >> 16) & 0xFFFF) {
case AD_SUBSYSID_62011_REV0:
case AD_SUBSYSID_62011_REV1:
device_set_desc(dev,
diff --git a/sys/pci/if_sf.c b/sys/pci/if_sf.c
index e6c0b98..35d6f29 100644
--- a/sys/pci/if_sf.c
+++ b/sys/pci/if_sf.c
@@ -604,8 +604,8 @@ static int sf_probe(dev)
while(t->sf_name != NULL) {
if ((pci_get_vendor(dev) == t->sf_vid) &&
(pci_get_device(dev) == t->sf_did)) {
- switch(pci_read_config(dev,
- SF_PCI_SUBVEN_ID >> 16, 4) & 0x8FFF) {
+ switch((pci_read_config(dev,
+ SF_PCI_SUBVEN_ID, 4) >> 16) & 0xFFFF) {
case AD_SUBSYSID_62011_REV0:
case AD_SUBSYSID_62011_REV1:
device_set_desc(dev,
OpenPOWER on IntegriCloud