提交 1c8a4c37 编写于 作者: K Krishna Gudipati 提交者: James Bottomley

[SCSI] bfa: Rename pport to fcport in BFA FCS.

Rename pport structures to fcport in BFA FCS, to resolve confusion
about the port structures in the firmware, and make sure the SG page
is setup correctly.
Signed-off-by: NKrishna Gudipati <kgudipat@brocade.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 13cc20c5
此差异已折叠。
......@@ -57,5 +57,5 @@ bfa_fcs_pport_event_handler(void *cbarg, bfa_pport_event_t event)
void
bfa_fcs_pport_attach(struct bfa_fcs_s *fcs)
{
bfa_pport_event_register(fcs->bfa, bfa_fcs_pport_event_handler, fcs);
bfa_fcport_event_register(fcs->bfa, bfa_fcs_pport_event_handler, fcs);
}
......@@ -24,7 +24,7 @@
*/
struct bfa_module_s *hal_mods[] = {
&hal_mod_sgpg,
&hal_mod_pport,
&hal_mod_fcport,
&hal_mod_fcxp,
&hal_mod_lps,
&hal_mod_uf,
......@@ -45,7 +45,7 @@ bfa_isr_func_t bfa_isrs[BFI_MC_MAX] = {
bfa_isr_unhandled, /* BFI_MC_DIAG */
bfa_isr_unhandled, /* BFI_MC_FLASH */
bfa_isr_unhandled, /* BFI_MC_CEE */
bfa_pport_isr, /* BFI_MC_PORT */
bfa_fcport_isr, /* BFI_MC_FCPORT */
bfa_isr_unhandled, /* BFI_MC_IOCFC */
bfa_isr_unhandled, /* BFI_MC_LL */
bfa_uf_isr, /* BFI_MC_UF */
......
......@@ -29,7 +29,7 @@
struct bfa_modules_s {
struct bfa_pport_s pport; /* physical port module */
struct bfa_fcport_s fcport; /* fc port module */
struct bfa_fcxp_mod_s fcxp_mod; /* fcxp module */
struct bfa_lps_mod_s lps_mod; /* fcxp module */
struct bfa_uf_mod_s uf_mod; /* unsolicited frame module */
......
......@@ -25,17 +25,17 @@
/**
* Link notification data structure
*/
struct bfa_pport_ln_s {
struct bfa_pport_s *pport;
struct bfa_fcport_ln_s {
struct bfa_fcport_s *fcport;
bfa_sm_t sm;
struct bfa_cb_qe_s ln_qe; /* BFA callback queue elem for ln */
enum bfa_pport_linkstate ln_event; /* ln event for callback */
};
/**
* BFA physical port data structure
* BFA FC port data structure
*/
struct bfa_pport_s {
struct bfa_fcport_s {
struct bfa_s *bfa; /* parent BFA instance */
bfa_sm_t sm; /* port state machine */
wwn_t nwwn; /* node wwn of physical port */
......@@ -62,7 +62,7 @@ struct bfa_pport_s {
union bfi_pport_i2h_msg_u i2hmsg;
} event_arg;
void *bfad; /* BFA driver handle */
struct bfa_pport_ln_s ln; /* Link Notification */
struct bfa_fcport_ln_s ln; /* Link Notification */
struct bfa_cb_qe_s hcb_qe; /* BFA callback queue elem */
u32 msgtag; /* fimrware msg tag for reply */
u8 *stats_kva;
......@@ -88,12 +88,17 @@ struct bfa_pport_s {
/* driver callback function */
void *stats_cbarg;
/* *!< user callback arg */
/* FCport stats */
u8 *fcport_stats_kva;
u64 fcport_stats_pa;
union bfa_fcport_stats_u *fcport_stats;
union bfa_fcport_stats_u *fcport_stats_ret;
};
#define BFA_PORT_MOD(__bfa) (&(__bfa)->modules.pport)
#define BFA_FCPORT_MOD(__bfa) (&(__bfa)->modules.fcport)
/*
* public functions
*/
void bfa_pport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg);
void bfa_fcport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg);
#endif /* __BFA_PORT_PRIV_H__ */
......@@ -101,7 +101,7 @@ extern bfa_boolean_t bfa_auto_recover;
extern struct bfa_module_s hal_mod_flash;
extern struct bfa_module_s hal_mod_fcdiag;
extern struct bfa_module_s hal_mod_sgpg;
extern struct bfa_module_s hal_mod_pport;
extern struct bfa_module_s hal_mod_fcport;
extern struct bfa_module_s hal_mod_fcxp;
extern struct bfa_module_s hal_mod_lps;
extern struct bfa_module_s hal_mod_uf;
......
......@@ -37,7 +37,7 @@ enum {
BFA_TRC_HAL_IOIM = 6,
BFA_TRC_HAL_TSKIM = 7,
BFA_TRC_HAL_ITNIM = 8,
BFA_TRC_HAL_PPORT = 9,
BFA_TRC_HAL_FCPORT = 9,
BFA_TRC_HAL_SGPG = 10,
BFA_TRC_HAL_FLASH = 11,
BFA_TRC_HAL_DEBUG = 12,
......
......@@ -664,7 +664,7 @@ bfad_fcs_port_cfg(struct bfad_s *bfad)
sprintf(symname, "%s-%d", BFAD_DRIVER_NAME, bfad->inst_no);
memcpy(port_cfg.sym_name.symname, symname, strlen(symname));
bfa_pport_get_attr(&bfad->bfa, &attr);
bfa_fcport_get_attr(&bfad->bfa, &attr);
port_cfg.nwwn = attr.nwwn;
port_cfg.pwwn = attr.pwwn;
......
......@@ -141,7 +141,7 @@ bfad_im_get_host_port_type(struct Scsi_Host *shost)
struct bfad_s *bfad = im_port->bfad;
struct bfa_pport_attr_s attr;
bfa_pport_get_attr(&bfad->bfa, &attr);
bfa_fcport_get_attr(&bfad->bfa, &attr);
switch (attr.port_type) {
case BFA_PPORT_TYPE_NPORT:
......@@ -173,7 +173,7 @@ bfad_im_get_host_port_state(struct Scsi_Host *shost)
struct bfad_s *bfad = im_port->bfad;
struct bfa_pport_attr_s attr;
bfa_pport_get_attr(&bfad->bfa, &attr);
bfa_fcport_get_attr(&bfad->bfa, &attr);
switch (attr.port_state) {
case BFA_PPORT_ST_LINKDOWN:
......@@ -232,7 +232,7 @@ bfad_im_get_host_speed(struct Scsi_Host *shost)
unsigned long flags;
spin_lock_irqsave(shost->host_lock, flags);
bfa_pport_get_attr(&bfad->bfa, &attr);
bfa_fcport_get_attr(&bfad->bfa, &attr);
switch (attr.speed) {
case BFA_PPORT_SPEED_8GBPS:
fc_host_speed(shost) = FC_PORTSPEED_8GBIT;
......
......@@ -966,7 +966,7 @@ bfad_os_fc_host_init(struct bfad_im_port_s *im_port)
FC_PORTSPEED_1GBIT;
memset(&attr.pattr, 0, sizeof(attr.pattr));
bfa_pport_get_attr(&bfad->bfa, &attr.pattr);
bfa_fcport_get_attr(&bfad->bfa, &attr.pattr);
fc_host_maxframe_size(host) = attr.pattr.pport_cfg.maxfrsize;
}
......
......@@ -37,7 +37,7 @@ BFA_TRC_FILE(FCS, FABRIC);
#define BFA_FCS_FABRIC_CLEANUP_DELAY (10000) /* Milliseconds */
#define bfa_fcs_fabric_set_opertype(__fabric) do { \
if (bfa_pport_get_topology((__fabric)->fcs->bfa) \
if (bfa_fcport_get_topology((__fabric)->fcs->bfa) \
== BFA_PPORT_TOPOLOGY_P2P) \
(__fabric)->oper_type = BFA_PPORT_TYPE_NPORT; \
else \
......@@ -160,7 +160,7 @@ bfa_fcs_fabric_sm_created(struct bfa_fcs_fabric_s *fabric,
switch (event) {
case BFA_FCS_FABRIC_SM_START:
if (bfa_pport_is_linkup(fabric->fcs->bfa)) {
if (bfa_fcport_is_linkup(fabric->fcs->bfa)) {
bfa_sm_set_state(fabric, bfa_fcs_fabric_sm_flogi);
bfa_fcs_fabric_login(fabric);
} else
......@@ -224,7 +224,7 @@ bfa_fcs_fabric_sm_flogi(struct bfa_fcs_fabric_s *fabric,
switch (event) {
case BFA_FCS_FABRIC_SM_CONT_OP:
bfa_pport_set_tx_bbcredit(fabric->fcs->bfa, fabric->bb_credit);
bfa_fcport_set_tx_bbcredit(fabric->fcs->bfa, fabric->bb_credit);
fabric->fab_type = BFA_FCS_FABRIC_SWITCHED;
if (fabric->auth_reqd && fabric->is_auth) {
......@@ -251,7 +251,7 @@ bfa_fcs_fabric_sm_flogi(struct bfa_fcs_fabric_s *fabric,
case BFA_FCS_FABRIC_SM_NO_FABRIC:
fabric->fab_type = BFA_FCS_FABRIC_N2N;
bfa_pport_set_tx_bbcredit(fabric->fcs->bfa, fabric->bb_credit);
bfa_fcport_set_tx_bbcredit(fabric->fcs->bfa, fabric->bb_credit);
bfa_fcs_fabric_notify_online(fabric);
bfa_sm_set_state(fabric, bfa_fcs_fabric_sm_nofabric);
break;
......@@ -418,7 +418,7 @@ bfa_fcs_fabric_sm_nofabric(struct bfa_fcs_fabric_s *fabric,
case BFA_FCS_FABRIC_SM_NO_FABRIC:
bfa_trc(fabric->fcs, fabric->bb_credit);
bfa_pport_set_tx_bbcredit(fabric->fcs->bfa, fabric->bb_credit);
bfa_fcport_set_tx_bbcredit(fabric->fcs->bfa, fabric->bb_credit);
break;
default:
......@@ -718,10 +718,10 @@ bfa_fcs_fabric_login(struct bfa_fcs_fabric_s *fabric)
struct bfa_port_cfg_s *pcfg = &fabric->bport.port_cfg;
u8 alpa = 0;
if (bfa_pport_get_topology(bfa) == BFA_PPORT_TOPOLOGY_LOOP)
alpa = bfa_pport_get_myalpa(bfa);
if (bfa_fcport_get_topology(bfa) == BFA_PPORT_TOPOLOGY_LOOP)
alpa = bfa_fcport_get_myalpa(bfa);
bfa_lps_flogi(fabric->lps, fabric, alpa, bfa_pport_get_maxfrsize(bfa),
bfa_lps_flogi(fabric->lps, fabric, alpa, bfa_fcport_get_maxfrsize(bfa),
pcfg->pwwn, pcfg->nwwn, fabric->auth_reqd);
fabric->stats.flogi_sent++;
......@@ -1176,8 +1176,8 @@ bfa_fcs_fabric_send_flogi_acc(struct bfa_fcs_fabric_s *fabric)
reqlen = fc_flogi_acc_build(&fchs, bfa_fcxp_get_reqbuf(fcxp),
bfa_os_hton3b(FC_FABRIC_PORT),
n2n_port->reply_oxid, pcfg->pwwn,
pcfg->nwwn, bfa_pport_get_maxfrsize(bfa),
bfa_pport_get_rx_bbcredit(bfa));
pcfg->nwwn, bfa_fcport_get_maxfrsize(bfa),
bfa_fcport_get_rx_bbcredit(bfa));
bfa_fcxp_send(fcxp, NULL, fabric->vf_id, bfa_lps_get_tag(fabric->lps),
BFA_FALSE, FC_CLASS_3, reqlen, &fchs,
......
......@@ -1175,7 +1175,7 @@ bfa_fcs_fdmi_get_portattr(struct bfa_fcs_port_fdmi_s *fdmi,
/*
* get pport attributes from hal
*/
bfa_pport_get_attr(port->fcs->bfa, &pport_attr);
bfa_fcport_get_attr(port->fcs->bfa, &pport_attr);
/*
* get FC4 type Bitmask
......
......@@ -26,6 +26,7 @@ struct bfa_fcxp_s;
#include <defs/bfa_defs_pport.h>
#include <defs/bfa_defs_rport.h>
#include <defs/bfa_defs_qos.h>
#include <defs/bfa_defs_fcport.h>
#include <cs/bfa_sm.h>
#include <bfa.h>
......@@ -151,60 +152,67 @@ struct bfa_lps_s {
bfa_eproto_status_t ext_status;
};
#define BFA_FCPORT(_bfa) (&((_bfa)->modules.port))
/*
* bfa pport API functions
*/
bfa_status_t bfa_pport_enable(struct bfa_s *bfa);
bfa_status_t bfa_pport_disable(struct bfa_s *bfa);
bfa_status_t bfa_pport_cfg_speed(struct bfa_s *bfa,
bfa_status_t bfa_fcport_enable(struct bfa_s *bfa);
bfa_status_t bfa_fcport_disable(struct bfa_s *bfa);
bfa_status_t bfa_fcport_cfg_speed(struct bfa_s *bfa,
enum bfa_pport_speed speed);
enum bfa_pport_speed bfa_pport_get_speed(struct bfa_s *bfa);
bfa_status_t bfa_pport_cfg_topology(struct bfa_s *bfa,
enum bfa_pport_speed bfa_fcport_get_speed(struct bfa_s *bfa);
bfa_status_t bfa_fcport_cfg_topology(struct bfa_s *bfa,
enum bfa_pport_topology topo);
enum bfa_pport_topology bfa_pport_get_topology(struct bfa_s *bfa);
bfa_status_t bfa_pport_cfg_hardalpa(struct bfa_s *bfa, u8 alpa);
bfa_boolean_t bfa_pport_get_hardalpa(struct bfa_s *bfa, u8 *alpa);
u8 bfa_pport_get_myalpa(struct bfa_s *bfa);
bfa_status_t bfa_pport_clr_hardalpa(struct bfa_s *bfa);
bfa_status_t bfa_pport_cfg_maxfrsize(struct bfa_s *bfa, u16 maxsize);
u16 bfa_pport_get_maxfrsize(struct bfa_s *bfa);
u32 bfa_pport_mypid(struct bfa_s *bfa);
u8 bfa_pport_get_rx_bbcredit(struct bfa_s *bfa);
bfa_status_t bfa_pport_trunk_enable(struct bfa_s *bfa, u8 bitmap);
bfa_status_t bfa_pport_trunk_disable(struct bfa_s *bfa);
bfa_boolean_t bfa_pport_trunk_query(struct bfa_s *bfa, u32 *bitmap);
void bfa_pport_get_attr(struct bfa_s *bfa, struct bfa_pport_attr_s *attr);
wwn_t bfa_pport_get_wwn(struct bfa_s *bfa, bfa_boolean_t node);
enum bfa_pport_topology bfa_fcport_get_topology(struct bfa_s *bfa);
bfa_status_t bfa_fcport_cfg_hardalpa(struct bfa_s *bfa, u8 alpa);
bfa_boolean_t bfa_fcport_get_hardalpa(struct bfa_s *bfa, u8 *alpa);
u8 bfa_fcport_get_myalpa(struct bfa_s *bfa);
bfa_status_t bfa_fcport_clr_hardalpa(struct bfa_s *bfa);
bfa_status_t bfa_fcport_cfg_maxfrsize(struct bfa_s *bfa, u16 maxsize);
u16 bfa_fcport_get_maxfrsize(struct bfa_s *bfa);
u32 bfa_fcport_mypid(struct bfa_s *bfa);
u8 bfa_fcport_get_rx_bbcredit(struct bfa_s *bfa);
bfa_status_t bfa_fcport_trunk_enable(struct bfa_s *bfa, u8 bitmap);
bfa_status_t bfa_fcport_trunk_disable(struct bfa_s *bfa);
bfa_boolean_t bfa_fcport_trunk_query(struct bfa_s *bfa, u32 *bitmap);
void bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_pport_attr_s *attr);
wwn_t bfa_fcport_get_wwn(struct bfa_s *bfa, bfa_boolean_t node);
bfa_status_t bfa_pport_get_stats(struct bfa_s *bfa,
union bfa_pport_stats_u *stats,
bfa_cb_pport_t cbfn, void *cbarg);
bfa_status_t bfa_pport_clear_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn,
void *cbarg);
void bfa_pport_event_register(struct bfa_s *bfa,
void bfa_fcport_event_register(struct bfa_s *bfa,
void (*event_cbfn) (void *cbarg,
bfa_pport_event_t event), void *event_cbarg);
bfa_boolean_t bfa_pport_is_disabled(struct bfa_s *bfa);
void bfa_pport_cfg_qos(struct bfa_s *bfa, bfa_boolean_t on_off);
void bfa_pport_cfg_ratelim(struct bfa_s *bfa, bfa_boolean_t on_off);
bfa_status_t bfa_pport_cfg_ratelim_speed(struct bfa_s *bfa,
bfa_boolean_t bfa_fcport_is_disabled(struct bfa_s *bfa);
void bfa_fcport_cfg_qos(struct bfa_s *bfa, bfa_boolean_t on_off);
void bfa_fcport_cfg_ratelim(struct bfa_s *bfa, bfa_boolean_t on_off);
bfa_status_t bfa_fcport_cfg_ratelim_speed(struct bfa_s *bfa,
enum bfa_pport_speed speed);
enum bfa_pport_speed bfa_pport_get_ratelim_speed(struct bfa_s *bfa);
enum bfa_pport_speed bfa_fcport_get_ratelim_speed(struct bfa_s *bfa);
void bfa_pport_set_tx_bbcredit(struct bfa_s *bfa, u16 tx_bbcredit);
void bfa_pport_busy(struct bfa_s *bfa, bfa_boolean_t status);
void bfa_pport_beacon(struct bfa_s *bfa, bfa_boolean_t beacon,
void bfa_fcport_set_tx_bbcredit(struct bfa_s *bfa, u16 tx_bbcredit);
void bfa_fcport_busy(struct bfa_s *bfa, bfa_boolean_t status);
void bfa_fcport_beacon(struct bfa_s *bfa, bfa_boolean_t beacon,
bfa_boolean_t link_e2e_beacon);
void bfa_cb_pport_event(void *cbarg, bfa_pport_event_t event);
void bfa_pport_qos_get_attr(struct bfa_s *bfa, struct bfa_qos_attr_s *qos_attr);
void bfa_pport_qos_get_vc_attr(struct bfa_s *bfa,
void bfa_fcport_qos_get_attr(struct bfa_s *bfa, struct bfa_qos_attr_s *qos_attr);
void bfa_fcport_qos_get_vc_attr(struct bfa_s *bfa,
struct bfa_qos_vc_attr_s *qos_vc_attr);
bfa_status_t bfa_pport_get_qos_stats(struct bfa_s *bfa,
bfa_status_t bfa_fcport_get_qos_stats(struct bfa_s *bfa,
union bfa_pport_stats_u *stats,
bfa_cb_pport_t cbfn, void *cbarg);
bfa_status_t bfa_pport_clear_qos_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn,
bfa_status_t bfa_fcport_clear_qos_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn,
void *cbarg);
bfa_boolean_t bfa_pport_is_ratelim(struct bfa_s *bfa);
bfa_boolean_t bfa_pport_is_linkup(struct bfa_s *bfa);
bfa_boolean_t bfa_fcport_is_ratelim(struct bfa_s *bfa);
bfa_boolean_t bfa_fcport_is_linkup(struct bfa_s *bfa);
bfa_status_t bfa_fcport_get_stats(struct bfa_s *bfa,
union bfa_fcport_stats_u *stats,
bfa_cb_pport_t cbfn, void *cbarg);
bfa_status_t bfa_fcport_clear_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn,
void *cbarg);
/*
* bfa rport API functions
......
......@@ -32,6 +32,8 @@ enum bfi_pport_h2i {
BFI_PPORT_H2I_ENABLE_TX_VF_TAG_REQ = (7),
BFI_PPORT_H2I_GET_QOS_STATS_REQ = (8),
BFI_PPORT_H2I_CLEAR_QOS_STATS_REQ = (9),
BFI_FCPORT_H2I_GET_STATS_REQ = (10),
BFI_FCPORT_H2I_CLEAR_STATS_REQ = (11),
};
enum bfi_pport_i2h {
......@@ -45,6 +47,8 @@ enum bfi_pport_i2h {
BFI_PPORT_I2H_EVENT = BFA_I2HM(8),
BFI_PPORT_I2H_GET_QOS_STATS_RSP = BFA_I2HM(9),
BFI_PPORT_I2H_CLEAR_QOS_STATS_RSP = BFA_I2HM(10),
BFI_FCPORT_I2H_GET_STATS_RSP = BFA_I2HM(11),
BFI_FCPORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(12),
};
/**
......@@ -75,6 +79,7 @@ struct bfi_pport_enable_req_s {
wwn_t pwwn; /* port wwn of physical port */
struct bfa_pport_cfg_s port_cfg; /* port configuration */
union bfi_addr_u stats_dma_addr; /* DMA address for stats */
union bfi_addr_u fcport_stats_dma_addr;/*!< DMA address for stats */
u32 msgtag; /* msgtag for reply */
u32 rsvd2;
};
......
......@@ -23,6 +23,14 @@
#define __BFA_SM_H__
typedef void (*bfa_sm_t)(void *sm, int event);
/**
* oc - object class eg. bfa_ioc
* st - state, eg. reset
* otype - object type, eg. struct bfa_ioc_s
* etype - object type, eg. enum ioc_event
*/
#define bfa_sm_state_decl(oc, st, otype, etype) \
static void oc ## _sm_ ## st(otype * fsm, etype event)
#define bfa_sm_set_state(_sm, _state) ((_sm)->sm = (bfa_sm_t)(_state))
#define bfa_sm_send_event(_sm, _event) ((_sm)->sm((_sm), (_event)))
......
......@@ -19,6 +19,7 @@
#define __BFA_DEFS_ETHPORT_H__
#include <defs/bfa_defs_status.h>
#include <defs/bfa_defs_port.h>
#include <protocol/types.h>
#include <cna/pstats/phyport_defs.h>
#include <cna/pstats/ethport_defs.h>
......
/*
* Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
* All rights reserved
* www.brocade.com
*
* bfa_defs_fcport.h
*
* Linux driver for Brocade Fibre Channel Host Bus Adapter.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License (GPL) Version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
#ifndef __BFA_DEFS_FCPORT_H__
#define __BFA_DEFS_FCPORT_H__
#include <defs/bfa_defs_types.h>
#include <protocol/types.h>
#pragma pack(1)
/**
* FCoE statistics
*/
struct bfa_fcoe_stats_s {
u64 secs_reset; /* Seconds since stats reset */
u64 cee_linkups; /* CEE link up */
u64 cee_linkdns; /* CEE link down */
u64 fip_linkups; /* FIP link up */
u64 fip_linkdns; /* FIP link down */
u64 fip_fails; /* FIP failures */
u64 mac_invalids; /* Invalid mac assignments */
u64 vlan_req; /* Vlan requests */
u64 vlan_notify; /* Vlan notifications */
u64 vlan_err; /* Vlan notification errors */
u64 vlan_timeouts; /* Vlan request timeouts */
u64 vlan_invalids; /* Vlan invalids */
u64 disc_req; /* Discovery requests */
u64 disc_rsp; /* Discovery responses */
u64 disc_err; /* Discovery error frames */
u64 disc_unsol; /* Discovery unsolicited */
u64 disc_timeouts; /* Discovery timeouts */
u64 disc_fcf_unavail; /* Discovery FCF not avail */
u64 linksvc_unsupp; /* FIP link service req unsupp. */
u64 linksvc_err; /* FIP link service req errors */
u64 logo_req; /* FIP logo */
u64 clrvlink_req; /* Clear virtual link requests */
u64 op_unsupp; /* FIP operation unsupp. */
u64 untagged; /* FIP untagged frames */
u64 txf_ucast; /* Tx FCoE unicast frames */
u64 txf_ucast_vlan; /* Tx FCoE unicast vlan frames */
u64 txf_ucast_octets; /* Tx FCoE unicast octets */
u64 txf_mcast; /* Tx FCoE mutlicast frames */
u64 txf_mcast_vlan; /* Tx FCoE mutlicast vlan frames */
u64 txf_mcast_octets; /* Tx FCoE multicast octets */
u64 txf_bcast; /* Tx FCoE broadcast frames */
u64 txf_bcast_vlan; /* Tx FCoE broadcast vlan frames */
u64 txf_bcast_octets; /* Tx FCoE broadcast octets */
u64 txf_timeout; /* Tx timeouts */
u64 txf_parity_errors; /* Transmit parity err */
u64 txf_fid_parity_errors; /* Transmit FID parity err */
u64 tx_pause; /* Tx pause frames */
u64 tx_zero_pause; /* Tx zero pause frames */
u64 tx_first_pause; /* Tx first pause frames */
u64 rx_pause; /* Rx pause frames */
u64 rx_zero_pause; /* Rx zero pause frames */
u64 rx_first_pause; /* Rx first pause frames */
u64 rxf_ucast_octets; /* Rx unicast octets */
u64 rxf_ucast; /* Rx unicast frames */
u64 rxf_ucast_vlan; /* Rx unicast vlan frames */
u64 rxf_mcast_octets; /* Rx multicast octets */
u64 rxf_mcast; /* Rx multicast frames */
u64 rxf_mcast_vlan; /* Rx multicast vlan frames */
u64 rxf_bcast_octets; /* Rx broadcast octests */
u64 rxf_bcast; /* Rx broadcast frames */
u64 rxf_bcast_vlan; /* Rx broadcast vlan frames */
};
/**
* QoS or FCoE stats (fcport stats excluding physical FC port stats)
*/
union bfa_fcport_stats_u {
struct bfa_qos_stats_s fcqos;
struct bfa_fcoe_stats_s fcoe;
};
#pragma pack()
#endif /* __BFA_DEFS_FCPORT_H__ */
......@@ -236,6 +236,7 @@ struct bfa_fw_fip_stats_s {
u32 disc_err; /* Discovery advt. parse errors */
u32 disc_unsol; /* Discovery unsolicited */
u32 disc_timeouts; /* Discovery timeouts */
u32 disc_fcf_unavail; /* Discovery FCF Not Avail. */
u32 linksvc_unsupp; /* Unsupported link service req */
u32 linksvc_err; /* Parse error in link service req */
u32 logo_req; /* Number of FIP logos received */
......
......@@ -162,7 +162,7 @@ bfa_fcs_port_loop_send_plogi(struct bfa_fcs_port_s *port, u8 alpa)
len = fc_plogi_build(&fchs, bfa_fcxp_get_reqbuf(fcxp), alpa,
bfa_fcs_port_get_fcid(port), 0,
port->port_cfg.pwwn, port->port_cfg.nwwn,
bfa_pport_get_maxfrsize(port->fcs->bfa));
bfa_fcport_get_maxfrsize(port->fcs->bfa));
bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE,
FC_CLASS_3, len, &fchs,
......
......@@ -156,7 +156,7 @@ bfa_fcs_port_get_rport_max_speed(struct bfa_fcs_port_s *port)
/*
* Get Physical port's current speed
*/
bfa_pport_get_attr(port->fcs->bfa, &pport_attr);
bfa_fcport_get_attr(port->fcs->bfa, &pport_attr);
pport_speed = pport_attr.speed;
bfa_trc(fcs, pport_speed);
......
......@@ -637,7 +637,7 @@ bfa_fcs_port_ms_send_plogi(void *ms_cbarg, struct bfa_fcxp_s *fcxp_alloced)
bfa_os_hton3b(FC_MGMT_SERVER),
bfa_fcs_port_get_fcid(port), 0,
port->port_cfg.pwwn, port->port_cfg.nwwn,
bfa_pport_get_maxfrsize(port->fcs->bfa));
bfa_fcport_get_maxfrsize(port->fcs->bfa));
bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE,
FC_CLASS_3, len, &fchs, bfa_fcs_port_ms_plogi_response,
......
......@@ -660,7 +660,7 @@ bfa_fcs_port_ns_send_plogi(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced)
bfa_os_hton3b(FC_NAME_SERVER),
bfa_fcs_port_get_fcid(port), 0,
port->port_cfg.pwwn, port->port_cfg.nwwn,
bfa_pport_get_maxfrsize(port->fcs->bfa));
bfa_fcport_get_maxfrsize(port->fcs->bfa));
bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE,
FC_CLASS_3, len, &fchs, bfa_fcs_port_ns_plogi_response,
......
......@@ -1373,7 +1373,7 @@ bfa_fcs_rport_send_plogi(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced)
len = fc_plogi_build(&fchs, bfa_fcxp_get_reqbuf(fcxp), rport->pid,
bfa_fcs_port_get_fcid(port), 0,
port->port_cfg.pwwn, port->port_cfg.nwwn,
bfa_pport_get_maxfrsize(port->fcs->bfa));
bfa_fcport_get_maxfrsize(port->fcs->bfa));
bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE,
FC_CLASS_3, len, &fchs, bfa_fcs_rport_plogi_response,
......@@ -1485,7 +1485,7 @@ bfa_fcs_rport_send_plogiacc(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced)
len = fc_plogi_acc_build(&fchs, bfa_fcxp_get_reqbuf(fcxp), rport->pid,
bfa_fcs_port_get_fcid(port), rport->reply_oxid,
port->port_cfg.pwwn, port->port_cfg.nwwn,
bfa_pport_get_maxfrsize(port->fcs->bfa));
bfa_fcport_get_maxfrsize(port->fcs->bfa));
bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE,
FC_CLASS_3, len, &fchs, NULL, NULL, FC_MAX_PDUSZ, 0);
......@@ -1820,7 +1820,7 @@ bfa_fcs_rport_process_rpsc(struct bfa_fcs_rport_s *rport,
/*
* get curent speed from pport attributes from BFA
*/
bfa_pport_get_attr(port->fcs->bfa, &pport_attr);
bfa_fcport_get_attr(port->fcs->bfa, &pport_attr);
speeds.port_op_speed = fc_bfa_speed_to_rpsc_operspeed(pport_attr.speed);
......@@ -2171,7 +2171,7 @@ bfa_fcs_rport_update(struct bfa_fcs_rport_s *rport, struct fc_logi_s *plogi)
bfa_trc(port->fcs, port->fabric->bb_credit);
port->fabric->bb_credit = bfa_os_ntohs(plogi->csp.bbcred);
bfa_pport_set_tx_bbcredit(port->fcs->bfa,
bfa_fcport_set_tx_bbcredit(port->fcs->bfa,
port->fabric->bb_credit);
}
......
......@@ -102,7 +102,7 @@ bfa_fcs_rport_get_attr(struct bfa_fcs_rport_s *rport,
rport_attr->qos_attr = qos_attr;
rport_attr->trl_enforced = BFA_FALSE;
if (bfa_pport_is_ratelim(port->fcs->bfa)) {
if (bfa_fcport_is_ratelim(port->fcs->bfa)) {
if ((rport->rpf.rpsc_speed == BFA_PPORT_SPEED_UNKNOWN) ||
(rport->rpf.rpsc_speed <
bfa_fcs_port_get_rport_max_speed(port)))
......
......@@ -478,7 +478,7 @@ static void
bfa_fcs_vport_do_fdisc(struct bfa_fcs_vport_s *vport)
{
bfa_lps_fdisc(vport->lps, vport,
bfa_pport_get_maxfrsize(__vport_bfa(vport)),
bfa_fcport_get_maxfrsize(__vport_bfa(vport)),
__vport_pwwn(vport), __vport_nwwn(vport));
vport->vport_stats.fdisc_sent++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册