Print this page
    
NEX-8705 Drivers for ATTO Celerity FC-162E Gen 5 and Celerity FC-162P Gen 6 16GB FC cards support
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
NEX-1878 update emlxs from source provided by Emulex
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/uts/common/sys/fibre-channel/fca/emlxs/emlxs_extern.h
          +++ new/usr/src/uts/common/sys/fibre-channel/fca/emlxs/emlxs_extern.h
   1    1  /*
   2    2   * CDDL HEADER START
   3    3   *
   4    4   * The contents of this file are subject to the terms of the
   5    5   * Common Development and Distribution License (the "License").
   6    6   * You may not use this file except in compliance with the License.
   7    7   *
   8    8   * You can obtain a copy of the license at
   9    9   * http://www.opensource.org/licenses/cddl1.txt.
  10   10   * See the License for the specific language governing permissions
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  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 (c) 2004-2011 Emulex. All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  #ifndef _EMLXS_EXTERN_H
  28   28  #define _EMLXS_EXTERN_H
  29   29  
  30   30  #ifdef  __cplusplus
  31   31  extern "C" {
  32   32  #endif
  33   33  
  34   34  extern void                     *emlxs_soft_state;
  35   35  extern uint32_t                 emlxs_instance[MAX_FC_BRDS];
  36   36  extern uint32_t                 emlxs_instance_count;
  37   37  extern char                     emlxs_revision[32];
  38   38  extern char                     emlxs_version[32];
  39   39  extern char                     emlxs_name[64];
  40   40  extern char                     emlxs_label[64];
  41   41  
  42   42  extern emlxs_device_t           emlxs_device;
  43   43  extern uint32_t                 emlxs_instance[MAX_FC_BRDS];
  44   44  extern uint32_t                 emlxs_instance_count;
  45   45  
  46   46  extern ddi_device_acc_attr_t    emlxs_data_acc_attr;
  47   47  extern ddi_device_acc_attr_t    emlxs_dev_acc_attr;
  48   48  extern ddi_dma_lim_t            emlxs_dma_lim;
  49   49  extern emlxs_config_t           emlxs_cfg[];
  50   50  extern ddi_dma_attr_t           emlxs_dma_attr;
  51   51  extern ddi_dma_attr_t           emlxs_dma_attr_ro;
  52   52  extern ddi_dma_attr_t           emlxs_dma_attr_fcip_rsp;
  53   53  extern ddi_dma_attr_t           emlxs_dma_attr_1sg;
  54   54  
  55   55  /* Module emlxs_msg.c External Routine Declarations */
  56   56  extern void                     emlxs_msg_printf(emlxs_port_t *port,
  57   57                                          const uint32_t fileno,
  58   58                                          const uint32_t line,
  59   59                                          emlxs_msg_t *msg,
  60   60                                          const char *fmt, ...);
  61   61  extern uint32_t                 emlxs_msg_log_create(emlxs_hba_t *hba);
  62   62  extern void                     emlxs_msg_lock_reinit(emlxs_hba_t *hba);
  63   63  extern void                     emlxs_msg_log_destroy(emlxs_hba_t *hba);
  64   64  extern uint32_t                 emlxs_msg_log_get(emlxs_hba_t *hba,
  65   65                                          emlxs_log_req_t *req,
  66   66                                          emlxs_log_resp_t *resp);
  67   67  
  68   68  /* Module emlxs_event.c External Routine Declarations */
  69   69  extern uint32_t                 emlxs_flush_ct_event(emlxs_port_t *port,
  70   70                                          uint32_t rxid);
  71   71  extern void                     emlxs_timer_check_events(emlxs_hba_t *hba);
  72   72  
  73   73  extern uint32_t                 emlxs_event_queue_create(emlxs_hba_t *hba);
  74   74  
  75   75  extern void                     emlxs_event_queue_destroy(emlxs_hba_t *hba);
  76   76  
  77   77  extern void                     emlxs_event(emlxs_port_t *port,
  78   78                                          emlxs_event_t *evt, void *bp,
  79   79                                          uint32_t size);
  80   80  extern void                     emlxs_log_dump_event(emlxs_port_t *port,
  81   81                                          uint8_t *buffer, uint32_t size);
  82   82  extern void                     emlxs_log_link_event(emlxs_port_t *port);
  83   83  
  84   84  extern uint32_t                 emlxs_log_ct_event(emlxs_port_t *port,
  85   85                                          uint8_t *payload, uint32_t size,
  86   86                                          uint32_t rxid);
  87   87  extern void                     emlxs_log_rscn_event(emlxs_port_t *port,
  88   88                                          uint8_t *payload, uint32_t size);
  89   89  extern void                     emlxs_log_vportrscn_event(emlxs_port_t *port,
  90   90                                          uint8_t *payload, uint32_t size);
  91   91  extern void                     emlxs_get_dfc_event(emlxs_port_t *port,
  92   92                                          emlxs_dfc_event_t *dfc_event,
  93   93                                          uint32_t sleep);
  94   94  extern uint32_t                 emlxs_kill_dfc_event(emlxs_port_t *port,
  95   95                                          emlxs_dfc_event_t *dfc_event);
  96   96  extern uint32_t                 emlxs_get_dfc_eventinfo(emlxs_port_t *port,
  97   97                                          HBA_EVENTINFO *eventinfo,
  98   98                                          uint32_t *eventcount,
  99   99                                          uint32_t *missed);
 100  100  extern void                     emlxs_log_temp_event(emlxs_port_t *port,
 101  101                                          uint32_t type, uint32_t temp);
 102  102  extern void                     emlxs_log_fcoe_event(emlxs_port_t *port,
 103  103                                          menlo_init_rsp_t *init_rsp);
 104  104  extern void                     emlxs_log_async_event(emlxs_port_t *port,
 105  105                                          IOCB *iocb);
 106  106  
 107  107  #ifdef SAN_DIAG_SUPPORT
 108  108  extern void                     emlxs_get_sd_event(emlxs_port_t *port,
 109  109                                          emlxs_dfc_event_t *dfc_event,
 110  110                                          uint32_t sleep);
 111  111  extern void                     emlxs_log_sd_basic_els_event(emlxs_port_t *port,
 112  112                                          uint32_t subcat, HBA_WWN *portname,
 113  113                                          HBA_WWN *nodename);
 114  114  extern void                     emlxs_log_sd_prlo_event(emlxs_port_t *port,
 115  115                                          HBA_WWN *portname);
 116  116  extern void                     emlxs_log_sd_lsrjt_event(emlxs_port_t *port,
 117  117                                          HBA_WWN *remoteport, uint32_t orig_cmd,
 118  118                                          uint32_t reason, uint32_t reason_expl);
 119  119  extern void                     emlxs_log_sd_fc_bsy_event(emlxs_port_t *port,
 120  120                                          HBA_WWN *remoteport);
 121  121  extern void                     emlxs_log_sd_fc_rdchk_event(emlxs_port_t *port,
 122  122                                          HBA_WWN *remoteport, uint32_t lun,
 123  123                                          uint32_t opcode, uint32_t fcp_param);
 124  124  extern void                     emlxs_log_sd_scsi_event(emlxs_port_t *port,
 125  125                                          uint32_t type, HBA_WWN *remoteport,
 126  126                                          int32_t lun);
 127  127  extern void                     emlxs_log_sd_scsi_check_event(
 128  128                                          emlxs_port_t *port,
 129  129                                          HBA_WWN *remoteport, uint32_t lun,
 130  130                                          uint32_t cmdcode, uint32_t sensekey,
 131  131                                          uint32_t asc, uint32_t ascq);
 132  132  #endif  /* SAN_DIAG_SUPPORT */
 133  133  
 134  134  /* Module emlxs_solaris.c External Routine Declarations */
 135  135  
 136  136  extern void                     emlxs_fca_link_up(emlxs_port_t *port);
 137  137  
 138  138  extern void                     emlxs_fca_link_down(emlxs_port_t *port);
 139  139  
 140  140  extern void                     emlxs_ulp_unsol_cb(emlxs_port_t *port,
 141  141                                          fc_unsol_buf_t *ubp);
 142  142  extern void                     emlxs_ulp_statec_cb(emlxs_port_t *port,
 143  143                                          uint32_t statec);
 144  144  extern int32_t                  emlxs_fca_reset(opaque_t fca_port_handle,
 145  145                                          uint32_t cmd);
 146  146  extern int32_t                  emlxs_fca_pkt_abort(opaque_t fca_port_handle,
 147  147                                          fc_packet_t *pkt, int32_t sleep);
 148  148  extern char                     *emlxs_state_xlate(uint8_t state);
 149  149  extern char                     *emlxs_error_xlate(uint8_t errno);
 150  150  extern void                     emlxs_mem_free(emlxs_hba_t *hba,
 151  151                                          MBUF_INFO *buf_info);
 152  152  extern uint8_t                  *emlxs_mem_alloc(emlxs_hba_t *hba,
 153  153                                          MBUF_INFO *buf_info);
 154  154  extern int                      emlxs_map_bus(emlxs_hba_t *hba);
 155  155  extern void                     emlxs_unmap_bus(emlxs_hba_t *hba);
 156  156  extern fc_unsol_buf_t           *emlxs_ub_find(emlxs_port_t *port,
 157  157                                          uint32_t token);
 158  158  extern fc_unsol_buf_t           *emlxs_ub_get(emlxs_port_t *port, uint32_t size,
 159  159                                          uint32_t type, uint32_t resv);
 160  160  extern int32_t                  emlxs_log_printf(int32_t f, int32_t type,
 161  161                                          int32_t num, int32_t brdno,
 162  162                                          const char *fmt, ...);
 163  163  extern void                     emlxs_set_pkt_state(emlxs_buf_t *sbp,
 164  164                                          uint32_t iostat, uint8_t localstat,
 165  165                                          uint32_t lock);
 166  166  extern char                     *emlxs_elscmd_xlate(uint32_t cmd);
 167  167  extern char                     *emlxs_ctcmd_xlate(uint32_t cmd);
 168  168  extern char                     *emlxs_rmcmd_xlate(uint32_t cmd);
 169  169  extern char                     *emlxs_wwn_xlate(char *buffer, size_t len,
 170  170                                          uint8_t *wwn);
 171  171  extern int32_t                  emlxs_wwn_cmp(uint8_t *wwn1, uint8_t *wwn2);
 172  172  extern int32_t                  emlxs_fca_transport(opaque_t fca_port_handle,
 173  173                                          fc_packet_t *pkt);
 174  174  extern int32_t                  emlxs_fca_pkt_uninit(opaque_t fca_port_handle,
 175  175                                          fc_packet_t *pkt);
 176  176  extern int32_t                  emlxs_fca_pkt_init(opaque_t fca_port_handle,
 177  177                                          fc_packet_t *pkt, int32_t sleep);
 178  178  extern void                     emlxs_pkt_complete(emlxs_buf_t *sbp,
 179  179                                          uint32_t iostat, uint8_t localstat,
 180  180                                          uint32_t doneq);
 181  181  
 182  182  #ifdef SAN_DIAG_SUPPORT
 183  183  extern void                     emlxs_update_sd_bucket(emlxs_buf_t *sbp);
 184  184  #endif /* SAN_DIAG_SUPPORT */
 185  185  
 186  186  extern uint32_t                 emlxs_get_instance(int32_t ddiinst);
 187  187  extern char                     *emlxs_mscmd_xlate(uint16_t cmd);
 188  188  extern int32_t                  emlxs_reset(emlxs_port_t *port, uint32_t cmd);
 189  189  extern void                     emlxs_swap_service_params(SERV_PARM *sp);
 190  190  extern void                     emlxs_swap_fcp_pkt(emlxs_buf_t *sbp);
 191  191  extern void                     emlxs_swap_ct_pkt(emlxs_buf_t *sbp);
 192  192  extern void                     emlxs_swap_els_pkt(emlxs_buf_t *sbp);
 193  193  extern int                      emlxs_fca_ub_release(opaque_t fca_port_handle,
 194  194                                          uint32_t count, uint64_t tokens[]);
 195  195  extern void                     emlxs_swap_els_ub(fc_unsol_buf_t *ubp);
 196  196  extern void                     emlxs_unswap_pkt(emlxs_buf_t *sbp);
 197  197  extern uint32_t                 emlxs_get_key(emlxs_hba_t *hba, MAILBOXQ *mbq);
 198  198  extern int                      emlxs_pm_busy_component(dev_info_t *dip);
 199  199  extern int                      emlxs_pm_idle_component(dev_info_t *dip);
 200  200  extern void                     emlxs_pm_idle_timer(dev_info_t *dip);
 201  201  extern void                     emlxs_shutdown_thread(emlxs_hba_t *hba,
 202  202                                          void *arg1, void *arg2);
 203  203  extern uint32_t                 emlxs_set_parm(emlxs_hba_t *hba, uint32_t index,
 204  204                                          uint32_t new_value);
 205  205  extern void                     emlxs_ub_destroy(emlxs_port_t *port,
 206  206                                          emlxs_unsol_buf_t *pool);
 207  207  extern void                     emlxs_ub_callback(emlxs_port_t *port,
 208  208                                          fc_unsol_buf_t *ubp);
 209  209  extern void                     emlxs_ub_flush(emlxs_port_t *port);
 210  210  extern uint32_t                 emlxs_check_parm(emlxs_hba_t *hba,
 211  211                                          uint32_t index, uint32_t new_value);
 212  212  extern int32_t                  emlxs_fca_port_manage(opaque_t fca_port_handle,
 213  213                                          fc_fca_pm_t *pm);
 214  214  extern void                     emlxs_port_init(emlxs_port_t *port);
 215  215  extern void                     emlxs_get_fcode_version(emlxs_hba_t *hba);
 216  216  
 217  217  extern void                     emlxs_swap32_buffer(uint8_t *buffer,
 218  218                                          uint32_t size);
 219  219  extern void                     emlxs_swap32_bcopy(uint8_t *src,
 220  220                                          uint8_t *dst, uint32_t size);
 221  221  
 222  222  extern char                     *emlxs_strtoupper(char *str);
 223  223  
 224  224  extern void                     emlxs_mode_set(emlxs_hba_t *hba);
 225  225  
 226  226  extern char                     *emlxs_mode_xlate(uint32_t mode);
 227  227  
 228  228  #ifdef MENLO_SUPPORT
 229  229  extern char                     *emlxs_menlo_cmd_xlate(uint32_t cmd);
 230  230  extern char                     *emlxs_menlo_rsp_xlate(uint32_t rsp);
 231  231  #endif /* MENLO_SUPPORT */
 232  232  
 233  233  #ifdef FMA_SUPPORT
 234  234  extern void                     emlxs_fm_init(emlxs_hba_t *hba);
 235  235  extern void                     emlxs_fm_fini(emlxs_hba_t *hba);
 236  236  extern int                      emlxs_fm_check_acc_handle(emlxs_hba_t *hba,
 237  237                                          ddi_acc_handle_t handle);
 238  238  extern int                      emlxs_fm_check_dma_handle(emlxs_hba_t *hba,
 239  239                                          ddi_dma_handle_t handle);
 240  240  extern void                     emlxs_fm_ereport(emlxs_hba_t *hba,
 241  241                                          char *detail);
 242  242  extern void                     emlxs_fm_service_impact(emlxs_hba_t *hba,
 243  243                                          int impact);
 244  244  extern int                      emlxs_fm_error_cb(dev_info_t *dip,
 245  245                                          ddi_fm_error_t *err,
 246  246                                          const void *impl_data);
 247  247  extern void                     emlxs_check_dma(emlxs_hba_t *hba,
 248  248                                          emlxs_buf_t *sbp);
 249  249  #endif  /* FMA_SUPPORT */
 250  250  
 251  251  /* Module emlxs_pkt.c External Routine Declarations */
 252  252  extern int32_t                  emlxs_pkt_send(fc_packet_t *pkt, uint32_t now);
 253  253  extern void                     emlxs_pkt_free(fc_packet_t *pkt);
 254  254  extern void                     emlxs_pkt_callback(fc_packet_t *pkt);
 255  255  extern fc_packet_t              *emlxs_pkt_alloc(emlxs_port_t *port,
 256  256                                          uint32_t cmdlen, uint32_t rsplen,
 257  257                                          uint32_t datalen, int32_t sleep);
 258  258  
 259  259  /* Module emlxs_clock.c External Routine Declarations */
 260  260  extern void                     emlxs_timer_checks(emlxs_hba_t *hba);
 261  261  extern void                     emlxs_timer_start(emlxs_hba_t *hba);
 262  262  extern void                     emlxs_timer_stop(emlxs_hba_t *hba);
 263  263  extern void                     emlxs_link_timeout(emlxs_hba_t *hba);
 264  264  extern clock_t                  emlxs_timeout(emlxs_hba_t *hba,
 265  265                                          uint32_t timeout);
 266  266  extern void                     emlxs_timer_cancel_clean_address(
 267  267                                          emlxs_port_t *port);
 268  268  
 269  269  /* Module emlxs_dhchap.c External Routine Declarations */
 270  270  #ifdef DHCHAP_SUPPORT
 271  271  extern int                      emlxs_dhchap_state_machine(emlxs_port_t *port,
 272  272                                          CHANNEL *cp, IOCBQ *iocbq,
 273  273                                          MATCHMAP *mp, NODELIST *node, int evt);
 274  274  
 275  275  extern void                     emlxs_dhc_attach(emlxs_hba_t *hba);
 276  276  extern void                     emlxs_dhc_detach(emlxs_hba_t *hba);
 277  277  extern void                     emlxs_dhc_authrsp_timeout(emlxs_port_t *port,
 278  278                                          void *node, void *null);
 279  279  extern void                     emlxs_dhc_reauth_timeout(emlxs_port_t *port,
 280  280                                          void *newtimeout, void *node);
 281  281  extern void                     emlxs_dhc_auth_stop(emlxs_port_t *port,
 282  282                                          emlxs_node_t *node);
 283  283  extern int                      emlxs_dhc_auth_start(emlxs_port_t *port,
 284  284                                          emlxs_node_t *node, uint8_t *sbp,
 285  285                                          uint8_t *ubp);
 286  286  extern void                     emlxs_dhc_init_sp(emlxs_port_t *port,
 287  287                                          uint32_t did, SERV_PARM *sp,
 288  288                                          char **msg);
 289  289  extern uint32_t                 emlxs_dhc_verify_login(emlxs_port_t *port,
 290  290                                          uint32_t sid, SERV_PARM *sp);
 291  291  extern void                     emlxs_dhc_status(emlxs_port_t *port,
 292  292                                          emlxs_node_t *ndlp, uint32_t reason,
 293  293                                          uint32_t explaination);
 294  294  extern void                     emlxs_dhc_state(emlxs_port_t *port,
 295  295                                          emlxs_node_t *ndlp, uint32_t state,
 296  296                                          uint32_t reason,
 297  297                                          uint32_t explaination);
 298  298  extern uint32_t                 emlxs_dhc_init_auth(emlxs_hba_t *hba,
 299  299                                          uint8_t *lwwpn, uint8_t *rwwpn);
 300  300  extern uint32_t                 emlxs_dhc_get_auth_cfg(emlxs_hba_t *hba,
 301  301                                          dfc_fcsp_config_t *fcsp_cfg);
 302  302  extern uint32_t                 emlxs_dhc_get_auth_key(emlxs_hba_t *hba,
 303  303                                          dfc_auth_password_t *dfc_auth_pwd);
 304  304  extern uint32_t                 emlxs_dhc_add_auth_cfg(emlxs_hba_t *hba,
 305  305                                          dfc_fcsp_config_t *fcsp_cfg,
 306  306                                          dfc_password_t *dfc_pwd);
 307  307  extern uint32_t                 emlxs_dhc_delete_auth_cfg(emlxs_hba_t *hba,
 308  308                                          dfc_fcsp_config_t *fcsp_cfg,
 309  309                                          dfc_password_t *dfc_pwd);
 310  310  extern uint32_t                 emlxs_dhc_set_auth_key(emlxs_hba_t *hba,
 311  311                                          dfc_auth_password_t *dfc_pwd);
 312  312  extern uint32_t                 emlxs_dhc_get_auth_status(emlxs_hba_t *hba,
 313  313                                          dfc_auth_status_t *fcsp_status);
 314  314  extern uint32_t                 emlxs_dhc_get_auth_cfg_table(emlxs_hba_t *hba,
 315  315                                          dfc_fcsp_config_t *fcsp_cfg);
 316  316  extern uint32_t                 emlxs_dhc_get_auth_key_table(emlxs_hba_t *hba,
 317  317                                          dfc_auth_password_t *auth_pwd);
 318  318  #endif  /* DHCHAP_SUPPORT */
 319  319  
 320  320  /* Module emlxs_node.c External Routine Declarations */
 321  321  extern void                     emlxs_node_throttle_set(emlxs_port_t *port,
 322  322                                          NODELIST *node);
 323  323  extern NODELIST *               emlxs_node_create(emlxs_port_t *port,
 324  324                                          uint32_t did, uint32_t rpi,
 325  325                                          SERV_PARM *sp);
 326  326  extern void                     emlxs_node_timeout(emlxs_port_t *port,
 327  327                                          NODELIST *ndlp, uint32_t ringno);
 328  328  extern void                     emlxs_node_open(emlxs_port_t *port,
 329  329                                          NODELIST *ndlp, uint32_t ringno);
 330  330  extern void                     emlxs_node_close(emlxs_port_t *port,
 331  331                                          NODELIST *ndlp, uint32_t ringno,
 332  332                                          int32_t timeout);
 333  333  extern NODELIST                 *emlxs_node_find_did(emlxs_port_t *port,
 334  334                                          uint32_t did, uint32_t lock);
 335  335  extern NODELIST                 *emlxs_node_find_rpi(emlxs_port_t *port,
 336  336                                          uint32_t rpi);
 337  337  extern void                     emlxs_node_destroy_all(emlxs_port_t *port);
 338  338  extern NODELIST                 *emlxs_node_find_mac(emlxs_port_t *port,
 339  339                                          uint8_t *mac);
 340  340  extern void                     emlxs_node_rm(emlxs_port_t *port,
 341  341                                          NODELIST *ndlp);
 342  342  extern NODELIST                 *emlxs_node_find_wwpn(emlxs_port_t *port,
 343  343                                          uint8_t *wwpn, uint32_t lock);
 344  344  extern NODELIST                 *emlxs_node_find_index(emlxs_port_t *port,
 345  345                                          uint32_t index, uint32_t nports_only);
 346  346  extern uint32_t                 emlxs_nport_count(emlxs_port_t *port);
 347  347  
 348  348  /* Module emlxs_els.c External Routine Declarations */
 349  349  extern int32_t                  emlxs_els_handle_event(emlxs_hba_t *hba,
 350  350                                          CHANNEL *cp, IOCBQ *temp);
 351  351  extern int32_t                  emlxs_els_handle_unsol_req(emlxs_port_t *port,
 352  352                                          CHANNEL *cp, IOCBQ *iocbq,
 353  353                                          MATCHMAP *mp, uint32_t size);
 354  354  extern uint32_t                 emlxs_generate_rscn(emlxs_port_t *port,
 355  355                                          uint32_t d_id);
 356  356  extern int32_t                  emlxs_ct_handle_event(emlxs_hba_t *hba,
 357  357                                          CHANNEL *cp, IOCBQ *temp);
 358  358  extern int32_t                  emlxs_ct_handle_unsol_req(emlxs_port_t *port,
 359  359                                          CHANNEL *cp, IOCBQ *iocbq,
 360  360                                          MATCHMAP *mp, uint32_t size);
 361  361  extern int32_t                  emlxs_els_reply(emlxs_port_t *port,
 362  362                                          IOCBQ *iocbq, uint32_t type,
 363  363                                          uint32_t type2, uint32_t reason,
 364  364                                          uint32_t explain);
 365  365  extern void                     emlxs_send_logo(emlxs_port_t *port,
 366  366                                          uint32_t d_id);
 367  367  extern void                     emlxs_reset_link_thread(emlxs_hba_t *hba,
 368  368                                          void *arg1, void *arg2);
 369  369  extern uint32_t                 emlxs_process_unsol_flogi(emlxs_port_t *port,
 370  370                                          IOCBQ *iocbq, MATCHMAP *mp,
 371  371                                          uint32_t size, char *buffer,
 372  372                                          size_t len);
 373  373  extern uint32_t                 emlxs_process_unsol_plogi(emlxs_port_t *port,
 374  374                                          IOCBQ *iocbq, MATCHMAP *mp,
 375  375                                          uint32_t size, char *buffer,
 376  376                                          size_t len);
 377  377  extern uint32_t                 emlxs_ub_send_login_acc(emlxs_port_t *port,
 378  378                                          fc_unsol_buf_t *ubp);
 379  379  
 380  380  #ifdef MENLO_SUPPORT
 381  381  extern int                      emlxs_menlo_handle_event(emlxs_hba_t *hba,
 382  382                                          CHANNEL *cp, IOCBQ *iocbq);
 383  383  #endif /* MENLO_SUPPORT */
 384  384  
 385  385  /* Module emlxs_ip.c External Routine Declarations */
 386  386  extern int32_t                  emlxs_ip_handle_event(emlxs_hba_t *hba,
 387  387                                          CHANNEL *cp, IOCBQ *temp);
 388  388  extern int                      emlxs_ip_handle_rcv_seq_list(emlxs_hba_t *hba,
 389  389                                          CHANNEL *cp, IOCBQ *saveq);
 390  390  extern int                      emlxs_ip_handle_unsol_req(emlxs_port_t *port,
 391  391                                          CHANNEL *cp, IOCBQ *iocbq, MATCHMAP *mp,
 392  392                                          uint32_t size);
 393  393  extern int                      emlxs_create_xri(emlxs_port_t *port,
 394  394                                          CHANNEL *cp, NODELIST *ndlp);
 395  395  extern int                      emlxs_handle_create_xri(emlxs_hba_t *hba,
 396  396                                          CHANNEL *cp, IOCBQ *temp);
 397  397  extern int                      emlxs_handle_xri_aborted(emlxs_hba_t *hba,
 398  398                                          CHANNEL *cp, IOCBQ *temp);
 399  399  
 400  400  /* Module emlxs_mbox.c External Routine Declarations */
 401  401  extern void                     emlxs_mb_get_port_name(emlxs_hba_t *hba,
 402  402                                          MAILBOXQ *mbq);
 403  403  extern void                     emlxs_mb_get_extents_info(emlxs_hba_t *hba,
 404  404                                          MAILBOXQ *mbq, uint16_t type);
 405  405  extern void                     emlxs_mb_get_extents(emlxs_hba_t *hba,
 406  406                                          MAILBOXQ *mbq, uint16_t type);
 407  407  extern void                     emlxs_mb_dealloc_extents(emlxs_hba_t *hba,
 408  408                                          MAILBOXQ *mbq, uint16_t type);
 409  409  extern void                     emlxs_mb_alloc_extents(emlxs_hba_t *hba,
 410  410                                          MAILBOXQ *mbq, uint16_t type,
 411  411                                          uint16_t count);
 412  412  extern void                     emlxs_mb_get_sli4_params(emlxs_hba_t *hba,
 413  413                                          MAILBOXQ *mbq);
 414  414  extern char                     *emlxs_mb_xlate_status(uint32_t status);
 415  415  
 416  416  extern void                     emlxs_mb_config_msi(emlxs_hba_t *hba,
 417  417                                          MAILBOXQ *mbq, uint32_t *intr_map,
 418  418                                          uint32_t intr_count);
 419  419  extern void                     emlxs_mb_config_msix(emlxs_hba_t *hba,
 420  420                                          MAILBOXQ *mbq, uint32_t *intr_map,
 421  421                                          uint32_t intr_count);
 422  422  extern void                     emlxs_mb_read_lnk_stat(emlxs_hba_t *hba,
 423  423                                          MAILBOXQ *mbq);
 424  424  extern void                     emlxs_mb_config_link(emlxs_hba_t *hba,
 425  425                                          MAILBOXQ *mbq);
 426  426  extern void                     emlxs_mb_config_ring(emlxs_hba_t *hba,
 427  427                                          int32_t ring, MAILBOXQ *mbq);
 428  428  extern void                     emlxs_mb_init_link(emlxs_hba_t *hba,
 429  429                                          MAILBOXQ *mbq, uint32_t topology,
 430  430                                          uint32_t linkspeed);
 431  431  extern void                     emlxs_mb_down_link(emlxs_hba_t *hba,
 432  432                                          MAILBOXQ *mbq);
 433  433  extern uint32_t                 emlxs_mb_read_la(emlxs_hba_t *hba,
 434  434                                          MAILBOXQ *mbq);
 435  435  extern void                     emlxs_mb_read_nv(emlxs_hba_t *hba,
 436  436                                          MAILBOXQ *mbq);
 437  437  extern void                     emlxs_mb_read_rev(emlxs_hba_t *hba,
 438  438                                          MAILBOXQ *mbq, uint32_t v3);
 439  439  extern uint32_t                 emlxs_mb_read_rpi(emlxs_hba_t *hba,
 440  440                                          uint32_t rpi, MAILBOXQ *mbq,
 441  441                                          uint32_t flg);
 442  442  extern uint32_t                 emlxs_mb_read_xri(emlxs_hba_t *hba,
 443  443                                          uint32_t xri, MAILBOXQ *mbq,
 444  444                                          uint32_t flg);
 445  445  extern uint32_t                 emlxs_mb_read_sparam(emlxs_hba_t *hba,
 446  446                                          MAILBOXQ *mbq);
 447  447  extern void                     emlxs_disable_tc(emlxs_hba_t *hba,
 448  448                                          MAILBOXQ *mbq);
 449  449  extern uint32_t                 emlxs_mb_run_biu_diag(emlxs_hba_t *hba,
 450  450                                          MAILBOXQ *mbq, uint64_t in,
 451  451                                          uint64_t out);
 452  452  extern void                     emlxs_mb_dump_vpd(emlxs_hba_t *hba,
 453  453                                          MAILBOXQ *mbq, uint32_t offset);
 454  454  extern void                     emlxs_mb_dump_fcoe(emlxs_hba_t *hba,
 455  455                                          MAILBOXQ *mbq, uint32_t offset);
 456  456  extern void                     emlxs_mb_config_farp(emlxs_hba_t *hba,
 457  457                                          MAILBOXQ *mbq);
 458  458  extern void                     emlxs_mb_read_config(emlxs_hba_t *hba,
 459  459                                          MAILBOXQ *mbq);
 460  460  extern void                     emlxs_mb_put(emlxs_hba_t *hba,
 461  461                                          MAILBOXQ *mbq);
 462  462  extern MAILBOXQ                 *emlxs_mb_get(emlxs_hba_t *hba);
 463  463  extern void                     emlxs_mb_clear_la(emlxs_hba_t *hba,
 464  464                                          MAILBOXQ *mbq);
 465  465  extern void                     emlxs_mb_set_var(emlxs_hba_t *hba,
 466  466                                          MAILBOXQ *mbq, uint32_t addr,
 467  467                                          uint32_t value);
 468  468  extern void                     emlxs_mb_reset_ring(emlxs_hba_t *hba,
 469  469                                          MAILBOXQ *mbq, uint32_t ringno);
 470  470  extern char                     *emlxs_mb_cmd_xlate(uint8_t command);
 471  471  extern char                     *emlxs_request_feature_xlate(uint32_t mask);
 472  472  extern void                     emlxs_mb_read_status(emlxs_hba_t *hba,
 473  473                                          MAILBOXQ *mbq);
 474  474  extern int                      emlxs_cmpl_init_vpi(void *arg1, MAILBOXQ *mbq);
 475  475  extern uint32_t                 emlxs_mb_init_vpi(emlxs_port_t *port);
 476  476  extern int                      emlxs_cmpl_reg_vpi(void *arg1, MAILBOXQ *mbq);
 477  477  extern uint32_t                 emlxs_mb_reg_vpi(emlxs_port_t *port,
 478  478                                          emlxs_buf_t *sbp);
  
    | 
      ↓ open down ↓ | 
    478 lines elided | 
    
      ↑ open up ↑ | 
  
 479  479  extern int                      emlxs_cmpl_unreg_vpi(void *arg1, MAILBOXQ *mbq);
 480  480  extern uint32_t                 emlxs_mb_unreg_vpi(emlxs_port_t *port);
 481  481  extern void                     emlxs_mb_fini(emlxs_hba_t *hba,
 482  482                                          MAILBOX *mb, uint32_t mbxStatus);
 483  483  extern void                     emlxs_mb_deferred_cmpl(emlxs_port_t *port,
 484  484                                          uint32_t mbxStatus, emlxs_buf_t *sbp,
 485  485                                          fc_unsol_buf_t *ubp, IOCBQ *iocbq);
 486  486  extern void                     emlxs_mb_flush(emlxs_hba_t *hba);
 487  487  extern void                     emlxs_mb_heartbeat(emlxs_hba_t *hba,
 488  488                                          MAILBOXQ *mbq);
      489 +extern void                     emlxs_mb_gpio_write(emlxs_hba_t *hba,
      490 +                                        MAILBOXQ *mbq, uint8_t pin,
      491 +                                        uint8_t val);
 489  492  extern void                     emlxs_mb_request_features(emlxs_hba_t *hba,
 490  493                                          MAILBOXQ *mbq, uint32_t mask);
 491  494  extern int                      emlxs_mb_resume_rpi(emlxs_hba_t *hba,
 492  495                                          emlxs_buf_t *sbp, uint16_t rpi);
 493  496  extern void                     emlxs_mb_noop(emlxs_hba_t *hba,
 494  497                                          MAILBOXQ *mbq);
 495  498  extern int                      emlxs_mbext_noop(emlxs_hba_t *hba,
 496  499                                          MAILBOXQ *mbq);
 497  500  extern void                     emlxs_mb_resetport(emlxs_hba_t *hba,
 498  501                                          MAILBOXQ *mbq);
 499  502  extern void                     emlxs_mb_eq_create(emlxs_hba_t *hba,
 500  503                                          MAILBOXQ *mbq, uint32_t num);
 501  504  extern void                     emlxs_mb_cq_create(emlxs_hba_t *hba,
 502  505                                          MAILBOXQ *mbq, uint32_t num);
 503  506  extern void                     emlxs_mb_wq_create(emlxs_hba_t *hba,
 504  507                                          MAILBOXQ *mbq, uint32_t num);
 505  508  extern void                     emlxs_mb_rq_create(emlxs_hba_t *hba,
 506  509                                          MAILBOXQ *mbq, uint32_t num);
 507  510  extern void                     emlxs_mb_mq_create(emlxs_hba_t *hba,
 508  511                                          MAILBOXQ *mbq);
 509  512  extern void                     emlxs_mb_mq_create_ext(emlxs_hba_t *hba,
 510  513                                          MAILBOXQ *mbq);
 511  514  extern int                      emlxs_mb_reg_fcfi(emlxs_hba_t *hba,
 512  515                                          MAILBOXQ *mbq, FCFIobj_t *fcfp);
 513  516  extern int                      emlxs_mb_unreg_fcfi(emlxs_hba_t *hba,
 514  517                                          FCFIobj_t *fcfp);
 515  518  extern int                      emlxs_mb_reg_vfi(emlxs_hba_t *hba,
 516  519                                          MAILBOXQ *mb, VFIobj_t *vfip,
 517  520                                          emlxs_port_t *vpip);
 518  521  extern int                      emlxs_mb_unreg_vfi(emlxs_hba_t *hba,
 519  522                                          VFIobj_t *vfip);
 520  523  extern int                      emlxs_mbext_read_fcf_table(emlxs_hba_t *hba,
 521  524                                          MAILBOXQ *mbq, uint32_t index);
 522  525  extern int                      emlxs_mbext_add_fcf_table(emlxs_hba_t *hba,
 523  526                                          MAILBOXQ *mbq, uint32_t index);
 524  527  extern void                     emlxs_mb_rediscover_fcf_table(emlxs_hba_t *hba,
 525  528                                          MAILBOXQ *mbq);
 526  529  extern void                     emlxs_mb_async_event(emlxs_hba_t *hba,
 527  530                                          MAILBOXQ *mbq);
 528  531  extern int32_t                  emlxs_mb_check_sparm(emlxs_hba_t *hba,
 529  532                                          SERV_PARM *nsp);
 530  533  extern void                     emlxs_cmpl_mbox(emlxs_hba_t *hba, MAILBOXQ *mq);
 531  534  extern void                     emlxs_mb_dump(emlxs_hba_t *hba, MAILBOXQ *mbq,
 532  535                                          uint32_t offset, uint32_t words);
 533  536  extern void                     emlxs_mb_retry(emlxs_hba_t *hba, MAILBOXQ *mbq);
 534  537  extern void                     emlxs_mb_init(emlxs_hba_t *hba, MAILBOXQ *mbq,
 535  538                                          uint32_t flag, uint32_t tmo);
 536  539  extern void                     emlxs_mb_config_hbq(emlxs_hba_t *hba,
 537  540                                          MAILBOXQ *mbq, int hbq_id);
 538  541  
 539  542  /* Module emlxs_mem.c External Routine Declarations */
 540  543  extern void                     *emlxs_mem_pool_get(emlxs_hba_t *hba,
 541  544                                          MEMSEG *seg);
 542  545  extern void                     emlxs_mem_pool_put(emlxs_hba_t *hba,
 543  546                                          MEMSEG *seg, void *bp);
 544  547  extern uint32_t                 emlxs_mem_pool_create(emlxs_hba_t *hba,
 545  548                                          MEMSEG *seg);
 546  549  extern void                     emlxs_mem_pool_destroy(emlxs_hba_t *hba,
 547  550                                          MEMSEG *seg);
 548  551  extern void                     emlxs_mem_pool_clean(emlxs_hba_t *hba,
 549  552                                          MEMSEG *seg);
 550  553  extern MATCHMAP                 *emlxs_mem_get_vaddr(emlxs_hba_t *hba,
 551  554                                          RING *rp, uint64_t mapbp);
 552  555  extern void                     *emlxs_mem_get(emlxs_hba_t *hba,
 553  556                                          uint32_t seg_id);
 554  557  extern void                     emlxs_mem_put(emlxs_hba_t *hba,
 555  558                                          uint32_t seg_id, void *bp);
 556  559  extern int32_t                  emlxs_mem_free_buffer(emlxs_hba_t *hba);
 557  560  extern int32_t                  emlxs_mem_alloc_buffer(emlxs_hba_t *hba);
 558  561  extern void                     emlxs_mem_map_vaddr(emlxs_hba_t *hba,
 559  562                                          RING *rp, MATCHMAP *mp, uint32_t *haddr,
 560  563                                          uint32_t *laddr);
 561  564  extern MATCHMAP                 *emlxs_mem_buf_alloc(emlxs_hba_t *hba,
 562  565                                          uint32_t size);
 563  566  extern void                     emlxs_mem_buf_free(emlxs_hba_t *hba,
 564  567                                          MATCHMAP *mp);
 565  568  extern uint32_t                 emlxs_hbq_alloc(emlxs_hba_t *hba,
 566  569                                          uint32_t hbq_id);
 567  570  
 568  571  /* Module emlxs_hba.c  External Routine Declarations */
 569  572  extern char                     *emlxs_pci_cap_xlate(uint32_t id);
 570  573  extern char                     *emlxs_pci_ecap_xlate(uint32_t id);
 571  574  
 572  575  extern void                     emlxs_decode_firmware_rev(emlxs_hba_t *hba,
 573  576                                          emlxs_vpd_t *vp);
 574  577  extern uint32_t                 emlxs_init_adapter_info(emlxs_hba_t *hba);
 575  578  extern uint32_t                 emlxs_strtol(char *str, uint32_t base);
 576  579  extern uint64_t                 emlxs_strtoll(char *str, uint32_t base);
 577  580  extern void                     emlxs_decode_version(uint32_t version,
 578  581                                          char *buffer, size_t len);
 579  582  extern char                     *emlxs_ffstate_xlate(uint32_t new_state);
 580  583  extern char                     *emlxs_ring_xlate(uint32_t ringno);
 581  584  extern void                     emlxs_proc_channel(emlxs_hba_t *hba,
 582  585                                          CHANNEL *cp, void *arg2);
 583  586  extern void                     emlxs_pcix_mxr_update(emlxs_hba_t *hba,
 584  587                                          uint32_t verbose);
 585  588  extern void                     emlxs_restart_thread(emlxs_hba_t *hba,
 586  589                                          void *arg1, void *arg2);
 587  590  extern void                     emlxs_fw_show(emlxs_hba_t *hba);
 588  591  extern void                     emlxs_proc_channel_event(emlxs_hba_t *hba,
 589  592                                          CHANNEL *cp, IOCBQ *iocbq);
 590  593  
 591  594  #ifdef MODFW_SUPPORT
 592  595  extern void                     emlxs_fw_load(emlxs_hba_t *hba,
 593  596                                          emlxs_firmware_t *fw);
 594  597  extern void                     emlxs_fw_unload(emlxs_hba_t *hba,
 595  598                                          emlxs_firmware_t *fw);
 596  599  #endif /* MODFW_SUPPORT */
 597  600  
 598  601  #ifdef MSI_SUPPORT
 599  602  extern int32_t                  emlxs_msi_add(emlxs_hba_t *hba);
 600  603  extern int32_t                  emlxs_msi_remove(emlxs_hba_t *hba);
 601  604  extern int32_t                  emlxs_msi_init(emlxs_hba_t *hba, uint32_t max);
 602  605  extern int32_t                  emlxs_msi_uninit(emlxs_hba_t *hba);
 603  606  #endif  /* MSI_SUPPORT */
 604  607  
 605  608  extern int32_t                  emlxs_intx_add(emlxs_hba_t *hba);
 606  609  extern int32_t                  emlxs_intx_remove(emlxs_hba_t *hba);
 607  610  extern int32_t                  emlxs_intx_init(emlxs_hba_t *hba, uint32_t max);
 608  611  extern int32_t                  emlxs_intx_uninit(emlxs_hba_t *hba);
 609  612  
 610  613  extern void                     emlxs_parse_prog_types(emlxs_hba_t *hba,
 611  614                                          char *types);
 612  615  extern int32_t                  emlxs_parse_vpd(emlxs_hba_t *hba, uint8_t *vpd,
 613  616                                          uint32_t size);
 614  617  extern int32_t                  emlxs_parse_fcoe(emlxs_hba_t *hba, uint8_t *p,
 615  618                                          uint32_t size);
 616  619  
 617  620  extern void                     emlxs_decode_label(char *label, char *buffer,
 618  621                                          int bige, size_t len);
 619  622  extern void                     emlxs_build_prog_types(emlxs_hba_t *hba,
 620  623                                          emlxs_vpd_t *vpd);
 621  624  extern void                     emlxs_process_link_speed(emlxs_hba_t *hba);
 622  625  
 623  626  extern uint32_t                 emlxs_iotag_flush(emlxs_hba_t *hba);
 624  627  
 625  628  extern int                      emlxs_pci_model_count;
 626  629  extern emlxs_model_t            emlxs_pci_model[];
 627  630  
 628  631  extern int                      emlxs_fw_count;
 629  632  extern emlxs_firmware_t         emlxs_fw_table[];
 630  633  
 631  634  
 632  635  /* Module emlxs_sli3.c  External Routine Declarations */
 633  636  extern emlxs_sli_api_t          emlxs_sli3_api;
 634  637  
 635  638  extern int                      emlxs_handle_rcv_seq(emlxs_hba_t *hba,
 636  639                                          CHANNEL *cp, IOCBQ *iocbq);
 637  640  extern void                     emlxs_update_HBQ_index(emlxs_hba_t *hba,
 638  641                                          uint32_t hbq_id);
 639  642  extern void                     emlxs_hbq_free_all(emlxs_hba_t *hba,
 640  643                                          uint32_t hbq_id);
 641  644  
 642  645  /* Module emlxs_sli4.c  External Routine Declarations */
 643  646  
 644  647  extern uint32_t                 emlxs_sli4_vfi_to_index(emlxs_hba_t *hba,
 645  648                                          uint32_t vfi);
 646  649  extern uint32_t                 emlxs_sli4_index_to_vfi(emlxs_hba_t *hba,
 647  650                                          uint32_t index);
 648  651  extern uint32_t                 emlxs_sli4_vpi_to_index(emlxs_hba_t *hba,
 649  652                                          uint32_t vpi);
 650  653  extern uint32_t                 emlxs_sli4_index_to_vpi(emlxs_hba_t *hba,
 651  654                                          uint32_t index);
 652  655  extern uint32_t                 emlxs_sli4_xri_to_index(emlxs_hba_t *hba,
 653  656                                          uint32_t xri);
 654  657  extern uint32_t                 emlxs_sli4_index_to_xri(emlxs_hba_t *hba,
 655  658                                          uint32_t index);
 656  659  extern uint32_t                 emlxs_sli4_rpi_to_index(emlxs_hba_t *hba,
 657  660                                          uint32_t rpi);
 658  661  extern uint32_t                 emlxs_sli4_index_to_rpi(emlxs_hba_t *hba,
 659  662                                          uint32_t index);
 660  663  
 661  664  extern uint32_t                 emlxs_sli4_unreg_all_nodes(
 662  665                                          emlxs_port_t *port);
 663  666  extern void                     emlxs_sli4_hba_reset_all(emlxs_hba_t *hba,
 664  667                                          uint32_t flag);
 665  668  extern XRIobj_t                 *emlxs_sli4_reserve_xri(emlxs_port_t *port,
 666  669                                          RPIobj_t *rpip, uint32_t type,
 667  670                                          uint16_t rx_id);
 668  671  extern emlxs_sli_api_t          emlxs_sli4_api;
 669  672  
 670  673  extern FCFIobj_t                *emlxs_sli4_assign_fcfi(emlxs_hba_t *hba,
 671  674                                          FCF_RECORD_t *fcfrec,
 672  675                                          uint32_t event_tag);
 673  676  extern void                     emlxs_data_dump(emlxs_port_t *port, char *str,
 674  677                                          uint32_t *data, int cnt, int err);
 675  678  extern void                     emlxs_ue_dump(emlxs_hba_t *hba, char *str);
 676  679  
 677  680  extern XRIobj_t                 *emlxs_sli4_find_xri(emlxs_port_t *port,
 678  681                                          uint16_t xri);
 679  682  extern VFIobj_t                 *emlxs_sli4_alloc_vfi(emlxs_hba_t *hba,
 680  683                                          FCFIobj_t *fp);
 681  684  extern void                     emlxs_sli4_free_vfi(emlxs_hba_t *hba,
 682  685                                          VFIobj_t *xp);
 683  686  extern void                     emlxs_sli4_free_fcfi(emlxs_hba_t *hba,
 684  687                                          FCFIobj_t *xp);
 685  688  extern void                     emlxs_sli4_free_xri(emlxs_port_t *port,
 686  689                                          emlxs_buf_t *sbp, XRIobj_t *xp,
 687  690                                          uint8_t lock);
 688  691  extern FCFIobj_t                *emlxs_sli4_bind_fcfi(emlxs_hba_t *hba);
 689  692  
 690  693  extern uint32_t                 emlxs_sli4_unreserve_xri(emlxs_port_t *port,
 691  694                                          uint16_t xri, uint32_t lock);
 692  695  extern XRIobj_t                 *emlxs_sli4_register_xri(emlxs_port_t *port,
 693  696                                          emlxs_buf_t *sbp, uint16_t xri,
 694  697                                          uint32_t did);
 695  698  
 696  699  
 697  700  /* Module emlxs_diag.c  External Routine Declarations */
 698  701  extern uint32_t                 emlxs_diag_post_run(emlxs_hba_t *hba);
 699  702  extern uint32_t                 emlxs_diag_biu_run(emlxs_hba_t *hba,
 700  703                                          uint32_t pattern);
 701  704  extern uint32_t                 emlxs_diag_pattern[256];
 702  705  extern uint32_t                 emlxs_diag_echo_run(emlxs_port_t *port,
 703  706                                          uint32_t did, uint32_t pattern);
 704  707  
 705  708  /* Module emlxs_download.c External Routine Declarations */
 706  709  extern void                     emlxs_memset(uint8_t *buffer, uint8_t value,
 707  710                                          uint32_t size);
 708  711  extern int32_t                  emlxs_fw_download(emlxs_hba_t *hba,
 709  712                                          caddr_t buffer, uint32_t len,
 710  713                                          uint32_t offline);
 711  714  extern uint32_t                 emlxs_get_max_sram(emlxs_hba_t *hba,
 712  715                                          uint32_t *MaxRbusSize,
 713  716                                          uint32_t *MaxIbusSize);
 714  717  extern uint32_t                 emlxs_get_load_list(emlxs_hba_t *hba,
 715  718                                          PROG_ID *load_list);
 716  719  extern uint32_t                 emlxs_read_wakeup_parms(emlxs_hba_t *hba,
 717  720                                          PWAKE_UP_PARMS WakeUpParms,
 718  721                                          uint32_t verbose);
 719  722  extern int32_t                  emlxs_cfl_download(emlxs_hba_t *hba,
 720  723                                          uint32_t region, caddr_t buffer,
 721  724                                          uint32_t len);
 722  725  
 723  726  extern int32_t                  emlxs_boot_code_disable(emlxs_hba_t *hba);
 724  727  extern int32_t                  emlxs_boot_code_enable(emlxs_hba_t *hba);
 725  728  extern int32_t                  emlxs_boot_code_state(emlxs_hba_t *hba);
 726  729  
 727  730  extern int32_t                  emlxs_be_read_fw_version(emlxs_hba_t *hba,
 728  731                                          emlxs_firmware_t *fw);
 729  732  
 730  733  /* Module emlxs_fcp.c External Routine Declarations */
 731  734  extern int                      emlxs_power_up(emlxs_hba_t *hba);
 732  735  extern int                      emlxs_power_down(emlxs_hba_t *hba);
 733  736  extern int                      emlxs_reset_link(emlxs_hba_t *hba,
 734  737                                          uint32_t linkup, uint32_t wait);
 735  738  extern emlxs_buf_t              *emlxs_unregister_pkt(CHANNEL *cp,
 736  739                                          uint16_t iotag, uint32_t forced);
 737  740  extern uint16_t                 emlxs_register_pkt(CHANNEL *cp,
 738  741                                          emlxs_buf_t *sbp);
 739  742  
 740  743  extern IOCBQ                    *emlxs_create_abort_xri_cn(emlxs_port_t *port,
 741  744                                          NODELIST *ndlp, uint16_t iotag,
 742  745                                          CHANNEL *cp, uint8_t class,
 743  746                                          int32_t flag);
 744  747  extern IOCBQ                    *emlxs_create_close_xri_cn(emlxs_port_t *port,
 745  748                                          NODELIST *ndlp, uint16_t iotag,
 746  749                                          CHANNEL *cp);
 747  750  extern IOCBQ                    *emlxs_create_abort_xri_cx(emlxs_port_t *port,
 748  751                                          NODELIST *ndlp, uint16_t xid,
 749  752                                          CHANNEL *cp, uint8_t class,
 750  753                                          int32_t flag);
 751  754  extern IOCBQ                    *emlxs_create_close_xri_cx(emlxs_port_t *port,
 752  755                                          NODELIST *ndlp, uint16_t xid,
 753  756                                          CHANNEL *cp);
 754  757  extern void                     emlxs_abort_ct_exchange(emlxs_hba_t *hba,
 755  758                                          emlxs_port_t *port, uint32_t rxid);
 756  759  extern void                     emlxs_abort_els_exchange(emlxs_hba_t *hba,
 757  760                                          emlxs_port_t *port, uint32_t rxid);
 758  761  extern void                     emlxs_close_els_exchange(emlxs_hba_t *hba,
 759  762                                          emlxs_port_t *port, uint32_t rxid);
 760  763  extern void                     emlxs_abort_fct_exchange(emlxs_hba_t *hba,
 761  764                                          emlxs_port_t *port, uint32_t rxid);
 762  765  extern emlxs_buf_t              *emlxs_chipq_get(CHANNEL *cp, uint16_t iotag);
 763  766  extern void                     emlxs_chipq_put(CHANNEL *cp, emlxs_buf_t *sbp);
 764  767  extern uint32_t                 emlxs_chipq_node_flush(emlxs_port_t *port,
 765  768                                          CHANNEL *cp, NODELIST *ndlp,
 766  769                                          emlxs_buf_t *fpkt);
 767  770  extern uint32_t                 emlxs_chipq_lun_flush(emlxs_port_t *port,
 768  771                                          NODELIST *ndlp, uint32_t lun,
 769  772                                          emlxs_buf_t *fpkt);
 770  773  extern uint32_t                 emlxs_chipq_node_check(emlxs_port_t *port,
 771  774                                          CHANNEL *cp, NODELIST *ndlp);
 772  775  
 773  776  extern IOCBQ                    *emlxs_tx_get(CHANNEL *cp, uint32_t lock);
 774  777  extern void                     emlxs_tx_put(IOCBQ *iocbq, uint32_t lock);
 775  778  extern void                     emlxs_tx_move(NODELIST *ndlp, CHANNEL *from,
 776  779                                          CHANNEL *to, uint32_t cmd,
 777  780                                          emlxs_buf_t *fpkt, uint32_t lock);
 778  781  
 779  782  extern uint32_t                 emlxs_tx_node_check(emlxs_port_t *port,
 780  783                                          NODELIST *ndlp, CHANNEL *cp);
 781  784  extern uint32_t                 emlxs_tx_node_flush(emlxs_port_t *port,
 782  785                                          NODELIST *ndlp, CHANNEL *cp,
 783  786                                          uint32_t shutdown, emlxs_buf_t *fpkt);
 784  787  extern uint32_t                 emlxs_tx_lun_flush(emlxs_port_t *port,
 785  788                                          NODELIST *ndlp, uint32_t lun,
 786  789                                          emlxs_buf_t *fpkt);
 787  790  extern uint32_t                 emlxs_tx_channel_flush(emlxs_hba_t *hba,
 788  791                                          CHANNEL *cp, emlxs_buf_t *fpkt);
 789  792  
 790  793  extern void                     emlxs_linkdown(emlxs_hba_t *hba);
 791  794  extern void                     emlxs_linkup(emlxs_hba_t *hba);
 792  795  extern void                     emlxs_port_online(emlxs_port_t *port);
 793  796  extern int32_t                  emlxs_port_offline(emlxs_port_t *port,
 794  797                                          uint32_t scope);
 795  798  extern void                     emlxs_ffcleanup(emlxs_hba_t *hba);
 796  799  extern int32_t                  emlxs_offline(emlxs_hba_t *hba,
 797  800                                          uint32_t reset_requested);
 798  801  extern int32_t                  emlxs_online(emlxs_hba_t *hba);
 799  802  extern int32_t                  emlxs_post_buffer(emlxs_hba_t *hba,
 800  803                                          RING *rp, int16_t cnt);
 801  804  extern void                     emlxs_ff_start(emlxs_hba_t *hba);
 802  805  extern void                     emlxs_handle_fcp_event(emlxs_hba_t *hba,
 803  806                                          CHANNEL *rp, IOCBQ *temp);
 804  807  extern int                      emlxs_fct_handle_abort(emlxs_hba_t *hba,
 805  808                                          CHANNEL *rp, IOCBQ *iocbq);
 806  809  
 807  810  /* Module emlxs_thread.c External Routine Declarations */
 808  811  extern void                     emlxs_taskq_destroy(emlxs_taskq_t *taskq);
 809  812  extern void                     emlxs_taskq_create(emlxs_hba_t *hba,
 810  813                                          emlxs_taskq_t *taskq);
 811  814  extern uint32_t                 emlxs_taskq_dispatch(emlxs_taskq_t *taskq,
 812  815                                          void (*func) (), void *arg);
 813  816  extern void                     emlxs_thread_create(emlxs_hba_t *hba,
 814  817                                          emlxs_thread_t *ethread);
 815  818  extern void                     emlxs_thread_destroy(emlxs_thread_t *ethread);
 816  819  extern void                     emlxs_thread_trigger1(emlxs_thread_t *ethread,
 817  820                                          void (*func) ());
 818  821  extern void                     emlxs_thread_trigger2(emlxs_thread_t *ethread,
 819  822                                          void (*func) (), CHANNEL *cp);
 820  823  extern void                     emlxs_thread_spawn(emlxs_hba_t *hba,
 821  824                                          void (*func) (), void *arg1,
 822  825                                          void *arg2);
 823  826  extern void                     emlxs_thread_spawn_create(emlxs_hba_t *hba);
 824  827  extern void                     emlxs_thread_spawn_destroy(emlxs_hba_t *hba);
 825  828  
 826  829  /* Module emlxs_dfc.c External Routine Declarations */
 827  830  extern int32_t                  emlxs_dfc_manage(emlxs_hba_t *hba, void *dfc,
 828  831                                          int32_t mode);
 829  832  extern int32_t                  emlxs_dfc_handle_event(emlxs_hba_t *hba,
 830  833                                          CHANNEL *cp, IOCBQ *temp);
 831  834  extern int                      emlxs_dfc_handle_unsol_req(emlxs_port_t *port,
 832  835                                          CHANNEL *cp, IOCBQ *iocbq,
 833  836                                          MATCHMAP *mp, uint32_t size);
 834  837  extern void                     emlxs_fcoe_attention_thread(emlxs_hba_t *hba,
 835  838                                          void *arg1, void *arg2);
 836  839  extern uint32_t         emlxs_set_hba_mode(emlxs_hba_t *hba, uint32_t mode);
 837  840  extern uint32_t         emlxs_get_dump_region(emlxs_hba_t *hba, uint32_t region,
 838  841                              uint8_t *buffer, uint32_t *psize);
 839  842  extern int32_t          emlxs_send_menlo_cmd(emlxs_hba_t *hba, uint8_t *cmd_buf,
 840  843                              uint32_t cmd_size, uint8_t *rsp_buf,
 841  844                              uint32_t *rsp_size);
 842  845  
 843  846  #ifdef SFCT_SUPPORT
 844  847  /* Module emlxs_fct.c External Routine Declarations */
 845  848  extern uint32_t                 emlxs_fct_stmf_alloc(emlxs_hba_t *hba,
 846  849                                          MATCHMAP *mp);
 847  850  extern void                     emlxs_fct_stmf_free(emlxs_hba_t *hba,
 848  851                                          MATCHMAP *mp);
 849  852  extern void                     emlxs_fct_link_down(emlxs_port_t *port);
 850  853  extern void                     emlxs_fct_link_up(emlxs_port_t *port);
 851  854  extern uint32_t                 emlxs_fct_init(emlxs_hba_t *hba);
 852  855  extern void                     emlxs_fct_detach(emlxs_hba_t *hba);
 853  856  extern int                      emlxs_fct_handle_unsol_els(emlxs_port_t *port,
 854  857                                          CHANNEL *cp, IOCBQ *iocbq, MATCHMAP *mp,
 855  858                                          uint32_t size);
 856  859  extern int                      emlxs_fct_handle_unsol_req(emlxs_port_t *port,
 857  860                                          CHANNEL *cp, IOCBQ *iocbq, MATCHMAP *mp,
 858  861                                          uint32_t size);
 859  862  extern int                      emlxs_fct_handle_fcp_event(emlxs_hba_t *hba,
 860  863                                          CHANNEL *cp, IOCBQ *iocbq);
 861  864  extern void                     emlxs_fct_bind_port(emlxs_port_t *port);
 862  865  extern void                     emlxs_fct_unbind_port(emlxs_port_t *port);
 863  866  extern void                     emlxs_fct_unsol_callback(emlxs_port_t *port,
 864  867                                          fct_cmd_t *fct_cmd);
 865  868  extern void                     emlxs_fct_attach(emlxs_hba_t *hba);
 866  869  extern int                      emlxs_fct_port_shutdown(emlxs_port_t *port);
 867  870  extern int                      emlxs_fct_port_initialize(emlxs_port_t *port);
 868  871  
 869  872  #ifdef MODSYM_SUPPORT
 870  873  extern int                      emlxs_fct_modopen();
 871  874  extern void                     emlxs_fct_modclose();
 872  875  #endif /* MODSYM_SUPPORT */
 873  876  
 874  877  #ifdef FCT_IO_TRACE
 875  878  extern void                     emlxs_fct_io_trace(emlxs_port_t *,
 876  879                                          fct_cmd_t *, uint32_t);
 877  880  #endif /* FCT_IO_TRACE */
 878  881  #endif /* SFCT_SUPPORT */
 879  882  
 880  883  #ifdef DUMP_SUPPORT
 881  884  /* Module emlxs_dump.c External Routine Declarations */
 882  885  extern uint32_t         emlxs_dump_drv_event(emlxs_hba_t *hba);
 883  886  extern uint32_t         emlxs_dump_user_event(emlxs_hba_t *hba);
 884  887  extern uint32_t         emlxs_dump_temp_event(emlxs_hba_t *hba,
 885  888                                  uint32_t tempType, uint32_t temp);
 886  889  extern void             emlxs_dump_drv_thread(emlxs_hba_t *hba,
 887  890                                  void *arg1, void *arg2);
 888  891  extern void             emlxs_dump_user_thread(emlxs_hba_t *hba,
 889  892                                  void *arg1, void *arg2);
 890  893  extern void             emlxs_dump_temp_thread(emlxs_hba_t *hba,
 891  894                                  void *arg1, void *arg2);
 892  895  extern uint32_t         emlxs_ftell(emlxs_file_t *fp);
 893  896  extern uint32_t         emlxs_get_dump(emlxs_hba_t *hba, uint8_t *buffer,
 894  897                              uint32_t *buflen);
 895  898  extern void             emlxs_dump_wait(emlxs_hba_t *hba);
 896  899  extern void             emlxs_dump(emlxs_hba_t *hba, uint32_t type,
 897  900                              uint32_t temp_type, uint32_t temp);
 898  901  
 899  902  extern emlxs_file_t     *emlxs_fopen(emlxs_hba_t *hba, uint32_t file_type);
 900  903  extern void             emlxs_fflush(emlxs_file_t *fp);
 901  904  extern uint32_t         emlxs_fclose(emlxs_file_t *fp);
 902  905  extern uint32_t         emlxs_dump_word_dmpfile(emlxs_file_t *fpDmpFile,
 903  906                                  uint8_t *pBuffer, uint32_t bufferLen,
 904  907                                  int fSwap);
 905  908  #endif /* DUMP_SUPPORT */
 906  909  
 907  910  
 908  911  /* Module emlxs_fcf.c External Routine Declarations */
 909  912  extern void             emlxs_fcf_init(emlxs_hba_t *hba);
 910  913  
 911  914  extern void             emlxs_fcf_fini(emlxs_hba_t *hba);
 912  915  
 913  916  extern uint32_t         emlxs_vpi_port_bind_notify(emlxs_port_t *port);
 914  917  
 915  918  extern uint32_t         emlxs_vpi_port_unbind_notify(emlxs_port_t *port,
 916  919                                  uint32_t wait);
 917  920  extern uint32_t         emlxs_vpi_logo_cmpl_notify(emlxs_port_t *port);
 918  921  
 919  922  extern uint32_t         emlxs_vpi_logi_notify(emlxs_port_t *port,
 920  923                                  emlxs_buf_t *sbp);
 921  924  extern uint32_t         emlxs_vpi_logi_failed_notify(emlxs_port_t *port,
 922  925                                  emlxs_buf_t *sbp);
 923  926  extern uint32_t         emlxs_vpi_rpi_offline_notify(emlxs_port_t *port,
 924  927                                  uint32_t did, uint32_t rpi);
 925  928  extern uint32_t         emlxs_vpi_rpi_online_notify(emlxs_port_t *port,
 926  929                                  uint32_t did, uint32_t rpi, uint32_t lock);
 927  930  extern uint32_t         emlxs_fcf_shutdown_notify(emlxs_port_t *port,
 928  931                                  uint32_t wait);
 929  932  extern uint32_t         emlxs_fcf_linkup_notify(emlxs_port_t *port);
 930  933  
 931  934  extern uint32_t         emlxs_fcf_linkdown_notify(emlxs_port_t *port);
 932  935  
 933  936  extern uint32_t         emlxs_fcf_cvl_notify(emlxs_port_t *port, uint32_t vpi);
 934  937  
 935  938  extern uint32_t         emlxs_fcf_full_notify(emlxs_port_t *port);
 936  939  
 937  940  extern uint32_t         emlxs_fcf_found_notify(emlxs_port_t *port,
 938  941                                  uint32_t fcf_index);
 939  942  extern uint32_t         emlxs_fcf_changed_notify(emlxs_port_t *port,
 940  943                                  uint32_t fcf_index);
 941  944  extern uint32_t         emlxs_fcf_lost_notify(emlxs_port_t *port,
 942  945                                  uint32_t fcf_index);
 943  946  extern void             emlxs_fcf_timer_notify(emlxs_hba_t *hba);
 944  947  
 945  948  
 946  949  extern RPIobj_t         *emlxs_rpi_find(emlxs_port_t *port, uint16_t rpi);
 947  950  
 948  951  extern RPIobj_t         *emlxs_rpi_reserve_notify(emlxs_port_t *port,
 949  952                                  uint32_t did, XRIobj_t *xrip);
 950  953  extern RPIobj_t         *emlxs_rpi_alloc_notify(emlxs_port_t *port,
 951  954                                  uint32_t did);
 952  955  extern uint32_t         emlxs_rpi_free_notify(emlxs_port_t *port,
 953  956                                  RPIobj_t *rpip);
 954  957  extern uint32_t         emlxs_rpi_online_notify(emlxs_port_t *port,
 955  958                                  RPIobj_t *rpip, uint32_t did, SERV_PARM *sparam,
 956  959                                  void *arg1, void *arg2, void *arg3);
 957  960  extern uint32_t         emlxs_rpi_offline_notify(emlxs_port_t *port,
 958  961                                  RPIobj_t *rpip, void *arg1, void *arg2,
 959  962                                  void *arg3);
 960  963  extern uint32_t         emlxs_rpi_pause_notify(emlxs_port_t *port,
 961  964                                  RPIobj_t *rpip);
 962  965  extern uint32_t         emlxs_rpi_resume_notify(emlxs_port_t *port,
 963  966                                  RPIobj_t *rpip, emlxs_buf_t *sbp);
 964  967  
 965  968  
 966  969  #ifdef  __cplusplus
 967  970  }
 968  971  #endif
 969  972  
 970  973  #endif  /* _EMLXS_EXTERN_H */
  
    | 
      ↓ open down ↓ | 
    472 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX