PCI: Mask out the strict flag when checking if the added card is not on-board, fixes bridge adding.
This commit is contained in:
@@ -790,7 +790,7 @@ pci_add_card(uint8_t add_type, uint8_t (*read)(int func, int addr, void *priv),
|
||||
if (next_pci_card < PCI_CARDS_NUM) {
|
||||
dev = &pci_card_descs[next_pci_card];
|
||||
|
||||
dev->type = add_type | PCI_ADD_STRICT;
|
||||
dev->type = add_type | PCI_ADD_STRICT;
|
||||
dev->read = read;
|
||||
dev->write = write;
|
||||
dev->priv = priv;
|
||||
@@ -885,7 +885,7 @@ pci_register_cards(void)
|
||||
type = pci_card_descs[i].type;
|
||||
slot = pci_card_descs[i].slot;
|
||||
#endif
|
||||
normal = (pci_card_descs[i].type == PCI_CARD_NORMAL);
|
||||
normal = ((pci_card_descs[i].type & ~PCI_ADD_STRICT) == PCI_CARD_NORMAL);
|
||||
|
||||
/* If this is a normal card, increase the next normal card index. */
|
||||
if (normal)
|
||||
|
||||
Reference in New Issue
Block a user