summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>2001-09-15 10:18:56 +0000
committeryokota <yokota@FreeBSD.org>2001-09-15 10:18:56 +0000
commit613cff6e43604342d100252952b637ab6cfbef05 (patch)
tree92c2431e88292567e6f37868d51bd998fc2e4bd3 /sys/isa
parentfc0a6c1596965169eaaf0434848132a546dc2b8a (diff)
downloadFreeBSD-src-613cff6e43604342d100252952b637ab6cfbef05.zip
FreeBSD-src-613cff6e43604342d100252952b637ab6cfbef05.tar.gz
Handle "identifier strings" right. Each ISA PnP card must have a
mandatory "card" identifier string. A logical devices on the ISA PnP card may optionally have a "device" identifier string. Do not confuse them. The "card" identifier string is assigned to a logical device as the default description string when the device is found. (If the "card" identifier string has not been found, use the EISA PnP ID string. Strictly speaking, this is an error.) We will override it when a "device" identifier string is found later.
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/pnp.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/isa/pnp.c b/sys/isa/pnp.c
index de37620..bf7ca97 100644
--- a/sys/isa/pnp.c
+++ b/sys/isa/pnp.c
@@ -513,6 +513,15 @@ pnp_create_devices(device_t parent, pnp_id *p, int csn,
scanning -= large_len;
if (PNP_LRES_NUM(tag) == PNP_TAG_ID_ANSI) {
+ if (dev) {
+ /*
+ * This is an optional device
+ * indentifier string. Skipt it
+ * for now.
+ */
+ continue;
+ }
+ /* else mandately card identifier string */
if (large_len > sizeof(buf) - 1)
large_len = sizeof(buf) - 1;
bcopy(resinfo, buf, large_len);
@@ -524,8 +533,6 @@ pnp_create_devices(device_t parent, pnp_id *p, int csn,
large_len--;
buf[large_len] = '\0';
desc = buf;
- if (dev)
- device_set_desc_copy(dev, desc);
continue;
}
@@ -565,6 +572,9 @@ pnp_create_devices(device_t parent, pnp_id *p, int csn,
dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNP, NULL, -1);
if (desc)
device_set_desc_copy(dev, desc);
+ else
+ device_set_desc_copy(dev,
+ pnp_eisaformat(logical_id));
isa_set_vendorid(dev, p->vendor_id);
isa_set_serial(dev, p->serial);
isa_set_logicalid(dev, logical_id);
OpenPOWER on IntegriCloud