diff options
author | Saurav Kashyap <saurav.kashyap@qlogic.com> | 2013-02-08 10:57:53 +0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-02-22 16:43:05 +0400 |
commit | 6c315553285533d6785ec313e437c3b3ab89ad47 (patch) | |
tree | f47f2da423b88e3ba30d1e941df80740c5f8740d /drivers/scsi/qla2xxx/qla_nx.c | |
parent | 992357c6514398ab874198f5059c5e5024480f8c (diff) | |
download | linux-6c315553285533d6785ec313e437c3b3ab89ad47.tar.xz |
[SCSI] qla2xxx: Display the lock owner on lock acquire failure.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_nx.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nx.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index 042368b9a2e7..dc4be5b78bb9 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c @@ -847,14 +847,21 @@ static int qla82xx_rom_lock(struct qla_hw_data *ha) { int done = 0, timeout = 0; + uint32_t lock_owner = 0; + scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); while (!done) { /* acquire semaphore2 from PCI HW block */ done = qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM2_LOCK)); if (done == 1) break; - if (timeout >= qla82xx_rom_lock_timeout) + if (timeout >= qla82xx_rom_lock_timeout) { + lock_owner = qla82xx_rd_32(ha, QLA82XX_ROM_LOCK_ID); + ql_dbg(ql_dbg_p3p, vha, 0xb085, + "Failed to acquire rom lock, acquired by %d.\n", + lock_owner); return -1; + } timeout++; } qla82xx_wr_32(ha, QLA82XX_ROM_LOCK_ID, ROM_LOCK_DRIVER); |