diff options
author | imp <imp@FreeBSD.org> | 2001-07-27 07:14:12 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-07-27 07:14:12 +0000 |
commit | 3e6aed8fdce718dceb09e51b82d2eec614603224 (patch) | |
tree | 7aec46dc0cbd93a2b4f64bec1ac9e04c88808dc7 /sys/pccard/pcic_pci.c | |
parent | 98c03bcff22374087c3ca7f5c9afdebe1518d1ef (diff) | |
download | FreeBSD-src-3e6aed8fdce718dceb09e51b82d2eec614603224.zip FreeBSD-src-3e6aed8fdce718dceb09e51b82d2eec614603224.tar.gz |
Give hopefully better diagnostics about the card types we reject.
Diffstat (limited to 'sys/pccard/pcic_pci.c')
-rw-r--r-- | sys/pccard/pcic_pci.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c index f6080fb..71575d2 100644 --- a/sys/pccard/pcic_pci.c +++ b/sys/pccard/pcic_pci.c @@ -355,6 +355,20 @@ pcic_pci_ricoh_init(device_t dev, int old) } } +static const char * +pcic_pci_cardtype(u_int32_t stat) +{ + if (stat & CB_SS_NOTCARD) + return ("Cardtype unrecognized by bridge"); + if ((stat & (CB_SS_16BIT | CB_SS_CB)) == (CB_SS_16BIT | CB_SS_CB)) + return ("16-bit and 32-bit (can't happen)"); + if (stat & CB_SS_16BIT) + return ("16-bit pccard"); + if (stat & CB_SS_CB) + return ("32-bit cardbus"); + return ("none (can't happen)"); +} + static void pcic_cd_event(void *arg) { @@ -366,8 +380,8 @@ pcic_cd_event(void *arg) device_printf(sc->dev, "debounced state is 0x%x\n", stat); if ((stat & CB_SS_CD) == 0) { if ((stat & CB_SS_16BIT) == 0) - device_printf(sp->sc->dev, - "Unsupported card type inserted\n"); + device_printf(sp->sc->dev, "Unsupported card: %s\n", + pcic_pci_cardtype(stat)); else pccard_event(sp->slt, card_inserted); } else { |