qla2xxx: Log when device state is moved to failed state.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
ba4828b7f0
commit
4fa0c6687f
|
@ -1655,6 +1655,19 @@ qla8044_set_drv_active(struct scsi_qla_host *vha)
|
||||||
qla8044_wr_direct(vha, QLA8044_CRB_DRV_ACTIVE_INDEX, drv_active);
|
qla8044_wr_direct(vha, QLA8044_CRB_DRV_ACTIVE_INDEX, drv_active);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
qla8044_check_drv_active(struct scsi_qla_host *vha)
|
||||||
|
{
|
||||||
|
uint32_t drv_active;
|
||||||
|
struct qla_hw_data *ha = vha->hw;
|
||||||
|
|
||||||
|
drv_active = qla8044_rd_direct(vha, QLA8044_CRB_DRV_ACTIVE_INDEX);
|
||||||
|
if (drv_active & (1 << ha->portnum))
|
||||||
|
return QLA_SUCCESS;
|
||||||
|
else
|
||||||
|
return QLA_TEST_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qla8044_clear_idc_dontreset(struct scsi_qla_host *vha)
|
qla8044_clear_idc_dontreset(struct scsi_qla_host *vha)
|
||||||
{
|
{
|
||||||
|
@ -1837,14 +1850,16 @@ qla8044_device_state_handler(struct scsi_qla_host *vha)
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (time_after_eq(jiffies, dev_init_timeout)) {
|
if (time_after_eq(jiffies, dev_init_timeout)) {
|
||||||
ql_log(ql_log_warn, vha, 0xb0cf,
|
if (qla8044_check_drv_active(vha) == QLA_SUCCESS) {
|
||||||
"%s: Device Init Failed 0x%x = %s\n",
|
ql_log(ql_log_warn, vha, 0xb0cf,
|
||||||
QLA2XXX_DRIVER_NAME, dev_state,
|
"%s: Device Init Failed 0x%x = %s\n",
|
||||||
dev_state < MAX_STATES ?
|
QLA2XXX_DRIVER_NAME, dev_state,
|
||||||
qdev_state(dev_state) : "Unknown");
|
dev_state < MAX_STATES ?
|
||||||
|
qdev_state(dev_state) : "Unknown");
|
||||||
qla8044_wr_direct(vha, QLA8044_CRB_DEV_STATE_INDEX,
|
qla8044_wr_direct(vha,
|
||||||
QLA8XXX_DEV_FAILED);
|
QLA8044_CRB_DEV_STATE_INDEX,
|
||||||
|
QLA8XXX_DEV_FAILED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_state = qla8044_rd_direct(vha, QLA8044_CRB_DEV_STATE_INDEX);
|
dev_state = qla8044_rd_direct(vha, QLA8044_CRB_DEV_STATE_INDEX);
|
||||||
|
|
Loading…
Reference in New Issue