diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 6 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_bsg.c | 6 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_ct.c | 3 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 10 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 5 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 45 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nportdisc.c | 19 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 33 |
9 files changed, 80 insertions, 49 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 7706c99ec8bb..c586db227a9a 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -66,8 +66,10 @@ struct lpfc_sli2_slim; | |||
66 | * queue depths when there are driver resource error or Firmware | 66 | * queue depths when there are driver resource error or Firmware |
67 | * resource error. | 67 | * resource error. |
68 | */ | 68 | */ |
69 | #define QUEUE_RAMP_DOWN_INTERVAL (1 * HZ) /* 1 Second */ | 69 | /* 1 Second */ |
70 | #define QUEUE_RAMP_UP_INTERVAL (300 * HZ) /* 5 minutes */ | 70 | #define QUEUE_RAMP_DOWN_INTERVAL (msecs_to_jiffies(1000 * 1)) |
71 | /* 5 minutes */ | ||
72 | #define QUEUE_RAMP_UP_INTERVAL (msecs_to_jiffies(1000 * 300)) | ||
71 | 73 | ||
72 | /* Number of exchanges reserved for discovery to complete */ | 74 | /* Number of exchanges reserved for discovery to complete */ |
73 | #define LPFC_DISC_IOCB_BUFF_COUNT 20 | 75 | #define LPFC_DISC_IOCB_BUFF_COUNT 20 |
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 888666892004..f79933366545 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c | |||
@@ -2576,7 +2576,8 @@ static int lpfcdiag_loop_get_xri(struct lpfc_hba *phba, uint16_t rpi, | |||
2576 | evt->wait_time_stamp = jiffies; | 2576 | evt->wait_time_stamp = jiffies; |
2577 | time_left = wait_event_interruptible_timeout( | 2577 | time_left = wait_event_interruptible_timeout( |
2578 | evt->wq, !list_empty(&evt->events_to_see), | 2578 | evt->wq, !list_empty(&evt->events_to_see), |
2579 | ((phba->fc_ratov * 2) + LPFC_DRVR_TIMEOUT) * HZ); | 2579 | msecs_to_jiffies(1000 * |
2580 | ((phba->fc_ratov * 2) + LPFC_DRVR_TIMEOUT))); | ||
2580 | if (list_empty(&evt->events_to_see)) | 2581 | if (list_empty(&evt->events_to_see)) |
2581 | ret_val = (time_left) ? -EINTR : -ETIMEDOUT; | 2582 | ret_val = (time_left) ? -EINTR : -ETIMEDOUT; |
2582 | else { | 2583 | else { |
@@ -3151,7 +3152,8 @@ lpfc_bsg_diag_loopback_run(struct fc_bsg_job *job) | |||
3151 | evt->waiting = 1; | 3152 | evt->waiting = 1; |
3152 | time_left = wait_event_interruptible_timeout( | 3153 | time_left = wait_event_interruptible_timeout( |
3153 | evt->wq, !list_empty(&evt->events_to_see), | 3154 | evt->wq, !list_empty(&evt->events_to_see), |
3154 | ((phba->fc_ratov * 2) + LPFC_DRVR_TIMEOUT) * HZ); | 3155 | msecs_to_jiffies(1000 * |
3156 | ((phba->fc_ratov * 2) + LPFC_DRVR_TIMEOUT))); | ||
3155 | evt->waiting = 0; | 3157 | evt->waiting = 0; |
3156 | if (list_empty(&evt->events_to_see)) { | 3158 | if (list_empty(&evt->events_to_see)) { |
3157 | rc = (time_left) ? -EINTR : -ETIMEDOUT; | 3159 | rc = (time_left) ? -EINTR : -ETIMEDOUT; |
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index 7bff3a19af56..ae1a07c57cae 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c | |||
@@ -1811,7 +1811,8 @@ lpfc_fdmi_timeout_handler(struct lpfc_vport *vport) | |||
1811 | if (init_utsname()->nodename[0] != '\0') | 1811 | if (init_utsname()->nodename[0] != '\0') |
1812 | lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_DHBA); | 1812 | lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_DHBA); |
1813 | else | 1813 | else |
1814 | mod_timer(&vport->fc_fdmitmo, jiffies + HZ * 60); | 1814 | mod_timer(&vport->fc_fdmitmo, jiffies + |
1815 | msecs_to_jiffies(1000 * 60)); | ||
1815 | } | 1816 | } |
1816 | return; | 1817 | return; |
1817 | } | 1818 | } |
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index bbed8471bf0b..7ea0d35be977 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -6241,7 +6241,8 @@ lpfc_els_timeout_handler(struct lpfc_vport *vport) | |||
6241 | } | 6241 | } |
6242 | 6242 | ||
6243 | if (!list_empty(&phba->sli.ring[LPFC_ELS_RING].txcmplq)) | 6243 | if (!list_empty(&phba->sli.ring[LPFC_ELS_RING].txcmplq)) |
6244 | mod_timer(&vport->els_tmofunc, jiffies + HZ * timeout); | 6244 | mod_timer(&vport->els_tmofunc, |
6245 | jiffies + msecs_to_jiffies(1000 * timeout)); | ||
6245 | } | 6246 | } |
6246 | 6247 | ||
6247 | /** | 6248 | /** |
@@ -7003,7 +7004,7 @@ lpfc_do_scr_ns_plogi(struct lpfc_hba *phba, struct lpfc_vport *vport) | |||
7003 | if (vport->fc_flag & FC_DISC_DELAYED) { | 7004 | if (vport->fc_flag & FC_DISC_DELAYED) { |
7004 | spin_unlock_irq(shost->host_lock); | 7005 | spin_unlock_irq(shost->host_lock); |
7005 | mod_timer(&vport->delayed_disc_tmo, | 7006 | mod_timer(&vport->delayed_disc_tmo, |
7006 | jiffies + HZ * phba->fc_ratov); | 7007 | jiffies + msecs_to_jiffies(1000 * phba->fc_ratov)); |
7007 | return; | 7008 | return; |
7008 | } | 7009 | } |
7009 | spin_unlock_irq(shost->host_lock); | 7010 | spin_unlock_irq(shost->host_lock); |
@@ -7287,7 +7288,7 @@ lpfc_retry_pport_discovery(struct lpfc_hba *phba) | |||
7287 | return; | 7288 | return; |
7288 | 7289 | ||
7289 | shost = lpfc_shost_from_vport(phba->pport); | 7290 | shost = lpfc_shost_from_vport(phba->pport); |
7290 | mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ); | 7291 | mod_timer(&ndlp->nlp_delayfunc, jiffies + msecs_to_jiffies(1000)); |
7291 | spin_lock_irq(shost->host_lock); | 7292 | spin_lock_irq(shost->host_lock); |
7292 | ndlp->nlp_flag |= NLP_DELAY_TMO; | 7293 | ndlp->nlp_flag |= NLP_DELAY_TMO; |
7293 | spin_unlock_irq(shost->host_lock); | 7294 | spin_unlock_irq(shost->host_lock); |
@@ -7791,7 +7792,8 @@ lpfc_block_fabric_iocbs(struct lpfc_hba *phba) | |||
7791 | blocked = test_and_set_bit(FABRIC_COMANDS_BLOCKED, &phba->bit_flags); | 7792 | blocked = test_and_set_bit(FABRIC_COMANDS_BLOCKED, &phba->bit_flags); |
7792 | /* Start a timer to unblock fabric iocbs after 100ms */ | 7793 | /* Start a timer to unblock fabric iocbs after 100ms */ |
7793 | if (!blocked) | 7794 | if (!blocked) |
7794 | mod_timer(&phba->fabric_block_timer, jiffies + HZ/10 ); | 7795 | mod_timer(&phba->fabric_block_timer, |
7796 | jiffies + msecs_to_jiffies(100)); | ||
7795 | 7797 | ||
7796 | return; | 7798 | return; |
7797 | } | 7799 | } |
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 2ce2ebcc8f17..62deb31fa4b8 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -4247,7 +4247,7 @@ lpfc_set_disctmo(struct lpfc_vport *vport) | |||
4247 | tmo, vport->port_state, vport->fc_flag); | 4247 | tmo, vport->port_state, vport->fc_flag); |
4248 | } | 4248 | } |
4249 | 4249 | ||
4250 | mod_timer(&vport->fc_disctmo, jiffies + HZ * tmo); | 4250 | mod_timer(&vport->fc_disctmo, jiffies + msecs_to_jiffies(1000 * tmo)); |
4251 | spin_lock_irq(shost->host_lock); | 4251 | spin_lock_irq(shost->host_lock); |
4252 | vport->fc_flag |= FC_DISC_TMO; | 4252 | vport->fc_flag |= FC_DISC_TMO; |
4253 | spin_unlock_irq(shost->host_lock); | 4253 | spin_unlock_irq(shost->host_lock); |
@@ -5422,7 +5422,8 @@ lpfc_mbx_cmpl_fdmi_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
5422 | if (vport->cfg_fdmi_on == 1) | 5422 | if (vport->cfg_fdmi_on == 1) |
5423 | lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_DHBA); | 5423 | lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_DHBA); |
5424 | else | 5424 | else |
5425 | mod_timer(&vport->fc_fdmitmo, jiffies + HZ * 60); | 5425 | mod_timer(&vport->fc_fdmitmo, |
5426 | jiffies + msecs_to_jiffies(1000 * 60)); | ||
5426 | 5427 | ||
5427 | /* decrement the node reference count held for this callback | 5428 | /* decrement the node reference count held for this callback |
5428 | * function. | 5429 | * function. |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 8edef6c4d57a..ac210d7fc96a 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -541,13 +541,16 @@ lpfc_config_port_post(struct lpfc_hba *phba) | |||
541 | 541 | ||
542 | /* Set up ring-0 (ELS) timer */ | 542 | /* Set up ring-0 (ELS) timer */ |
543 | timeout = phba->fc_ratov * 2; | 543 | timeout = phba->fc_ratov * 2; |
544 | mod_timer(&vport->els_tmofunc, jiffies + HZ * timeout); | 544 | mod_timer(&vport->els_tmofunc, |
545 | jiffies + msecs_to_jiffies(1000 * timeout)); | ||
545 | /* Set up heart beat (HB) timer */ | 546 | /* Set up heart beat (HB) timer */ |
546 | mod_timer(&phba->hb_tmofunc, jiffies + HZ * LPFC_HB_MBOX_INTERVAL); | 547 | mod_timer(&phba->hb_tmofunc, |
548 | jiffies + msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL)); | ||
547 | phba->hb_outstanding = 0; | 549 | phba->hb_outstanding = 0; |
548 | phba->last_completion_time = jiffies; | 550 | phba->last_completion_time = jiffies; |
549 | /* Set up error attention (ERATT) polling timer */ | 551 | /* Set up error attention (ERATT) polling timer */ |
550 | mod_timer(&phba->eratt_poll, jiffies + HZ * LPFC_ERATT_POLL_INTERVAL); | 552 | mod_timer(&phba->eratt_poll, |
553 | jiffies + msecs_to_jiffies(1000 * LPFC_ERATT_POLL_INTERVAL)); | ||
551 | 554 | ||
552 | if (phba->hba_flag & LINK_DISABLED) { | 555 | if (phba->hba_flag & LINK_DISABLED) { |
553 | lpfc_printf_log(phba, | 556 | lpfc_printf_log(phba, |
@@ -1021,7 +1024,8 @@ lpfc_hb_mbox_cmpl(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmboxq) | |||
1021 | !(phba->link_state == LPFC_HBA_ERROR) && | 1024 | !(phba->link_state == LPFC_HBA_ERROR) && |
1022 | !(phba->pport->load_flag & FC_UNLOADING)) | 1025 | !(phba->pport->load_flag & FC_UNLOADING)) |
1023 | mod_timer(&phba->hb_tmofunc, | 1026 | mod_timer(&phba->hb_tmofunc, |
1024 | jiffies + HZ * LPFC_HB_MBOX_INTERVAL); | 1027 | jiffies + |
1028 | msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL)); | ||
1025 | return; | 1029 | return; |
1026 | } | 1030 | } |
1027 | 1031 | ||
@@ -1064,15 +1068,18 @@ lpfc_hb_timeout_handler(struct lpfc_hba *phba) | |||
1064 | 1068 | ||
1065 | spin_lock_irq(&phba->pport->work_port_lock); | 1069 | spin_lock_irq(&phba->pport->work_port_lock); |
1066 | 1070 | ||
1067 | if (time_after(phba->last_completion_time + LPFC_HB_MBOX_INTERVAL * HZ, | 1071 | if (time_after(phba->last_completion_time + |
1068 | jiffies)) { | 1072 | msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL), |
1073 | jiffies)) { | ||
1069 | spin_unlock_irq(&phba->pport->work_port_lock); | 1074 | spin_unlock_irq(&phba->pport->work_port_lock); |
1070 | if (!phba->hb_outstanding) | 1075 | if (!phba->hb_outstanding) |
1071 | mod_timer(&phba->hb_tmofunc, | 1076 | mod_timer(&phba->hb_tmofunc, |
1072 | jiffies + HZ * LPFC_HB_MBOX_INTERVAL); | 1077 | jiffies + |
1078 | msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL)); | ||
1073 | else | 1079 | else |
1074 | mod_timer(&phba->hb_tmofunc, | 1080 | mod_timer(&phba->hb_tmofunc, |
1075 | jiffies + HZ * LPFC_HB_MBOX_TIMEOUT); | 1081 | jiffies + |
1082 | msecs_to_jiffies(1000 * LPFC_HB_MBOX_TIMEOUT)); | ||
1076 | return; | 1083 | return; |
1077 | } | 1084 | } |
1078 | spin_unlock_irq(&phba->pport->work_port_lock); | 1085 | spin_unlock_irq(&phba->pport->work_port_lock); |
@@ -1104,7 +1111,8 @@ lpfc_hb_timeout_handler(struct lpfc_hba *phba) | |||
1104 | if (!pmboxq) { | 1111 | if (!pmboxq) { |
1105 | mod_timer(&phba->hb_tmofunc, | 1112 | mod_timer(&phba->hb_tmofunc, |
1106 | jiffies + | 1113 | jiffies + |
1107 | HZ * LPFC_HB_MBOX_INTERVAL); | 1114 | msecs_to_jiffies(1000 * |
1115 | LPFC_HB_MBOX_INTERVAL)); | ||
1108 | return; | 1116 | return; |
1109 | } | 1117 | } |
1110 | 1118 | ||
@@ -1120,7 +1128,8 @@ lpfc_hb_timeout_handler(struct lpfc_hba *phba) | |||
1120 | phba->mbox_mem_pool); | 1128 | phba->mbox_mem_pool); |
1121 | mod_timer(&phba->hb_tmofunc, | 1129 | mod_timer(&phba->hb_tmofunc, |
1122 | jiffies + | 1130 | jiffies + |
1123 | HZ * LPFC_HB_MBOX_INTERVAL); | 1131 | msecs_to_jiffies(1000 * |
1132 | LPFC_HB_MBOX_INTERVAL)); | ||
1124 | return; | 1133 | return; |
1125 | } | 1134 | } |
1126 | phba->skipped_hb = 0; | 1135 | phba->skipped_hb = 0; |
@@ -1136,7 +1145,8 @@ lpfc_hb_timeout_handler(struct lpfc_hba *phba) | |||
1136 | phba->skipped_hb = jiffies; | 1145 | phba->skipped_hb = jiffies; |
1137 | 1146 | ||
1138 | mod_timer(&phba->hb_tmofunc, | 1147 | mod_timer(&phba->hb_tmofunc, |
1139 | jiffies + HZ * LPFC_HB_MBOX_TIMEOUT); | 1148 | jiffies + |
1149 | msecs_to_jiffies(1000 * LPFC_HB_MBOX_TIMEOUT)); | ||
1140 | return; | 1150 | return; |
1141 | } else { | 1151 | } else { |
1142 | /* | 1152 | /* |
@@ -1150,7 +1160,8 @@ lpfc_hb_timeout_handler(struct lpfc_hba *phba) | |||
1150 | jiffies_to_msecs(jiffies | 1160 | jiffies_to_msecs(jiffies |
1151 | - phba->last_completion_time)); | 1161 | - phba->last_completion_time)); |
1152 | mod_timer(&phba->hb_tmofunc, | 1162 | mod_timer(&phba->hb_tmofunc, |
1153 | jiffies + HZ * LPFC_HB_MBOX_TIMEOUT); | 1163 | jiffies + |
1164 | msecs_to_jiffies(1000 * LPFC_HB_MBOX_TIMEOUT)); | ||
1154 | } | 1165 | } |
1155 | } | 1166 | } |
1156 | } | 1167 | } |
@@ -3207,14 +3218,15 @@ int lpfc_scan_finished(struct Scsi_Host *shost, unsigned long time) | |||
3207 | stat = 1; | 3218 | stat = 1; |
3208 | goto finished; | 3219 | goto finished; |
3209 | } | 3220 | } |
3210 | if (time >= 30 * HZ) { | 3221 | if (time >= msecs_to_jiffies(30 * 1000)) { |
3211 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 3222 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
3212 | "0461 Scanning longer than 30 " | 3223 | "0461 Scanning longer than 30 " |
3213 | "seconds. Continuing initialization\n"); | 3224 | "seconds. Continuing initialization\n"); |
3214 | stat = 1; | 3225 | stat = 1; |
3215 | goto finished; | 3226 | goto finished; |
3216 | } | 3227 | } |
3217 | if (time >= 15 * HZ && phba->link_state <= LPFC_LINK_DOWN) { | 3228 | if (time >= msecs_to_jiffies(15 * 1000) && |
3229 | phba->link_state <= LPFC_LINK_DOWN) { | ||
3218 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 3230 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
3219 | "0465 Link down longer than 15 " | 3231 | "0465 Link down longer than 15 " |
3220 | "seconds. Continuing initialization\n"); | 3232 | "seconds. Continuing initialization\n"); |
@@ -3226,7 +3238,7 @@ int lpfc_scan_finished(struct Scsi_Host *shost, unsigned long time) | |||
3226 | goto finished; | 3238 | goto finished; |
3227 | if (vport->num_disc_nodes || vport->fc_prli_sent) | 3239 | if (vport->num_disc_nodes || vport->fc_prli_sent) |
3228 | goto finished; | 3240 | goto finished; |
3229 | if (vport->fc_map_cnt == 0 && time < 2 * HZ) | 3241 | if (vport->fc_map_cnt == 0 && time < msecs_to_jiffies(2 * 1000)) |
3230 | goto finished; | 3242 | goto finished; |
3231 | if ((phba->sli.sli_flag & LPFC_SLI_MBOX_ACTIVE) != 0) | 3243 | if ((phba->sli.sli_flag & LPFC_SLI_MBOX_ACTIVE) != 0) |
3232 | goto finished; | 3244 | goto finished; |
@@ -4225,7 +4237,8 @@ lpfc_sli4_async_fip_evt(struct lpfc_hba *phba, | |||
4225 | * If there are other active VLinks present, | 4237 | * If there are other active VLinks present, |
4226 | * re-instantiate the Vlink using FDISC. | 4238 | * re-instantiate the Vlink using FDISC. |
4227 | */ | 4239 | */ |
4228 | mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ); | 4240 | mod_timer(&ndlp->nlp_delayfunc, |
4241 | jiffies + msecs_to_jiffies(1000)); | ||
4229 | shost = lpfc_shost_from_vport(vport); | 4242 | shost = lpfc_shost_from_vport(vport); |
4230 | spin_lock_irq(shost->host_lock); | 4243 | spin_lock_irq(shost->host_lock); |
4231 | ndlp->nlp_flag |= NLP_DELAY_TMO; | 4244 | ndlp->nlp_flag |= NLP_DELAY_TMO; |
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 82f4d3542289..41e833ede571 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c | |||
@@ -574,7 +574,7 @@ out: | |||
574 | lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, NULL); | 574 | lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, NULL); |
575 | 575 | ||
576 | /* 1 sec timeout */ | 576 | /* 1 sec timeout */ |
577 | mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ); | 577 | mod_timer(&ndlp->nlp_delayfunc, jiffies + msecs_to_jiffies(1000)); |
578 | 578 | ||
579 | spin_lock_irq(shost->host_lock); | 579 | spin_lock_irq(shost->host_lock); |
580 | ndlp->nlp_flag |= NLP_DELAY_TMO; | 580 | ndlp->nlp_flag |= NLP_DELAY_TMO; |
@@ -631,7 +631,8 @@ lpfc_rcv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
631 | * If there are other active VLinks present, | 631 | * If there are other active VLinks present, |
632 | * re-instantiate the Vlink using FDISC. | 632 | * re-instantiate the Vlink using FDISC. |
633 | */ | 633 | */ |
634 | mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ); | 634 | mod_timer(&ndlp->nlp_delayfunc, |
635 | jiffies + msecs_to_jiffies(1000)); | ||
635 | spin_lock_irq(shost->host_lock); | 636 | spin_lock_irq(shost->host_lock); |
636 | ndlp->nlp_flag |= NLP_DELAY_TMO; | 637 | ndlp->nlp_flag |= NLP_DELAY_TMO; |
637 | spin_unlock_irq(shost->host_lock); | 638 | spin_unlock_irq(shost->host_lock); |
@@ -648,7 +649,8 @@ lpfc_rcv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
648 | !(ndlp->nlp_type & NLP_FCP_INITIATOR))) || | 649 | !(ndlp->nlp_type & NLP_FCP_INITIATOR))) || |
649 | (ndlp->nlp_state == NLP_STE_ADISC_ISSUE)) { | 650 | (ndlp->nlp_state == NLP_STE_ADISC_ISSUE)) { |
650 | /* Only try to re-login if this is NOT a Fabric Node */ | 651 | /* Only try to re-login if this is NOT a Fabric Node */ |
651 | mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ * 1); | 652 | mod_timer(&ndlp->nlp_delayfunc, |
653 | jiffies + msecs_to_jiffies(1000 * 1)); | ||
652 | spin_lock_irq(shost->host_lock); | 654 | spin_lock_irq(shost->host_lock); |
653 | ndlp->nlp_flag |= NLP_DELAY_TMO; | 655 | ndlp->nlp_flag |= NLP_DELAY_TMO; |
654 | spin_unlock_irq(shost->host_lock); | 656 | spin_unlock_irq(shost->host_lock); |
@@ -969,7 +971,7 @@ lpfc_rcv_els_plogi_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
969 | } | 971 | } |
970 | 972 | ||
971 | /* Put ndlp in npr state set plogi timer for 1 sec */ | 973 | /* Put ndlp in npr state set plogi timer for 1 sec */ |
972 | mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ * 1); | 974 | mod_timer(&ndlp->nlp_delayfunc, jiffies + msecs_to_jiffies(1000 * 1)); |
973 | spin_lock_irq(shost->host_lock); | 975 | spin_lock_irq(shost->host_lock); |
974 | ndlp->nlp_flag |= NLP_DELAY_TMO; | 976 | ndlp->nlp_flag |= NLP_DELAY_TMO; |
975 | spin_unlock_irq(shost->host_lock); | 977 | spin_unlock_irq(shost->host_lock); |
@@ -1303,7 +1305,8 @@ lpfc_cmpl_adisc_adisc_issue(struct lpfc_vport *vport, | |||
1303 | if ((irsp->ulpStatus) || | 1305 | if ((irsp->ulpStatus) || |
1304 | (!lpfc_check_adisc(vport, ndlp, &ap->nodeName, &ap->portName))) { | 1306 | (!lpfc_check_adisc(vport, ndlp, &ap->nodeName, &ap->portName))) { |
1305 | /* 1 sec timeout */ | 1307 | /* 1 sec timeout */ |
1306 | mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ); | 1308 | mod_timer(&ndlp->nlp_delayfunc, |
1309 | jiffies + msecs_to_jiffies(1000)); | ||
1307 | spin_lock_irq(shost->host_lock); | 1310 | spin_lock_irq(shost->host_lock); |
1308 | ndlp->nlp_flag |= NLP_DELAY_TMO; | 1311 | ndlp->nlp_flag |= NLP_DELAY_TMO; |
1309 | spin_unlock_irq(shost->host_lock); | 1312 | spin_unlock_irq(shost->host_lock); |
@@ -1509,7 +1512,8 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport, | |||
1509 | } | 1512 | } |
1510 | 1513 | ||
1511 | /* Put ndlp in npr state set plogi timer for 1 sec */ | 1514 | /* Put ndlp in npr state set plogi timer for 1 sec */ |
1512 | mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ * 1); | 1515 | mod_timer(&ndlp->nlp_delayfunc, |
1516 | jiffies + msecs_to_jiffies(1000 * 1)); | ||
1513 | spin_lock_irq(shost->host_lock); | 1517 | spin_lock_irq(shost->host_lock); |
1514 | ndlp->nlp_flag |= NLP_DELAY_TMO; | 1518 | ndlp->nlp_flag |= NLP_DELAY_TMO; |
1515 | spin_unlock_irq(shost->host_lock); | 1519 | spin_unlock_irq(shost->host_lock); |
@@ -2145,7 +2149,8 @@ lpfc_rcv_prlo_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
2145 | lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL); | 2149 | lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL); |
2146 | 2150 | ||
2147 | if ((ndlp->nlp_flag & NLP_DELAY_TMO) == 0) { | 2151 | if ((ndlp->nlp_flag & NLP_DELAY_TMO) == 0) { |
2148 | mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ * 1); | 2152 | mod_timer(&ndlp->nlp_delayfunc, |
2153 | jiffies + msecs_to_jiffies(1000 * 1)); | ||
2149 | spin_lock_irq(shost->host_lock); | 2154 | spin_lock_irq(shost->host_lock); |
2150 | ndlp->nlp_flag |= NLP_DELAY_TMO; | 2155 | ndlp->nlp_flag |= NLP_DELAY_TMO; |
2151 | ndlp->nlp_flag &= ~NLP_NPR_ADISC; | 2156 | ndlp->nlp_flag &= ~NLP_NPR_ADISC; |
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index dacde58b602c..d096402ae4d7 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -4771,7 +4771,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) | |||
4771 | /* Wait for abort to complete */ | 4771 | /* Wait for abort to complete */ |
4772 | wait_event_timeout(waitq, | 4772 | wait_event_timeout(waitq, |
4773 | (lpfc_cmd->pCmd != cmnd), | 4773 | (lpfc_cmd->pCmd != cmnd), |
4774 | (2*vport->cfg_devloss_tmo*HZ)); | 4774 | msecs_to_jiffies(2*vport->cfg_devloss_tmo*1000)); |
4775 | lpfc_cmd->waitq = NULL; | 4775 | lpfc_cmd->waitq = NULL; |
4776 | 4776 | ||
4777 | if (lpfc_cmd->pCmd == cmnd) { | 4777 | if (lpfc_cmd->pCmd == cmnd) { |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 96fe1ef24689..89a3a4059064 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -667,7 +667,7 @@ lpfc_handle_rrq_active(struct lpfc_hba *phba) | |||
667 | 667 | ||
668 | spin_lock_irqsave(&phba->hbalock, iflags); | 668 | spin_lock_irqsave(&phba->hbalock, iflags); |
669 | phba->hba_flag &= ~HBA_RRQ_ACTIVE; | 669 | phba->hba_flag &= ~HBA_RRQ_ACTIVE; |
670 | next_time = jiffies + HZ * (phba->fc_ratov + 1); | 670 | next_time = jiffies + msecs_to_jiffies(1000 * (phba->fc_ratov + 1)); |
671 | list_for_each_entry_safe(rrq, nextrrq, | 671 | list_for_each_entry_safe(rrq, nextrrq, |
672 | &phba->active_rrq_list, list) { | 672 | &phba->active_rrq_list, list) { |
673 | if (time_after(jiffies, rrq->rrq_stop_time)) | 673 | if (time_after(jiffies, rrq->rrq_stop_time)) |
@@ -782,7 +782,7 @@ lpfc_cleanup_wt_rrqs(struct lpfc_hba *phba) | |||
782 | return; | 782 | return; |
783 | spin_lock_irqsave(&phba->hbalock, iflags); | 783 | spin_lock_irqsave(&phba->hbalock, iflags); |
784 | phba->hba_flag &= ~HBA_RRQ_ACTIVE; | 784 | phba->hba_flag &= ~HBA_RRQ_ACTIVE; |
785 | next_time = jiffies + HZ * (phba->fc_ratov * 2); | 785 | next_time = jiffies + msecs_to_jiffies(1000 * (phba->fc_ratov * 2)); |
786 | list_splice_init(&phba->active_rrq_list, &rrq_list); | 786 | list_splice_init(&phba->active_rrq_list, &rrq_list); |
787 | spin_unlock_irqrestore(&phba->hbalock, iflags); | 787 | spin_unlock_irqrestore(&phba->hbalock, iflags); |
788 | 788 | ||
@@ -878,7 +878,8 @@ lpfc_set_rrq_active(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, | |||
878 | else | 878 | else |
879 | rrq->send_rrq = 0; | 879 | rrq->send_rrq = 0; |
880 | rrq->xritag = xritag; | 880 | rrq->xritag = xritag; |
881 | rrq->rrq_stop_time = jiffies + HZ * (phba->fc_ratov + 1); | 881 | rrq->rrq_stop_time = jiffies + |
882 | msecs_to_jiffies(1000 * (phba->fc_ratov + 1)); | ||
882 | rrq->ndlp = ndlp; | 883 | rrq->ndlp = ndlp; |
883 | rrq->nlp_DID = ndlp->nlp_DID; | 884 | rrq->nlp_DID = ndlp->nlp_DID; |
884 | rrq->vport = ndlp->vport; | 885 | rrq->vport = ndlp->vport; |
@@ -1339,7 +1340,8 @@ lpfc_sli_ringtxcmpl_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
1339 | BUG(); | 1340 | BUG(); |
1340 | else | 1341 | else |
1341 | mod_timer(&piocb->vport->els_tmofunc, | 1342 | mod_timer(&piocb->vport->els_tmofunc, |
1342 | jiffies + HZ * (phba->fc_ratov << 1)); | 1343 | jiffies + |
1344 | msecs_to_jiffies(1000 * (phba->fc_ratov << 1))); | ||
1343 | } | 1345 | } |
1344 | 1346 | ||
1345 | 1347 | ||
@@ -2908,8 +2910,9 @@ void lpfc_poll_eratt(unsigned long ptr) | |||
2908 | lpfc_worker_wake_up(phba); | 2910 | lpfc_worker_wake_up(phba); |
2909 | else | 2911 | else |
2910 | /* Restart the timer for next eratt poll */ | 2912 | /* Restart the timer for next eratt poll */ |
2911 | mod_timer(&phba->eratt_poll, jiffies + | 2913 | mod_timer(&phba->eratt_poll, |
2912 | HZ * LPFC_ERATT_POLL_INTERVAL); | 2914 | jiffies + |
2915 | msecs_to_jiffies(1000 * LPFC_ERATT_POLL_INTERVAL)); | ||
2913 | return; | 2916 | return; |
2914 | } | 2917 | } |
2915 | 2918 | ||
@@ -6448,16 +6451,17 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) | |||
6448 | 6451 | ||
6449 | /* Start the ELS watchdog timer */ | 6452 | /* Start the ELS watchdog timer */ |
6450 | mod_timer(&vport->els_tmofunc, | 6453 | mod_timer(&vport->els_tmofunc, |
6451 | jiffies + HZ * (phba->fc_ratov * 2)); | 6454 | jiffies + msecs_to_jiffies(1000 * (phba->fc_ratov * 2))); |
6452 | 6455 | ||
6453 | /* Start heart beat timer */ | 6456 | /* Start heart beat timer */ |
6454 | mod_timer(&phba->hb_tmofunc, | 6457 | mod_timer(&phba->hb_tmofunc, |
6455 | jiffies + HZ * LPFC_HB_MBOX_INTERVAL); | 6458 | jiffies + msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL)); |
6456 | phba->hb_outstanding = 0; | 6459 | phba->hb_outstanding = 0; |
6457 | phba->last_completion_time = jiffies; | 6460 | phba->last_completion_time = jiffies; |
6458 | 6461 | ||
6459 | /* Start error attention (ERATT) polling timer */ | 6462 | /* Start error attention (ERATT) polling timer */ |
6460 | mod_timer(&phba->eratt_poll, jiffies + HZ * LPFC_ERATT_POLL_INTERVAL); | 6463 | mod_timer(&phba->eratt_poll, |
6464 | jiffies + msecs_to_jiffies(1000 * LPFC_ERATT_POLL_INTERVAL)); | ||
6461 | 6465 | ||
6462 | /* Enable PCIe device Advanced Error Reporting (AER) if configured */ | 6466 | /* Enable PCIe device Advanced Error Reporting (AER) if configured */ |
6463 | if (phba->cfg_aer_support == 1 && !(phba->hba_flag & HBA_AER_ENABLED)) { | 6467 | if (phba->cfg_aer_support == 1 && !(phba->hba_flag & HBA_AER_ENABLED)) { |
@@ -6824,8 +6828,9 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
6824 | goto out_not_finished; | 6828 | goto out_not_finished; |
6825 | } | 6829 | } |
6826 | /* timeout active mbox command */ | 6830 | /* timeout active mbox command */ |
6827 | mod_timer(&psli->mbox_tmo, (jiffies + | 6831 | timeout = msecs_to_jiffies(lpfc_mbox_tmo_val(phba, pmbox) * |
6828 | (HZ * lpfc_mbox_tmo_val(phba, pmbox)))); | 6832 | 1000); |
6833 | mod_timer(&psli->mbox_tmo, jiffies + timeout); | ||
6829 | } | 6834 | } |
6830 | 6835 | ||
6831 | /* Mailbox cmd <cmd> issue */ | 6836 | /* Mailbox cmd <cmd> issue */ |
@@ -7498,7 +7503,7 @@ lpfc_sli4_post_async_mbox(struct lpfc_hba *phba) | |||
7498 | 7503 | ||
7499 | /* Start timer for the mbox_tmo and log some mailbox post messages */ | 7504 | /* Start timer for the mbox_tmo and log some mailbox post messages */ |
7500 | mod_timer(&psli->mbox_tmo, (jiffies + | 7505 | mod_timer(&psli->mbox_tmo, (jiffies + |
7501 | (HZ * lpfc_mbox_tmo_val(phba, mboxq)))); | 7506 | msecs_to_jiffies(1000 * lpfc_mbox_tmo_val(phba, mboxq)))); |
7502 | 7507 | ||
7503 | lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI, | 7508 | lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI, |
7504 | "(%d):0355 Mailbox cmd x%x (x%x/x%x) issue Data: " | 7509 | "(%d):0355 Mailbox cmd x%x (x%x/x%x) issue Data: " |
@@ -10005,7 +10010,7 @@ lpfc_sli_issue_iocb_wait(struct lpfc_hba *phba, | |||
10005 | retval = lpfc_sli_issue_iocb(phba, ring_number, piocb, | 10010 | retval = lpfc_sli_issue_iocb(phba, ring_number, piocb, |
10006 | SLI_IOCB_RET_IOCB); | 10011 | SLI_IOCB_RET_IOCB); |
10007 | if (retval == IOCB_SUCCESS) { | 10012 | if (retval == IOCB_SUCCESS) { |
10008 | timeout_req = timeout * HZ; | 10013 | timeout_req = msecs_to_jiffies(timeout * 1000); |
10009 | timeleft = wait_event_timeout(done_q, | 10014 | timeleft = wait_event_timeout(done_q, |
10010 | lpfc_chk_iocb_flg(phba, piocb, LPFC_IO_WAKE), | 10015 | lpfc_chk_iocb_flg(phba, piocb, LPFC_IO_WAKE), |
10011 | timeout_req); | 10016 | timeout_req); |
@@ -10110,7 +10115,7 @@ lpfc_sli_issue_mbox_wait(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq, | |||
10110 | if (retval == MBX_BUSY || retval == MBX_SUCCESS) { | 10115 | if (retval == MBX_BUSY || retval == MBX_SUCCESS) { |
10111 | wait_event_interruptible_timeout(done_q, | 10116 | wait_event_interruptible_timeout(done_q, |
10112 | pmboxq->mbox_flag & LPFC_MBX_WAKE, | 10117 | pmboxq->mbox_flag & LPFC_MBX_WAKE, |
10113 | timeout * HZ); | 10118 | msecs_to_jiffies(timeout * 1000)); |
10114 | 10119 | ||
10115 | spin_lock_irqsave(&phba->hbalock, flag); | 10120 | spin_lock_irqsave(&phba->hbalock, flag); |
10116 | pmboxq->context1 = NULL; | 10121 | pmboxq->context1 = NULL; |