Print this page
XXXX introduce drv_sectohz


 769                  * find entry in list that has the same FC-AL handle (if any)
 770                  */
 771                 while (tsf != NULL) {
 772                         if (tsf->sf_socp == sf->sf_socp) {
 773                                 break;          /* found matching entry */
 774                         }
 775                         tsf = tsf->sf_next;
 776                 }
 777 
 778                 if (tsf != NULL) {
 779                         /* if we found a matching entry keep track of it */
 780                         sf->sf_sibling = tsf;
 781                 }
 782 
 783                 /*
 784                  * increment watchdog init flag, setting watchdog timeout
 785                  * if we are the first (since somebody has to do it)
 786                  */
 787                 if (!sf_watchdog_init++) {
 788                         mutex_exit(&sf_global_mutex);
 789                         sf_watchdog_tick = sf_watchdog_timeout *
 790                             drv_usectohz(1000000);
 791                         sf_watchdog_id = timeout(sf_watch,
 792                             NULL, sf_watchdog_tick);
 793                 } else {
 794                         mutex_exit(&sf_global_mutex);
 795                 }
 796 
 797                 if (tsf != NULL) {
 798                         /*
 799                          * set up matching entry to be our sibling
 800                          */
 801                         mutex_enter(&tsf->sf_mutex);
 802                         tsf->sf_sibling = sf;
 803                         mutex_exit(&tsf->sf_mutex);
 804                 }
 805 
 806                 /*
 807                  * create this property so that PM code knows we want
 808                  * to be suspended at PM time
 809                  */
 810                 (void) ddi_prop_update_string(DDI_DEV_T_NONE, dip,




 769                  * find entry in list that has the same FC-AL handle (if any)
 770                  */
 771                 while (tsf != NULL) {
 772                         if (tsf->sf_socp == sf->sf_socp) {
 773                                 break;          /* found matching entry */
 774                         }
 775                         tsf = tsf->sf_next;
 776                 }
 777 
 778                 if (tsf != NULL) {
 779                         /* if we found a matching entry keep track of it */
 780                         sf->sf_sibling = tsf;
 781                 }
 782 
 783                 /*
 784                  * increment watchdog init flag, setting watchdog timeout
 785                  * if we are the first (since somebody has to do it)
 786                  */
 787                 if (!sf_watchdog_init++) {
 788                         mutex_exit(&sf_global_mutex);
 789                         sf_watchdog_tick = drv_sectohz(sf_watchdog_timeout);

 790                         sf_watchdog_id = timeout(sf_watch,
 791                             NULL, sf_watchdog_tick);
 792                 } else {
 793                         mutex_exit(&sf_global_mutex);
 794                 }
 795 
 796                 if (tsf != NULL) {
 797                         /*
 798                          * set up matching entry to be our sibling
 799                          */
 800                         mutex_enter(&tsf->sf_mutex);
 801                         tsf->sf_sibling = sf;
 802                         mutex_exit(&tsf->sf_mutex);
 803                 }
 804 
 805                 /*
 806                  * create this property so that PM code knows we want
 807                  * to be suspended at PM time
 808                  */
 809                 (void) ddi_prop_update_string(DDI_DEV_T_NONE, dip,