Copy manufacturer and version string into the kernel, and copy it to

the slot info.  This brings OLDCARD's API much closer to NEWCARD and
will allow moving more information into the kernel from pccard.conf
for common drivers (ed).
This commit is contained in:
imp 2002-07-22 06:46:10 +00:00
parent e73489bbe4
commit 2442eb4edd
3 changed files with 10 additions and 2 deletions

View File

@ -133,6 +133,8 @@ struct io_desc {
/*
* Device descriptor for allocation of driver.
*/
#define DEV_MISC_LEN 36
#define DEV_MAX_CIS_LEN 40
struct dev_desc {
char name[16]; /* Driver name */
int unit; /* Driver unit number */
@ -142,7 +144,9 @@ struct dev_desc {
int iosize; /* Length of I/O ports */
int irqmask; /* Interrupt number(s) to allocate */
int flags; /* Device flags */
uint8_t misc[116]; /* For any random info */
uint8_t misc[DEV_MISC_LEN]; /* For any random info */
uint8_t manufstr[DEV_MAX_CIS_LEN];
uint8_t versstr[DEV_MAX_CIS_LEN];
uint32_t manufacturer; /* Manufacturer ID */
uint32_t product; /* Product ID */
uint32_t prodext; /* Product ID (extended) */

View File

@ -224,6 +224,8 @@ allocate_driver(struct slot *slt, struct dev_desc *desc)
devi->running = 1;
devi->slt = slt;
bcopy(desc->misc, devi->misc, sizeof(desc->misc));
strcpy(devi->manufstr, desc->manufstr);
strcpy(devi->versstr, desc->versstr);
devi->manufacturer = desc->manufacturer;
devi->product = desc->product;
devi->prodext = desc->prodext;

View File

@ -88,7 +88,9 @@ struct slot_ctrl {
struct pccard_devinfo {
uint8_t name[128];
int running; /* Current state of driver */
uint8_t misc[116]; /* For any random info */
uint8_t misc[DEV_MISC_LEN]; /* For any random info */
uint8_t manufstr[DEV_MAX_CIS_LEN];
uint8_t versstr[DEV_MAX_CIS_LEN];
uint32_t manufacturer; /* Manufacturer ID */
uint32_t product; /* Product ID */
uint32_t prodext; /* Product ID (extended) */