diff options
author | Saurav Kashyap <saurav.kashyap@qlogic.com> | 2013-02-08 01:57:53 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-02-22 07:43:05 -0500 |
commit | 6c315553285533d6785ec313e437c3b3ab89ad47 (patch) | |
tree | f47f2da423b88e3ba30d1e941df80740c5f8740d /drivers/scsi/qla2xxx/qla_nx.c | |
parent | 992357c6514398ab874198f5059c5e5024480f8c (diff) |
[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 | |||
847 | qla82xx_rom_lock(struct qla_hw_data *ha) | 847 | qla82xx_rom_lock(struct qla_hw_data *ha) |
848 | { | 848 | { |
849 | int done = 0, timeout = 0; | 849 | int done = 0, timeout = 0; |
850 | uint32_t lock_owner = 0; | ||
851 | scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); | ||
850 | 852 | ||
851 | while (!done) { | 853 | while (!done) { |
852 | /* acquire semaphore2 from PCI HW block */ | 854 | /* acquire semaphore2 from PCI HW block */ |
853 | done = qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM2_LOCK)); | 855 | done = qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM2_LOCK)); |
854 | if (done == 1) | 856 | if (done == 1) |
855 | break; | 857 | break; |
856 | if (timeout >= qla82xx_rom_lock_timeout) | 858 | if (timeout >= qla82xx_rom_lock_timeout) { |
859 | lock_owner = qla82xx_rd_32(ha, QLA82XX_ROM_LOCK_ID); | ||
860 | ql_dbg(ql_dbg_p3p, vha, 0xb085, | ||
861 | "Failed to acquire rom lock, acquired by %d.\n", | ||
862 | lock_owner); | ||
857 | return -1; | 863 | return -1; |
864 | } | ||
858 | timeout++; | 865 | timeout++; |
859 | } | 866 | } |
860 | qla82xx_wr_32(ha, QLA82XX_ROM_LOCK_ID, ROM_LOCK_DRIVER); | 867 | qla82xx_wr_32(ha, QLA82XX_ROM_LOCK_ID, ROM_LOCK_DRIVER); |