mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Delete the CIS resource after releasing it. This is needed when the CIS is
stored in a BAR since the CIS BAR is mapped before the PCI bus driver enumerates all the BARs. Without this change, the PCI bus driver would attempt to initialize a BAR that was already allocated resulting in a panic.
This commit is contained in:
parent
4e8790e943
commit
767dff0ac9
1 changed files with 3 additions and 2 deletions
|
|
@ -430,6 +430,7 @@ cardbus_read_tuple_finish(device_t cbdev, device_t child, int rid,
|
|||
{
|
||||
if (res != CIS_CONFIG_SPACE) {
|
||||
bus_release_resource(child, SYS_RES_MEMORY, rid, res);
|
||||
bus_delete_resource(child, SYS_RES_MEMORY, rid);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -492,8 +493,8 @@ cardbus_read_tuple_init(device_t cbdev, device_t child, uint32_t *start,
|
|||
device_printf(cbdev, "Bad header in rom %d: "
|
||||
"[%x] %04x\n", romnum, imagebase +
|
||||
CARDBUS_EXROM_SIGNATURE, romsig);
|
||||
bus_release_resource(child, SYS_RES_MEMORY,
|
||||
*rid, res);
|
||||
cardbus_read_tuple_finish(cbdev, child, *rid,
|
||||
res);
|
||||
*rid = 0;
|
||||
return (NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue