#include <linux/blkdev.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/utsname.h>
#include <scsi/scsi.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_transport_fc.h>
#include <scsi/fc/fc_fs.h>
#include "lpfc_hw4.h"
#include "lpfc_hw.h"
#include "lpfc_sli.h"
#include "lpfc_sli4.h"
#include "lpfc_nl.h"
#include "lpfc_disc.h"
#include "lpfc.h"
#include "lpfc_scsi.h"
#include "lpfc_logmsg.h"
#include "lpfc_crtn.h"
#include "lpfc_version.h"
#include "lpfc_vport.h"
#include "lpfc_debugfs.h"
#define HBA_PORTSPEED_1GFC …
#define HBA_PORTSPEED_2GFC …
#define HBA_PORTSPEED_4GFC …
#define HBA_PORTSPEED_10GFC …
#define HBA_PORTSPEED_8GFC …
#define HBA_PORTSPEED_16GFC …
#define HBA_PORTSPEED_32GFC …
#define HBA_PORTSPEED_20GFC …
#define HBA_PORTSPEED_40GFC …
#define HBA_PORTSPEED_128GFC …
#define HBA_PORTSPEED_64GFC …
#define HBA_PORTSPEED_256GFC …
#define HBA_PORTSPEED_UNKNOWN …
#define HBA_PORTSPEED_10GE …
#define HBA_PORTSPEED_40GE …
#define HBA_PORTSPEED_100GE …
#define HBA_PORTSPEED_25GE …
#define HBA_PORTSPEED_50GE …
#define HBA_PORTSPEED_400GE …
#define FOURBYTES …
static char *lpfc_release_version = …;
static void
lpfc_cmpl_ct_cmd_vmid(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb);
static void
lpfc_ct_ignore_hbq_buffer(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq,
struct lpfc_dmabuf *mp, uint32_t size)
{ … }
static void
lpfc_ct_unsol_buffer(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq,
struct lpfc_dmabuf *mp, uint32_t size)
{ … }
static void
lpfc_ct_unsol_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
static void
lpfc_ct_reject_event(struct lpfc_nodelist *ndlp,
struct lpfc_sli_ct_request *ct_req,
u16 ulp_context, u16 ox_id)
{ … }
static void
lpfc_ct_handle_mibreq(struct lpfc_hba *phba, struct lpfc_iocbq *ctiocbq)
{ … }
void
lpfc_ct_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_iocbq *ctiocbq)
{ … }
int
lpfc_ct_handle_unsol_abort(struct lpfc_hba *phba, struct hbq_dmabuf *dmabuf)
{ … }
static void
lpfc_free_ct_rsp(struct lpfc_hba *phba, struct lpfc_dmabuf *mlist)
{ … }
static struct lpfc_dmabuf *
lpfc_alloc_ct_rsp(struct lpfc_hba *phba, __be16 cmdcode, struct ulp_bde64 *bpl,
uint32_t size, int *entries)
{ … }
int
lpfc_ct_free_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *ctiocb)
{ … }
static int
lpfc_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp,
struct lpfc_dmabuf *inp, struct lpfc_dmabuf *outp,
void (*cmpl)(struct lpfc_hba *, struct lpfc_iocbq *,
struct lpfc_iocbq *),
struct lpfc_nodelist *ndlp, uint32_t event_tag, uint32_t num_entry,
uint32_t tmo, uint8_t retry)
{ … }
static int
lpfc_ct_cmd(struct lpfc_vport *vport, struct lpfc_dmabuf *inmp,
struct lpfc_dmabuf *bmp, struct lpfc_nodelist *ndlp,
void (*cmpl) (struct lpfc_hba *, struct lpfc_iocbq *,
struct lpfc_iocbq *),
uint32_t rsp_size, uint8_t retry)
{ … }
struct lpfc_vport *
lpfc_find_vport_by_did(struct lpfc_hba *phba, uint32_t did) { … }
static void
lpfc_prep_node_fc4type(struct lpfc_vport *vport, uint32_t Did, uint8_t fc4_type)
{ … }
static void
lpfc_ns_rsp_audit_did(struct lpfc_vport *vport, uint32_t Did, uint8_t fc4_type)
{ … }
static int
lpfc_ns_rsp(struct lpfc_vport *vport, struct lpfc_dmabuf *mp, uint8_t fc4_type,
uint32_t Size)
{ … }
static void
lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
static void
lpfc_cmpl_ct_cmd_gid_pt(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
static void
lpfc_cmpl_ct_cmd_gff_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
static void
lpfc_cmpl_ct_cmd_gft_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
static void
lpfc_cmpl_ct(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
static void
lpfc_cmpl_ct_cmd_rft_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
static void
lpfc_cmpl_ct_cmd_rnn_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
static void
lpfc_cmpl_ct_cmd_rspn_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
static void
lpfc_cmpl_ct_cmd_rsnn_nn(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
static void
lpfc_cmpl_ct_cmd_da_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
static void
lpfc_cmpl_ct_cmd_rff_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
int
lpfc_vport_symbolic_port_name(struct lpfc_vport *vport, char *symbol,
size_t size)
{ … }
int
lpfc_vport_symbolic_node_name(struct lpfc_vport *vport, char *symbol,
size_t size)
{ … }
static uint32_t
lpfc_find_map_node(struct lpfc_vport *vport)
{ … }
int
lpfc_get_gidft_type(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb)
{ … }
int
lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode,
uint8_t retry, uint32_t context)
{ … }
static void
lpfc_fdmi_rprt_defer(struct lpfc_hba *phba, uint32_t mask)
{ … }
static void
lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
void
lpfc_fdmi_change_check(struct lpfc_vport *vport)
{ … }
static inline int
lpfc_fdmi_set_attr_u32(void *attr, uint16_t attrtype, uint32_t attrval)
{ … }
static inline int
lpfc_fdmi_set_attr_wwn(void *attr, uint16_t attrtype, struct lpfc_name *wwn)
{ … }
static inline int
lpfc_fdmi_set_attr_fullwwn(void *attr, uint16_t attrtype,
struct lpfc_name *wwnn, struct lpfc_name *wwpn)
{ … }
static inline int
lpfc_fdmi_set_attr_string(void *attr, uint16_t attrtype, char *attrstring)
{ … }
#define ATTR_FC4_CT …
#define ATTR_FC4_FCP …
#define ATTR_FC4_NVME …
static inline int
lpfc_fdmi_set_attr_fc4types(void *attr, uint16_t attrtype, uint32_t typemask)
{ … }
static int
lpfc_fdmi_hba_attr_wwnn(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_manufacturer(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_sn(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_model(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_description(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_hdw_ver(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_drvr_ver(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_rom_ver(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_fmw_ver(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_os_ver(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_ct_len(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_symbolic_name(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_vendor_info(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_num_ports(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_fabric_wwnn(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_bios_ver(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_bios_state(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_hba_attr_vendor_id(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_fc4type(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_support_speed(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_speed(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_max_frame(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_os_devname(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_host_name(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_wwnn(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_wwpn(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_symbolic_name(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_port_type(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_class(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_fabric_wwpn(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_active_fc4type(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_port_state(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_num_disc(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_port_attr_nportid(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_smart_attr_service(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_smart_attr_guid(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_smart_attr_version(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_smart_attr_model(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_smart_attr_port_info(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_smart_attr_qos(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_smart_attr_security(struct lpfc_vport *vport, void *attr)
{ … }
static int
lpfc_fdmi_vendor_attr_mi(struct lpfc_vport *vport, void *attr)
{ … }
static int (*lpfc_fdmi_hba_action[])
(struct lpfc_vport *vport, void *attrbuf) = …;
static int (*lpfc_fdmi_port_action[])
(struct lpfc_vport *vport, void *attrbuf) = …;
int
lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
int cmdcode, uint32_t new_mask)
{ … }
void
lpfc_delayed_disc_tmo(struct timer_list *t)
{ … }
void
lpfc_delayed_disc_timeout_handler(struct lpfc_vport *vport)
{ … }
void
lpfc_decode_firmware_rev(struct lpfc_hba *phba, char *fwrevision, int flag)
{ … }
static void
lpfc_cmpl_ct_cmd_vmid(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
{ … }
int
lpfc_vmid_cmd(struct lpfc_vport *vport,
int cmdcode, struct lpfc_vmid *vmid)
{ … }