Print this page
XXXX introduce drv_sectohz

*** 2647,2665 **** /* Keep polling the chip until our IO is completed */ /* Driver's timer will not function during panics. */ /* Therefore, timer checks must be performed manually. */ (void) drv_getparm(LBOLT, &time); ! timeout = time + drv_usectohz(1000000); while (!(sbp->pkt_flags & PACKET_COMPLETED)) { EMLXS_SLI_POLL_INTR(hba); (void) drv_getparm(LBOLT, &time); /* Trigger timer checks periodically */ if (time >= timeout) { emlxs_timer_checks(hba); ! timeout = time + drv_usectohz(1000000); } } } else { /* Wait for IO completion */ /* The driver's timer will detect */ --- 2647,2665 ---- /* Keep polling the chip until our IO is completed */ /* Driver's timer will not function during panics. */ /* Therefore, timer checks must be performed manually. */ (void) drv_getparm(LBOLT, &time); ! timeout = time + drv_sectohz(1); while (!(sbp->pkt_flags & PACKET_COMPLETED)) { EMLXS_SLI_POLL_INTR(hba); (void) drv_getparm(LBOLT, &time); /* Trigger timer checks periodically */ if (time >= timeout) { emlxs_timer_checks(hba); ! timeout = time + drv_sectohz(1); } } } else { /* Wait for IO completion */ /* The driver's timer will detect */
*** 3762,3781 **** * to keep the driver going. */ /* Keep polling the chip until our IO is completed */ (void) drv_getparm(LBOLT, &time); ! timer = time + drv_usectohz(1000000); while ((time < pkt_timeout) && !(sbp->pkt_flags & PACKET_COMPLETED)) { EMLXS_SLI_POLL_INTR(hba); (void) drv_getparm(LBOLT, &time); /* Trigger timer checks periodically */ if (time >= timer) { emlxs_timer_checks(hba); ! timer = time + drv_usectohz(1000000); } } } else { /* Wait for IO completion or pkt_timeout */ mutex_enter(&EMLXS_PKT_LOCK); --- 3762,3781 ---- * to keep the driver going. */ /* Keep polling the chip until our IO is completed */ (void) drv_getparm(LBOLT, &time); ! timer = time + drv_sectohz(1); while ((time < pkt_timeout) && !(sbp->pkt_flags & PACKET_COMPLETED)) { EMLXS_SLI_POLL_INTR(hba); (void) drv_getparm(LBOLT, &time); /* Trigger timer checks periodically */ if (time >= timer) { emlxs_timer_checks(hba); ! timer = time + drv_sectohz(1); } } } else { /* Wait for IO completion or pkt_timeout */ mutex_enter(&EMLXS_PKT_LOCK);
*** 4044,4061 **** hba->reset_state &= ~FC_PORT_RESET_INP; hba->reset_request &= ~(FC_PORT_RESET | FC_LINK_RESET); mutex_exit(&EMLXS_PORT_LOCK); /* Wait for the timer thread to detect the error condition */ ! delay(drv_usectohz(1000000)); /* Wait for the HBA to re-initialize */ i = 0; mutex_enter(&EMLXS_PORT_LOCK); while (!(hba->flag & FC_ONLINE_MODE) && (i++ < 30)) { mutex_exit(&EMLXS_PORT_LOCK); ! delay(drv_usectohz(1000000)); mutex_enter(&EMLXS_PORT_LOCK); } if (!(hba->flag & FC_ONLINE_MODE)) { rval = FC_FAILURE; --- 4044,4061 ---- hba->reset_state &= ~FC_PORT_RESET_INP; hba->reset_request &= ~(FC_PORT_RESET | FC_LINK_RESET); mutex_exit(&EMLXS_PORT_LOCK); /* Wait for the timer thread to detect the error condition */ ! delay(drv_sectohz(1)); /* Wait for the HBA to re-initialize */ i = 0; mutex_enter(&EMLXS_PORT_LOCK); while (!(hba->flag & FC_ONLINE_MODE) && (i++ < 30)) { mutex_exit(&EMLXS_PORT_LOCK); ! delay(drv_sectohz(1)); mutex_enter(&EMLXS_PORT_LOCK); } if (!(hba->flag & FC_ONLINE_MODE)) { rval = FC_FAILURE;