diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 63 |
1 files changed, 37 insertions, 26 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 2c0876c81a3..c194c23ca1f 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -37,12 +37,12 @@ static struct kmem_cache *srb_cachep; | |||
37 | static struct kmem_cache *ctx_cachep; | 37 | static struct kmem_cache *ctx_cachep; |
38 | 38 | ||
39 | int ql2xlogintimeout = 20; | 39 | int ql2xlogintimeout = 20; |
40 | module_param(ql2xlogintimeout, int, S_IRUGO|S_IRUSR); | 40 | module_param(ql2xlogintimeout, int, S_IRUGO); |
41 | MODULE_PARM_DESC(ql2xlogintimeout, | 41 | MODULE_PARM_DESC(ql2xlogintimeout, |
42 | "Login timeout value in seconds."); | 42 | "Login timeout value in seconds."); |
43 | 43 | ||
44 | int qlport_down_retry; | 44 | int qlport_down_retry; |
45 | module_param(qlport_down_retry, int, S_IRUGO|S_IRUSR); | 45 | module_param(qlport_down_retry, int, S_IRUGO); |
46 | MODULE_PARM_DESC(qlport_down_retry, | 46 | MODULE_PARM_DESC(qlport_down_retry, |
47 | "Maximum number of command retries to a port that returns " | 47 | "Maximum number of command retries to a port that returns " |
48 | "a PORT-DOWN status."); | 48 | "a PORT-DOWN status."); |
@@ -55,12 +55,12 @@ MODULE_PARM_DESC(ql2xplogiabsentdevice, | |||
55 | "Default is 0 - no PLOGI. 1 - perfom PLOGI."); | 55 | "Default is 0 - no PLOGI. 1 - perfom PLOGI."); |
56 | 56 | ||
57 | int ql2xloginretrycount = 0; | 57 | int ql2xloginretrycount = 0; |
58 | module_param(ql2xloginretrycount, int, S_IRUGO|S_IRUSR); | 58 | module_param(ql2xloginretrycount, int, S_IRUGO); |
59 | MODULE_PARM_DESC(ql2xloginretrycount, | 59 | MODULE_PARM_DESC(ql2xloginretrycount, |
60 | "Specify an alternate value for the NVRAM login retry count."); | 60 | "Specify an alternate value for the NVRAM login retry count."); |
61 | 61 | ||
62 | int ql2xallocfwdump = 1; | 62 | int ql2xallocfwdump = 1; |
63 | module_param(ql2xallocfwdump, int, S_IRUGO|S_IRUSR); | 63 | module_param(ql2xallocfwdump, int, S_IRUGO); |
64 | MODULE_PARM_DESC(ql2xallocfwdump, | 64 | MODULE_PARM_DESC(ql2xallocfwdump, |
65 | "Option to enable allocation of memory for a firmware dump " | 65 | "Option to enable allocation of memory for a firmware dump " |
66 | "during HBA initialization. Memory allocation requirements " | 66 | "during HBA initialization. Memory allocation requirements " |
@@ -73,7 +73,7 @@ MODULE_PARM_DESC(ql2xextended_error_logging, | |||
73 | "Default is 0 - no logging. 1 - log errors."); | 73 | "Default is 0 - no logging. 1 - log errors."); |
74 | 74 | ||
75 | int ql2xshiftctondsd = 6; | 75 | int ql2xshiftctondsd = 6; |
76 | module_param(ql2xshiftctondsd, int, S_IRUGO|S_IRUSR); | 76 | module_param(ql2xshiftctondsd, int, S_IRUGO); |
77 | MODULE_PARM_DESC(ql2xshiftctondsd, | 77 | MODULE_PARM_DESC(ql2xshiftctondsd, |
78 | "Set to control shifting of command type processing " | 78 | "Set to control shifting of command type processing " |
79 | "based on total number of SG elements."); | 79 | "based on total number of SG elements."); |
@@ -81,7 +81,7 @@ MODULE_PARM_DESC(ql2xshiftctondsd, | |||
81 | static void qla2x00_free_device(scsi_qla_host_t *); | 81 | static void qla2x00_free_device(scsi_qla_host_t *); |
82 | 82 | ||
83 | int ql2xfdmienable=1; | 83 | int ql2xfdmienable=1; |
84 | module_param(ql2xfdmienable, int, S_IRUGO|S_IRUSR); | 84 | module_param(ql2xfdmienable, int, S_IRUGO); |
85 | MODULE_PARM_DESC(ql2xfdmienable, | 85 | MODULE_PARM_DESC(ql2xfdmienable, |
86 | "Enables FDMI registrations. " | 86 | "Enables FDMI registrations. " |
87 | "0 - no FDMI. Default is 1 - perform FDMI."); | 87 | "0 - no FDMI. Default is 1 - perform FDMI."); |
@@ -106,27 +106,27 @@ MODULE_PARM_DESC(ql2xenablehba_err_chk, | |||
106 | " Default is 0 - Error isolation disabled, 1 - Enable it"); | 106 | " Default is 0 - Error isolation disabled, 1 - Enable it"); |
107 | 107 | ||
108 | int ql2xiidmaenable=1; | 108 | int ql2xiidmaenable=1; |
109 | module_param(ql2xiidmaenable, int, S_IRUGO|S_IRUSR); | 109 | module_param(ql2xiidmaenable, int, S_IRUGO); |
110 | MODULE_PARM_DESC(ql2xiidmaenable, | 110 | MODULE_PARM_DESC(ql2xiidmaenable, |
111 | "Enables iIDMA settings " | 111 | "Enables iIDMA settings " |
112 | "Default is 1 - perform iIDMA. 0 - no iIDMA."); | 112 | "Default is 1 - perform iIDMA. 0 - no iIDMA."); |
113 | 113 | ||
114 | int ql2xmaxqueues = 1; | 114 | int ql2xmaxqueues = 1; |
115 | module_param(ql2xmaxqueues, int, S_IRUGO|S_IRUSR); | 115 | module_param(ql2xmaxqueues, int, S_IRUGO); |
116 | MODULE_PARM_DESC(ql2xmaxqueues, | 116 | MODULE_PARM_DESC(ql2xmaxqueues, |
117 | "Enables MQ settings " | 117 | "Enables MQ settings " |
118 | "Default is 1 for single queue. Set it to number " | 118 | "Default is 1 for single queue. Set it to number " |
119 | "of queues in MQ mode."); | 119 | "of queues in MQ mode."); |
120 | 120 | ||
121 | int ql2xmultique_tag; | 121 | int ql2xmultique_tag; |
122 | module_param(ql2xmultique_tag, int, S_IRUGO|S_IRUSR); | 122 | module_param(ql2xmultique_tag, int, S_IRUGO); |
123 | MODULE_PARM_DESC(ql2xmultique_tag, | 123 | MODULE_PARM_DESC(ql2xmultique_tag, |
124 | "Enables CPU affinity settings for the driver " | 124 | "Enables CPU affinity settings for the driver " |
125 | "Default is 0 for no affinity of request and response IO. " | 125 | "Default is 0 for no affinity of request and response IO. " |
126 | "Set it to 1 to turn on the cpu affinity."); | 126 | "Set it to 1 to turn on the cpu affinity."); |
127 | 127 | ||
128 | int ql2xfwloadbin; | 128 | int ql2xfwloadbin; |
129 | module_param(ql2xfwloadbin, int, S_IRUGO|S_IRUSR); | 129 | module_param(ql2xfwloadbin, int, S_IRUGO); |
130 | MODULE_PARM_DESC(ql2xfwloadbin, | 130 | MODULE_PARM_DESC(ql2xfwloadbin, |
131 | "Option to specify location from which to load ISP firmware:\n" | 131 | "Option to specify location from which to load ISP firmware:\n" |
132 | " 2 -- load firmware via the request_firmware() (hotplug)\n" | 132 | " 2 -- load firmware via the request_firmware() (hotplug)\n" |
@@ -135,39 +135,32 @@ MODULE_PARM_DESC(ql2xfwloadbin, | |||
135 | " 0 -- use default semantics.\n"); | 135 | " 0 -- use default semantics.\n"); |
136 | 136 | ||
137 | int ql2xetsenable; | 137 | int ql2xetsenable; |
138 | module_param(ql2xetsenable, int, S_IRUGO|S_IRUSR); | 138 | module_param(ql2xetsenable, int, S_IRUGO); |
139 | MODULE_PARM_DESC(ql2xetsenable, | 139 | MODULE_PARM_DESC(ql2xetsenable, |
140 | "Enables firmware ETS burst." | 140 | "Enables firmware ETS burst." |
141 | "Default is 0 - skip ETS enablement."); | 141 | "Default is 0 - skip ETS enablement."); |
142 | 142 | ||
143 | int ql2xdbwr = 1; | 143 | int ql2xdbwr = 1; |
144 | module_param(ql2xdbwr, int, S_IRUGO|S_IRUSR); | 144 | module_param(ql2xdbwr, int, S_IRUGO); |
145 | MODULE_PARM_DESC(ql2xdbwr, | 145 | MODULE_PARM_DESC(ql2xdbwr, |
146 | "Option to specify scheme for request queue posting\n" | 146 | "Option to specify scheme for request queue posting\n" |
147 | " 0 -- Regular doorbell.\n" | 147 | " 0 -- Regular doorbell.\n" |
148 | " 1 -- CAMRAM doorbell (faster).\n"); | 148 | " 1 -- CAMRAM doorbell (faster).\n"); |
149 | 149 | ||
150 | int ql2xdontresethba; | ||
151 | module_param(ql2xdontresethba, int, S_IRUGO|S_IRUSR); | ||
152 | MODULE_PARM_DESC(ql2xdontresethba, | ||
153 | "Option to specify reset behaviour\n" | ||
154 | " 0 (Default) -- Reset on failure.\n" | ||
155 | " 1 -- Do not reset on failure.\n"); | ||
156 | |||
157 | int ql2xtargetreset = 1; | 150 | int ql2xtargetreset = 1; |
158 | module_param(ql2xtargetreset, int, S_IRUGO|S_IRUSR); | 151 | module_param(ql2xtargetreset, int, S_IRUGO); |
159 | MODULE_PARM_DESC(ql2xtargetreset, | 152 | MODULE_PARM_DESC(ql2xtargetreset, |
160 | "Enable target reset." | 153 | "Enable target reset." |
161 | "Default is 1 - use hw defaults."); | 154 | "Default is 1 - use hw defaults."); |
162 | 155 | ||
163 | int ql2xgffidenable; | 156 | int ql2xgffidenable; |
164 | module_param(ql2xgffidenable, int, S_IRUGO|S_IRUSR); | 157 | module_param(ql2xgffidenable, int, S_IRUGO); |
165 | MODULE_PARM_DESC(ql2xgffidenable, | 158 | MODULE_PARM_DESC(ql2xgffidenable, |
166 | "Enables GFF_ID checks of port type. " | 159 | "Enables GFF_ID checks of port type. " |
167 | "Default is 0 - Do not use GFF_ID information."); | 160 | "Default is 0 - Do not use GFF_ID information."); |
168 | 161 | ||
169 | int ql2xasynctmfenable; | 162 | int ql2xasynctmfenable; |
170 | module_param(ql2xasynctmfenable, int, S_IRUGO|S_IRUSR); | 163 | module_param(ql2xasynctmfenable, int, S_IRUGO); |
171 | MODULE_PARM_DESC(ql2xasynctmfenable, | 164 | MODULE_PARM_DESC(ql2xasynctmfenable, |
172 | "Enables issue of TM IOCBs asynchronously via IOCB mechanism" | 165 | "Enables issue of TM IOCBs asynchronously via IOCB mechanism" |
173 | "Default is 0 - Issue TM IOCBs via mailbox mechanism."); | 166 | "Default is 0 - Issue TM IOCBs via mailbox mechanism."); |
@@ -2371,7 +2364,7 @@ qla2x00_remove_one(struct pci_dev *pdev) | |||
2371 | list_for_each_entry(vha, &ha->vp_list, list) { | 2364 | list_for_each_entry(vha, &ha->vp_list, list) { |
2372 | atomic_inc(&vha->vref_count); | 2365 | atomic_inc(&vha->vref_count); |
2373 | 2366 | ||
2374 | if (vha && vha->fc_vport) { | 2367 | if (vha->fc_vport) { |
2375 | spin_unlock_irqrestore(&ha->vport_slock, flags); | 2368 | spin_unlock_irqrestore(&ha->vport_slock, flags); |
2376 | 2369 | ||
2377 | fc_vport_terminate(vha->fc_vport); | 2370 | fc_vport_terminate(vha->fc_vport); |
@@ -3386,6 +3379,21 @@ qla2x00_do_dpc(void *data) | |||
3386 | clear_bit(FCPORT_UPDATE_NEEDED, &base_vha->dpc_flags); | 3379 | clear_bit(FCPORT_UPDATE_NEEDED, &base_vha->dpc_flags); |
3387 | } | 3380 | } |
3388 | 3381 | ||
3382 | if (test_bit(ISP_QUIESCE_NEEDED, &base_vha->dpc_flags)) { | ||
3383 | DEBUG(printk(KERN_INFO "scsi(%ld): dpc: sched " | ||
3384 | "qla2x00_quiesce_needed ha = %p\n", | ||
3385 | base_vha->host_no, ha)); | ||
3386 | qla82xx_device_state_handler(base_vha); | ||
3387 | clear_bit(ISP_QUIESCE_NEEDED, &base_vha->dpc_flags); | ||
3388 | if (!ha->flags.quiesce_owner) { | ||
3389 | qla2x00_perform_loop_resync(base_vha); | ||
3390 | |||
3391 | qla82xx_idc_lock(ha); | ||
3392 | qla82xx_clear_qsnt_ready(base_vha); | ||
3393 | qla82xx_idc_unlock(ha); | ||
3394 | } | ||
3395 | } | ||
3396 | |||
3389 | if (test_and_clear_bit(RESET_MARKER_NEEDED, | 3397 | if (test_and_clear_bit(RESET_MARKER_NEEDED, |
3390 | &base_vha->dpc_flags) && | 3398 | &base_vha->dpc_flags) && |
3391 | (!(test_and_set_bit(RESET_ACTIVE, &base_vha->dpc_flags)))) { | 3399 | (!(test_and_set_bit(RESET_ACTIVE, &base_vha->dpc_flags)))) { |
@@ -3589,13 +3597,16 @@ qla2x00_timer(scsi_qla_host_t *vha) | |||
3589 | return; | 3597 | return; |
3590 | } | 3598 | } |
3591 | 3599 | ||
3592 | if (IS_QLA82XX(ha)) | ||
3593 | qla82xx_watchdog(vha); | ||
3594 | |||
3595 | /* Hardware read to raise pending EEH errors during mailbox waits. */ | 3600 | /* Hardware read to raise pending EEH errors during mailbox waits. */ |
3596 | if (!pci_channel_offline(ha->pdev)) | 3601 | if (!pci_channel_offline(ha->pdev)) |
3597 | pci_read_config_word(ha->pdev, PCI_VENDOR_ID, &w); | 3602 | pci_read_config_word(ha->pdev, PCI_VENDOR_ID, &w); |
3598 | 3603 | ||
3604 | if (IS_QLA82XX(ha)) { | ||
3605 | if (test_bit(ISP_QUIESCE_NEEDED, &vha->dpc_flags)) | ||
3606 | start_dpc++; | ||
3607 | qla82xx_watchdog(vha); | ||
3608 | } | ||
3609 | |||
3599 | /* Loop down handler. */ | 3610 | /* Loop down handler. */ |
3600 | if (atomic_read(&vha->loop_down_timer) > 0 && | 3611 | if (atomic_read(&vha->loop_down_timer) > 0 && |
3601 | !(test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) | 3612 | !(test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) |