Print this page
4778 iprb shouldn't abuse ddi_get_time(9f)
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>

*** 8,18 **** * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* ! * Copyright 2010 Nexenta Systems, Inc. All rights reserved. */ #ifndef _IPRB_H #define _IPRB_H --- 8,18 ---- * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* ! * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ #ifndef _IPRB_H #define _IPRB_H
*** 24,35 **** * Tunables. */ #define NUM_TX 128 /* outstanding tx queue */ #define NUM_RX 128 /* outstanding rx queue */ ! #define RX_WATCHDOG 15 /* timeout for rx watchdog (sec) */ ! #define TX_WATCHDOG 15 /* timeout for tx watchdog (sec) */ /* * Driver structures. */ typedef struct { --- 24,36 ---- * Tunables. */ #define NUM_TX 128 /* outstanding tx queue */ #define NUM_RX 128 /* outstanding rx queue */ ! /* timeouts for the rx and tx watchdogs (nsec) */ ! #define RX_WATCHDOG (15 * NANOSEC) ! #define TX_WATCHDOG (15 * NANOSEC) /* * Driver structures. */ typedef struct {
*** 70,92 **** list_t mcast; boolean_t promisc; iprb_dma_t cmds[NUM_TX]; iprb_dma_t rxb[NUM_RX]; iprb_dma_t stats; ! time_t stats_time; uint16_t cmd_head; uint16_t cmd_last; uint16_t cmd_tail; uint16_t cmd_count; uint16_t rx_index; uint16_t rx_last; ! time_t rx_wdog; ! time_t rx_timeout; ! time_t tx_wdog; ! time_t tx_timeout; uint16_t eeprom_bits; boolean_t running; boolean_t suspended; --- 71,93 ---- list_t mcast; boolean_t promisc; iprb_dma_t cmds[NUM_TX]; iprb_dma_t rxb[NUM_RX]; iprb_dma_t stats; ! hrtime_t stats_time; uint16_t cmd_head; uint16_t cmd_last; uint16_t cmd_tail; uint16_t cmd_count; uint16_t rx_index; uint16_t rx_last; ! hrtime_t rx_wdog; ! hrtime_t rx_timeout; ! hrtime_t tx_wdog; ! hrtime_t tx_timeout; uint16_t eeprom_bits; boolean_t running; boolean_t suspended;