Skip to contentSkip to conversation

Move various PCI IDs to header file

PATCH In review Brent Casavant 7 participants 11 messages May 4, 2006 – May 13, 2006

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Move various PCI IDs to header file

Move various QLogic, Vitesse, and Intel storage
controller PCI IDs to the main header file.

---

As suggested by Andrew Morton and Jes Sorenson.

 drivers/scsi/qla1280.c  |   24 ------------------------
 drivers/scsi/sata_vsc.c |   11 ++++++-----
 include/linux/pci_ids.h |    9 +++++++++
 3 files changed, 15 insertions(+), 29 deletions(-)

---

drivers/scsi/qla1280.c +0 -24
index 5a48e55..00662a5 100644
@@ -397,30 +397,6 @@
 #include "ql1280_fw.h"
 #include "ql1040_fw.h"
 
-
-/*
- * Missing PCI ID's
- */
-#ifndef PCI_DEVICE_ID_QLOGIC_ISP1080
-#define PCI_DEVICE_ID_QLOGIC_ISP1080	0x1080
-#endif
-#ifndef PCI_DEVICE_ID_QLOGIC_ISP1240
-#define PCI_DEVICE_ID_QLOGIC_ISP1240	0x1240
-#endif
-#ifndef PCI_DEVICE_ID_QLOGIC_ISP1280
-#define PCI_DEVICE_ID_QLOGIC_ISP1280	0x1280
-#endif
-#ifndef PCI_DEVICE_ID_QLOGIC_ISP10160
-#define PCI_DEVICE_ID_QLOGIC_ISP10160	0x1016
-#endif
-#ifndef PCI_DEVICE_ID_QLOGIC_ISP12160
-#define PCI_DEVICE_ID_QLOGIC_ISP12160	0x1216
-#endif
-
-#ifndef PCI_VENDOR_ID_AMI
-#define PCI_VENDOR_ID_AMI               0x101e
-#endif
-
 #ifndef BITS_PER_LONG
 #error "BITS_PER_LONG not defined!"
 #endif
drivers/scsi/sata_vsc.c +6 -5
index 8a29ce3..27d6587 100644
@@ -433,13 +433,14 @@ err_out:
 
 
 /*
- * 0x1725/0x7174 is the Vitesse VSC-7174
- * 0x8086/0x3200 is the Intel 31244, which is supposed to be identical
- * compatibility is untested as of yet
+ * Intel 31244 is supposed to be identical.
+ * Compatibility is untested as of yet.
  */
 static const struct pci_device_id vsc_sata_pci_tbl[] = {
-	{ 0x1725, 0x7174, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
-	{ 0x8086, 0x3200, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
+	{ PCI_VENDOR_ID_VITESSE, PCI_DEVICE_ID_VITESSE_VSC7174,
+	  PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
+	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_GD31244,
+	  PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
 	{ }
 };
 
include/linux/pci_ids.h +9 -0
index d6fe048..c380faf 100644
@@ -848,7 +848,12 @@
 
 
 #define PCI_VENDOR_ID_QLOGIC		0x1077
+#define PCI_DEVICE_ID_QLOGIC_ISP10160	0x1016
 #define PCI_DEVICE_ID_QLOGIC_ISP1020	0x1020
+#define PCI_DEVICE_ID_QLOGIC_ISP1080	0x1080
+#define PCI_DEVICE_ID_QLOGIC_ISP12160	0x1216
+#define PCI_DEVICE_ID_QLOGIC_ISP1240	0x1240
+#define PCI_DEVICE_ID_QLOGIC_ISP1280	0x1280
 #define PCI_DEVICE_ID_QLOGIC_ISP2100	0x2100
 #define PCI_DEVICE_ID_QLOGIC_ISP2200	0x2200
 #define PCI_DEVICE_ID_QLOGIC_ISP2300	0x2300
@@ -1957,6 +1962,9 @@
 #define PCI_VENDOR_ID_NETCELL		0x169c
 #define PCI_DEVICE_ID_REVOLUTION	0x0044
 
+#define PCI_VENDOR_ID_VITESSE		0x1725
+#define PCI_DEVICE_ID_VITESSE_VSC7174	0x7174
+
 #define PCI_VENDOR_ID_LINKSYS		0x1737
 #define PCI_DEVICE_ID_LINKSYS_EG1064	0x1064
 
@@ -2135,6 +2143,7 @@
 #define PCI_DEVICE_ID_INTEL_ICH8_4	0x2815
 #define PCI_DEVICE_ID_INTEL_ICH8_5	0x283e
 #define PCI_DEVICE_ID_INTEL_ICH8_6	0x2850
+#define PCI_DEVICE_ID_INTEL_GD31244	0x3200
 #define PCI_DEVICE_ID_INTEL_82855PM_HB	0x3340
 #define PCI_DEVICE_ID_INTEL_82830_HB	0x3575
 #define PCI_DEVICE_ID_INTEL_82830_CGC	0x3577
#1 lore raw
Quoted 8 lines · On Thu, 4 May 2006 18:09:45 -0500 (CDT) Brent Casavant wrote:

Move various QLogic, Vitesse, and Intel storage
controller PCI IDs to the main header file.

---

As suggested by Andrew Morton and Jes Sorenson.

as compared to:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=9b860b8c4bde5949b272968597d1426d53080532

Quoted 101 lines
 drivers/scsi/qla1280.c  |   24 ------------------------
 drivers/scsi/sata_vsc.c |   11 ++++++-----
 include/linux/pci_ids.h |    9 +++++++++
 3 files changed, 15 insertions(+), 29 deletions(-)

---

drivers/scsi/qla1280.c +0 -24
index 5a48e55..00662a5 100644
@@ -397,30 +397,6 @@
 #include "ql1280_fw.h"
 #include "ql1040_fw.h"
 
-
-/*
- * Missing PCI ID's
- */
-#ifndef PCI_DEVICE_ID_QLOGIC_ISP1080
-#define PCI_DEVICE_ID_QLOGIC_ISP1080	0x1080
-#endif
-#ifndef PCI_DEVICE_ID_QLOGIC_ISP1240
-#define PCI_DEVICE_ID_QLOGIC_ISP1240	0x1240
-#endif
-#ifndef PCI_DEVICE_ID_QLOGIC_ISP1280
-#define PCI_DEVICE_ID_QLOGIC_ISP1280	0x1280
-#endif
-#ifndef PCI_DEVICE_ID_QLOGIC_ISP10160
-#define PCI_DEVICE_ID_QLOGIC_ISP10160	0x1016
-#endif
-#ifndef PCI_DEVICE_ID_QLOGIC_ISP12160
-#define PCI_DEVICE_ID_QLOGIC_ISP12160	0x1216
-#endif
-
-#ifndef PCI_VENDOR_ID_AMI
-#define PCI_VENDOR_ID_AMI               0x101e
-#endif
-
 #ifndef BITS_PER_LONG
 #error "BITS_PER_LONG not defined!"
 #endif
drivers/scsi/sata_vsc.c +6 -5
index 8a29ce3..27d6587 100644
@@ -433,13 +433,14 @@ err_out:
 
 
 /*
- * 0x1725/0x7174 is the Vitesse VSC-7174
- * 0x8086/0x3200 is the Intel 31244, which is supposed to be identical
- * compatibility is untested as of yet
+ * Intel 31244 is supposed to be identical.
+ * Compatibility is untested as of yet.
  */
 static const struct pci_device_id vsc_sata_pci_tbl[] = {
-	{ 0x1725, 0x7174, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
-	{ 0x8086, 0x3200, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
+	{ PCI_VENDOR_ID_VITESSE, PCI_DEVICE_ID_VITESSE_VSC7174,
+	  PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
+	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_GD31244,
+	  PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
 	{ }
 };
 
include/linux/pci_ids.h +9 -1
index d6fe048..c380faf 100644
@@ -848,7 +848,12 @@
 
 
 #define PCI_VENDOR_ID_QLOGIC		0x1077
+#define PCI_DEVICE_ID_QLOGIC_ISP10160	0x1016
 #define PCI_DEVICE_ID_QLOGIC_ISP1020	0x1020
+#define PCI_DEVICE_ID_QLOGIC_ISP1080	0x1080
+#define PCI_DEVICE_ID_QLOGIC_ISP12160	0x1216
+#define PCI_DEVICE_ID_QLOGIC_ISP1240	0x1240
+#define PCI_DEVICE_ID_QLOGIC_ISP1280	0x1280
 #define PCI_DEVICE_ID_QLOGIC_ISP2100	0x2100
 #define PCI_DEVICE_ID_QLOGIC_ISP2200	0x2200
 #define PCI_DEVICE_ID_QLOGIC_ISP2300	0x2300
@@ -1957,6 +1962,9 @@
 #define PCI_VENDOR_ID_NETCELL		0x169c
 #define PCI_DEVICE_ID_REVOLUTION	0x0044
 
+#define PCI_VENDOR_ID_VITESSE		0x1725
+#define PCI_DEVICE_ID_VITESSE_VSC7174	0x7174
+
 #define PCI_VENDOR_ID_LINKSYS		0x1737
 #define PCI_DEVICE_ID_LINKSYS_EG1064	0x1064
 
@@ -2135,6 +2143,7 @@
 #define PCI_DEVICE_ID_INTEL_ICH8_4	0x2815
 #define PCI_DEVICE_ID_INTEL_ICH8_5	0x283e
 #define PCI_DEVICE_ID_INTEL_ICH8_6	0x2850
+#define PCI_DEVICE_ID_INTEL_GD31244	0x3200
 #define PCI_DEVICE_ID_INTEL_82855PM_HB	0x3340
 #define PCI_DEVICE_ID_INTEL_82830_HB	0x3575
 #define PCI_DEVICE_ID_INTEL_82830_CGC	0x3577
-
Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

---
~Randy

#2 lore raw
Quoted 5 lines · Randy.Dunlap
Quoted 3 lines · On Thu, 4 May 2006 18:09:45 -0500 (CDT) Brent Casavant wrote:

Move various QLogic, Vitesse, and Intel storage
controller PCI IDs to the main header file.

Quoted 8 lines
Quoted 5 lines

---

As suggested by Andrew Morton and Jes Sorenson.

as compared to:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=9b860b8c4bde5949b272968597d1426d53080532

I guess Andrew and I should be blamed for that. I Andrew suggested putting the IDs in the 'right place' and I took the right place as being the pci_ids.h file.

Can't say I agree with the recommendation, having them in pci_ids.h is nice and clean and it allows one to go look through the list, instead they now really become random hex values :( Brent's patch is a perfect example of IDs being used in multiple places, ie. the qla1280 driver and in the IOC4 driver, so the claim in that Documentation/ file doesn't hold water.

Anyway, if this is the new rule, then I guess it's back to using the ugly patch :(

Jes

#3 lore raw
Quoted 26 lines · Jes Sorensen
Quoted 5 lines · Randy.Dunlap
Quoted 3 lines · On Thu, 4 May 2006 18:09:45 -0500 (CDT) Brent Casavant wrote:

Move various QLogic, Vitesse, and Intel storage
controller PCI IDs to the main header file.

Quoted 8 lines
Quoted 5 lines

---

As suggested by Andrew Morton and Jes Sorenson.

as compared to:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=9b860b8c4bde5949b272968597d1426d53080532

I guess Andrew and I should be blamed for that. I Andrew suggested putting the IDs in the 'right place' and I took the right place as being the pci_ids.h file.

Can't say I agree with the recommendation, having them in pci_ids.h is nice and clean and it allows one to go look through the list, instead they now really become random hex values :( Brent's patch is a perfect example of IDs being used in multiple places, ie. the qla1280 driver and in the IOC4 driver, so the claim in that Documentation/ file doesn't hold water.

Quoted 2 lines

Anyway, if this is the new rule, then I guess it's back to using the ugly patch :(

No, I agree with your patch, as you are having to reference the ids from 2 different files. So because of that, I feel it's ok to have those ids in the pci_id.h file.

Yes, the wording in the documentation file should be cleaned up a bit to state this a bit better...

thanks,

greg k-h

#4 lore raw

(since I was an instigator here...)

Quoted 3 lines · Greg KH

No, I agree with your patch, as you are having to reference the ids from 2 different files. So because of that, I feel it's ok to have those ids in the pci_id.h file.

Agreed.

Quoted 2 lines

Yes, the wording in the documentation file should be cleaned up a bit to state this a bit better...

Agreed.

Jeff

#5 lore raw
In reply to Jes Sorensen
Quoted 26 lines · Jes Sorensen
Quoted 5 lines · Randy.Dunlap
Quoted 3 lines · On Thu, 4 May 2006 18:09:45 -0500 (CDT) Brent Casavant wrote:

Move various QLogic, Vitesse, and Intel storage
controller PCI IDs to the main header file.

Quoted 8 lines
Quoted 5 lines

---

As suggested by Andrew Morton and Jes Sorenson.

as compared to:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=9b860b8c4bde5949b272968597d1426d53080532

I guess Andrew and I should be blamed for that. I Andrew suggested putting the IDs in the 'right place' and I took the right place as being the pci_ids.h file.

Can't say I agree with the recommendation, having them in pci_ids.h is nice and clean and it allows one to go look through the list, instead they now really become random hex values :( Brent's patch is a perfect example of IDs being used in multiple places, ie. the qla1280 driver and in the IOC4 driver, so the claim in that Documentation/ file doesn't hold water.

Quoted 2 lines

Anyway, if this is the new rule, then I guess it's back to using the ugly patch :(

FWIW, I'm not saying that I agree with the new rule, just that it's there/merged.

Signature · 1 line
~Randy
#6 lore raw
Quoted 28 lines · Randy.Dunlap
Quoted 26 lines · Jes Sorensen
Quoted 5 lines · Randy.Dunlap
Quoted 3 lines · On Thu, 4 May 2006 18:09:45 -0500 (CDT) Brent Casavant wrote:

Move various QLogic, Vitesse, and Intel storage
controller PCI IDs to the main header file.

Quoted 8 lines
Quoted 5 lines

---

As suggested by Andrew Morton and Jes Sorenson.

as compared to:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=9b860b8c4bde5949b272968597d1426d53080532

I guess Andrew and I should be blamed for that. I Andrew suggested putting the IDs in the 'right place' and I took the right place as being the pci_ids.h file.

Can't say I agree with the recommendation, having them in pci_ids.h is nice and clean and it allows one to go look through the list, instead they now really become random hex values :( Brent's patch is a perfect example of IDs being used in multiple places, ie. the qla1280 driver and in the IOC4 driver, so the claim in that Documentation/ file doesn't hold water.

Quoted 5 lines
Quoted 2 lines

Anyway, if this is the new rule, then I guess it's back to using the ugly patch :(

FWIW, I'm not saying that I agree with the new rule, just that it's there/merged.

When I worked on pci_ids.h cleanup last year I didn't get a clear idea of whether moving all #defines to the one header file was desired. Last I looked there were heaps of them scattered all over. Is there a preferred model for placing these #defines?

Grant.

#7 lore raw
Quoted 6 lines · Grant Coady

When I worked on pci_ids.h cleanup last year I didn't get a clear idea of whether moving all #defines to the one header file was desired. Last I looked there were heaps of them scattered all over. Is there a preferred model for placing these #defines?

Grant.

According to the document Randy referenced, the preferred place for *new* defines is to stick them in the local files where they are used. I don't think there is any preference for moving the out of pci_ids.h as it would just cause patch noise for the sake of making noise.

So much for being able to go through the pci_ids.h file to get an idea about whether or not a device may have a chance of being supported :(

Jes

#8 lore raw
Quoted 8 lines · Jes Sorensen
Quoted 6 lines · Grant Coady

When I worked on pci_ids.h cleanup last year I didn't get a clear idea of whether moving all #defines to the one header file was desired. Last I looked there were heaps of them scattered all over. Is there a preferred model for placing these #defines?

Grant.

Quoted 7 lines

According to the document Randy referenced, the preferred place for *new* defines is to stick them in the local files where they are used. I don't think there is any preference for moving the out of pci_ids.h as it would just cause patch noise for the sake of making noise.

So much for being able to go through the pci_ids.h file to get an idea about whether or not a device may have a chance of being supported :(

that wasn't there ever anyway..

modules.pcimap is more like it anyway

#9 lore raw
Quoted 7 lines · Arjan van de Ven
Quoted 2 lines · Jes Sorensen

So much for being able to go through the pci_ids.h file to get an idea about whether or not a device may have a chance of being supported :(

that wasn't there ever anyway..

modules.pcimap is more like it anyway

Wasn't bullet proof since some people just stuck it in their drivers due to laziness, but it was a pretty good indicator. I've gone through it many times to see if I could find a match for a device ;(

Anyway ....

Cheers,
Jes