aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2013-12-16 06:49:32 -0500
committerJames Bottomley <JBottomley@Parallels.com>2014-03-15 13:19:12 -0400
commita083e8bc839db0098301ebc483b83ff241e4fcdb (patch)
treee8f6e66c876ba58330de186435d04c0864117fce
parent37418cc61d0d71fc576bb49694d978c8e94e6e23 (diff)
[SCSI] qla4xxx: Print WARN_ONCE() if iSCSI function presence bit removed
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/qla4xxx/ql4_83xx.c20
-rw-r--r--drivers/scsi/qla4xxx/ql4_glbl.h1
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c5
3 files changed, 26 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_83xx.c b/drivers/scsi/qla4xxx/ql4_83xx.c
index 919284834ad7..c105b6eebf2b 100644
--- a/drivers/scsi/qla4xxx/ql4_83xx.c
+++ b/drivers/scsi/qla4xxx/ql4_83xx.c
@@ -1664,3 +1664,23 @@ void qla4_83xx_disable_pause(struct scsi_qla_host *ha)
1664 __qla4_83xx_disable_pause(ha); 1664 __qla4_83xx_disable_pause(ha);
1665 ha->isp_ops->idc_unlock(ha); 1665 ha->isp_ops->idc_unlock(ha);
1666} 1666}
1667
1668/**
1669 * qla4_83xx_is_detached - Check if we are marked invisible.
1670 * @ha: Pointer to host adapter structure.
1671 **/
1672int qla4_83xx_is_detached(struct scsi_qla_host *ha)
1673{
1674 uint32_t drv_active;
1675
1676 drv_active = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_ACTIVE);
1677
1678 if (test_bit(AF_INIT_DONE, &ha->flags) &&
1679 !(drv_active & (1 << ha->func_num))) {
1680 DEBUG2(ql4_printk(KERN_INFO, ha, "%s: drv_active = 0x%X\n",
1681 __func__, drv_active));
1682 return QLA_SUCCESS;
1683 }
1684
1685 return QLA_ERROR;
1686}
diff --git a/drivers/scsi/qla4xxx/ql4_glbl.h b/drivers/scsi/qla4xxx/ql4_glbl.h
index 6d72e1dde19f..b1a19cd8d5b2 100644
--- a/drivers/scsi/qla4xxx/ql4_glbl.h
+++ b/drivers/scsi/qla4xxx/ql4_glbl.h
@@ -280,6 +280,7 @@ uint8_t qla4xxx_set_ipaddr_state(uint8_t fw_ipaddr_state);
280int qla4_83xx_get_port_config(struct scsi_qla_host *ha, uint32_t *config); 280int qla4_83xx_get_port_config(struct scsi_qla_host *ha, uint32_t *config);
281int qla4_83xx_set_port_config(struct scsi_qla_host *ha, uint32_t *config); 281int qla4_83xx_set_port_config(struct scsi_qla_host *ha, uint32_t *config);
282int qla4_8xxx_check_init_adapter_retry(struct scsi_qla_host *ha); 282int qla4_8xxx_check_init_adapter_retry(struct scsi_qla_host *ha);
283int qla4_83xx_is_detached(struct scsi_qla_host *ha);
283 284
284extern int ql4xextended_error_logging; 285extern int ql4xextended_error_logging;
285extern int ql4xdontresethba; 286extern int ql4xdontresethba;
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 9803c9e3bc39..e6fa19cc0d32 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -4372,6 +4372,11 @@ void qla4_8xxx_watchdog(struct scsi_qla_host *ha)
4372 uint32_t dev_state; 4372 uint32_t dev_state;
4373 uint32_t idc_ctrl; 4373 uint32_t idc_ctrl;
4374 4374
4375 if (is_qla8032(ha) &&
4376 (qla4_83xx_is_detached(ha) == QLA_SUCCESS))
4377 WARN_ONCE(1, "%s: iSCSI function %d marked invisible\n",
4378 __func__, ha->func_num);
4379
4375 /* don't poll if reset is going on */ 4380 /* don't poll if reset is going on */
4376 if (!(test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags) || 4381 if (!(test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags) ||
4377 test_bit(DPC_RESET_HA, &ha->dpc_flags) || 4382 test_bit(DPC_RESET_HA, &ha->dpc_flags) ||