Skip to contentSkip to conversation

qla4xxx: use pci_dev->revision

PATCH RESEND New Sergei Shtylyov 2 participants 4 messages May 13, 2011 – Oct 5, 2011

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

PATCH RESEND v2 1/1 qla4xxx: use pci_dev->revision

Commit f4f5df23bf72208d0c2f1d8be629839924c2f4c2 ([SCSI] qla4xxx: Added support for ISP82XX) added code to read the PCI revision ID from the PCI configuration register while it's already stored by PCI subsystem in the 'revision' field of 'struct pci_dev'...

---
The patch is against the recent Linus' tree.
It wasn't merged in 2.6.39 time, I hope it can be merged to 2.6.40...

 drivers/scsi/qla4xxx/ql4_os.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/qla4xxx/ql4_os.c +2 -4
Index: linux-2.6/drivers/scsi/qla4xxx/ql4_os.c
===================================================================
@@ -1428,7 +1428,6 @@ static void qla4xxx_free_adapter(struct 
 int qla4_8xxx_iospace_config(struct scsi_qla_host *ha)
 {
 	int status = 0;
-	uint8_t revision_id;
 	unsigned long mem_base, mem_len, db_base, db_len;
 	struct pci_dev *pdev = ha->pdev;
 
@@ -1440,10 +1439,9 @@ int qla4_8xxx_iospace_config(struct scsi
 		goto iospace_error_exit;
 	}
 
-	pci_read_config_byte(pdev, PCI_REVISION_ID, &revision_id);
 	DEBUG2(printk(KERN_INFO "%s: revision-id=%d\n",
-	    __func__, revision_id));
-	ha->revision_id = revision_id;
+	    __func__, pdev->revision));
+	ha->revision_id = pdev->revision;
 
 	/* remap phys address */
 	mem_base = pci_resource_start(pdev, 0); /* 0 is for BAR 0 */
#1 lore raw

PATCH RESEND v2 1/1 qla4xxx: use pci_dev->revision

Commit f4f5df23bf72208d0c2f1d8be629839924c2f4c2 ([SCSI] qla4xxx: Added support for ISP82XX) added code to read the PCI revision ID from the PCI configuration register while it's already stored by PCI subsystem in the 'revision' field of 'struct pci_dev'...

---
The patch is against the recent Linus' tree.
It wasn't merged in either 2.6.39 or 3.0 time, hopefully it can be merged to 3.1...

 drivers/scsi/qla4xxx/ql4_os.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/qla4xxx/ql4_os.c +2 -4
Index: linux-2.6/drivers/scsi/qla4xxx/ql4_os.c
===================================================================
@@ -1428,7 +1428,6 @@ static void qla4xxx_free_adapter(struct 
 int qla4_8xxx_iospace_config(struct scsi_qla_host *ha)
 {
 	int status = 0;
-	uint8_t revision_id;
 	unsigned long mem_base, mem_len, db_base, db_len;
 	struct pci_dev *pdev = ha->pdev;
 
@@ -1440,10 +1439,9 @@ int qla4_8xxx_iospace_config(struct scsi
 		goto iospace_error_exit;
 	}
 
-	pci_read_config_byte(pdev, PCI_REVISION_ID, &revision_id);
 	DEBUG2(printk(KERN_INFO "%s: revision-id=%d\n",
-	    __func__, revision_id));
-	ha->revision_id = revision_id;
+	    __func__, pdev->revision));
+	ha->revision_id = pdev->revision;
 
 	/* remap phys address */
 	mem_base = pci_resource_start(pdev, 0); /* 0 is for BAR 0 */
#2 lore raw

PATCH RESEND v2 1/1 qla4xxx: use pci_dev->revision

Commit f4f5df23bf72208d0c2f1d8be629839924c2f4c2 ([SCSI] qla4xxx: Added support for ISP82XX) added code to read the PCI revision ID from the PCI configuration register while it's already stored by PCI subsystem in the 'revision' field of 'struct pci_dev'...

---
The patch is against the recent Linus' tree.
It wasn't merged in either 2.6.39, 3.0 or 3.1 time, hopefully it can be merged to 3.2...

Andrew, the SCSI maintainer seems to ignore this patch, maybe you can queue it?

 drivers/scsi/qla4xxx/ql4_os.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/qla4xxx/ql4_os.c +2 -4
Index: linux-2.6/drivers/scsi/qla4xxx/ql4_os.c
===================================================================
@@ -1430,7 +1430,6 @@ static void qla4xxx_free_adapter(struct 
 int qla4_8xxx_iospace_config(struct scsi_qla_host *ha)
 {
 	int status = 0;
-	uint8_t revision_id;
 	unsigned long mem_base, mem_len, db_base, db_len;
 	struct pci_dev *pdev = ha->pdev;
 
@@ -1442,10 +1441,9 @@ int qla4_8xxx_iospace_config(struct scsi
 		goto iospace_error_exit;
 	}
 
-	pci_read_config_byte(pdev, PCI_REVISION_ID, &revision_id);
 	DEBUG2(printk(KERN_INFO "%s: revision-id=%d\n",
-	    __func__, revision_id));
-	ha->revision_id = revision_id;
+	    __func__, pdev->revision));
+	ha->revision_id = pdev->revision;
 
 	/* remap phys address */
 	mem_base = pci_resource_start(pdev, 0); /* 0 is for BAR 0 */
Acked-by on v2 1/1
#3 lore raw
Quoted 38 lines · Sergei Shtylyov

Commit f4f5df23bf72208d0c2f1d8be629839924c2f4c2 ([SCSI] qla4xxx: Added support
for ISP82XX) added code to read the PCI revision ID from the PCI configuration
register while it's already stored by PCI subsystem in the 'revision' field of
'struct pci_dev'...

---
The patch is against the recent Linus' tree.
It wasn't merged in either 2.6.39, 3.0 or 3.1 time, hopefully it can be merged
to 3.2...

Andrew, the SCSI maintainer seems to ignore this patch, maybe you can queue it?

drivers/scsi/qla4xxx/ql4_os.c | 6 ++----

1 file changed, 2 insertions(+), 4 deletions(-)

Index: linux-2.6/drivers/scsi/qla4xxx/ql4_os.c
===================================================================

drivers/scsi/qla4xxx/ql4_os.c +0 -1
@@ -1430,7 +1430,6 @@ static void qla4xxx_free_adapter(struct
 int qla4_8xxx_iospace_config(struct scsi_qla_host *ha)
 {
      int status = 0;
-      uint8_t revision_id;
      unsigned long mem_base, mem_len, db_base, db_len;
      struct pci_dev *pdev = ha->pdev;
 
@@ -1442,10 +1441,9 @@ int qla4_8xxx_iospace_config(struct scsi
              goto iospace_error_exit;
      }

drivers/scsi/qla4xxx/ql4_os.c int qla4_8xxx_iospace_config(struct scsi · line 1449

Quoted 10 lines
drivers/scsi/qla4xxx/ql4_os.c +2 -3
 
-      pci_read_config_byte(pdev, PCI_REVISION_ID, &revision_id);
      DEBUG2(printk(KERN_INFO "%s: revision-id=%d\n",
-          __func__, revision_id));
-      ha->revision_id = revision_id;
+          __func__, pdev->revision));
+      ha->revision_id = pdev->revision;
 
      /* remap phys address */
      mem_base = pci_resource_start(pdev, 0); /* 0 is for BAR 0 */

This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.