diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 33 |
1 files changed, 19 insertions, 14 deletions
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; |