diff options
author | imp <imp@FreeBSD.org> | 2005-02-20 20:36:16 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-02-20 20:36:16 +0000 |
commit | 9d270f8af45547e7ddbdd43f96ea5723477469ed (patch) | |
tree | 1c3d751cca55bea6f4bf4e3099a0fffa655a0933 /sys | |
parent | 3f8cddbc1346a369e74fe02babb763bc256ed860 (diff) | |
download | FreeBSD-src-9d270f8af45547e7ddbdd43f96ea5723477469ed.zip FreeBSD-src-9d270f8af45547e7ddbdd43f96ea5723477469ed.tar.gz |
Be more verbose on errors with CIS reading. This should be a noop, but
appears to fix the ath problem that had been reported. I don't see how
it can, so there's likely some other hidden bug.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/cardbus/cardbus_cis.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c index f7ee22e..e44d69c 100644 --- a/sys/dev/cardbus/cardbus_cis.c +++ b/sys/dev/cardbus/cardbus_cis.c @@ -402,9 +402,8 @@ decode_tuple_end(device_t cbdev, device_t child, int id, int len, uint8_t *tupledata, uint32_t start, uint32_t *off, struct tuple_callbacks *info) { - if (cardbus_cis_debug) { + if (cardbus_cis_debug) printf("CIS reading done\n"); - } return (0); } @@ -659,12 +658,16 @@ cardbus_parse_cis(device_t cbdev, device_t child, bzero(tupledata, MAXTUPLESIZE); expect_linktarget = TRUE; - if ((start = pci_read_config(child, CARDBUS_CIS_REG, 4)) == 0) + if ((start = pci_read_config(child, CARDBUS_CIS_REG, 4)) == 0) { + device_printf(cbdev, "CIS pointer is 0!\n"); return (ENXIO); + } off = 0; res = cardbus_read_tuple_init(cbdev, child, &start, &rid); - if (res == NULL) + if (res == NULL) { + device_printf(cbdev, "Unable to allocate resources for CIS\n"); return (ENXIO); + } do { if (0 != cardbus_read_tuple(cbdev, child, res, start, &off, @@ -683,6 +686,8 @@ cardbus_parse_cis(device_t cbdev, device_t child, expect_linktarget = decode_tuple(cbdev, child, tupleid, len, tupledata, start, &off, callbacks); if (expect_linktarget != 0) { + device_printf(cbdev, "Parsing failed with %d\n", + expect_linktarget); cardbus_read_tuple_finish(cbdev, child, rid, res); return (expect_linktarget); } |