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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <brking@xxxxxxxxxxxxxxxxxx>
---

 linux-2.6-bjking1/drivers/scsi/ipr.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff -puN drivers/scsi/ipr.c~ipr_pcie_sas drivers/scsi/ipr.c
--- linux-2.6/drivers/scsi/ipr.c~ipr_pcie_sas	2007-01-17 17:21:10.000000000 -0600
+++ linux-2.6-bjking1/drivers/scsi/ipr.c	2007-01-17 17:21:10.000000000 -0600
@@ -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;
_
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux