[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>
This commit is contained in:
parent
992357c651
commit
6c31555328
|
@ -36,7 +36,7 @@
|
|||
* | | | 0x800b,0x8039 |
|
||||
* | AER/EEH | 0x9011 | |
|
||||
* | Virtual Port | 0xa007 | |
|
||||
* | ISP82XX Specific | 0xb084 | 0xb002,0xb024 |
|
||||
* | ISP82XX Specific | 0xb086 | 0xb002,0xb024 |
|
||||
* | MultiQ | 0xc00c | |
|
||||
* | Misc | 0xd010 | |
|
||||
* | Target Mode | 0xe070 | |
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -4065,6 +4065,8 @@ qla83xx_force_lock_recovery(scsi_qla_host_t *base_vha)
|
|||
uint32_t idc_lck_rcvry_stage_mask = 0x3;
|
||||
uint32_t idc_lck_rcvry_owner_mask = 0x3c;
|
||||
struct qla_hw_data *ha = base_vha->hw;
|
||||
ql_dbg(ql_dbg_p3p, base_vha, 0xb086,
|
||||
"Trying force recovery of the IDC lock.\n");
|
||||
|
||||
rval = qla83xx_rd_reg(base_vha, QLA83XX_IDC_LOCK_RECOVERY, &data);
|
||||
if (rval)
|
||||
|
@ -4156,6 +4158,7 @@ qla83xx_idc_lock(scsi_qla_host_t *base_vha, uint16_t requester_id)
|
|||
{
|
||||
uint16_t options = (requester_id << 15) | BIT_6;
|
||||
uint32_t data;
|
||||
uint32_t lock_owner;
|
||||
struct qla_hw_data *ha = base_vha->hw;
|
||||
|
||||
/* IDC-lock implementation using driver-lock/lock-id remote registers */
|
||||
|
@ -4167,8 +4170,11 @@ retry_lock:
|
|||
qla83xx_wr_reg(base_vha, QLA83XX_DRIVER_LOCKID,
|
||||
ha->portnum);
|
||||
} else {
|
||||
qla83xx_rd_reg(base_vha, QLA83XX_DRIVER_LOCKID,
|
||||
&lock_owner);
|
||||
ql_dbg(ql_dbg_p3p, base_vha, 0xb063,
|
||||
"Failed to acquire IDC lock. retrying...\n");
|
||||
"Failed to acquire IDC lock, acquired by %d, "
|
||||
"retrying...\n", lock_owner);
|
||||
|
||||
/* Retry/Perform IDC-Lock recovery */
|
||||
if (qla83xx_idc_lock_recovery(base_vha)
|
||||
|
|
Loading…
Reference in New Issue