Print this page
8368 remove warlock leftovers from usr/src/uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/fibre-channel/impl/fctl.c
          +++ new/usr/src/uts/common/io/fibre-channel/impl/fctl.c
↓ open down ↓ 134 lines elided ↑ open up ↑
 135  135   * prior to any local port locks.
 136  136   */
 137  137  
 138  138  static kmutex_t fctl_port_lock;
 139  139  static kmutex_t fctl_ulp_list_mutex;
 140  140  
 141  141  static fctl_nwwn_list_t         *fctl_nwwn_hash_table;
 142  142  static kmutex_t                 fctl_nwwn_hash_mutex;
 143  143  int fctl_nwwn_table_size = NWWN_HASH_TABLE_SIZE;
 144  144  
 145      -#if     !defined(lint)
 146      -_NOTE(MUTEX_PROTECTS_DATA(fctl_nwwn_hash_mutex, fctl_nwwn_hash_table))
 147      -_NOTE(MUTEX_PROTECTS_DATA(fctl_ulp_list_mutex, fctl_ulp_list))
 148      -_NOTE(RWLOCK_PROTECTS_DATA(fctl_ulp_lock, ulp_module::mod_next))
 149      -_NOTE(RWLOCK_PROTECTS_DATA(fctl_mod_ports_lock, ulp_module::mod_ports
 150      -    ulp_ports::port_handle))
 151      -_NOTE(DATA_READABLE_WITHOUT_LOCK(ulp_module::mod_info))
 152      -_NOTE(MUTEX_PROTECTS_DATA(ulp_ports::port_mutex, ulp_ports::port_statec
 153      -    ulp_ports::port_dstate))
 154      -#endif /* lint */
 155      -
 156  145  #define FCTL_VERSION            "20090729-1.70"
 157  146  #define FCTL_NAME_VERSION       "SunFC Transport v" FCTL_VERSION
 158  147  
 159  148  char *fctl_version = FCTL_NAME_VERSION;
 160  149  
 161  150  extern struct mod_ops mod_miscops;
 162  151  
 163  152  static struct modlmisc modlmisc = {
 164  153          &mod_miscops,                   /* type of module */
 165  154          FCTL_NAME_VERSION               /* Module name */
↓ open down ↓ 1743 lines elided ↑ open up ↑
1909 1898   * fc_fca_init
1910 1899   *              Overload the FCA bus_ops vector in its dev_ops with
1911 1900   *              fctl_fca_busops to handle all the INITchilds for "sf"
1912 1901   *              in one common place.
1913 1902   *
1914 1903   *              Should be called from FCA _init routine.
1915 1904   */
1916 1905  void
1917 1906  fc_fca_init(struct dev_ops *fca_devops_p)
1918 1907  {
1919      -#ifndef __lock_lint
1920 1908          fca_devops_p->devo_bus_ops = &fctl_fca_busops;
1921      -#endif  /* __lock_lint */
1922 1909  }
1923 1910  
1924 1911  
1925 1912  /*
1926 1913   * fc_fca_attach
1927 1914   */
1928 1915  int
1929 1916  fc_fca_attach(dev_info_t *fca_dip, fc_fca_tran_t *tran)
1930 1917  {
1931 1918          /*
↓ open down ↓ 504 lines elided ↑ open up ↑
2436 2423  
2437 2424          rw_enter(&fctl_ulp_lock, RW_WRITER);
2438 2425          rw_enter(&fctl_mod_ports_lock, RW_WRITER);
2439 2426  
2440 2427          for (mod = fctl_ulp_modules; mod; mod = mod->mod_next) {
2441 2428                  ulp_port = fctl_get_ulp_port(mod, port);
2442 2429                  if (ulp_port == NULL) {
2443 2430                          continue;
2444 2431                  }
2445 2432  
2446      -#ifndef __lock_lint
2447 2433                  ASSERT((ulp_port->port_dstate & ULP_PORT_ATTACH) == 0);
2448      -#endif /* __lock_lint */
2449 2434  
2450 2435                  (void) fctl_remove_ulp_port(mod, port);
2451 2436          }
2452 2437  
2453 2438          rw_exit(&fctl_mod_ports_lock);
2454 2439          rw_exit(&fctl_ulp_lock);
2455 2440  
2456 2441          mutex_enter(&fctl_port_lock);
2457 2442  
2458 2443          list = fctl_fca_portlist;
↓ open down ↓ 1416 lines elided ↑ open up ↑
3875 3860                  mutex_exit(&pd->pd_mutex);
3876 3861                  pd = pd->pd_did_hnext;
3877 3862          }
3878 3863  
3879 3864          mutex_exit(&port->fp_mutex);
3880 3865  
3881 3866          return (pd);
3882 3867  }
3883 3868  
3884 3869  
3885      -#ifndef __lock_lint             /* uncomment when there is a consumer */
3886      -
3887 3870  void
3888 3871  fc_ulp_hold_remote_port(opaque_t port_handle)
3889 3872  {
3890 3873          fc_remote_port_t *pd = port_handle;
3891 3874  
3892 3875          mutex_enter(&pd->pd_mutex);
3893 3876          pd->pd_ref_count++;
3894 3877          mutex_exit(&pd->pd_mutex);
3895 3878  }
3896 3879  
↓ open down ↓ 32 lines elided ↑ open up ↑
3929 3912                  }
3930 3913                  mutex_exit(&pd->pd_mutex);
3931 3914                  pd = pd->pd_did_hnext;
3932 3915          }
3933 3916  
3934 3917          mutex_exit(&port->fp_mutex);
3935 3918  
3936 3919          return (pd);
3937 3920  }
3938 3921  
3939      -#endif /* __lock_lint */
3940      -
3941 3922  /*
3942 3923   * Looks in the pwwn table of the specified fc_local_port_t for the
3943 3924   * fc_remote_port_t that matches the given pwwn.  Hashes based upon the
3944 3925   * given pwwn->raw_wwn. Returns a pointer to the fc_remote_port_t struct,
3945 3926   * but does not update any reference counts or otherwise indicate that
3946 3927   * the fc_remote_port_t is in use.
3947 3928   */
3948 3929  fc_remote_port_t *
3949 3930  fctl_get_remote_port_by_pwwn(fc_local_port_t *port, la_wwn_t *pwwn)
3950 3931  {
↓ open down ↓ 348 lines elided ↑ open up ↑
4299 4280          job = (job_request_t *)kmem_cache_alloc(fctl_job_cache, sleep);
4300 4281          if (job != NULL) {
4301 4282                  job->job_result = FC_SUCCESS;
4302 4283                  job->job_code = job_code;
4303 4284                  job->job_flags = job_flags;
4304 4285                  job->job_cb_arg = arg;
4305 4286                  job->job_comp = comp;
4306 4287                  job->job_private = NULL;
4307 4288                  job->job_ulp_pkts = NULL;
4308 4289                  job->job_ulp_listlen = 0;
4309      -#ifndef __lock_lint
4310 4290                  job->job_counter = 0;
4311 4291                  job->job_next = NULL;
4312      -#endif /* __lock_lint */
4313 4292          }
4314 4293  
4315 4294          return (job);
4316 4295  }
4317 4296  
4318 4297  
4319 4298  void
4320 4299  fctl_dealloc_job(job_request_t *job)
4321 4300  {
4322 4301          kmem_cache_free(fctl_job_cache, (void *)job);
↓ open down ↓ 2418 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX