ipr: Tolerate not finding PCI-X registers
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): 1169573123318-patch-mail.ibm.com
PATCH 2/4 ipr: Tolerate not finding PCI-X registers
Don't fail initialization of an adapter if the PCI-X registers cannot be found since it may be a PCI-E adapter.
Signed-off-by Brian King <[email protected]>
---
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
@@ -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 idev_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 ;
_
PATCH 3/4 ipr: PCI error recovery fix
In reply to a message not in the archiveSince 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.
Signed-off-by Brian King <[email protected]>
---
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
@@ -6308,7 +6308,6 @@ static int ipr_reset_restore_cfg_space(sint 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 ; }
_
PATCH 4/4 ipr: Driver version 2.3.1
In reply to a message not in the archiveBump driver version to 2.3.1.
Signed-off-by Brian King <[email protected]>
---
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
@@ -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
_