Module Name: src Committed By: martin Date: Sat Mar 26 13:41:16 UTC 2022
Modified Files: src/sys/dev/cardbus: cardbus.c Log Message: When reading CIS tuples from a BAR, do not blindly copy 2k of data (or to the end of the BAR space), but instead follow the tuples and stop reading once we reach the end of the list. I have a card bwi0 at cardbus0 function 0: Broadcom Wireless bwi0: BBP id 0x4306, BBP rev 0x2, BBP pkg 0 where the BAR claims 8k space but seems to only implement 6k (but that is impossible to report as the spec only allows 2^n sizes) and the CIS starts at a bit over 4k (so the old code tried reading beyound the 6k limit and caused pci bus errors). An alternative would be to avoid reporting bus errors during this access, but since we are only interested in the CIS chain anyway (and that ends way earlier) this is a simpler solution. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/dev/cardbus/cardbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.