You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull first round of SCSI updates from James Bottomley: "The patch set is mostly driver updates (usf, zfcp, lpfc, mpt2sas, megaraid_sas, bfa, ipr) and a few bug fixes. Also of note is that the Buslogic driver has been rewritten to a better coding style and 64 bit support added. We also removed the libsas limitation on 16 bytes for the command size (currently no drivers make use of this)" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (101 commits) [SCSI] megaraid: minor cut and paste error fixed. [SCSI] ufshcd-pltfrm: remove unnecessary dma_set_coherent_mask() call [SCSI] ufs: fix register address in UIC error interrupt handling [SCSI] ufshcd-pltfrm: add missing empty slot in ufs_of_match[] [SCSI] ufs: use devres functions for ufshcd [SCSI] ufs: Fix the response UPIU length setting [SCSI] ufs: rework link start-up process [SCSI] ufs: remove version check before IS reg clear [SCSI] ufs: amend interrupt configuration [SCSI] ufs: wrap the i/o access operations [SCSI] storvsc: Update the storage protocol to win8 level [SCSI] storvsc: Increase the value of scsi timeout for storvsc devices [SCSI] MAINTAINERS: Add myself as the maintainer for BusLogic SCSI driver [SCSI] BusLogic: Port driver to 64-bit. [SCSI] BusLogic: Fix style issues [SCSI] libiscsi: Added new boot entries in the session sysfs [SCSI] aacraid: Fix for arrays are going offline in the system. System hangs [SCSI] ipr: IOA Status Code(IOASC) update [SCSI] sd: Update WRITE SAME heuristics [SCSI] fnic: potential dead lock in fnic_is_abts_pending() ...
This commit is contained in:
@@ -216,6 +216,7 @@
|
||||
#include <scsi/scsi_host.h>
|
||||
#include <scsi/scsi_tcq.h>
|
||||
#include <scsi/scsi_cmnd.h>
|
||||
#include <scsi/scsi_eh.h>
|
||||
#include "3w-xxxx.h"
|
||||
|
||||
/* Globals */
|
||||
@@ -2009,7 +2010,8 @@ static int tw_scsi_queue_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_c
|
||||
printk(KERN_NOTICE "3w-xxxx: scsi%d: Unknown scsi opcode: 0x%x\n", tw_dev->host->host_no, *command);
|
||||
tw_dev->state[request_id] = TW_S_COMPLETED;
|
||||
tw_state_request_finish(tw_dev, request_id);
|
||||
SCpnt->result = (DID_BAD_TARGET << 16);
|
||||
SCpnt->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
|
||||
scsi_build_sense_buffer(1, SCpnt->sense_buffer, ILLEGAL_REQUEST, 0x20, 0);
|
||||
done(SCpnt);
|
||||
retval = 0;
|
||||
}
|
||||
|
||||
+2326
-2054
File diff suppressed because it is too large
Load Diff
+728
-757
File diff suppressed because it is too large
Load Diff
+284
-340
File diff suppressed because it is too large
Load Diff
@@ -633,7 +633,7 @@ config SCSI_BUSLOGIC
|
||||
|
||||
config SCSI_FLASHPOINT
|
||||
bool "FlashPoint support"
|
||||
depends on SCSI_BUSLOGIC && PCI && X86_32
|
||||
depends on SCSI_BUSLOGIC && PCI
|
||||
help
|
||||
This option allows you to add FlashPoint support to the
|
||||
BusLogic SCSI driver. The FlashPoint SCCB Manager code is
|
||||
|
||||
@@ -93,6 +93,9 @@ static irqreturn_t aac_src_intr_message(int irq, void *dev_id)
|
||||
int send_it = 0;
|
||||
extern int aac_sync_mode;
|
||||
|
||||
src_writel(dev, MUnit.ODR_C, bellbits);
|
||||
src_readl(dev, MUnit.ODR_C);
|
||||
|
||||
if (!aac_sync_mode) {
|
||||
src_writel(dev, MUnit.ODR_C, bellbits);
|
||||
src_readl(dev, MUnit.ODR_C);
|
||||
|
||||
@@ -505,7 +505,8 @@ static int asd_build_ssp_ascb(struct asd_ascb *ascb, struct sas_task *task,
|
||||
scb->ssp_task.ssp_cmd.efb_prio_attr |= EFB_MASK;
|
||||
scb->ssp_task.ssp_cmd.efb_prio_attr |= (task->ssp_task.task_prio << 3);
|
||||
scb->ssp_task.ssp_cmd.efb_prio_attr |= (task->ssp_task.task_attr & 7);
|
||||
memcpy(scb->ssp_task.ssp_cmd.cdb, task->ssp_task.cdb, 16);
|
||||
memcpy(scb->ssp_task.ssp_cmd.cdb, task->ssp_task.cmd->cmnd,
|
||||
task->ssp_task.cmd->cmd_len);
|
||||
|
||||
scb->ssp_task.sister_scb = cpu_to_le16(0xFFFF);
|
||||
scb->ssp_task.conn_handle = cpu_to_le16(
|
||||
|
||||
@@ -1432,6 +1432,7 @@ bfa_iocfc_disable_cbfn(void *bfa_arg)
|
||||
{
|
||||
struct bfa_s *bfa = bfa_arg;
|
||||
|
||||
bfa->queue_process = BFA_FALSE;
|
||||
bfa_fsm_send_event(&bfa->iocfc, IOCFC_E_IOC_DISABLED);
|
||||
}
|
||||
|
||||
@@ -1567,7 +1568,6 @@ bfa_iocfc_start(struct bfa_s *bfa)
|
||||
void
|
||||
bfa_iocfc_stop(struct bfa_s *bfa)
|
||||
{
|
||||
bfa->queue_process = BFA_FALSE;
|
||||
bfa_fsm_send_event(&bfa->iocfc, IOCFC_E_STOP);
|
||||
}
|
||||
|
||||
@@ -1674,7 +1674,6 @@ bfa_iocfc_disable(struct bfa_s *bfa)
|
||||
bfa_plog_str(bfa->plog, BFA_PL_MID_HAL, BFA_PL_EID_MISC, 0,
|
||||
"IOC Disable");
|
||||
|
||||
bfa->queue_process = BFA_FALSE;
|
||||
bfa_fsm_send_event(&bfa->iocfc, IOCFC_E_DISABLE);
|
||||
}
|
||||
|
||||
|
||||
+89
-14
@@ -45,6 +45,7 @@ enum {
|
||||
BFA_MFG_TYPE_PROWLER_C = 1710, /* Prowler CNA only cards */
|
||||
BFA_MFG_TYPE_PROWLER_D = 1860, /* Prowler Dual cards */
|
||||
BFA_MFG_TYPE_CHINOOK = 1867, /* Chinook cards */
|
||||
BFA_MFG_TYPE_CHINOOK2 = 1869, /*!< Chinook2 cards */
|
||||
BFA_MFG_TYPE_INVALID = 0, /* Invalid card type */
|
||||
};
|
||||
|
||||
@@ -59,7 +60,8 @@ enum {
|
||||
(type) == BFA_MFG_TYPE_ASTRA || \
|
||||
(type) == BFA_MFG_TYPE_LIGHTNING_P0 || \
|
||||
(type) == BFA_MFG_TYPE_LIGHTNING || \
|
||||
(type) == BFA_MFG_TYPE_CHINOOK))
|
||||
(type) == BFA_MFG_TYPE_CHINOOK || \
|
||||
(type) == BFA_MFG_TYPE_CHINOOK2))
|
||||
|
||||
/*
|
||||
* Check if the card having old wwn/mac handling
|
||||
@@ -185,6 +187,8 @@ enum bfa_status {
|
||||
BFA_STATUS_FAA_DISABLED = 198, /* FAA is already disabled */
|
||||
BFA_STATUS_FAA_ACQUIRED = 199, /* FAA is already acquired */
|
||||
BFA_STATUS_FAA_ACQ_ADDR = 200, /* Acquiring addr */
|
||||
BFA_STATUS_BBCR_FC_ONLY = 201, /*!< BBCredit Recovery is supported for *
|
||||
* FC mode only */
|
||||
BFA_STATUS_ERROR_TRUNK_ENABLED = 203, /* Trunk enabled on adapter */
|
||||
BFA_STATUS_MAX_ENTRY_REACHED = 212, /* MAX entry reached */
|
||||
BFA_STATUS_TOPOLOGY_LOOP = 230, /* Topology is set to Loop */
|
||||
@@ -197,7 +201,34 @@ enum bfa_status {
|
||||
BFA_STATUS_DPORT_DISABLED = 236, /* D-port mode is already disabled */
|
||||
BFA_STATUS_CMD_NOTSUPP_MEZZ = 239, /* Cmd not supported for MEZZ card */
|
||||
BFA_STATUS_FRU_NOT_PRESENT = 240, /* fru module not present */
|
||||
BFA_STATUS_DPORT_NO_SFP = 243, /* SFP is not present.\n D-port will be
|
||||
* enabled but it will be operational
|
||||
* only after inserting a valid SFP. */
|
||||
BFA_STATUS_DPORT_ERR = 245, /* D-port mode is enabled */
|
||||
BFA_STATUS_DPORT_ENOSYS = 254, /* Switch has no D_Port functionality */
|
||||
BFA_STATUS_DPORT_CANT_PERF = 255, /* Switch port is not D_Port capable
|
||||
* or D_Port is disabled */
|
||||
BFA_STATUS_DPORT_LOGICALERR = 256, /* Switch D_Port fail */
|
||||
BFA_STATUS_DPORT_SWBUSY = 257, /* Switch port busy */
|
||||
BFA_STATUS_ERR_BBCR_SPEED_UNSUPPORT = 258, /*!< BB credit recovery is
|
||||
* supported at max port speed alone */
|
||||
BFA_STATUS_ERROR_BBCR_ENABLED = 259, /*!< BB credit recovery
|
||||
* is enabled */
|
||||
BFA_STATUS_INVALID_BBSCN = 260, /*!< Invalid BBSCN value.
|
||||
* Valid range is [1-15] */
|
||||
BFA_STATUS_DDPORT_ERR = 261, /* Dynamic D_Port mode is active.\n To
|
||||
* exit dynamic mode, disable D_Port on
|
||||
* the remote port */
|
||||
BFA_STATUS_DPORT_SFPWRAP_ERR = 262, /* Clear e/o_wrap fail, check or
|
||||
* replace SFP */
|
||||
BFA_STATUS_BBCR_CFG_NO_CHANGE = 265, /*!< BBCR is operational.
|
||||
* Disable BBCR and try this operation again. */
|
||||
BFA_STATUS_DPORT_SW_NOTREADY = 268, /* Remote port is not ready to
|
||||
* start dport test. Check remote
|
||||
* port status. */
|
||||
BFA_STATUS_DPORT_INV_SFP = 271, /* Invalid SFP for D-PORT mode. */
|
||||
BFA_STATUS_DPORT_CMD_NOTSUPP = 273, /* Dport is not supported by
|
||||
* remote port */
|
||||
BFA_STATUS_MAX_VAL /* Unknown error code */
|
||||
};
|
||||
#define bfa_status_t enum bfa_status
|
||||
@@ -234,6 +265,7 @@ enum {
|
||||
BFA_ADAPTER_MFG_NAME_LEN = 8, /* manufacturer name length */
|
||||
BFA_ADAPTER_SYM_NAME_LEN = 64, /* adapter symbolic name length */
|
||||
BFA_ADAPTER_OS_TYPE_LEN = 64, /* adapter os type length */
|
||||
BFA_ADAPTER_UUID_LEN = 16, /* adapter uuid length */
|
||||
};
|
||||
|
||||
struct bfa_adapter_attr_s {
|
||||
@@ -267,6 +299,7 @@ struct bfa_adapter_attr_s {
|
||||
u8 mfg_month; /* manufacturing month */
|
||||
u16 mfg_year; /* manufacturing year */
|
||||
u16 rsvd;
|
||||
u8 uuid[BFA_ADAPTER_UUID_LEN];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -380,7 +413,8 @@ struct bfa_ioc_attr_s {
|
||||
u8 port_mode; /* bfa_mode_s */
|
||||
u8 cap_bm; /* capability */
|
||||
u8 port_mode_cfg; /* bfa_mode_s */
|
||||
u8 rsvd[4]; /* 64bit align */
|
||||
u8 def_fn; /* 1 if default fn */
|
||||
u8 rsvd[3]; /* 64bit align */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -516,17 +550,6 @@ struct bfa_ioc_aen_data_s {
|
||||
mac_t mac;
|
||||
};
|
||||
|
||||
/*
|
||||
* D-port states
|
||||
*
|
||||
*/
|
||||
enum bfa_dport_state {
|
||||
BFA_DPORT_ST_DISABLED = 0, /* D-port is Disabled */
|
||||
BFA_DPORT_ST_DISABLING = 1, /* D-port is Disabling */
|
||||
BFA_DPORT_ST_ENABLING = 2, /* D-port is Enabling */
|
||||
BFA_DPORT_ST_ENABLED = 3, /* D-port is Enabled */
|
||||
};
|
||||
|
||||
/*
|
||||
* ---------------------- mfg definitions ------------
|
||||
*/
|
||||
@@ -614,6 +637,7 @@ enum {
|
||||
BFA_PCI_DEVICE_ID_CT = 0x14,
|
||||
BFA_PCI_DEVICE_ID_CT_FC = 0x21,
|
||||
BFA_PCI_DEVICE_ID_CT2 = 0x22,
|
||||
BFA_PCI_DEVICE_ID_CT2_QUAD = 0x23,
|
||||
};
|
||||
|
||||
#define bfa_asic_id_cb(__d) \
|
||||
@@ -622,7 +646,9 @@ enum {
|
||||
#define bfa_asic_id_ct(__d) \
|
||||
((__d) == BFA_PCI_DEVICE_ID_CT || \
|
||||
(__d) == BFA_PCI_DEVICE_ID_CT_FC)
|
||||
#define bfa_asic_id_ct2(__d) ((__d) == BFA_PCI_DEVICE_ID_CT2)
|
||||
#define bfa_asic_id_ct2(__d) \
|
||||
((__d) == BFA_PCI_DEVICE_ID_CT2 || \
|
||||
(__d) == BFA_PCI_DEVICE_ID_CT2_QUAD)
|
||||
#define bfa_asic_id_ctc(__d) \
|
||||
(bfa_asic_id_ct(__d) || bfa_asic_id_ct2(__d))
|
||||
|
||||
@@ -1126,6 +1152,7 @@ struct bfa_flash_attr_s {
|
||||
#define LB_PATTERN_DEFAULT 0xB5B5B5B5
|
||||
#define QTEST_CNT_DEFAULT 10
|
||||
#define QTEST_PAT_DEFAULT LB_PATTERN_DEFAULT
|
||||
#define DPORT_ENABLE_LOOPCNT_DEFAULT (1024 * 1024)
|
||||
|
||||
struct bfa_diag_memtest_s {
|
||||
u8 algo;
|
||||
@@ -1154,6 +1181,54 @@ struct bfa_diag_loopback_result_s {
|
||||
u8 rsvd[3];
|
||||
};
|
||||
|
||||
enum bfa_diag_dport_test_status {
|
||||
DPORT_TEST_ST_IDLE = 0, /* the test has not started yet. */
|
||||
DPORT_TEST_ST_FINAL = 1, /* the test done successfully */
|
||||
DPORT_TEST_ST_SKIP = 2, /* the test skipped */
|
||||
DPORT_TEST_ST_FAIL = 3, /* the test failed */
|
||||
DPORT_TEST_ST_INPRG = 4, /* the testing is in progress */
|
||||
DPORT_TEST_ST_RESPONDER = 5, /* test triggered from remote port */
|
||||
DPORT_TEST_ST_STOPPED = 6, /* the test stopped by user. */
|
||||
DPORT_TEST_ST_MAX
|
||||
};
|
||||
|
||||
enum bfa_diag_dport_test_type {
|
||||
DPORT_TEST_ELOOP = 0,
|
||||
DPORT_TEST_OLOOP = 1,
|
||||
DPORT_TEST_ROLOOP = 2,
|
||||
DPORT_TEST_LINK = 3,
|
||||
DPORT_TEST_MAX
|
||||
};
|
||||
|
||||
enum bfa_diag_dport_test_opmode {
|
||||
BFA_DPORT_OPMODE_AUTO = 0,
|
||||
BFA_DPORT_OPMODE_MANU = 1,
|
||||
};
|
||||
|
||||
struct bfa_diag_dport_subtest_result_s {
|
||||
u8 status; /* bfa_diag_dport_test_status */
|
||||
u8 rsvd[7]; /* 64bit align */
|
||||
u64 start_time; /* timestamp */
|
||||
};
|
||||
|
||||
struct bfa_diag_dport_result_s {
|
||||
wwn_t rp_pwwn; /* switch port wwn */
|
||||
wwn_t rp_nwwn; /* switch node wwn */
|
||||
u64 start_time; /* user/sw start time */
|
||||
u64 end_time; /* timestamp */
|
||||
u8 status; /* bfa_diag_dport_test_status */
|
||||
u8 mode; /* bfa_diag_dport_test_opmode */
|
||||
u8 rsvd; /* 64bit align */
|
||||
u8 speed; /* link speed for buf_reqd */
|
||||
u16 buffer_required;
|
||||
u16 frmsz; /* frame size for buf_reqd */
|
||||
u32 lpcnt; /* Frame count */
|
||||
u32 pat; /* Pattern */
|
||||
u32 roundtrip_latency; /* in nano sec */
|
||||
u32 est_cable_distance; /* in meter */
|
||||
struct bfa_diag_dport_subtest_result_s subtest[DPORT_TEST_MAX];
|
||||
};
|
||||
|
||||
struct bfa_diag_ledtest_s {
|
||||
u32 cmd; /* bfa_led_op_t */
|
||||
u32 color; /* bfa_led_color_t */
|
||||
|
||||
@@ -105,6 +105,9 @@ struct bfa_fw_ioim_stats_s {
|
||||
* an error condition*/
|
||||
u32 wait_for_si; /* FW wait for SI */
|
||||
u32 rec_rsp_inval; /* REC rsp invalid */
|
||||
u32 rec_rsp_xchg_comp; /* REC rsp xchg complete */
|
||||
u32 rec_rsp_rd_si_ownd; /* REC rsp read si owned */
|
||||
|
||||
u32 seqr_io_abort; /* target does not know cmd so abort */
|
||||
u32 seqr_io_retry; /* SEQR failed so retry IO */
|
||||
|
||||
@@ -257,8 +260,6 @@ struct bfa_fw_port_lksm_stats_s {
|
||||
u32 nos_tx; /* No. of times NOS tx started */
|
||||
u32 hwsm_lrr_rx; /* No. of times LRR rx-ed by HWSM */
|
||||
u32 hwsm_lr_rx; /* No. of times LR rx-ed by HWSM */
|
||||
u32 bbsc_lr; /* LKSM LR tx for credit recovery */
|
||||
u32 rsvd;
|
||||
};
|
||||
|
||||
struct bfa_fw_port_snsm_stats_s {
|
||||
@@ -409,7 +410,7 @@ struct bfa_fw_trunk_stats_s {
|
||||
u32 rsvd; /* padding for 64 bit alignment */
|
||||
};
|
||||
|
||||
struct bfa_fw_advsm_stats_s {
|
||||
struct bfa_fw_aport_stats_s {
|
||||
u32 flogi_sent; /* Flogi sent */
|
||||
u32 flogi_acc_recvd; /* Flogi Acc received */
|
||||
u32 flogi_rjt_recvd; /* Flogi rejects received */
|
||||
@@ -419,6 +420,12 @@ struct bfa_fw_advsm_stats_s {
|
||||
u32 elp_accepted; /* ELP Accepted */
|
||||
u32 elp_rejected; /* ELP rejected */
|
||||
u32 elp_dropped; /* ELP dropped */
|
||||
|
||||
u32 bbcr_lr_count; /*!< BBCR Link Resets */
|
||||
u32 frame_lost_intrs; /*!< BBCR Frame loss intrs */
|
||||
u32 rrdy_lost_intrs; /*!< BBCR Rrdy loss intrs */
|
||||
|
||||
u32 rsvd;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -478,6 +485,14 @@ struct bfa_fw_ct_mod_stats_s {
|
||||
u32 rsvd; /* 64bit align */
|
||||
};
|
||||
|
||||
/*
|
||||
* RDS mod stats
|
||||
*/
|
||||
struct bfa_fw_rds_stats_s {
|
||||
u32 no_fid_drop_err; /* RDS no fid drop error */
|
||||
u32 rsvd; /* 64bit align */
|
||||
};
|
||||
|
||||
/*
|
||||
* IOC firmware stats
|
||||
*/
|
||||
@@ -489,10 +504,11 @@ struct bfa_fw_stats_s {
|
||||
struct bfa_fw_fcxchg_stats_s fcxchg_stats;
|
||||
struct bfa_fw_lps_stats_s lps_stats;
|
||||
struct bfa_fw_trunk_stats_s trunk_stats;
|
||||
struct bfa_fw_advsm_stats_s advsm_stats;
|
||||
struct bfa_fw_aport_stats_s aport_stats;
|
||||
struct bfa_fw_mac_mod_stats_s macmod_stats;
|
||||
struct bfa_fw_ct_mod_stats_s ctmod_stats;
|
||||
struct bfa_fw_eth_sndrcv_stats_s ethsndrcv_stats;
|
||||
struct bfa_fw_rds_stats_s rds_stats;
|
||||
};
|
||||
|
||||
#define BFA_IOCFC_PATHTOV_MAX 60
|
||||
@@ -545,6 +561,27 @@ struct bfa_qos_attr_s {
|
||||
struct bfa_qos_bw_s qos_bw_op; /* QOS bw operational */
|
||||
};
|
||||
|
||||
enum bfa_bbcr_state {
|
||||
BFA_BBCR_DISABLED, /*!< BBCR is disable */
|
||||
BFA_BBCR_ONLINE, /*!< BBCR is online */
|
||||
BFA_BBCR_OFFLINE, /*!< BBCR is offline */
|
||||
};
|
||||
|
||||
enum bfa_bbcr_err_reason {
|
||||
BFA_BBCR_ERR_REASON_NONE, /*!< Unknown */
|
||||
BFA_BBCR_ERR_REASON_SPEED_UNSUP, /*!< Port speed < max sup_speed */
|
||||
BFA_BBCR_ERR_REASON_PEER_UNSUP, /*!< BBCR is disable on peer port */
|
||||
BFA_BBCR_ERR_REASON_NON_BRCD_SW, /*!< Connected to non BRCD switch */
|
||||
BFA_BBCR_ERR_REASON_FLOGI_RJT, /*!< Login rejected by the switch */
|
||||
};
|
||||
|
||||
struct bfa_bbcr_attr_s {
|
||||
u8 state;
|
||||
u8 peer_bb_scn;
|
||||
u8 reason;
|
||||
u8 rsvd;
|
||||
};
|
||||
|
||||
/*
|
||||
* These fields should be displayed only from the CLI.
|
||||
* There will be a separate BFAL API (get_qos_vc_attr ?)
|
||||
@@ -736,6 +773,7 @@ enum bfa_port_states {
|
||||
BFA_PORT_ST_TOGGLING_QWAIT = 14,
|
||||
BFA_PORT_ST_FAA_MISCONFIG = 15,
|
||||
BFA_PORT_ST_DPORT = 16,
|
||||
BFA_PORT_ST_DDPORT = 17,
|
||||
BFA_PORT_ST_MAX_STATE,
|
||||
};
|
||||
|
||||
@@ -857,6 +895,15 @@ enum bfa_lunmask_state_s {
|
||||
BFA_LUNMASK_UNINITIALIZED = 0xff,
|
||||
};
|
||||
|
||||
/**
|
||||
* FEC states
|
||||
*/
|
||||
enum bfa_fec_state_s {
|
||||
BFA_FEC_ONLINE = 1, /*!< FEC is online */
|
||||
BFA_FEC_OFFLINE = 2, /*!< FEC is offline */
|
||||
BFA_FEC_OFFLINE_NOT_16G = 3, /*!< FEC is offline (speed not 16Gig) */
|
||||
};
|
||||
|
||||
#pragma pack(1)
|
||||
/*
|
||||
* LUN mask configuration
|
||||
@@ -892,6 +939,9 @@ struct bfa_defs_fcpim_throttle_s {
|
||||
u16 rsvd;
|
||||
};
|
||||
|
||||
#define BFA_BB_SCN_DEF 3
|
||||
#define BFA_BB_SCN_MAX 0x0F
|
||||
|
||||
/*
|
||||
* Physical port configuration
|
||||
*/
|
||||
@@ -907,8 +957,8 @@ struct bfa_port_cfg_s {
|
||||
u8 tx_bbcredit; /* transmit buffer credits */
|
||||
u8 ratelimit; /* ratelimit enabled or not */
|
||||
u8 trl_def_speed; /* ratelimit default speed */
|
||||
u8 bb_scn; /* BB_SCN value from FLOGI Exchg */
|
||||
u8 bb_scn_state; /* Config state of BB_SCN */
|
||||
u8 bb_cr_enabled; /*!< Config state of BB_SCN */
|
||||
u8 bb_scn; /*!< BB_SCN value for FLOGI Exchg */
|
||||
u8 faa_state; /* FAA enabled/disabled */
|
||||
u8 rsvd1;
|
||||
u16 path_tov; /* device path timeout */
|
||||
@@ -950,6 +1000,7 @@ struct bfa_port_attr_s {
|
||||
bfa_boolean_t link_e2e_beacon; /* link beacon is on */
|
||||
bfa_boolean_t bbsc_op_status; /* fc credit recovery oper
|
||||
* state */
|
||||
enum bfa_fec_state_s fec_state; /*!< current FEC state */
|
||||
|
||||
/*
|
||||
* Dynamic field - info from FCS
|
||||
@@ -961,7 +1012,7 @@ struct bfa_port_attr_s {
|
||||
|
||||
/* FCoE specific */
|
||||
u16 fcoe_vlan;
|
||||
u8 rsvd1[6];
|
||||
u8 rsvd1[2];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1048,10 +1099,12 @@ struct bfa_port_link_s {
|
||||
u8 speed; /* Link speed (1/2/4/8 G) */
|
||||
u32 linkstate_opt; /* Linkstate optional data (debug) */
|
||||
u8 trunked; /* Trunked or not (1 or 0) */
|
||||
u8 resvd[7];
|
||||
u8 fec_state; /*!< State of FEC */
|
||||
u8 resvd[6];
|
||||
struct bfa_qos_attr_s qos_attr; /* QoS Attributes */
|
||||
union {
|
||||
struct bfa_fcport_loop_info_s loop_info;
|
||||
struct bfa_bbcr_attr_s bbcr_attr;
|
||||
union {
|
||||
struct bfa_qos_vc_attr_s qos_vc_attr;
|
||||
/* VC info from ELP */
|
||||
@@ -1215,9 +1268,11 @@ struct bfa_port_fc_stats_s {
|
||||
u64 bad_os_count; /* Invalid ordered sets */
|
||||
u64 err_enc_out; /* Encoding err nonframe_8b10b */
|
||||
u64 err_enc; /* Encoding err frame_8b10b */
|
||||
u64 bbsc_frames_lost; /* Credit Recovery-Frames Lost */
|
||||
u64 bbsc_credits_lost; /* Credit Recovery-Credits Lost */
|
||||
u64 bbsc_link_resets; /* Credit Recovery-Link Resets */
|
||||
u64 bbcr_frames_lost; /*!< BBCR Frames Lost */
|
||||
u64 bbcr_rrdys_lost; /*!< BBCR RRDYs Lost */
|
||||
u64 bbcr_link_resets; /*!< BBCR Link Resets */
|
||||
u64 bbcr_frame_lost_intrs; /*!< BBCR Frame loss intrs */
|
||||
u64 bbcr_rrdy_lost_intrs; /*!< BBCR Rrdy loss intrs */
|
||||
u64 loop_timeouts; /* Loop timeouts */
|
||||
};
|
||||
|
||||
|
||||
@@ -1531,6 +1531,12 @@ enum fdmi_hba_attribute_type {
|
||||
FDMI_HBA_ATTRIB_FW_VERSION, /* 0x0009 */
|
||||
FDMI_HBA_ATTRIB_OS_NAME, /* 0x000A */
|
||||
FDMI_HBA_ATTRIB_MAX_CT, /* 0x000B */
|
||||
FDMI_HBA_ATTRIB_NODE_SYM_NAME, /* 0x000C */
|
||||
FDMI_HBA_ATTRIB_VENDOR_INFO, /* 0x000D */
|
||||
FDMI_HBA_ATTRIB_NUM_PORTS, /* 0x000E */
|
||||
FDMI_HBA_ATTRIB_FABRIC_NAME, /* 0x000F */
|
||||
FDMI_HBA_ATTRIB_BIOS_VER, /* 0x0010 */
|
||||
FDMI_HBA_ATTRIB_VENDOR_ID = 0x00E0,
|
||||
|
||||
FDMI_HBA_ATTRIB_MAX_TYPE
|
||||
};
|
||||
@@ -1545,6 +1551,15 @@ enum fdmi_port_attribute_type {
|
||||
FDMI_PORT_ATTRIB_FRAME_SIZE, /* 0x0004 */
|
||||
FDMI_PORT_ATTRIB_DEV_NAME, /* 0x0005 */
|
||||
FDMI_PORT_ATTRIB_HOST_NAME, /* 0x0006 */
|
||||
FDMI_PORT_ATTRIB_NODE_NAME, /* 0x0007 */
|
||||
FDMI_PORT_ATTRIB_PORT_NAME, /* 0x0008 */
|
||||
FDMI_PORT_ATTRIB_PORT_SYM_NAME, /* 0x0009 */
|
||||
FDMI_PORT_ATTRIB_PORT_TYPE, /* 0x000A */
|
||||
FDMI_PORT_ATTRIB_SUPP_COS, /* 0x000B */
|
||||
FDMI_PORT_ATTRIB_PORT_FAB_NAME, /* 0x000C */
|
||||
FDMI_PORT_ATTRIB_PORT_FC4_TYPE, /* 0x000D */
|
||||
FDMI_PORT_ATTRIB_PORT_STATE = 0x101, /* 0x0101 */
|
||||
FDMI_PORT_ATTRIB_PORT_NUM_RPRT = 0x102, /* 0x0102 */
|
||||
|
||||
FDMI_PORT_ATTR_MAX_TYPE
|
||||
};
|
||||
|
||||
@@ -2882,7 +2882,7 @@ bfa_ioim_good_comp_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
|
||||
iotag = be16_to_cpu(rsp->io_tag);
|
||||
|
||||
ioim = BFA_IOIM_FROM_TAG(fcpim, iotag);
|
||||
WARN_ON(BFA_IOIM_TAG_2_ID(ioim->iotag) != iotag);
|
||||
WARN_ON(ioim->iotag != iotag);
|
||||
|
||||
bfa_ioim_cb_profile_comp(fcpim, ioim);
|
||||
|
||||
|
||||
@@ -240,9 +240,6 @@ static void bfa_fcs_fabric_flogiacc_comp(void *fcsarg,
|
||||
u32 rsp_len,
|
||||
u32 resid_len,
|
||||
struct fchs_s *rspfchs);
|
||||
static u8 bfa_fcs_fabric_oper_bbscn(struct bfa_fcs_fabric_s *fabric);
|
||||
static bfa_boolean_t bfa_fcs_fabric_is_bbscn_enabled(
|
||||
struct bfa_fcs_fabric_s *fabric);
|
||||
|
||||
static void bfa_fcs_fabric_sm_uninit(struct bfa_fcs_fabric_s *fabric,
|
||||
enum bfa_fcs_fabric_event event);
|
||||
@@ -404,8 +401,7 @@ bfa_fcs_fabric_sm_flogi(struct bfa_fcs_fabric_s *fabric,
|
||||
case BFA_FCS_FABRIC_SM_CONT_OP:
|
||||
|
||||
bfa_fcport_set_tx_bbcredit(fabric->fcs->bfa,
|
||||
fabric->bb_credit,
|
||||
bfa_fcs_fabric_oper_bbscn(fabric));
|
||||
fabric->bb_credit);
|
||||
fabric->fab_type = BFA_FCS_FABRIC_SWITCHED;
|
||||
|
||||
if (fabric->auth_reqd && fabric->is_auth) {
|
||||
@@ -433,8 +429,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_fcport_set_tx_bbcredit(fabric->fcs->bfa,
|
||||
fabric->bb_credit,
|
||||
bfa_fcs_fabric_oper_bbscn(fabric));
|
||||
fabric->bb_credit);
|
||||
bfa_fcs_fabric_notify_online(fabric);
|
||||
bfa_sm_set_state(fabric, bfa_fcs_fabric_sm_nofabric);
|
||||
break;
|
||||
@@ -602,8 +597,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_fcport_set_tx_bbcredit(fabric->fcs->bfa,
|
||||
fabric->bb_credit,
|
||||
bfa_fcs_fabric_oper_bbscn(fabric));
|
||||
fabric->bb_credit);
|
||||
break;
|
||||
|
||||
case BFA_FCS_FABRIC_SM_RETRY_OP:
|
||||
@@ -965,10 +959,6 @@ bfa_cb_lps_flogi_comp(void *bfad, void *uarg, bfa_status_t status)
|
||||
|
||||
case BFA_STATUS_FABRIC_RJT:
|
||||
fabric->stats.flogi_rejects++;
|
||||
if (fabric->lps->lsrjt_rsn == FC_LS_RJT_RSN_LOGICAL_ERROR &&
|
||||
fabric->lps->lsrjt_expl == FC_LS_RJT_EXP_NO_ADDL_INFO)
|
||||
fabric->fcs->bbscn_flogi_rjt = BFA_TRUE;
|
||||
|
||||
bfa_sm_send_event(fabric, BFA_FCS_FABRIC_SM_RETRY_OP);
|
||||
return;
|
||||
|
||||
@@ -1014,14 +1004,11 @@ bfa_fcs_fabric_login(struct bfa_fcs_fabric_s *fabric)
|
||||
{
|
||||
struct bfa_s *bfa = fabric->fcs->bfa;
|
||||
struct bfa_lport_cfg_s *pcfg = &fabric->bport.port_cfg;
|
||||
u8 alpa = 0, bb_scn = 0;
|
||||
u8 alpa = 0;
|
||||
|
||||
if (bfa_fcs_fabric_is_bbscn_enabled(fabric) &&
|
||||
(!fabric->fcs->bbscn_flogi_rjt))
|
||||
bb_scn = BFA_FCS_PORT_DEF_BB_SCN;
|
||||
|
||||
bfa_lps_flogi(fabric->lps, fabric, alpa, bfa_fcport_get_maxfrsize(bfa),
|
||||
pcfg->pwwn, pcfg->nwwn, fabric->auth_reqd, bb_scn);
|
||||
pcfg->pwwn, pcfg->nwwn, fabric->auth_reqd);
|
||||
|
||||
fabric->stats.flogi_sent++;
|
||||
}
|
||||
@@ -1101,40 +1088,6 @@ bfa_fcs_fabric_stop(struct bfa_fcs_fabric_s *fabric)
|
||||
bfa_wc_wait(&fabric->stop_wc);
|
||||
}
|
||||
|
||||
/*
|
||||
* Computes operating BB_SCN value
|
||||
*/
|
||||
static u8
|
||||
bfa_fcs_fabric_oper_bbscn(struct bfa_fcs_fabric_s *fabric)
|
||||
{
|
||||
u8 pr_bbscn = fabric->lps->pr_bbscn;
|
||||
struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(fabric->fcs->bfa);
|
||||
|
||||
if (!(fcport->cfg.bb_scn_state && pr_bbscn))
|
||||
return 0;
|
||||
|
||||
/* return max of local/remote bb_scn values */
|
||||
return ((pr_bbscn > BFA_FCS_PORT_DEF_BB_SCN) ?
|
||||
pr_bbscn : BFA_FCS_PORT_DEF_BB_SCN);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if BB_SCN can be enabled.
|
||||
*/
|
||||
static bfa_boolean_t
|
||||
bfa_fcs_fabric_is_bbscn_enabled(struct bfa_fcs_fabric_s *fabric)
|
||||
{
|
||||
struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(fabric->fcs->bfa);
|
||||
|
||||
if (bfa_ioc_get_fcmode(&fabric->fcs->bfa->ioc) &&
|
||||
fcport->cfg.bb_scn_state &&
|
||||
!bfa_fcport_is_qos_enabled(fabric->fcs->bfa) &&
|
||||
!bfa_fcport_is_trunk_enabled(fabric->fcs->bfa))
|
||||
return BFA_TRUE;
|
||||
else
|
||||
return BFA_FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Delete all vports and wait for vport delete completions.
|
||||
*/
|
||||
@@ -1273,7 +1226,6 @@ void
|
||||
bfa_fcs_fabric_link_down(struct bfa_fcs_fabric_s *fabric)
|
||||
{
|
||||
bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn);
|
||||
fabric->fcs->bbscn_flogi_rjt = BFA_FALSE;
|
||||
bfa_sm_send_event(fabric, BFA_FCS_FABRIC_SM_LINK_DOWN);
|
||||
}
|
||||
|
||||
@@ -1480,7 +1432,6 @@ bfa_fcs_fabric_process_flogi(struct bfa_fcs_fabric_s *fabric,
|
||||
}
|
||||
|
||||
fabric->bb_credit = be16_to_cpu(flogi->csp.bbcred);
|
||||
fabric->lps->pr_bbscn = (be16_to_cpu(flogi->csp.rxsz) >> 12);
|
||||
bport->port_topo.pn2n.rem_port_wwn = flogi->port_name;
|
||||
bport->port_topo.pn2n.reply_oxid = fchs->ox_id;
|
||||
|
||||
@@ -1513,8 +1464,7 @@ bfa_fcs_fabric_send_flogi_acc(struct bfa_fcs_fabric_s *fabric)
|
||||
n2n_port->reply_oxid, pcfg->pwwn,
|
||||
pcfg->nwwn,
|
||||
bfa_fcport_get_maxfrsize(bfa),
|
||||
bfa_fcport_get_rx_bbcredit(bfa),
|
||||
bfa_fcs_fabric_oper_bbscn(fabric));
|
||||
bfa_fcport_get_rx_bbcredit(bfa), 0);
|
||||
|
||||
bfa_fcxp_send(fcxp, NULL, fabric->vf_id, fabric->lps->bfa_tag,
|
||||
BFA_FALSE, FC_CLASS_3,
|
||||
|
||||
+23
-11
@@ -243,24 +243,21 @@ struct bfa_fcs_fabric_s;
|
||||
* Symbolic Name.
|
||||
*
|
||||
* Physical Port's symbolic name Format : (Total 128 bytes)
|
||||
* Adapter Model number/name : 12 bytes
|
||||
* Adapter Model number/name : 16 bytes
|
||||
* Driver Version : 10 bytes
|
||||
* Host Machine Name : 30 bytes
|
||||
* Host OS Info : 48 bytes
|
||||
* Host OS Info : 44 bytes
|
||||
* Host OS PATCH Info : 16 bytes
|
||||
* ( remaining 12 bytes reserved to be used for separator)
|
||||
*/
|
||||
#define BFA_FCS_PORT_SYMBNAME_SEPARATOR " | "
|
||||
|
||||
#define BFA_FCS_PORT_SYMBNAME_MODEL_SZ 12
|
||||
#define BFA_FCS_PORT_SYMBNAME_MODEL_SZ 16
|
||||
#define BFA_FCS_PORT_SYMBNAME_VERSION_SZ 10
|
||||
#define BFA_FCS_PORT_SYMBNAME_MACHINENAME_SZ 30
|
||||
#define BFA_FCS_PORT_SYMBNAME_OSINFO_SZ 48
|
||||
#define BFA_FCS_PORT_SYMBNAME_OSINFO_SZ 44
|
||||
#define BFA_FCS_PORT_SYMBNAME_OSPATCH_SZ 16
|
||||
|
||||
/* bb_scn value in 2^bb_scn */
|
||||
#define BFA_FCS_PORT_DEF_BB_SCN 3
|
||||
|
||||
/*
|
||||
* Get FC port ID for a logical port.
|
||||
*/
|
||||
@@ -630,6 +627,9 @@ void bfa_fcs_fcpim_uf_recv(struct bfa_fcs_itnim_s *itnim,
|
||||
|
||||
#define BFA_FCS_FDMI_SUPP_SPEEDS_10G FDMI_TRANS_SPEED_10G
|
||||
|
||||
#define BFA_FCS_FDMI_VENDOR_INFO_LEN 8
|
||||
#define BFA_FCS_FDMI_FC4_TYPE_LEN 32
|
||||
|
||||
/*
|
||||
* HBA Attribute Block : BFA internal representation. Note : Some variable
|
||||
* sizes have been trimmed to suit BFA For Ex : Model will be "Brocade". Based
|
||||
@@ -640,25 +640,39 @@ struct bfa_fcs_fdmi_hba_attr_s {
|
||||
u8 manufacturer[64];
|
||||
u8 serial_num[64];
|
||||
u8 model[16];
|
||||
u8 model_desc[256];
|
||||
u8 model_desc[128];
|
||||
u8 hw_version[8];
|
||||
u8 driver_version[BFA_VERSION_LEN];
|
||||
u8 option_rom_ver[BFA_VERSION_LEN];
|
||||
u8 fw_version[BFA_VERSION_LEN];
|
||||
u8 os_name[256];
|
||||
__be32 max_ct_pyld;
|
||||
struct bfa_lport_symname_s node_sym_name;
|
||||
u8 vendor_info[BFA_FCS_FDMI_VENDOR_INFO_LEN];
|
||||
__be32 num_ports;
|
||||
wwn_t fabric_name;
|
||||
u8 bios_ver[BFA_VERSION_LEN];
|
||||
};
|
||||
|
||||
/*
|
||||
* Port Attribute Block
|
||||
*/
|
||||
struct bfa_fcs_fdmi_port_attr_s {
|
||||
u8 supp_fc4_types[32]; /* supported FC4 types */
|
||||
u8 supp_fc4_types[BFA_FCS_FDMI_FC4_TYPE_LEN];
|
||||
__be32 supp_speed; /* supported speed */
|
||||
__be32 curr_speed; /* current Speed */
|
||||
__be32 max_frm_size; /* max frame size */
|
||||
u8 os_device_name[256]; /* OS device Name */
|
||||
u8 host_name[256]; /* host name */
|
||||
wwn_t port_name;
|
||||
wwn_t node_name;
|
||||
struct bfa_lport_symname_s port_sym_name;
|
||||
__be32 port_type;
|
||||
enum fc_cos scos;
|
||||
wwn_t port_fabric_name;
|
||||
u8 port_act_fc4_type[BFA_FCS_FDMI_FC4_TYPE_LEN];
|
||||
__be32 port_state;
|
||||
__be32 num_ports;
|
||||
};
|
||||
|
||||
struct bfa_fcs_stats_s {
|
||||
@@ -683,8 +697,6 @@ struct bfa_fcs_s {
|
||||
struct bfa_trc_mod_s *trcmod; /* tracing module */
|
||||
bfa_boolean_t vf_enabled; /* VF mode is enabled */
|
||||
bfa_boolean_t fdmi_enabled; /* FDMI is enabled */
|
||||
bfa_boolean_t bbscn_enabled; /* Driver Config Parameter */
|
||||
bfa_boolean_t bbscn_flogi_rjt;/* FLOGI reject due to BB_SCN */
|
||||
bfa_boolean_t min_cfg; /* min cfg enabled/disabled */
|
||||
u16 port_vfid; /* port default VF ID */
|
||||
struct bfa_fcs_driver_info_s driver_info;
|
||||
|
||||
@@ -2048,10 +2048,71 @@ bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld)
|
||||
attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_MAX_CT);
|
||||
templen = sizeof(fcs_hba_attr->max_ct_pyld);
|
||||
memcpy(attr->value, &fcs_hba_attr->max_ct_pyld, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
count++;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
/*
|
||||
* Send extended attributes ( FOS 7.1 support )
|
||||
*/
|
||||
if (fdmi->retry_cnt == 0) {
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_NODE_SYM_NAME);
|
||||
templen = sizeof(fcs_hba_attr->node_sym_name);
|
||||
memcpy(attr->value, &fcs_hba_attr->node_sym_name, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
count++;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_VENDOR_ID);
|
||||
templen = sizeof(fcs_hba_attr->vendor_info);
|
||||
memcpy(attr->value, &fcs_hba_attr->vendor_info, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
count++;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_NUM_PORTS);
|
||||
templen = sizeof(fcs_hba_attr->num_ports);
|
||||
memcpy(attr->value, &fcs_hba_attr->num_ports, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
count++;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_FABRIC_NAME);
|
||||
templen = sizeof(fcs_hba_attr->fabric_name);
|
||||
memcpy(attr->value, &fcs_hba_attr->fabric_name, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
count++;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_BIOS_VER);
|
||||
templen = sizeof(fcs_hba_attr->bios_ver);
|
||||
memcpy(attr->value, &fcs_hba_attr->bios_ver, templen);
|
||||
templen = fc_roundup(attr->len, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
count++;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
}
|
||||
|
||||
/*
|
||||
* Update size of payload
|
||||
@@ -2252,6 +2313,113 @@ bfa_fcs_lport_fdmi_build_portattr_block(struct bfa_fcs_lport_fdmi_s *fdmi,
|
||||
sizeof(templen));
|
||||
}
|
||||
|
||||
if (fdmi->retry_cnt == 0) {
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_PORT_ATTRIB_NODE_NAME);
|
||||
templen = sizeof(fcs_port_attr.node_name);
|
||||
memcpy(attr->value, &fcs_port_attr.node_name, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
++count;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_PORT_ATTRIB_PORT_NAME);
|
||||
templen = sizeof(fcs_port_attr.port_name);
|
||||
memcpy(attr->value, &fcs_port_attr.port_name, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(attr->len) + templen;
|
||||
len += templen;
|
||||
++count;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
|
||||
if (fcs_port_attr.port_sym_name.symname[0] != '\0') {
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type =
|
||||
cpu_to_be16(FDMI_PORT_ATTRIB_PORT_SYM_NAME);
|
||||
templen = sizeof(fcs_port_attr.port_sym_name);
|
||||
memcpy(attr->value,
|
||||
&fcs_port_attr.port_sym_name, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) +
|
||||
sizeof(templen) + templen;
|
||||
len += templen;
|
||||
++count;
|
||||
attr->len = cpu_to_be16(templen +
|
||||
sizeof(attr->type) + sizeof(templen));
|
||||
}
|
||||
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_PORT_ATTRIB_PORT_TYPE);
|
||||
templen = sizeof(fcs_port_attr.port_type);
|
||||
memcpy(attr->value, &fcs_port_attr.port_type, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
++count;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_PORT_ATTRIB_SUPP_COS);
|
||||
templen = sizeof(fcs_port_attr.scos);
|
||||
memcpy(attr->value, &fcs_port_attr.scos, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
++count;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_PORT_ATTRIB_PORT_FAB_NAME);
|
||||
templen = sizeof(fcs_port_attr.port_fabric_name);
|
||||
memcpy(attr->value, &fcs_port_attr.port_fabric_name, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
++count;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_PORT_ATTRIB_PORT_FC4_TYPE);
|
||||
templen = sizeof(fcs_port_attr.port_act_fc4_type);
|
||||
memcpy(attr->value, fcs_port_attr.port_act_fc4_type,
|
||||
templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
++count;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_PORT_ATTRIB_PORT_STATE);
|
||||
templen = sizeof(fcs_port_attr.port_state);
|
||||
memcpy(attr->value, &fcs_port_attr.port_state, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
++count;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
|
||||
attr = (struct fdmi_attr_s *) curr_ptr;
|
||||
attr->type = cpu_to_be16(FDMI_PORT_ATTRIB_PORT_NUM_RPRT);
|
||||
templen = sizeof(fcs_port_attr.num_ports);
|
||||
memcpy(attr->value, &fcs_port_attr.num_ports, templen);
|
||||
templen = fc_roundup(templen, sizeof(u32));
|
||||
curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
|
||||
len += templen;
|
||||
++count;
|
||||
attr->len = cpu_to_be16(templen + sizeof(attr->type) +
|
||||
sizeof(templen));
|
||||
}
|
||||
|
||||
/*
|
||||
* Update size of payload
|
||||
*/
|
||||
@@ -2458,6 +2626,15 @@ bfa_fcs_fdmi_get_hbaattr(struct bfa_fcs_lport_fdmi_s *fdmi,
|
||||
/* Retrieve the max frame size from the port attr */
|
||||
bfa_fcs_fdmi_get_portattr(fdmi, &fcs_port_attr);
|
||||
hba_attr->max_ct_pyld = fcs_port_attr.max_frm_size;
|
||||
|
||||
strncpy(hba_attr->node_sym_name.symname,
|
||||
port->port_cfg.node_sym_name.symname, BFA_SYMNAME_MAXLEN);
|
||||
strcpy(hba_attr->vendor_info, "BROCADE");
|
||||
hba_attr->num_ports =
|
||||
cpu_to_be32(bfa_ioc_get_nports(&port->fcs->bfa->ioc));
|
||||
hba_attr->fabric_name = port->fabric->lps->pr_nwwn;
|
||||
strncpy(hba_attr->bios_ver, hba_attr->option_rom_ver, BFA_VERSION_LEN);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2467,6 +2644,7 @@ bfa_fcs_fdmi_get_portattr(struct bfa_fcs_lport_fdmi_s *fdmi,
|
||||
struct bfa_fcs_lport_s *port = fdmi->ms->port;
|
||||
struct bfa_fcs_driver_info_s *driver_info = &port->fcs->driver_info;
|
||||
struct bfa_port_attr_s pport_attr;
|
||||
struct bfa_lport_attr_s lport_attr;
|
||||
|
||||
memset(port_attr, 0, sizeof(struct bfa_fcs_fdmi_port_attr_s));
|
||||
|
||||
@@ -2531,6 +2709,18 @@ bfa_fcs_fdmi_get_portattr(struct bfa_fcs_lport_fdmi_s *fdmi,
|
||||
strncpy(port_attr->host_name, (char *)driver_info->host_machine_name,
|
||||
sizeof(port_attr->host_name));
|
||||
|
||||
port_attr->node_name = bfa_fcs_lport_get_nwwn(port);
|
||||
port_attr->port_name = bfa_fcs_lport_get_pwwn(port);
|
||||
|
||||
strncpy(port_attr->port_sym_name.symname,
|
||||
(char *)&bfa_fcs_lport_get_psym_name(port), BFA_SYMNAME_MAXLEN);
|
||||
bfa_fcs_lport_get_attr(port, &lport_attr);
|
||||
port_attr->port_type = cpu_to_be32(lport_attr.port_type);
|
||||
port_attr->scos = pport_attr.cos_supported;
|
||||
port_attr->port_fabric_name = port->fabric->lps->pr_nwwn;
|
||||
fc_get_fc4type_bitmask(FC_TYPE_FCP, port_attr->port_act_fc4_type);
|
||||
port_attr->port_state = cpu_to_be32(pport_attr.port_state);
|
||||
port_attr->num_ports = cpu_to_be32(port->num_rports);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5798,6 +5988,7 @@ enum bfa_fcs_vport_event {
|
||||
BFA_FCS_VPORT_SM_RSP_DUP_WWN = 12, /* Dup wnn error*/
|
||||
BFA_FCS_VPORT_SM_RSP_FAILED = 13, /* non-retryable failure */
|
||||
BFA_FCS_VPORT_SM_STOPCOMP = 14, /* vport delete completion */
|
||||
BFA_FCS_VPORT_SM_FABRIC_MAX = 15, /* max vports on fabric */
|
||||
};
|
||||
|
||||
static void bfa_fcs_vport_sm_uninit(struct bfa_fcs_vport_s *vport,
|
||||
@@ -5983,6 +6174,7 @@ bfa_fcs_vport_sm_fdisc(struct bfa_fcs_vport_s *vport,
|
||||
break;
|
||||
|
||||
case BFA_FCS_VPORT_SM_RSP_FAILED:
|
||||
case BFA_FCS_VPORT_SM_FABRIC_MAX:
|
||||
bfa_sm_set_state(vport, bfa_fcs_vport_sm_offline);
|
||||
break;
|
||||
|
||||
@@ -6053,6 +6245,7 @@ bfa_fcs_vport_sm_fdisc_rsp_wait(struct bfa_fcs_vport_s *vport,
|
||||
case BFA_FCS_VPORT_SM_OFFLINE:
|
||||
case BFA_FCS_VPORT_SM_RSP_ERROR:
|
||||
case BFA_FCS_VPORT_SM_RSP_FAILED:
|
||||
case BFA_FCS_VPORT_SM_FABRIC_MAX:
|
||||
case BFA_FCS_VPORT_SM_RSP_DUP_WWN:
|
||||
bfa_sm_set_state(vport, bfa_fcs_vport_sm_cleanup);
|
||||
bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
|
||||
@@ -6338,7 +6531,7 @@ bfa_fcs_vport_fdisc_rejected(struct bfa_fcs_vport_s *vport)
|
||||
else {
|
||||
bfa_fcs_vport_aen_post(&vport->lport,
|
||||
BFA_LPORT_AEN_NPIV_FABRIC_MAX);
|
||||
bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_FAILED);
|
||||
bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_FABRIC_MAX);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -6724,7 +6917,19 @@ bfa_cb_lps_fdisc_comp(void *bfad, void *uarg, bfa_status_t status)
|
||||
break;
|
||||
}
|
||||
|
||||
bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_ERROR);
|
||||
if (vport->fdisc_retries < BFA_FCS_VPORT_MAX_RETRIES)
|
||||
bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_ERROR);
|
||||
else
|
||||
bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_FAILED);
|
||||
|
||||
break;
|
||||
|
||||
case BFA_STATUS_ETIMER:
|
||||
vport->vport_stats.fdisc_timeouts++;
|
||||
if (vport->fdisc_retries < BFA_FCS_VPORT_MAX_RETRIES)
|
||||
bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_ERROR);
|
||||
else
|
||||
bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_FAILED);
|
||||
break;
|
||||
|
||||
case BFA_STATUS_FABRIC_RJT:
|
||||
|
||||
@@ -189,8 +189,8 @@ bfa_fcs_rport_sm_uninit(struct bfa_fcs_rport_s *rport, enum rport_event event)
|
||||
break;
|
||||
|
||||
case RPSM_EVENT_PLOGI_RCVD:
|
||||
bfa_sm_set_state(rport, bfa_fcs_rport_sm_fc4_fcs_online);
|
||||
bfa_fcs_rport_fcs_online_action(rport);
|
||||
bfa_sm_set_state(rport, bfa_fcs_rport_sm_plogiacc_sending);
|
||||
bfa_fcs_rport_send_plogiacc(rport, NULL);
|
||||
break;
|
||||
|
||||
case RPSM_EVENT_PLOGI_COMP:
|
||||
@@ -2577,7 +2577,7 @@ bfa_fcs_rport_update(struct bfa_fcs_rport_s *rport, struct fc_logi_s *plogi)
|
||||
|
||||
port->fabric->bb_credit = be16_to_cpu(plogi->csp.bbcred);
|
||||
bfa_fcport_set_tx_bbcredit(port->fcs->bfa,
|
||||
port->fabric->bb_credit, 0);
|
||||
port->fabric->bb_credit);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3430,9 +3430,10 @@ bfa_fcs_rpf_rpsc2_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg,
|
||||
num_ents = be16_to_cpu(rpsc2_acc->num_pids);
|
||||
bfa_trc(rport->fcs, num_ents);
|
||||
if (num_ents > 0) {
|
||||
WARN_ON(rpsc2_acc->port_info[0].pid == rport->pid);
|
||||
WARN_ON(be32_to_cpu(rpsc2_acc->port_info[0].pid) !=
|
||||
bfa_ntoh3b(rport->pid));
|
||||
bfa_trc(rport->fcs,
|
||||
be16_to_cpu(rpsc2_acc->port_info[0].pid));
|
||||
be32_to_cpu(rpsc2_acc->port_info[0].pid));
|
||||
bfa_trc(rport->fcs,
|
||||
be16_to_cpu(rpsc2_acc->port_info[0].speed));
|
||||
bfa_trc(rport->fcs,
|
||||
|
||||
+48
-26
@@ -67,6 +67,14 @@ BFA_TRC_FILE(CNA, IOC);
|
||||
((__ioc)->ioc_hwif->ioc_sync_ack(__ioc))
|
||||
#define bfa_ioc_sync_complete(__ioc) \
|
||||
((__ioc)->ioc_hwif->ioc_sync_complete(__ioc))
|
||||
#define bfa_ioc_set_cur_ioc_fwstate(__ioc, __fwstate) \
|
||||
((__ioc)->ioc_hwif->ioc_set_fwstate(__ioc, __fwstate))
|
||||
#define bfa_ioc_get_cur_ioc_fwstate(__ioc) \
|
||||
((__ioc)->ioc_hwif->ioc_get_fwstate(__ioc))
|
||||
#define bfa_ioc_set_alt_ioc_fwstate(__ioc, __fwstate) \
|
||||
((__ioc)->ioc_hwif->ioc_set_alt_fwstate(__ioc, __fwstate))
|
||||
#define bfa_ioc_get_alt_ioc_fwstate(__ioc) \
|
||||
((__ioc)->ioc_hwif->ioc_get_alt_fwstate(__ioc))
|
||||
|
||||
#define bfa_ioc_mbox_cmd_pending(__ioc) \
|
||||
(!list_empty(&((__ioc)->mbox_mod.cmd_q)) || \
|
||||
@@ -698,7 +706,7 @@ bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf_s *iocpf)
|
||||
}
|
||||
|
||||
/* h/w sem init */
|
||||
fwstate = readl(iocpf->ioc->ioc_regs.ioc_fwstate);
|
||||
fwstate = bfa_ioc_get_cur_ioc_fwstate(iocpf->ioc);
|
||||
if (fwstate == BFI_IOC_UNINIT) {
|
||||
writel(1, iocpf->ioc->ioc_regs.ioc_init_sem_reg);
|
||||
goto sem_get;
|
||||
@@ -725,8 +733,8 @@ bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf_s *iocpf)
|
||||
|
||||
bfa_trc(iocpf->ioc, fwstate);
|
||||
bfa_trc(iocpf->ioc, swab32(fwhdr.exec));
|
||||
writel(BFI_IOC_UNINIT, iocpf->ioc->ioc_regs.ioc_fwstate);
|
||||
writel(BFI_IOC_UNINIT, iocpf->ioc->ioc_regs.alt_ioc_fwstate);
|
||||
bfa_ioc_set_cur_ioc_fwstate(iocpf->ioc, BFI_IOC_UNINIT);
|
||||
bfa_ioc_set_alt_ioc_fwstate(iocpf->ioc, BFI_IOC_UNINIT);
|
||||
|
||||
/*
|
||||
* Unlock the hw semaphore. Should be here only once per boot.
|
||||
@@ -1037,7 +1045,7 @@ bfa_iocpf_sm_disabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event)
|
||||
*/
|
||||
|
||||
case IOCPF_E_TIMEOUT:
|
||||
writel(BFI_IOC_FAIL, ioc->ioc_regs.ioc_fwstate);
|
||||
bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL);
|
||||
bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync);
|
||||
break;
|
||||
|
||||
@@ -1138,7 +1146,7 @@ bfa_iocpf_sm_initfail_sync(struct bfa_iocpf_s *iocpf, enum iocpf_event event)
|
||||
case IOCPF_E_SEMLOCKED:
|
||||
bfa_ioc_notify_fail(ioc);
|
||||
bfa_ioc_sync_leave(ioc);
|
||||
writel(BFI_IOC_FAIL, ioc->ioc_regs.ioc_fwstate);
|
||||
bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL);
|
||||
writel(1, ioc->ioc_regs.ioc_sem_reg);
|
||||
bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail);
|
||||
break;
|
||||
@@ -1227,7 +1235,7 @@ bfa_iocpf_sm_fail_sync(struct bfa_iocpf_s *iocpf, enum iocpf_event event)
|
||||
bfa_ioc_notify_fail(ioc);
|
||||
if (!iocpf->auto_recover) {
|
||||
bfa_ioc_sync_leave(ioc);
|
||||
writel(BFI_IOC_FAIL, ioc->ioc_regs.ioc_fwstate);
|
||||
bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL);
|
||||
writel(1, ioc->ioc_regs.ioc_sem_reg);
|
||||
bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail);
|
||||
} else {
|
||||
@@ -1519,7 +1527,7 @@ bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force)
|
||||
u32 boot_type;
|
||||
u32 boot_env;
|
||||
|
||||
ioc_fwstate = readl(ioc->ioc_regs.ioc_fwstate);
|
||||
ioc_fwstate = bfa_ioc_get_cur_ioc_fwstate(ioc);
|
||||
|
||||
if (force)
|
||||
ioc_fwstate = BFI_IOC_UNINIT;
|
||||
@@ -1850,7 +1858,7 @@ bfa_ioc_smem_read(struct bfa_ioc_s *ioc, void *tbuf, u32 soff, u32 sz)
|
||||
bfa_trc(ioc, len);
|
||||
for (i = 0; i < len; i++) {
|
||||
r32 = bfa_mem_read(ioc->ioc_regs.smem_page_start, loff);
|
||||
buf[i] = be32_to_cpu(r32);
|
||||
buf[i] = swab32(r32);
|
||||
loff += sizeof(u32);
|
||||
|
||||
/*
|
||||
@@ -2006,11 +2014,11 @@ bfa_ioc_boot(struct bfa_ioc_s *ioc, u32 boot_type, u32 boot_env)
|
||||
* Initialize IOC state of all functions on a chip reset.
|
||||
*/
|
||||
if (boot_type == BFI_FWBOOT_TYPE_MEMTEST) {
|
||||
writel(BFI_IOC_MEMTEST, ioc->ioc_regs.ioc_fwstate);
|
||||
writel(BFI_IOC_MEMTEST, ioc->ioc_regs.alt_ioc_fwstate);
|
||||
bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_MEMTEST);
|
||||
bfa_ioc_set_alt_ioc_fwstate(ioc, BFI_IOC_MEMTEST);
|
||||
} else {
|
||||
writel(BFI_IOC_INITING, ioc->ioc_regs.ioc_fwstate);
|
||||
writel(BFI_IOC_INITING, ioc->ioc_regs.alt_ioc_fwstate);
|
||||
bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_INITING);
|
||||
bfa_ioc_set_alt_ioc_fwstate(ioc, BFI_IOC_INITING);
|
||||
}
|
||||
|
||||
bfa_ioc_msgflush(ioc);
|
||||
@@ -2038,7 +2046,7 @@ bfa_ioc_is_operational(struct bfa_ioc_s *ioc)
|
||||
bfa_boolean_t
|
||||
bfa_ioc_is_initialized(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
u32 r32 = readl(ioc->ioc_regs.ioc_fwstate);
|
||||
u32 r32 = bfa_ioc_get_cur_ioc_fwstate(ioc);
|
||||
|
||||
return ((r32 != BFI_IOC_UNINIT) &&
|
||||
(r32 != BFI_IOC_INITING) &&
|
||||
@@ -2188,6 +2196,7 @@ bfa_ioc_pci_init(struct bfa_ioc_s *ioc, struct bfa_pcidev_s *pcidev,
|
||||
break;
|
||||
|
||||
case BFA_PCI_DEVICE_ID_CT2:
|
||||
case BFA_PCI_DEVICE_ID_CT2_QUAD:
|
||||
ioc->asic_gen = BFI_ASIC_GEN_CT2;
|
||||
if (clscode == BFI_PCIFN_CLASS_FC &&
|
||||
pcidev->ssid == BFA_PCI_CT2_SSID_FC) {
|
||||
@@ -2430,12 +2439,12 @@ bfa_ioc_adapter_is_disabled(struct bfa_ioc_s *ioc)
|
||||
if (!bfa_fsm_cmp_state(ioc, bfa_ioc_sm_disabled))
|
||||
return BFA_FALSE;
|
||||
|
||||
ioc_state = readl(ioc->ioc_regs.ioc_fwstate);
|
||||
ioc_state = bfa_ioc_get_cur_ioc_fwstate(ioc);
|
||||
if (!bfa_ioc_state_disabled(ioc_state))
|
||||
return BFA_FALSE;
|
||||
|
||||
if (ioc->pcidev.device_id != BFA_PCI_DEVICE_ID_FC_8G1P) {
|
||||
ioc_state = readl(ioc->ioc_regs.alt_ioc_fwstate);
|
||||
ioc_state = bfa_ioc_get_cur_ioc_fwstate(ioc);
|
||||
if (!bfa_ioc_state_disabled(ioc_state))
|
||||
return BFA_FALSE;
|
||||
}
|
||||
@@ -2449,8 +2458,8 @@ bfa_ioc_adapter_is_disabled(struct bfa_ioc_s *ioc)
|
||||
void
|
||||
bfa_ioc_reset_fwstate(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
writel(BFI_IOC_UNINIT, ioc->ioc_regs.ioc_fwstate);
|
||||
writel(BFI_IOC_UNINIT, ioc->ioc_regs.alt_ioc_fwstate);
|
||||
bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_UNINIT);
|
||||
bfa_ioc_set_alt_ioc_fwstate(ioc, BFI_IOC_UNINIT);
|
||||
}
|
||||
|
||||
#define BFA_MFG_NAME "Brocade"
|
||||
@@ -2500,6 +2509,7 @@ bfa_ioc_get_adapter_attr(struct bfa_ioc_s *ioc,
|
||||
ad_attr->mfg_day = ioc_attr->mfg_day;
|
||||
ad_attr->mfg_month = ioc_attr->mfg_month;
|
||||
ad_attr->mfg_year = ioc_attr->mfg_year;
|
||||
memcpy(ad_attr->uuid, ioc_attr->uuid, BFA_ADAPTER_UUID_LEN);
|
||||
}
|
||||
|
||||
enum bfa_ioc_type_e
|
||||
@@ -2564,13 +2574,19 @@ void
|
||||
bfa_ioc_get_adapter_model(struct bfa_ioc_s *ioc, char *model)
|
||||
{
|
||||
struct bfi_ioc_attr_s *ioc_attr;
|
||||
u8 nports = bfa_ioc_get_nports(ioc);
|
||||
|
||||
WARN_ON(!model);
|
||||
memset((void *)model, 0, BFA_ADAPTER_MODEL_NAME_LEN);
|
||||
|
||||
ioc_attr = ioc->attr;
|
||||
|
||||
snprintf(model, BFA_ADAPTER_MODEL_NAME_LEN, "%s-%u",
|
||||
if (bfa_asic_id_ct2(ioc->pcidev.device_id) &&
|
||||
(!bfa_mfg_is_mezz(ioc_attr->card_type)))
|
||||
snprintf(model, BFA_ADAPTER_MODEL_NAME_LEN, "%s-%u-%u%s",
|
||||
BFA_MFG_NAME, ioc_attr->card_type, nports, "p");
|
||||
else
|
||||
snprintf(model, BFA_ADAPTER_MODEL_NAME_LEN, "%s-%u",
|
||||
BFA_MFG_NAME, ioc_attr->card_type);
|
||||
}
|
||||
|
||||
@@ -2620,7 +2636,7 @@ bfa_ioc_get_attr(struct bfa_ioc_s *ioc, struct bfa_ioc_attr_s *ioc_attr)
|
||||
memset((void *)ioc_attr, 0, sizeof(struct bfa_ioc_attr_s));
|
||||
|
||||
ioc_attr->state = bfa_ioc_get_state(ioc);
|
||||
ioc_attr->port_id = ioc->port_id;
|
||||
ioc_attr->port_id = bfa_ioc_portid(ioc);
|
||||
ioc_attr->port_mode = ioc->port_mode;
|
||||
ioc_attr->port_mode_cfg = ioc->port_mode_cfg;
|
||||
ioc_attr->cap_bm = ioc->ad_cap_bm;
|
||||
@@ -2629,8 +2645,9 @@ bfa_ioc_get_attr(struct bfa_ioc_s *ioc, struct bfa_ioc_attr_s *ioc_attr)
|
||||
|
||||
bfa_ioc_get_adapter_attr(ioc, &ioc_attr->adapter_attr);
|
||||
|
||||
ioc_attr->pci_attr.device_id = ioc->pcidev.device_id;
|
||||
ioc_attr->pci_attr.pcifn = ioc->pcidev.pci_func;
|
||||
ioc_attr->pci_attr.device_id = bfa_ioc_devid(ioc);
|
||||
ioc_attr->pci_attr.pcifn = bfa_ioc_pcifn(ioc);
|
||||
ioc_attr->def_fn = (bfa_ioc_pcifn(ioc) == bfa_ioc_portid(ioc));
|
||||
bfa_ioc_get_pci_chip_rev(ioc, ioc_attr->pci_attr.chip_rev);
|
||||
}
|
||||
|
||||
@@ -2917,7 +2934,7 @@ bfa_iocpf_sem_timeout(void *ioc_arg)
|
||||
static void
|
||||
bfa_ioc_poll_fwinit(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
u32 fwstate = readl(ioc->ioc_regs.ioc_fwstate);
|
||||
u32 fwstate = bfa_ioc_get_cur_ioc_fwstate(ioc);
|
||||
|
||||
bfa_trc(ioc, fwstate);
|
||||
|
||||
@@ -6010,6 +6027,7 @@ bfa_fru_write_send(void *cbarg, enum bfi_fru_h2i_msgs msg_type)
|
||||
*/
|
||||
msg->last = (len == fru->residue) ? 1 : 0;
|
||||
|
||||
msg->trfr_cmpl = (len == fru->residue) ? fru->trfr_cmpl : 0;
|
||||
bfi_h2i_set(msg->mh, BFI_MC_FRU, msg_type, bfa_ioc_portid(fru->ioc));
|
||||
bfa_alen_set(&msg->alen, len, fru->dbuf_pa);
|
||||
|
||||
@@ -6124,13 +6142,14 @@ bfa_fru_memclaim(struct bfa_fru_s *fru, u8 *dm_kva, u64 dm_pa,
|
||||
*/
|
||||
bfa_status_t
|
||||
bfa_fruvpd_update(struct bfa_fru_s *fru, void *buf, u32 len, u32 offset,
|
||||
bfa_cb_fru_t cbfn, void *cbarg)
|
||||
bfa_cb_fru_t cbfn, void *cbarg, u8 trfr_cmpl)
|
||||
{
|
||||
bfa_trc(fru, BFI_FRUVPD_H2I_WRITE_REQ);
|
||||
bfa_trc(fru, len);
|
||||
bfa_trc(fru, offset);
|
||||
|
||||
if (fru->ioc->asic_gen != BFI_ASIC_GEN_CT2)
|
||||
if (fru->ioc->asic_gen != BFI_ASIC_GEN_CT2 &&
|
||||
fru->ioc->attr->card_type != BFA_MFG_TYPE_CHINOOK2)
|
||||
return BFA_STATUS_FRU_NOT_PRESENT;
|
||||
|
||||
if (fru->ioc->attr->card_type != BFA_MFG_TYPE_CHINOOK)
|
||||
@@ -6152,6 +6171,7 @@ bfa_fruvpd_update(struct bfa_fru_s *fru, void *buf, u32 len, u32 offset,
|
||||
fru->offset = 0;
|
||||
fru->addr_off = offset;
|
||||
fru->ubuf = buf;
|
||||
fru->trfr_cmpl = trfr_cmpl;
|
||||
|
||||
bfa_fru_write_send(fru, BFI_FRUVPD_H2I_WRITE_REQ);
|
||||
|
||||
@@ -6181,7 +6201,8 @@ bfa_fruvpd_read(struct bfa_fru_s *fru, void *buf, u32 len, u32 offset,
|
||||
if (fru->ioc->asic_gen != BFI_ASIC_GEN_CT2)
|
||||
return BFA_STATUS_FRU_NOT_PRESENT;
|
||||
|
||||
if (fru->ioc->attr->card_type != BFA_MFG_TYPE_CHINOOK)
|
||||
if (fru->ioc->attr->card_type != BFA_MFG_TYPE_CHINOOK &&
|
||||
fru->ioc->attr->card_type != BFA_MFG_TYPE_CHINOOK2)
|
||||
return BFA_STATUS_CMD_NOTSUPP;
|
||||
|
||||
if (!bfa_ioc_is_operational(fru->ioc))
|
||||
@@ -6222,7 +6243,8 @@ bfa_fruvpd_get_max_size(struct bfa_fru_s *fru, u32 *max_size)
|
||||
if (!bfa_ioc_is_operational(fru->ioc))
|
||||
return BFA_STATUS_IOC_NON_OP;
|
||||
|
||||
if (fru->ioc->attr->card_type == BFA_MFG_TYPE_CHINOOK)
|
||||
if (fru->ioc->attr->card_type == BFA_MFG_TYPE_CHINOOK ||
|
||||
fru->ioc->attr->card_type == BFA_MFG_TYPE_CHINOOK2)
|
||||
*max_size = BFA_FRU_CHINOOK_MAX_SIZE;
|
||||
else
|
||||
return BFA_STATUS_CMD_NOTSUPP;
|
||||
|
||||
@@ -346,6 +346,12 @@ struct bfa_ioc_hwif_s {
|
||||
void (*ioc_sync_ack) (struct bfa_ioc_s *ioc);
|
||||
bfa_boolean_t (*ioc_sync_complete) (struct bfa_ioc_s *ioc);
|
||||
bfa_boolean_t (*ioc_lpu_read_stat) (struct bfa_ioc_s *ioc);
|
||||
void (*ioc_set_fwstate) (struct bfa_ioc_s *ioc,
|
||||
enum bfi_ioc_state fwstate);
|
||||
enum bfi_ioc_state (*ioc_get_fwstate) (struct bfa_ioc_s *ioc);
|
||||
void (*ioc_set_alt_fwstate) (struct bfa_ioc_s *ioc,
|
||||
enum bfi_ioc_state fwstate);
|
||||
enum bfi_ioc_state (*ioc_get_alt_fwstate) (struct bfa_ioc_s *ioc);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -725,6 +731,7 @@ struct bfa_fru_s {
|
||||
struct bfa_mbox_cmd_s mb; /* mailbox */
|
||||
struct bfa_ioc_notify_s ioc_notify; /* ioc event notify */
|
||||
struct bfa_mem_dma_s fru_dma;
|
||||
u8 trfr_cmpl;
|
||||
};
|
||||
|
||||
#define BFA_FRU(__bfa) (&(__bfa)->modules.fru)
|
||||
@@ -732,7 +739,7 @@ struct bfa_fru_s {
|
||||
|
||||
bfa_status_t bfa_fruvpd_update(struct bfa_fru_s *fru,
|
||||
void *buf, u32 len, u32 offset,
|
||||
bfa_cb_fru_t cbfn, void *cbarg);
|
||||
bfa_cb_fru_t cbfn, void *cbarg, u8 trfr_cmpl);
|
||||
bfa_status_t bfa_fruvpd_read(struct bfa_fru_s *fru,
|
||||
void *buf, u32 len, u32 offset,
|
||||
bfa_cb_fru_t cbfn, void *cbarg);
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
BFA_TRC_FILE(CNA, IOC_CB);
|
||||
|
||||
#define bfa_ioc_cb_join_pos(__ioc) ((u32) (1 << BFA_IOC_CB_JOIN_SH))
|
||||
|
||||
/*
|
||||
* forward declarations
|
||||
*/
|
||||
@@ -37,6 +39,12 @@ static void bfa_ioc_cb_sync_join(struct bfa_ioc_s *ioc);
|
||||
static void bfa_ioc_cb_sync_leave(struct bfa_ioc_s *ioc);
|
||||
static void bfa_ioc_cb_sync_ack(struct bfa_ioc_s *ioc);
|
||||
static bfa_boolean_t bfa_ioc_cb_sync_complete(struct bfa_ioc_s *ioc);
|
||||
static void bfa_ioc_cb_set_cur_ioc_fwstate(
|
||||
struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate);
|
||||
static enum bfi_ioc_state bfa_ioc_cb_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc);
|
||||
static void bfa_ioc_cb_set_alt_ioc_fwstate(
|
||||
struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate);
|
||||
static enum bfi_ioc_state bfa_ioc_cb_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc);
|
||||
|
||||
static struct bfa_ioc_hwif_s hwif_cb;
|
||||
|
||||
@@ -59,6 +67,10 @@ bfa_ioc_set_cb_hwif(struct bfa_ioc_s *ioc)
|
||||
hwif_cb.ioc_sync_leave = bfa_ioc_cb_sync_leave;
|
||||
hwif_cb.ioc_sync_ack = bfa_ioc_cb_sync_ack;
|
||||
hwif_cb.ioc_sync_complete = bfa_ioc_cb_sync_complete;
|
||||
hwif_cb.ioc_set_fwstate = bfa_ioc_cb_set_cur_ioc_fwstate;
|
||||
hwif_cb.ioc_get_fwstate = bfa_ioc_cb_get_cur_ioc_fwstate;
|
||||
hwif_cb.ioc_set_alt_fwstate = bfa_ioc_cb_set_alt_ioc_fwstate;
|
||||
hwif_cb.ioc_get_alt_fwstate = bfa_ioc_cb_get_alt_ioc_fwstate;
|
||||
|
||||
ioc->ioc_hwif = &hwif_cb;
|
||||
}
|
||||
@@ -187,6 +199,20 @@ bfa_ioc_cb_isr_mode_set(struct bfa_ioc_s *ioc, bfa_boolean_t msix)
|
||||
static bfa_boolean_t
|
||||
bfa_ioc_cb_sync_start(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
u32 ioc_fwstate = readl(ioc->ioc_regs.ioc_fwstate);
|
||||
|
||||
/**
|
||||
* Driver load time. If the join bit is set,
|
||||
* it is due to an unclean exit by the driver for this
|
||||
* PCI fn in the previous incarnation. Whoever comes here first
|
||||
* should clean it up, no matter which PCI fn.
|
||||
*/
|
||||
if (ioc_fwstate & BFA_IOC_CB_JOIN_MASK) {
|
||||
writel(BFI_IOC_UNINIT, ioc->ioc_regs.ioc_fwstate);
|
||||
writel(BFI_IOC_UNINIT, ioc->ioc_regs.alt_ioc_fwstate);
|
||||
return BFA_TRUE;
|
||||
}
|
||||
|
||||
return bfa_ioc_cb_sync_complete(ioc);
|
||||
}
|
||||
|
||||
@@ -212,24 +238,66 @@ bfa_ioc_cb_ownership_reset(struct bfa_ioc_s *ioc)
|
||||
static void
|
||||
bfa_ioc_cb_sync_join(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
u32 r32 = readl(ioc->ioc_regs.ioc_fwstate);
|
||||
u32 join_pos = bfa_ioc_cb_join_pos(ioc);
|
||||
|
||||
writel((r32 | join_pos), ioc->ioc_regs.ioc_fwstate);
|
||||
}
|
||||
|
||||
static void
|
||||
bfa_ioc_cb_sync_leave(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
u32 r32 = readl(ioc->ioc_regs.ioc_fwstate);
|
||||
u32 join_pos = bfa_ioc_cb_join_pos(ioc);
|
||||
|
||||
writel((r32 & ~join_pos), ioc->ioc_regs.ioc_fwstate);
|
||||
}
|
||||
|
||||
static void
|
||||
bfa_ioc_cb_set_cur_ioc_fwstate(struct bfa_ioc_s *ioc,
|
||||
enum bfi_ioc_state fwstate)
|
||||
{
|
||||
u32 r32 = readl(ioc->ioc_regs.ioc_fwstate);
|
||||
|
||||
writel((fwstate | (r32 & BFA_IOC_CB_JOIN_MASK)),
|
||||
ioc->ioc_regs.ioc_fwstate);
|
||||
}
|
||||
|
||||
static enum bfi_ioc_state
|
||||
bfa_ioc_cb_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
return (enum bfi_ioc_state)(readl(ioc->ioc_regs.ioc_fwstate) &
|
||||
BFA_IOC_CB_FWSTATE_MASK);
|
||||
}
|
||||
|
||||
static void
|
||||
bfa_ioc_cb_set_alt_ioc_fwstate(struct bfa_ioc_s *ioc,
|
||||
enum bfi_ioc_state fwstate)
|
||||
{
|
||||
u32 r32 = readl(ioc->ioc_regs.alt_ioc_fwstate);
|
||||
|
||||
writel((fwstate | (r32 & BFA_IOC_CB_JOIN_MASK)),
|
||||
ioc->ioc_regs.alt_ioc_fwstate);
|
||||
}
|
||||
|
||||
static enum bfi_ioc_state
|
||||
bfa_ioc_cb_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
return (enum bfi_ioc_state)(readl(ioc->ioc_regs.alt_ioc_fwstate) &
|
||||
BFA_IOC_CB_FWSTATE_MASK);
|
||||
}
|
||||
|
||||
static void
|
||||
bfa_ioc_cb_sync_ack(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
writel(BFI_IOC_FAIL, ioc->ioc_regs.ioc_fwstate);
|
||||
bfa_ioc_cb_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL);
|
||||
}
|
||||
|
||||
static bfa_boolean_t
|
||||
bfa_ioc_cb_sync_complete(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
uint32_t fwstate, alt_fwstate;
|
||||
fwstate = readl(ioc->ioc_regs.ioc_fwstate);
|
||||
u32 fwstate, alt_fwstate;
|
||||
fwstate = bfa_ioc_cb_get_cur_ioc_fwstate(ioc);
|
||||
|
||||
/*
|
||||
* At this point, this IOC is hoding the hw sem in the
|
||||
@@ -257,7 +325,7 @@ bfa_ioc_cb_sync_complete(struct bfa_ioc_s *ioc)
|
||||
fwstate == BFI_IOC_OP)
|
||||
return BFA_TRUE;
|
||||
else {
|
||||
alt_fwstate = readl(ioc->ioc_regs.alt_ioc_fwstate);
|
||||
alt_fwstate = bfa_ioc_cb_get_alt_ioc_fwstate(ioc);
|
||||
if (alt_fwstate == BFI_IOC_FAIL ||
|
||||
alt_fwstate == BFI_IOC_DISABLED ||
|
||||
alt_fwstate == BFI_IOC_UNINIT ||
|
||||
@@ -272,7 +340,7 @@ bfa_ioc_cb_sync_complete(struct bfa_ioc_s *ioc)
|
||||
bfa_status_t
|
||||
bfa_ioc_cb_pll_init(void __iomem *rb, enum bfi_asic_mode fcmode)
|
||||
{
|
||||
u32 pll_sclk, pll_fclk;
|
||||
u32 pll_sclk, pll_fclk, join_bits;
|
||||
|
||||
pll_sclk = __APP_PLL_SCLK_ENABLE | __APP_PLL_SCLK_LRESETN |
|
||||
__APP_PLL_SCLK_P0_1(3U) |
|
||||
@@ -282,8 +350,12 @@ bfa_ioc_cb_pll_init(void __iomem *rb, enum bfi_asic_mode fcmode)
|
||||
__APP_PLL_LCLK_RSEL200500 | __APP_PLL_LCLK_P0_1(3U) |
|
||||
__APP_PLL_LCLK_JITLMT0_1(3U) |
|
||||
__APP_PLL_LCLK_CNTLMT0_1(3U);
|
||||
writel(BFI_IOC_UNINIT, (rb + BFA_IOC0_STATE_REG));
|
||||
writel(BFI_IOC_UNINIT, (rb + BFA_IOC1_STATE_REG));
|
||||
join_bits = readl(rb + BFA_IOC0_STATE_REG) &
|
||||
BFA_IOC_CB_JOIN_MASK;
|
||||
writel((BFI_IOC_UNINIT | join_bits), (rb + BFA_IOC0_STATE_REG));
|
||||
join_bits = readl(rb + BFA_IOC1_STATE_REG) &
|
||||
BFA_IOC_CB_JOIN_MASK;
|
||||
writel((BFI_IOC_UNINIT | join_bits), (rb + BFA_IOC1_STATE_REG));
|
||||
writel(0xffffffffU, (rb + HOSTFN0_INT_MSK));
|
||||
writel(0xffffffffU, (rb + HOSTFN1_INT_MSK));
|
||||
writel(0xffffffffU, (rb + HOSTFN0_INT_STATUS));
|
||||
|
||||
@@ -43,6 +43,12 @@ static void bfa_ioc_ct_sync_join(struct bfa_ioc_s *ioc);
|
||||
static void bfa_ioc_ct_sync_leave(struct bfa_ioc_s *ioc);
|
||||
static void bfa_ioc_ct_sync_ack(struct bfa_ioc_s *ioc);
|
||||
static bfa_boolean_t bfa_ioc_ct_sync_complete(struct bfa_ioc_s *ioc);
|
||||
static void bfa_ioc_ct_set_cur_ioc_fwstate(
|
||||
struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate);
|
||||
static enum bfi_ioc_state bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc);
|
||||
static void bfa_ioc_ct_set_alt_ioc_fwstate(
|
||||
struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate);
|
||||
static enum bfi_ioc_state bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc);
|
||||
|
||||
static struct bfa_ioc_hwif_s hwif_ct;
|
||||
static struct bfa_ioc_hwif_s hwif_ct2;
|
||||
@@ -512,6 +518,10 @@ bfa_ioc_set_ctx_hwif(struct bfa_ioc_s *ioc, struct bfa_ioc_hwif_s *hwif)
|
||||
hwif->ioc_sync_leave = bfa_ioc_ct_sync_leave;
|
||||
hwif->ioc_sync_ack = bfa_ioc_ct_sync_ack;
|
||||
hwif->ioc_sync_complete = bfa_ioc_ct_sync_complete;
|
||||
hwif->ioc_set_fwstate = bfa_ioc_ct_set_cur_ioc_fwstate;
|
||||
hwif->ioc_get_fwstate = bfa_ioc_ct_get_cur_ioc_fwstate;
|
||||
hwif->ioc_set_alt_fwstate = bfa_ioc_ct_set_alt_ioc_fwstate;
|
||||
hwif->ioc_get_alt_fwstate = bfa_ioc_ct_get_alt_ioc_fwstate;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -918,6 +928,16 @@ bfa_ioc_ct2_pll_init(void __iomem *rb, enum bfi_asic_mode mode)
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* The very first PCIe DMA Read done by LPU fails with a fatal error,
|
||||
* when Address Translation Cache (ATC) has been enabled by system BIOS.
|
||||
*
|
||||
* Workaround:
|
||||
* Disable Invalidated Tag Match Enable capability by setting the bit 26
|
||||
* of CHIP_MISC_PRG to 0, by default it is set to 1.
|
||||
*/
|
||||
r32 = readl(rb + CT2_CHIP_MISC_PRG);
|
||||
writel((r32 & 0xfbffffff), (rb + CT2_CHIP_MISC_PRG));
|
||||
|
||||
/*
|
||||
* Mask the interrupts and clear any
|
||||
@@ -949,3 +969,29 @@ bfa_ioc_ct2_pll_init(void __iomem *rb, enum bfi_asic_mode mode)
|
||||
|
||||
return BFA_STATUS_OK;
|
||||
}
|
||||
|
||||
static void
|
||||
bfa_ioc_ct_set_cur_ioc_fwstate(struct bfa_ioc_s *ioc,
|
||||
enum bfi_ioc_state fwstate)
|
||||
{
|
||||
writel(fwstate, ioc->ioc_regs.ioc_fwstate);
|
||||
}
|
||||
|
||||
static enum bfi_ioc_state
|
||||
bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
return (enum bfi_ioc_state)readl(ioc->ioc_regs.ioc_fwstate);
|
||||
}
|
||||
|
||||
static void
|
||||
bfa_ioc_ct_set_alt_ioc_fwstate(struct bfa_ioc_s *ioc,
|
||||
enum bfi_ioc_state fwstate)
|
||||
{
|
||||
writel(fwstate, ioc->ioc_regs.alt_ioc_fwstate);
|
||||
}
|
||||
|
||||
static enum bfi_ioc_state
|
||||
bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
return (enum bfi_ioc_state) readl(ioc->ioc_regs.alt_ioc_fwstate);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user