Print this page
4786 emlxs shouldn't abuse ddi_get_time(9f)

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/fibre-channel/fca/emlxs/emlxs_fc.h
          +++ new/usr/src/uts/common/sys/fibre-channel/fca/emlxs/emlxs_fc.h
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2010 Emulex.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
       26 +/*
       27 + * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
       28 + */
  26   29  
  27   30  #ifndef _EMLXS_FC_H
  28   31  #define _EMLXS_FC_H
  29   32  
  30   33  #ifdef  __cplusplus
  31   34  extern "C" {
  32   35  #endif
  33   36  
  34   37  typedef struct emlxs_buf
  35   38  {
↓ open down ↓ 1997 lines elided ↑ open up ↑
2033 2036  #define EMLXS_INTR_UNINIT(_hba)                 emlxs_intx_uninit(_hba)
2034 2037  #define EMLXS_INTR_ADD(_hba)                    emlxs_intx_add(_hba)
2035 2038  #define EMLXS_INTR_REMOVE(_hba)                 emlxs_intx_remove(_hba)
2036 2039  #endif  /* MSI_SUPPORT */
2037 2040  
2038 2041  
2039 2042  /* Power Management Component */
2040 2043  #define EMLXS_PM_ADAPTER        0
2041 2044  
2042 2045  
2043      -#define DRV_TIME        (uint32_t)(ddi_get_time() - emlxs_device.drv_timestamp)
     2046 +#define DRV_TIME        (uint32_t)((gethrtime() - emlxs_device.drv_timestamp) / NANOSEC)
2044 2047  
2045 2048  #define HBA                     port->hba
2046 2049  #define PPORT                   hba->port[0]
2047 2050  #define VPORT(x)                hba->port[x]
2048 2051  #define EMLXS_TIMER_LOCK        hba->timer_lock
2049 2052  #define VPD                     hba->vpd
2050 2053  #define CFG                     hba->config[0]
2051 2054  #define LOG                     hba->log
2052 2055  #define EVENTQ                  hba->event_queue
2053 2056  #define EMLXS_MBOX_LOCK         hba->mbox_lock
↓ open down ↓ 106 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX