Make legacy ATA emulation detection more strict. This should fix false
positive legacy detection and attach failure/panic for Marvell 88SX6141 controller and potentially some others. PR: kern/145064
This commit is contained in:
parent
ea168d383d
commit
e064bdc08a
@ -769,7 +769,8 @@ DRIVER_MODULE(ata, atapci, ata_pcichannel_driver, ata_devclass, 0, 0);
|
||||
int
|
||||
ata_legacy(device_t dev)
|
||||
{
|
||||
return (((pci_read_config(dev, PCIR_PROGIF, 1)&PCIP_STORAGE_IDE_MASTERDEV)&&
|
||||
return (((pci_read_config(dev, PCIR_SUBCLASS, 1) == PCIS_STORAGE_IDE) &&
|
||||
(pci_read_config(dev, PCIR_PROGIF, 1)&PCIP_STORAGE_IDE_MASTERDEV)&&
|
||||
((pci_read_config(dev, PCIR_PROGIF, 1) &
|
||||
(PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC)) !=
|
||||
(PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC))) ||
|
||||
|
Loading…
Reference in New Issue
Block a user