aboutsummaryrefslogtreecommitdiff
path: root/sys/pccard
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2001-05-24 04:24:22 +0000
committerWarner Losh <imp@FreeBSD.org>2001-05-24 04:24:22 +0000
commit4d5a4ec15f01c40cf8239894782fd8607e2f1596 (patch)
tree29bab1f7c270b032e0f420c430d4df06481dbab0 /sys/pccard
parent99efcc2bb9f4432d91dbee2c923450df322ae1aa (diff)
downloadsrc-4d5a4ec15f01c40cf8239894782fd8607e2f1596.tar.gz
src-4d5a4ec15f01c40cf8239894782fd8607e2f1596.zip
Do what we should have done a long time ago:
o If the class is PCIC_BRIDGE, subclass is PCIS_BRIDGE_PCMCIA and programming interface is 0, assume that it is a generic PCMCIA PCI chip we can program. I don't think there are any of these that we don't know about, but you never know. o If the class is PCIC_BRIDGE, subclass is PCIS_BRIDGE_CARDBUS and programming interface is 0, assume that it is a YENTA cardbus bridge that we know how to cope with. There are likely some cardbus bridges that haven't it made it in here yet.
Notes
Notes: svn path=/head/; revision=77110
Diffstat (limited to 'sys/pccard')
-rw-r--r--sys/pccard/pcic_pci.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c
index 9c8afb766b19..3b74304910e7 100644
--- a/sys/pccard/pcic_pci.c
+++ b/sys/pccard/pcic_pci.c
@@ -219,6 +219,8 @@ static int
pcic_pci_probe(device_t dev)
{
u_int32_t device_id;
+ u_int8_t subclass;
+ u_int8_t progif;
char *desc;
device_id = pci_get_devid(dev);
@@ -307,6 +309,14 @@ pcic_pci_probe(device_t dev)
break;
default:
+ if (pci_get_class(dev) == PCIC_BRIDGE) {
+ subclass = pci_get_subclass(dev);
+ progif = pci_get_progif(dev);
+ if (subclass == PCIS_BRIDGE_PCMCIA && progif == 0)
+ desc = "Generic PCI-PCMCIA Bridge";
+ if (subclass == PCIS_BRIDGE_CARDBUS && progif == 0)
+ desc = "YENTA PCI-CARDBUS Bridge";
+ }
break;
}