libata: fix ata_piix on ICH6R in RAID mode
PATCH 1/1 libata: fix ata_piix on ICH6R in RAID mode
Jeff,
Here is the cleaned up patch (as you suggested) that enables ata_piix to work in RAID mode on ICH6R. I tested it and it seems to behave correctly
in all the modes---sees all 4 disks in IDE and RAID modes, doesn't see any in Compatibility mode (which is right, because only two are available and the regular IDE driver has picked them up already).
Signed-off-by Martins Krikis <[email protected]>
drivers/scsi/libata-core.c +2 -1
@@ -3597,7 +3597,8 @@ int ata_pci_init_one (struct pci_dev *pdelse port[1 ] = port[0 ]; -if ((port[0 ]->host_flags &ATA_FLAG_NO_LEGACY ) ==0 ) { +if ((port[0 ]->host_flags &ATA_FLAG_NO_LEGACY ) ==0 + && (pdev->class >>8 ) ==PCI_CLASS_STORAGE_IDE ) {/* TODO: support transitioning to native mode? */ pci_read_config_byte (pdev,PCI_CLASS_PROG , &tmp8); mask = (1 <<2 ) | (1 <<0 );
Jeff Garzik
Applieddrivers/scsi/libata-core.c int ata_pci_init_one (struct pci_dev *pd · line 3604
Quoted 12 lines · Martins Krikis
drivers/scsi/libata-core.c +2
-1@@ -3597,7 +3597,8 @@ int ata_pci_init_one (struct pci_dev *pdelse port[1 ] = port[0 ]; -if ((port[0 ]->host_flags &ATA_FLAG_NO_LEGACY ) ==0 ) { +if ((port[0 ]->host_flags &ATA_FLAG_NO_LEGACY ) ==0 + && (pdev->class >>8 ) ==PCI_CLASS_STORAGE_IDE ) {/* TODO: support transitioning to native mode? */ pci_read_config_byte (pdev,PCI_CLASS_PROG , &tmp8); mask = (1 <<2 ) | (1 <<0 );
applied