[PATCH] libata: fix ata_piix on ICH6R in RAID mode

Linux Kernel Mailing List <[email protected]>
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
ChangeSet 1.1549, 2005/02/06 00:06:58-05:00, [email protected]

	[PATCH] libata: fix ata_piix on ICH6R in RAID mode
	
	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).
	
	
	Change description:  only test for PCI IDE legacy mode, via the
	PCI programming interface register, if the PCI device is of class
	PCI_CLASS_STORAGE_IDE.
	
	
	Signed-off-by: Martins Krikis <[email protected]>
	Signed-off-by: Jeff Garzik <[email protected]>



 libata-core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c	2005-02-07 13:04:07 -08:00
+++ b/drivers/scsi/libata-core.c	2005-02-07 13:04:07 -08:00
@@ -3684,7 +3684,8 @@
 	else
 		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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.