3428
3429 /*
3430 * Read the device MAC address from the EEPROM
3431 */
3432 if (e1000_read_mac_addr(hw) != E1000_SUCCESS)
3433 return (B_FALSE);
3434
3435 return (B_TRUE);
3436 }
3437
3438 #pragma inline(igb_arm_watchdog_timer)
3439
3440 static void
3441 igb_arm_watchdog_timer(igb_t *igb)
3442 {
3443 /*
3444 * Fire a watchdog timer
3445 */
3446 igb->watchdog_tid =
3447 timeout(igb_local_timer,
3448 (void *)igb, 1 * drv_usectohz(1000000));
3449
3450 }
3451
3452 /*
3453 * igb_enable_watchdog_timer - Enable and start the driver watchdog timer
3454 */
3455 void
3456 igb_enable_watchdog_timer(igb_t *igb)
3457 {
3458 mutex_enter(&igb->watchdog_lock);
3459
3460 if (!igb->watchdog_enable) {
3461 igb->watchdog_enable = B_TRUE;
3462 igb->watchdog_start = B_TRUE;
3463 igb_arm_watchdog_timer(igb);
3464 }
3465
3466 mutex_exit(&igb->watchdog_lock);
3467
3468 }
|
3428
3429 /*
3430 * Read the device MAC address from the EEPROM
3431 */
3432 if (e1000_read_mac_addr(hw) != E1000_SUCCESS)
3433 return (B_FALSE);
3434
3435 return (B_TRUE);
3436 }
3437
3438 #pragma inline(igb_arm_watchdog_timer)
3439
3440 static void
3441 igb_arm_watchdog_timer(igb_t *igb)
3442 {
3443 /*
3444 * Fire a watchdog timer
3445 */
3446 igb->watchdog_tid =
3447 timeout(igb_local_timer,
3448 (void *)igb, drv_sectohz(1));
3449
3450 }
3451
3452 /*
3453 * igb_enable_watchdog_timer - Enable and start the driver watchdog timer
3454 */
3455 void
3456 igb_enable_watchdog_timer(igb_t *igb)
3457 {
3458 mutex_enter(&igb->watchdog_lock);
3459
3460 if (!igb->watchdog_enable) {
3461 igb->watchdog_enable = B_TRUE;
3462 igb->watchdog_start = B_TRUE;
3463 igb_arm_watchdog_timer(igb);
3464 }
3465
3466 mutex_exit(&igb->watchdog_lock);
3467
3468 }
|