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>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/iprb/iprb.h
          +++ new/usr/src/uts/common/io/iprb/iprb.h
↓ open down ↓ 2 lines elided ↑ open up ↑
   3    3   * Common Development and Distribution License ("CDDL"), version 1.0.
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13      - * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
       13 + * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  14   14   */
  15   15  
  16   16  #ifndef _IPRB_H
  17   17  #define _IPRB_H
  18   18  
  19   19  /*
  20   20   * iprb - Intel Pro/100B Ethernet Driver
  21   21   */
  22   22  
  23   23  /*
  24   24   * Tunables.
  25   25   */
  26   26  #define NUM_TX          128     /* outstanding tx queue */
  27   27  #define NUM_RX          128     /* outstanding rx queue */
  28   28  
  29      -#define RX_WATCHDOG     15      /* timeout for rx watchdog (sec) */
  30      -#define TX_WATCHDOG     15      /* timeout for tx watchdog (sec) */
       29 +/* timeouts for the rx and tx watchdogs (nsec) */
       30 +#define RX_WATCHDOG     (15 * NANOSEC)
       31 +#define TX_WATCHDOG     (15 * NANOSEC)
  31   32  
  32   33  /*
  33   34   * Driver structures.
  34   35   */
  35   36  typedef struct {
  36   37          ddi_acc_handle_t        acch;
  37   38          ddi_dma_handle_t        dmah;
  38   39          caddr_t                 vaddr;
  39   40          uint32_t                paddr;
  40   41  } iprb_dma_t;
↓ open down ↓ 24 lines elided ↑ open up ↑
  65   66  
  66   67          uint8_t                 factaddr[6];
  67   68          uint8_t                 curraddr[6];
  68   69  
  69   70          int                     nmcast;
  70   71          list_t                  mcast;
  71   72          boolean_t               promisc;
  72   73          iprb_dma_t              cmds[NUM_TX];
  73   74          iprb_dma_t              rxb[NUM_RX];
  74   75          iprb_dma_t              stats;
  75      -        time_t                  stats_time;
       76 +        hrtime_t                stats_time;
  76   77  
  77   78          uint16_t                cmd_head;
  78   79          uint16_t                cmd_last;
  79   80          uint16_t                cmd_tail;
  80   81          uint16_t                cmd_count;
  81   82  
  82   83          uint16_t                rx_index;
  83   84          uint16_t                rx_last;
  84      -        time_t                  rx_wdog;
  85      -        time_t                  rx_timeout;
  86      -        time_t                  tx_wdog;
  87      -        time_t                  tx_timeout;
       85 +        hrtime_t                rx_wdog;
       86 +        hrtime_t                rx_timeout;
       87 +        hrtime_t                tx_wdog;
       88 +        hrtime_t                tx_timeout;
  88   89  
  89   90          uint16_t                eeprom_bits;
  90   91  
  91   92          boolean_t               running;
  92   93          boolean_t               suspended;
  93   94          boolean_t               wantw;
  94   95          boolean_t               rxhangbug;
  95   96          boolean_t               resumebug;
  96   97          boolean_t               is557;
  97   98          boolean_t               canpause;
↓ open down ↓ 276 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX