linux/drivers/scsi/bfa/bfa_port_priv.h
<<
>>
Prefs
   1/*
   2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
   3 * All rights reserved
   4 * www.brocade.com
   5 *
   6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
   7 *
   8 * This program is free software; you can redistribute it and/or modify it
   9 * under the terms of the GNU General Public License (GPL) Version 2 as
  10 * published by the Free Software Foundation
  11 *
  12 * This program is distributed in the hope that it will be useful, but
  13 * WITHOUT ANY WARRANTY; without even the implied warranty of
  14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15 * General Public License for more details.
  16 */
  17
  18#ifndef __BFA_PORT_PRIV_H__
  19#define __BFA_PORT_PRIV_H__
  20
  21#include <defs/bfa_defs_pport.h>
  22#include <bfi/bfi_pport.h>
  23#include "bfa_intr_priv.h"
  24
  25/**
  26 * BFA physical port data structure
  27 */
  28struct bfa_pport_s {
  29        struct bfa_s            *bfa;   /*  parent BFA instance */
  30        bfa_sm_t                sm;     /*  port state machine */
  31        wwn_t                   nwwn;   /*  node wwn of physical port */
  32        wwn_t                   pwwn;   /*  port wwn of physical oprt */
  33        enum bfa_pport_speed speed_sup;
  34                                        /*  supported speeds */
  35        enum bfa_pport_speed speed;     /*  current speed */
  36        enum bfa_pport_topology topology;       /*  current topology */
  37        u8                      myalpa; /*  my ALPA in LOOP topology */
  38        u8                      rsvd[3];
  39        struct bfa_pport_cfg_s  cfg;    /*  current port configuration */
  40        struct bfa_qos_attr_s  qos_attr;   /* QoS Attributes */
  41        struct bfa_qos_vc_attr_s qos_vc_attr;  /*  VC info from ELP */
  42        struct bfa_reqq_wait_s  reqq_wait;
  43                                        /*  to wait for room in reqq */
  44        struct bfa_reqq_wait_s  svcreq_wait;
  45                                        /*  to wait for room in reqq */
  46        struct bfa_reqq_wait_s  stats_reqq_wait;
  47                                        /*  to wait for room in reqq (stats) */
  48        void                    *event_cbarg;
  49        void                    (*event_cbfn) (void *cbarg,
  50                                                bfa_pport_event_t event);
  51        union {
  52                union bfi_pport_i2h_msg_u i2hmsg;
  53        } event_arg;
  54        void                    *bfad;  /*  BFA driver handle */
  55        struct bfa_cb_qe_s              hcb_qe; /*  BFA callback queue elem */
  56        enum bfa_pport_linkstate        hcb_event;
  57                                        /*  link event for callback */
  58        u32             msgtag; /*  fimrware msg tag for reply */
  59        u8                      *stats_kva;
  60        u64             stats_pa;
  61        union bfa_pport_stats_u *stats; /*  pport stats */
  62        u32             mypid : 24;
  63        u32             rsvd_b : 8;
  64        struct bfa_timer_s      timer;  /*  timer */
  65        union bfa_pport_stats_u         *stats_ret;
  66                                        /*  driver stats location */
  67        bfa_status_t            stats_status;
  68                                        /*  stats/statsclr status */
  69        bfa_boolean_t           stats_busy;
  70                                        /*  outstanding stats/statsclr */
  71        bfa_boolean_t           stats_qfull;
  72        bfa_boolean_t           diag_busy;
  73                                        /*  diag busy status */
  74        bfa_boolean_t           beacon;
  75                                        /*  port beacon status */
  76        bfa_boolean_t           link_e2e_beacon;
  77                                        /*  link beacon status */
  78        bfa_cb_pport_t          stats_cbfn;
  79                                        /*  driver callback function */
  80        void                    *stats_cbarg;
  81                                        /* *!< user callback arg */
  82};
  83
  84#define BFA_PORT_MOD(__bfa)     (&(__bfa)->modules.pport)
  85
  86/*
  87 * public functions
  88 */
  89void    bfa_pport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg);
  90#endif /* __BFA_PORT_PRIV_H__ */
  91