Messages in this thread Patch in this message | | | Subject | [PATCH 2/2] ipr: Block config I/O during BIST | From | brking@us ... | Date | Fri, 19 Nov 2004 14:23:29 -0600 |
| |
Here is an example of how to use the new PCI APIs to block PCI config accesses when running BIST.
Signed-off-by: Brian King <brking@us.ibm.com> ---
linux-2.6.10-rc2-bk4-bjking1/drivers/scsi/ipr.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-)
diff -puN drivers/scsi/ipr.c~ipr_block_config_io_during_bist_generic drivers/scsi/ipr.c --- linux-2.6.10-rc2-bk4/drivers/scsi/ipr.c~ipr_block_config_io_during_bist_generic 2004-11-19 14:06:57.000000000 -0600 +++ linux-2.6.10-rc2-bk4-bjking1/drivers/scsi/ipr.c 2004-11-19 14:06:57.000000000 -0600 @@ -4935,6 +4935,7 @@ static int ipr_reset_restore_cfg_space(s int rc; ENTER; + pci_unblock_config_access(ioa_cfg->pdev); rc = pci_restore_state(ioa_cfg->pdev); if (rc != PCIBIOS_SUCCESSFUL) { @@ -4989,9 +4990,11 @@ static int ipr_reset_start_bist(struct i int rc; ENTER; - rc = pci_write_config_byte(ioa_cfg->pdev, PCI_BIST, PCI_BIST_START); + pci_block_config_access(ioa_cfg->pdev); + rc = pci_start_bist(ioa_cfg->pdev); if (rc != PCIBIOS_SUCCESSFUL) { + pci_unblock_config_access(ioa_cfg->pdev); ipr_cmd->ioasa.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR); rc = IPR_RC_JOB_CONTINUE; } else { _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |