diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 532c33ca7279..ab3392930a45 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -867,6 +867,9 @@ pccard_read_ivar(device_t bus, device_t child, int which, u_char *result) case PCCARD_IVAR_PRODUCT: *(u_int32_t *) result = sc->card.product; break; + case PCCARD_IVAR_FUNCTION: + *(u_int32_t *) result = func->function; + break; case PCCARD_IVAR_FUNCTION_NUMBER: if (!func) { device_printf(bus, "No function number, bug!\n"); diff --git a/sys/dev/pccard/pccardvar.h b/sys/dev/pccard/pccardvar.h index 11e33ad53700..e53e811a563c 100644 --- a/sys/dev/pccard/pccardvar.h +++ b/sys/dev/pccard/pccardvar.h @@ -316,7 +316,8 @@ enum { PCCARD_IVAR_VENDOR_STR, /* CIS string for "Manufacturer" */ PCCARD_IVAR_PRODUCT_STR,/* CIS strnig for "Product" */ PCCARD_IVAR_CIS3_STR, - PCCARD_IVAR_CIS4_STR + PCCARD_IVAR_CIS4_STR, + PCCARD_IVAR_FUNCTION }; #define PCCARD_ACCESSOR(A, B, T) \ @@ -331,6 +332,7 @@ PCCARD_ACCESSOR(ether, ETHADDR, u_int8_t) PCCARD_ACCESSOR(vendor, VENDOR, u_int32_t) PCCARD_ACCESSOR(product, PRODUCT, u_int32_t) PCCARD_ACCESSOR(function_number,FUNCTION_NUMBER, u_int32_t) +PCCARD_ACCESSOR(function, FUNCTION, u_int32_t) PCCARD_ACCESSOR(vendor_str, VENDOR_STR, char *) PCCARD_ACCESSOR(product_str, PRODUCT_STR, char *) PCCARD_ACCESSOR(cis3_str, CIS3_STR, char *)