Print this page
XXXX introduce drv_sectohz


1534                     "hot-plug mode.");
1535                 cmn_err(CE_CONT, "Do not attempt to hot-plug boards "
1536                     "or power supplies in this system until further notice.");
1537 
1538         } else if (ac_hot_plug_timeout != (timeout_id_t)NULL) {
1539                 /*
1540                  * There is a pending timeout so we must already be
1541                  * in non "hot-plug" mode. It doesn't matter if the
1542                  * kstat request is a read or a write.
1543                  *
1544                  * We need to cancel the existing timeout.
1545                  */
1546                 (void) untimeout(ac_hot_plug_timeout);
1547                 ac_hot_plug_timeout = NULL;
1548         }
1549 
1550         /*
1551          * create a new timeout.
1552          */
1553         ac_hot_plug_timeout = timeout(ac_timeout, NULL,
1554             drv_usectohz(ac_hot_plug_timeout_interval * 1000000));
1555 
1556         mutex_exit(&ac_hot_plug_mode_mutex);
1557         return (0);
1558 }
1559 
1560 static void
1561 ac_timeout(void *arg)
1562 {
1563         struct ac_soft_state *softsp;
1564         fhc_bd_t        *board;
1565 
1566 #ifdef lint
1567         arg = arg;
1568 #endif /* lint */
1569 
1570         ac_hot_plug_timeout = (timeout_id_t)NULL;
1571 
1572         (void) fhc_bdlist_lock(-1);
1573 
1574         /*




1534                     "hot-plug mode.");
1535                 cmn_err(CE_CONT, "Do not attempt to hot-plug boards "
1536                     "or power supplies in this system until further notice.");
1537 
1538         } else if (ac_hot_plug_timeout != (timeout_id_t)NULL) {
1539                 /*
1540                  * There is a pending timeout so we must already be
1541                  * in non "hot-plug" mode. It doesn't matter if the
1542                  * kstat request is a read or a write.
1543                  *
1544                  * We need to cancel the existing timeout.
1545                  */
1546                 (void) untimeout(ac_hot_plug_timeout);
1547                 ac_hot_plug_timeout = NULL;
1548         }
1549 
1550         /*
1551          * create a new timeout.
1552          */
1553         ac_hot_plug_timeout = timeout(ac_timeout, NULL,
1554             drv_sectohz(ac_hot_plug_timeout_interval));
1555 
1556         mutex_exit(&ac_hot_plug_mode_mutex);
1557         return (0);
1558 }
1559 
1560 static void
1561 ac_timeout(void *arg)
1562 {
1563         struct ac_soft_state *softsp;
1564         fhc_bd_t        *board;
1565 
1566 #ifdef lint
1567         arg = arg;
1568 #endif /* lint */
1569 
1570         ac_hot_plug_timeout = (timeout_id_t)NULL;
1571 
1572         (void) fhc_bdlist_lock(-1);
1573 
1574         /*