diff options
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 37158eab3c89..db205c9d42d1 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -174,15 +174,15 @@ static const struct ipr_chip_cfg_t ipr_chip_cfg[] = { | |||
174 | }; | 174 | }; |
175 | 175 | ||
176 | static const struct ipr_chip_t ipr_chip[] = { | 176 | static const struct ipr_chip_t ipr_chip[] = { |
177 | { PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE, IPR_USE_LSI, IPR_SIS32, &ipr_chip_cfg[0] }, | 177 | { PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE, IPR_USE_LSI, IPR_SIS32, IPR_PCI_CFG, &ipr_chip_cfg[0] }, |
178 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CITRINE, IPR_USE_LSI, IPR_SIS32, &ipr_chip_cfg[0] }, | 178 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CITRINE, IPR_USE_LSI, IPR_SIS32, IPR_PCI_CFG, &ipr_chip_cfg[0] }, |
179 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN, IPR_USE_LSI, IPR_SIS32, &ipr_chip_cfg[0] }, | 179 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN, IPR_USE_LSI, IPR_SIS32, IPR_PCI_CFG, &ipr_chip_cfg[0] }, |
180 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN, IPR_USE_LSI, IPR_SIS32, &ipr_chip_cfg[0] }, | 180 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN, IPR_USE_LSI, IPR_SIS32, IPR_PCI_CFG, &ipr_chip_cfg[0] }, |
181 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN_E, IPR_USE_MSI, IPR_SIS32, &ipr_chip_cfg[0] }, | 181 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN_E, IPR_USE_MSI, IPR_SIS32, IPR_PCI_CFG, &ipr_chip_cfg[0] }, |
182 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_SNIPE, IPR_USE_LSI, IPR_SIS32, &ipr_chip_cfg[1] }, | 182 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_SNIPE, IPR_USE_LSI, IPR_SIS32, IPR_PCI_CFG, &ipr_chip_cfg[1] }, |
183 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_SCAMP, IPR_USE_LSI, IPR_SIS32, &ipr_chip_cfg[1] }, | 183 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_SCAMP, IPR_USE_LSI, IPR_SIS32, IPR_PCI_CFG, &ipr_chip_cfg[1] }, |
184 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CROC_FPGA_E2, IPR_USE_MSI, IPR_SIS64, &ipr_chip_cfg[2] }, | 184 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CROC_FPGA_E2, IPR_USE_MSI, IPR_SIS64, IPR_MMIO, &ipr_chip_cfg[2] }, |
185 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CROC_ASIC_E2, IPR_USE_MSI, IPR_SIS64, &ipr_chip_cfg[2] } | 185 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CROC_ASIC_E2, IPR_USE_MSI, IPR_SIS64, IPR_MMIO, &ipr_chip_cfg[2] } |
186 | }; | 186 | }; |
187 | 187 | ||
188 | static int ipr_max_bus_speeds [] = { | 188 | static int ipr_max_bus_speeds [] = { |
@@ -7451,20 +7451,25 @@ static int ipr_reset_bist_done(struct ipr_cmnd *ipr_cmd) | |||
7451 | static int ipr_reset_start_bist(struct ipr_cmnd *ipr_cmd) | 7451 | static int ipr_reset_start_bist(struct ipr_cmnd *ipr_cmd) |
7452 | { | 7452 | { |
7453 | struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; | 7453 | struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; |
7454 | int rc; | 7454 | int rc = PCIBIOS_SUCCESSFUL; |
7455 | 7455 | ||
7456 | ENTER; | 7456 | ENTER; |
7457 | pci_block_user_cfg_access(ioa_cfg->pdev); | 7457 | pci_block_user_cfg_access(ioa_cfg->pdev); |
7458 | rc = pci_write_config_byte(ioa_cfg->pdev, PCI_BIST, PCI_BIST_START); | ||
7459 | 7458 | ||
7460 | if (rc != PCIBIOS_SUCCESSFUL) { | 7459 | if (ioa_cfg->ipr_chip->bist_method == IPR_MMIO) |
7461 | pci_unblock_user_cfg_access(ipr_cmd->ioa_cfg->pdev); | 7460 | writel(IPR_UPROCI_SIS64_START_BIST, |
7462 | ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR); | 7461 | ioa_cfg->regs.set_uproc_interrupt_reg32); |
7463 | rc = IPR_RC_JOB_CONTINUE; | 7462 | else |
7464 | } else { | 7463 | rc = pci_write_config_byte(ioa_cfg->pdev, PCI_BIST, PCI_BIST_START); |
7464 | |||
7465 | if (rc == PCIBIOS_SUCCESSFUL) { | ||
7465 | ipr_cmd->job_step = ipr_reset_bist_done; | 7466 | ipr_cmd->job_step = ipr_reset_bist_done; |
7466 | ipr_reset_start_timer(ipr_cmd, IPR_WAIT_FOR_BIST_TIMEOUT); | 7467 | ipr_reset_start_timer(ipr_cmd, IPR_WAIT_FOR_BIST_TIMEOUT); |
7467 | rc = IPR_RC_JOB_RETURN; | 7468 | rc = IPR_RC_JOB_RETURN; |
7469 | } else { | ||
7470 | pci_unblock_user_cfg_access(ipr_cmd->ioa_cfg->pdev); | ||
7471 | ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR); | ||
7472 | rc = IPR_RC_JOB_CONTINUE; | ||
7468 | } | 7473 | } |
7469 | 7474 | ||
7470 | LEAVE; | 7475 | LEAVE; |