diff options
author | shiba <shiba@FreeBSD.org> | 2002-02-20 14:42:36 +0000 |
---|---|---|
committer | shiba <shiba@FreeBSD.org> | 2002-02-20 14:42:36 +0000 |
commit | fd71244d4b7f4b44a0cc69c193fe4064d97adf47 (patch) | |
tree | dfa211dff55bb9075ad16105da1c600463b31d45 /sys/pccard | |
parent | 33bb91ea16ef866fdc680ac6f22559b43aa2ecfc (diff) | |
download | FreeBSD-src-fd71244d4b7f4b44a0cc69c193fe4064d97adf47.zip FreeBSD-src-fd71244d4b7f4b44a0cc69c193fe4064d97adf47.tar.gz |
Add some code which is compatible for NEWCARD. It makes manufacturer
id transfer from pccardd.
Reviewed by: imp
Diffstat (limited to 'sys/pccard')
-rw-r--r-- | sys/pccard/cardinfo.h | 3 | ||||
-rw-r--r-- | sys/pccard/pccard.c | 3 | ||||
-rw-r--r-- | sys/pccard/pccard_nbk.c | 9 | ||||
-rw-r--r-- | sys/pccard/slot.h | 3 |
4 files changed, 18 insertions, 0 deletions
diff --git a/sys/pccard/cardinfo.h b/sys/pccard/cardinfo.h index 834fe73..0984aed 100644 --- a/sys/pccard/cardinfo.h +++ b/sys/pccard/cardinfo.h @@ -142,6 +142,9 @@ struct dev_desc { int iosize; /* Length of I/O ports */ int irqmask; /* Interrupt number(s) to allocate */ int flags; /* Device flags */ + u_int manufacturer; /* Manufacturer ID */ + u_int product; /* Product ID */ + u_int prodext; /* Product ID (extended) */ u_char misc[128]; /* For any random info */ }; #define DEV_DESC_HAS_SIZE 1 diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 4aece9c..992f4d1 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -234,6 +234,9 @@ allocate_driver(struct slot *slt, struct dev_desc *desc) devi->running = 1; devi->slt = slt; bcopy(desc->misc, devi->misc, sizeof(desc->misc)); + devi->manufacturer = desc->manufacturer; + devi->product = desc->product; + devi->prodext = desc->prodext; resource_list_init(&devi->resources); child = device_add_child(pccarddev, devi->name, desc->unit); if (child == NULL) { diff --git a/sys/pccard/pccard_nbk.c b/sys/pccard/pccard_nbk.c index 1f64755..2559220 100644 --- a/sys/pccard/pccard_nbk.c +++ b/sys/pccard/pccard_nbk.c @@ -308,6 +308,15 @@ pccard_read_ivar(device_t bus, device_t child, int which, uintptr_t *result) case PCCARD_IVAR_ETHADDR: bcopy(devi->misc, result, ETHER_ADDR_LEN); return (0); + case PCCARD_IVAR_VENDOR: + *(u_int32_t *) result = devi->manufacturer; + return (0); + case PCCARD_IVAR_PRODUCT: + *(u_int32_t *) result = devi->product; + return (0); + case PCCARD_IVAR_PRODEXT: + *(u_int16_t *) result = devi->prodext; + return (0); } return (ENOENT); } diff --git a/sys/pccard/slot.h b/sys/pccard/slot.h index 7d44390..ebbec57 100644 --- a/sys/pccard/slot.h +++ b/sys/pccard/slot.h @@ -89,6 +89,9 @@ struct pccard_devinfo { u_char name[128]; int running; /* Current state of driver */ u_char misc[128]; /* For any random info */ + u_int manufacturer; /* Manufacturer ID */ + u_int product; /* Product ID */ + u_int prodext; /* Product ID (extended) */ struct slot *slt; /* Back pointer to slot */ struct resource_list resources; |