public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Add pci class code for SATA (patch updated)
@ 2007-01-09 10:03 Conke Hu
  2007-01-09 10:33 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Conke Hu @ 2007-01-09 10:03 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan, Andrew Morton, Linux kernel mailing list

On 1/8/07, Jeff Garzik <jeff@garzik.org> wrote:
>  ...
> The above seems OK to me...
>
>         Jeff
>

add pci class code for SATA & AHCI, and replace some magic numbers.

Signed-off-by: Conke Hu <conke.hu@amd.com>
------------
diff -Nur linux-2.6.20-rc4.orig/drivers/ata/ahci.c
linux-2.6.20-rc4/drivers/ata/ahci.c
--- linux-2.6.20-rc4.orig/drivers/ata/ahci.c	2007-01-09 15:50:14.000000000 +0800
+++ linux-2.6.20-rc4/drivers/ata/ahci.c	2007-01-09 15:53:52.000000000 +0800
@@ -426,7 +426,7 @@

 	/* Generic, PCI class code for AHCI */
 	{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
-	  0x010601, 0xffffff, board_ahci },
+	  PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci },

 	{ }	/* terminate list */
 };
@@ -1594,11 +1594,11 @@
 		speed_s = "?";

 	pci_read_config_word(pdev, 0x0a, &cc);
-	if (cc == 0x0101)
+	if (cc == PCI_CLASS_STORAGE_IDE)
 		scc_s = "IDE";
-	else if (cc == 0x0106)
+	else if (cc == PCI_CLASS_STORAGE_SATA)
 		scc_s = "SATA";
-	else if (cc == 0x0104)
+	else if (cc == PCI_CLASS_STORAGE_RAID)
 		scc_s = "RAID";
 	else
 		scc_s = "unknown";
diff -Nur linux-2.6.20-rc4.orig/drivers/pci/quirks.c
linux-2.6.20-rc4/drivers/pci/quirks.c
--- linux-2.6.20-rc4.orig/drivers/pci/quirks.c	2007-01-09
15:50:14.000000000 +0800
+++ linux-2.6.20-rc4/drivers/pci/quirks.c	2007-01-09 15:52:10.000000000 +0800
@@ -862,7 +862,7 @@
 		pci_write_config_byte(pdev, 0xa, 6);
 		pci_write_config_byte(pdev, 0x40, tmp);

-		pdev->class = 0x010601;
+		pdev->class = PCI_CLASS_STORAGE_SATA_AHCI;
 	}
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI,
PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_sb600_sata);
diff -Nur linux-2.6.20-rc4.orig/include/linux/pci_ids.h
linux-2.6.20-rc4/include/linux/pci_ids.h
--- linux-2.6.20-rc4.orig/include/linux/pci_ids.h	2007-01-09
15:50:14.000000000 +0800
+++ linux-2.6.20-rc4/include/linux/pci_ids.h	2007-01-09 15:51:42.000000000 +0800
@@ -15,6 +15,8 @@
 #define PCI_CLASS_STORAGE_FLOPPY	0x0102
 #define PCI_CLASS_STORAGE_IPI		0x0103
 #define PCI_CLASS_STORAGE_RAID		0x0104
+#define PCI_CLASS_STORAGE_SATA		0x0106
+#define PCI_CLASS_STORAGE_SATA_AHCI	0x010601
 #define PCI_CLASS_STORAGE_SAS		0x0107
 #define PCI_CLASS_STORAGE_OTHER		0x0180

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Add pci class code for SATA (patch updated)
  2007-01-09 10:03 [PATCH] Add pci class code for SATA (patch updated) Conke Hu
@ 2007-01-09 10:33 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-01-09 10:33 UTC (permalink / raw)
  To: Conke Hu; +Cc: Alan, Andrew Morton, Linux kernel mailing list

Conke Hu wrote:
> On 1/8/07, Jeff Garzik <jeff@garzik.org> wrote:
>>  ...
>> The above seems OK to me...
>>
>>         Jeff
>>
> 
> add pci class code for SATA & AHCI, and replace some magic numbers.
> 
> Signed-off-by: Conke Hu <conke.hu@amd.com>

applied manually.  For some reason git-am did not like your patch, but 
after hand-editing, patch(1) snarfed it right up.

	Jeff




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-09 10:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-09 10:03 [PATCH] Add pci class code for SATA (patch updated) Conke Hu
2007-01-09 10:33 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox