Print this page
XXXX introduce drv_sectohz


3688         if (found) {
3689                 bcopy(hw->mac.addr, hw->mac.perm_addr, ETHERADDRL);
3690                 return (B_TRUE);
3691         }
3692 #else
3693         _NOTE(ARGUNUSED(ixgbe));
3694 #endif
3695 
3696         return (B_TRUE);
3697 }
3698 
3699 #pragma inline(ixgbe_arm_watchdog_timer)
3700 static void
3701 ixgbe_arm_watchdog_timer(ixgbe_t *ixgbe)
3702 {
3703         /*
3704          * Fire a watchdog timer
3705          */
3706         ixgbe->watchdog_tid =
3707             timeout(ixgbe_local_timer,
3708             (void *)ixgbe, 1 * drv_usectohz(1000000));
3709 
3710 }
3711 
3712 /*
3713  * ixgbe_enable_watchdog_timer - Enable and start the driver watchdog timer.
3714  */
3715 void
3716 ixgbe_enable_watchdog_timer(ixgbe_t *ixgbe)
3717 {
3718         mutex_enter(&ixgbe->watchdog_lock);
3719 
3720         if (!ixgbe->watchdog_enable) {
3721                 ixgbe->watchdog_enable = B_TRUE;
3722                 ixgbe->watchdog_start = B_TRUE;
3723                 ixgbe_arm_watchdog_timer(ixgbe);
3724         }
3725 
3726         mutex_exit(&ixgbe->watchdog_lock);
3727 }
3728 




3688         if (found) {
3689                 bcopy(hw->mac.addr, hw->mac.perm_addr, ETHERADDRL);
3690                 return (B_TRUE);
3691         }
3692 #else
3693         _NOTE(ARGUNUSED(ixgbe));
3694 #endif
3695 
3696         return (B_TRUE);
3697 }
3698 
3699 #pragma inline(ixgbe_arm_watchdog_timer)
3700 static void
3701 ixgbe_arm_watchdog_timer(ixgbe_t *ixgbe)
3702 {
3703         /*
3704          * Fire a watchdog timer
3705          */
3706         ixgbe->watchdog_tid =
3707             timeout(ixgbe_local_timer,
3708             (void *)ixgbe, drv_sectohz(1));
3709 
3710 }
3711 
3712 /*
3713  * ixgbe_enable_watchdog_timer - Enable and start the driver watchdog timer.
3714  */
3715 void
3716 ixgbe_enable_watchdog_timer(ixgbe_t *ixgbe)
3717 {
3718         mutex_enter(&ixgbe->watchdog_lock);
3719 
3720         if (!ixgbe->watchdog_enable) {
3721                 ixgbe->watchdog_enable = B_TRUE;
3722                 ixgbe->watchdog_start = B_TRUE;
3723                 ixgbe_arm_watchdog_timer(ixgbe);
3724         }
3725 
3726         mutex_exit(&ixgbe->watchdog_lock);
3727 }
3728