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,11 +8,11 @@
* 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.
+ * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
*/
#ifndef _IPRB_H
#define _IPRB_H
@@ -24,12 +24,13 @@
* 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) */
+/* timeouts for the rx and tx watchdogs (nsec) */
+#define RX_WATCHDOG (15 * NANOSEC)
+#define TX_WATCHDOG (15 * NANOSEC)
/*
* Driver structures.
*/
typedef struct {
@@ -70,23 +71,23 @@
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;
+ 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;
- time_t rx_wdog;
- time_t rx_timeout;
- time_t tx_wdog;
- time_t tx_timeout;
+ 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;