Skip to contentSkip to conversation

ipr: Tolerate not finding PCI-X registers

PATCH New Brian King 1 participant 3 messages Jan 23, 2007 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Brian King

author
#1 lore raw

PATCH 2/4 ipr: Tolerate not finding PCI-X registers

In reply to a message not in the archive

Don't fail initialization of an adapter if the PCI-X registers cannot be found since it may be a PCI-E adapter.

---

 linux-2.6-bjking1/drivers/scsi/ipr.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
drivers/scsi/ipr.c renamed from drivers/scsi/ipr.c~ipr_pcie_sas +2 -8
diff -puN drivers/scsi/ipr.c~ipr_pcie_sas drivers/scsi/ipr.c
@@ -595,10 +595,8 @@ static int ipr_save_pcix_cmd_reg(struct 
 {
 	int pcix_cmd_reg = pci_find_capability(ioa_cfg->pdev, PCI_CAP_ID_PCIX);
 
-	if (pcix_cmd_reg == 0) {
-		dev_err(&ioa_cfg->pdev->dev, "Failed to save PCI-X command register\n");
-		return -EIO;
-	}
+	if (pcix_cmd_reg == 0)
+		return 0;
 
 	if (pci_read_config_word(ioa_cfg->pdev, pcix_cmd_reg + PCI_X_CMD,
 				 &ioa_cfg->saved_pcix_cmd_reg) != PCIBIOS_SUCCESSFUL) {
@@ -627,10 +625,6 @@ static int ipr_set_pcix_cmd_reg(struct i
 			dev_err(&ioa_cfg->pdev->dev, "Failed to setup PCI-X command register\n");
 			return -EIO;
 		}
-	} else {
-		dev_err(&ioa_cfg->pdev->dev,
-			"Failed to setup PCI-X command register\n");
-		return -EIO;
 	}
 
 	return 0;

_

author
#2 lore raw

PATCH 3/4 ipr: PCI error recovery fix

In reply to a message not in the archive

Since the pci_block_user_cfg_access API was modified to track block/unblocks, it was discovered that the ipr driver had a path through its code (in PCI error recovery) which would unblock when not previously blocked.

---

 linux-2.6-bjking1/drivers/scsi/ipr.c |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)
drivers/scsi/ipr.c renamed from drivers/scsi/ipr.c~ipr_eeh_recovery_fix +19 -2
diff -puN drivers/scsi/ipr.c~ipr_eeh_recovery_fix drivers/scsi/ipr.c
@@ -6308,7 +6308,6 @@ static int ipr_reset_restore_cfg_space(s
 	int rc;
 
 	ENTER;
-	pci_unblock_user_cfg_access(ioa_cfg->pdev);
 	rc = pci_restore_state(ioa_cfg->pdev);
 
 	if (rc != PCIBIOS_SUCCESSFUL) {
@@ -6349,6 +6348,24 @@ static int ipr_reset_restore_cfg_space(s
 }
 
 /**
+ * ipr_reset_bist_done - BIST has completed on the adapter.
+ * @ipr_cmd:	ipr command struct
+ *
+ * Description: Unblock config space and resume the reset process.
+ *
+ * Return value:
+ * 	IPR_RC_JOB_CONTINUE
+ **/
+static int ipr_reset_bist_done(struct ipr_cmnd *ipr_cmd)
+{
+	ENTER;
+	pci_unblock_user_cfg_access(ipr_cmd->ioa_cfg->pdev);
+	ipr_cmd->job_step = ipr_reset_restore_cfg_space;
+	LEAVE;
+	return IPR_RC_JOB_CONTINUE;
+}
+
+/**
  * ipr_reset_start_bist - Run BIST on the adapter.
  * @ipr_cmd:	ipr command struct
  *
@@ -6370,7 +6387,7 @@ static int ipr_reset_start_bist(struct i
 		ipr_cmd->ioasa.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR);
 		rc = IPR_RC_JOB_CONTINUE;
 	} else {
-		ipr_cmd->job_step = ipr_reset_restore_cfg_space;
+		ipr_cmd->job_step = ipr_reset_bist_done;
 		ipr_reset_start_timer(ipr_cmd, IPR_WAIT_FOR_BIST_TIMEOUT);
 		rc = IPR_RC_JOB_RETURN;
 	}

_

author
#3 lore raw

PATCH 4/4 ipr: Driver version 2.3.1

In reply to a message not in the archive

Bump driver version to 2.3.1.

---

 linux-2.6-bjking1/drivers/scsi/ipr.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/ipr.h renamed from drivers/scsi/ipr.h~ipr_driver_version_2_3_1 +2 -2
diff -puN drivers/scsi/ipr.h~ipr_driver_version_2_3_1 drivers/scsi/ipr.h
@@ -37,8 +37,8 @@
 /*
  * Literals
  */
-#define IPR_DRIVER_VERSION "2.3.0"
-#define IPR_DRIVER_DATE "(November 8, 2006)"
+#define IPR_DRIVER_VERSION "2.3.1"
+#define IPR_DRIVER_DATE "(January 23, 2007)"
 
 /*
  * IPR_MAX_CMD_PER_LUN: This defines the maximum number of outstanding

_