aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNilesh Javali <nilesh.javali@qlogic.com>2014-04-09 21:12:25 -0400
committerChristoph Hellwig <hch@lst.de>2014-05-19 13:12:19 -0400
commit906cbf3d2cef76a6e23207647cbbbc66023886f9 (patch)
treef6aecc180dd7a3eb082907a7e6ec87efcfd63e62
parentd43ba46fa226b106c66c7c92c8c512ef8515b6ee (diff)
qla4xxx: Export sysfs DDBs from DPC handler
Issue: modprobe qla4xxx is killed by systemd due to timeout. Solution: The exporting of sysfs DDBs from qla4xxx_probe_adapter added delay of approximately 15s due to which system-udevd killed the modprobe of the driver. Added fix to export the sysfs DDBs from the DPC handler. Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/scsi/qla4xxx/ql4_def.h1
-rw-r--r--drivers/scsi/qla4xxx/ql4_glbl.h1
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c15
3 files changed, 11 insertions, 6 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index 73a502288bde..8f6d0fb2cd80 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -601,6 +601,7 @@ struct scsi_qla_host {
601#define DPC_HA_NEED_QUIESCENT 22 /* 0x00400000 ISP-82xx only*/ 601#define DPC_HA_NEED_QUIESCENT 22 /* 0x00400000 ISP-82xx only*/
602#define DPC_POST_IDC_ACK 23 /* 0x00800000 */ 602#define DPC_POST_IDC_ACK 23 /* 0x00800000 */
603#define DPC_RESTORE_ACB 24 /* 0x01000000 */ 603#define DPC_RESTORE_ACB 24 /* 0x01000000 */
604#define DPC_SYSFS_DDB_EXPORT 25 /* 0x02000000 */
604 605
605 struct Scsi_Host *host; /* pointer to host data */ 606 struct Scsi_Host *host; /* pointer to host data */
606 uint32_t tot_ddbs; 607 uint32_t tot_ddbs;
diff --git a/drivers/scsi/qla4xxx/ql4_glbl.h b/drivers/scsi/qla4xxx/ql4_glbl.h
index 20354754faa2..5f58b451327e 100644
--- a/drivers/scsi/qla4xxx/ql4_glbl.h
+++ b/drivers/scsi/qla4xxx/ql4_glbl.h
@@ -281,6 +281,7 @@ int 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); 283int qla4_83xx_is_detached(struct scsi_qla_host *ha);
284int qla4xxx_sysfs_ddb_export(struct scsi_qla_host *ha);
284 285
285extern int ql4xextended_error_logging; 286extern int ql4xextended_error_logging;
286extern int ql4xdontresethba; 287extern int ql4xdontresethba;
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index bb160409b7cb..9be829bb90db 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -4565,6 +4565,7 @@ static void qla4xxx_timer(struct scsi_qla_host *ha)
4565 test_bit(DPC_LINK_CHANGED, &ha->dpc_flags) || 4565 test_bit(DPC_LINK_CHANGED, &ha->dpc_flags) ||
4566 test_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags) || 4566 test_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags) ||
4567 test_bit(DPC_HA_NEED_QUIESCENT, &ha->dpc_flags) || 4567 test_bit(DPC_HA_NEED_QUIESCENT, &ha->dpc_flags) ||
4568 test_bit(DPC_SYSFS_DDB_EXPORT, &ha->dpc_flags) ||
4568 test_bit(DPC_AEN, &ha->dpc_flags)) { 4569 test_bit(DPC_AEN, &ha->dpc_flags)) {
4569 DEBUG2(printk("scsi%ld: %s: scheduling dpc routine" 4570 DEBUG2(printk("scsi%ld: %s: scheduling dpc routine"
4570 " - dpc flags = 0x%lx\n", 4571 " - dpc flags = 0x%lx\n",
@@ -5429,6 +5430,11 @@ dpc_post_reset_ha:
5429 qla4xxx_relogin_all_devices(ha); 5430 qla4xxx_relogin_all_devices(ha);
5430 } 5431 }
5431 } 5432 }
5433 if (test_and_clear_bit(DPC_SYSFS_DDB_EXPORT, &ha->dpc_flags)) {
5434 if (qla4xxx_sysfs_ddb_export(ha))
5435 ql4_printk(KERN_ERR, ha, "%s: Error exporting ddb to sysfs\n",
5436 __func__);
5437 }
5432} 5438}
5433 5439
5434/** 5440/**
@@ -8406,7 +8412,7 @@ exit_ddb_del:
8406 * 8412 *
8407 * Export the firmware DDB for all send targets and normal targets to sysfs. 8413 * Export the firmware DDB for all send targets and normal targets to sysfs.
8408 **/ 8414 **/
8409static int qla4xxx_sysfs_ddb_export(struct scsi_qla_host *ha) 8415int qla4xxx_sysfs_ddb_export(struct scsi_qla_host *ha)
8410{ 8416{
8411 struct dev_db_entry *fw_ddb_entry = NULL; 8417 struct dev_db_entry *fw_ddb_entry = NULL;
8412 dma_addr_t fw_ddb_entry_dma; 8418 dma_addr_t fw_ddb_entry_dma;
@@ -8844,11 +8850,8 @@ skip_retry_init:
8844 ql4_printk(KERN_ERR, ha, 8850 ql4_printk(KERN_ERR, ha,
8845 "%s: No iSCSI boot target configured\n", __func__); 8851 "%s: No iSCSI boot target configured\n", __func__);
8846 8852
8847 if (qla4xxx_sysfs_ddb_export(ha)) 8853 set_bit(DPC_SYSFS_DDB_EXPORT, &ha->dpc_flags);
8848 ql4_printk(KERN_ERR, ha, 8854 /* Perform the build ddb list and login to each */
8849 "%s: Error exporting ddb to sysfs\n", __func__);
8850
8851 /* Perform the build ddb list and login to each */
8852 qla4xxx_build_ddb_list(ha, INIT_ADAPTER); 8855 qla4xxx_build_ddb_list(ha, INIT_ADAPTER);
8853 iscsi_host_for_each_session(ha->host, qla4xxx_login_flash_ddb); 8856 iscsi_host_for_each_session(ha->host, qla4xxx_login_flash_ddb);
8854 qla4xxx_wait_login_resp_boot_tgt(ha); 8857 qla4xxx_wait_login_resp_boot_tgt(ha);