Date: Mon, 3 Nov 2008 06:06:22 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r184581 - head/sys/dev/cardbus Message-ID: <200811030606.mA366Mlf058286@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Mon Nov 3 06:06:22 2008 New Revision: 184581 URL: http://svn.freebsd.org/changeset/base/184581 Log: Use child (the card) in preference to cbdev (the bridge) when allocating resources to read the CIS. I'm not sure when this changed, but it is totally wrong. Also, add a minor improvement to the debugging. This should help everybody trying to run dumpcis on atheros wireless card as well. MFC after: 2 days Modified: head/sys/dev/cardbus/cardbus_cis.c Modified: head/sys/dev/cardbus/cardbus_cis.c ============================================================================== --- head/sys/dev/cardbus/cardbus_cis.c Mon Nov 3 05:53:10 2008 (r184580) +++ head/sys/dev/cardbus/cardbus_cis.c Mon Nov 3 06:06:22 2008 (r184581) @@ -511,7 +511,7 @@ cardbus_read_tuple_init(device_t cbdev, device_printf(cbdev, "Bad header in rom %d: " "[%x] %04x\n", romnum, imagebase + CARDBUS_EXROM_SIGNATURE, romsig); - bus_release_resource(cbdev, SYS_RES_MEMORY, + bus_release_resource(child, SYS_RES_MEMORY, *rid, res); *rid = 0; return (NULL); @@ -548,7 +548,7 @@ cardbus_read_tuple_init(device_t cbdev, CARDBUS_EXROM_DATA_INDICATOR) & 0x80) != 0) { device_printf(cbdev, "Cannot find CIS in " "Option ROM\n"); - bus_release_resource(cbdev, SYS_RES_MEMORY, + bus_release_resource(child, SYS_RES_MEMORY, *rid, res); *rid = 0; return (NULL); @@ -559,6 +559,8 @@ cardbus_read_tuple_init(device_t cbdev, } else { *start = *start & PCIM_CIS_ADDR_MASK; } + if (cardbus_cis_debug) + device_printf(cbdev, "CIS offset is %#x\n", *start); return (res); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811030606.mA366Mlf058286>