#include "qla_def.h"
#include "qla_target.h"
#include "qla_gbl.h"
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/cpu.h>
#include <linux/t10-pi.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi_bsg_fc.h>
#include <scsi/scsi_eh.h>
#include <scsi/fc/fc_fs.h>
#include <linux/nvme-fc-driver.h>
static void qla2x00_mbx_completion(scsi_qla_host_t *, uint16_t);
static void qla2x00_status_entry(scsi_qla_host_t *, struct rsp_que *, void *);
static void qla2x00_status_cont_entry(struct rsp_que *, sts_cont_entry_t *);
static int qla2x00_error_entry(scsi_qla_host_t *, struct rsp_que *,
sts_entry_t *);
static void qla27xx_process_purex_fpin(struct scsi_qla_host *vha,
struct purex_item *item);
static struct purex_item *qla24xx_alloc_purex_item(scsi_qla_host_t *vha,
uint16_t size);
static struct purex_item *qla24xx_copy_std_pkt(struct scsi_qla_host *vha,
void *pkt);
static struct purex_item *qla27xx_copy_fpin_pkt(struct scsi_qla_host *vha,
void **pkt, struct rsp_que **rsp);
static void
qla27xx_process_purex_fpin(struct scsi_qla_host *vha, struct purex_item *item)
{ … }
const char *const port_state_str[] = …;
#define SFP_DISABLE_LASER_INITIATED …
#define SFP_ENABLE_LASER_INITIATED …
static inline void display_Laser_info(scsi_qla_host_t *vha,
u16 mb1, u16 mb2, u16 mb3) { … }
static void
qla24xx_process_abts(struct scsi_qla_host *vha, struct purex_item *pkt)
{ … }
void __qla_consume_iocb(struct scsi_qla_host *vha,
void **pkt, struct rsp_que **rsp)
{ … }
int __qla_copy_purex_to_buffer(struct scsi_qla_host *vha,
void **pkt, struct rsp_que **rsp, u8 *buf, u32 buf_len)
{ … }
irqreturn_t
qla2100_intr_handler(int irq, void *dev_id)
{ … }
bool
qla2x00_check_reg32_for_disconnect(scsi_qla_host_t *vha, uint32_t reg)
{ … }
bool
qla2x00_check_reg16_for_disconnect(scsi_qla_host_t *vha, uint16_t reg)
{ … }
irqreturn_t
qla2300_intr_handler(int irq, void *dev_id)
{ … }
static void
qla2x00_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)
{ … }
static void
qla81xx_idc_event(scsi_qla_host_t *vha, uint16_t aen, uint16_t descr)
{ … }
#define LS_UNKNOWN …
const char *
qla2x00_get_link_speed_str(struct qla_hw_data *ha, uint16_t speed)
{ … }
static void
qla83xx_handle_8200_aen(scsi_qla_host_t *vha, uint16_t *mb)
{ … }
struct purex_item *
qla27xx_copy_multiple_pkt(struct scsi_qla_host *vha, void **pkt,
struct rsp_que **rsp, bool is_purls,
bool byte_order)
{ … }
int
qla2x00_is_a_vp_did(scsi_qla_host_t *vha, uint32_t rscn_entry)
{ … }
fc_port_t *
qla2x00_find_fcport_by_loopid(scsi_qla_host_t *vha, uint16_t loop_id)
{ … }
fc_port_t *
qla2x00_find_fcport_by_wwpn(scsi_qla_host_t *vha, u8 *wwpn, u8 incl_deleted)
{ … }
fc_port_t *
qla2x00_find_fcport_by_nportid(scsi_qla_host_t *vha, port_id_t *id,
u8 incl_deleted)
{ … }
static void
qla27xx_handle_8200_aen(scsi_qla_host_t *vha, uint16_t *mb)
{ … }
static struct purex_item *
qla24xx_alloc_purex_item(scsi_qla_host_t *vha, uint16_t size)
{ … }
void
qla24xx_queue_purex_item(scsi_qla_host_t *vha, struct purex_item *pkt,
void (*process_item)(struct scsi_qla_host *vha,
struct purex_item *pkt))
{ … }
static struct purex_item
*qla24xx_copy_std_pkt(struct scsi_qla_host *vha, void *pkt)
{ … }
static struct purex_item *
qla27xx_copy_fpin_pkt(struct scsi_qla_host *vha, void **pkt,
struct rsp_que **rsp)
{ … }
void
qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
{ … }
void
qla2x00_process_completed_request(struct scsi_qla_host *vha,
struct req_que *req, uint32_t index)
{ … }
static srb_t *
qla_get_sp_from_handle(scsi_qla_host_t *vha, const char *func,
struct req_que *req, void *iocb, u16 *ret_index)
{ … }
srb_t *
qla2x00_get_sp_from_handle(scsi_qla_host_t *vha, const char *func,
struct req_que *req, void *iocb)
{ … }
static void
qla2x00_mbx_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
struct mbx_entry *mbx)
{ … }
static void
qla24xx_mbx_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
struct mbx_24xx_entry *pkt)
{ … }
static void
qla24xxx_nack_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
struct nack_to_isp *pkt)
{ … }
static void
qla2x00_ct_entry(scsi_qla_host_t *vha, struct req_que *req,
sts_entry_t *pkt, int iocb_type)
{ … }
static void
qla24xx_els_ct_entry(scsi_qla_host_t *v, struct req_que *req,
struct sts_entry_24xx *pkt, int iocb_type)
{ … }
static void
qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
struct logio_entry_24xx *logio)
{ … }
static void
qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk)
{ … }
static void qla24xx_nvme_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
void *tsk, srb_t *sp)
{ … }
static void qla_ctrlvp_completed(scsi_qla_host_t *vha, struct req_que *req,
struct vp_ctrl_entry_24xx *vce)
{ … }
static void qla2x00_process_response_entry(struct scsi_qla_host *vha,
struct rsp_que *rsp,
sts_entry_t *pkt)
{ … }
void
qla2x00_process_response_queue(struct rsp_que *rsp)
{ … }
static inline void
qla2x00_handle_sense(srb_t *sp, uint8_t *sense_data, uint32_t par_sense_len,
uint32_t sense_len, struct rsp_que *rsp, int res)
{ … }
static inline int
qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
{ … }
static void
qla25xx_process_bidir_status_iocb(scsi_qla_host_t *vha, void *pkt,
struct req_que *req, uint32_t index)
{ … }
static void
qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
{ … }
static void
qla2x00_status_cont_entry(struct rsp_que *rsp, sts_cont_entry_t *pkt)
{ … }
static int
qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt)
{ … }
static void
qla24xx_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)
{ … }
static void
qla24xx_abort_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
struct abort_entry_24xx *pkt)
{ … }
void qla24xx_nvme_ls4_iocb(struct scsi_qla_host *vha,
struct pt_ls4_request *pkt, struct req_que *req)
{ … }
static int qla_chk_cont_iocb_avail(struct scsi_qla_host *vha,
struct rsp_que *rsp, response_t *pkt, u32 rsp_q_in)
{ … }
static void qla_marker_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
struct mrk_entry_24xx *pkt)
{ … }
void qla24xx_process_response_queue(struct scsi_qla_host *vha,
struct rsp_que *rsp)
{ … }
static void
qla2xxx_check_risc_status(scsi_qla_host_t *vha)
{ … }
irqreturn_t
qla24xx_intr_handler(int irq, void *dev_id)
{ … }
static irqreturn_t
qla24xx_msix_rsp_q(int irq, void *dev_id)
{ … }
static irqreturn_t
qla24xx_msix_default(int irq, void *dev_id)
{ … }
irqreturn_t
qla2xxx_msix_rsp_q(int irq, void *dev_id)
{ … }
irqreturn_t
qla2xxx_msix_rsp_q_hs(int irq, void *dev_id)
{ … }
struct qla_init_msix_entry { … };
static const struct qla_init_msix_entry msix_entries[] = …;
static const struct qla_init_msix_entry qla82xx_msix_entries[] = …;
static int
qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
{ … }
int
qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp)
{ … }
void
qla2x00_free_irqs(scsi_qla_host_t *vha)
{ … }
int qla25xx_request_irq(struct qla_hw_data *ha, struct qla_qpair *qpair,
struct qla_msix_entry *msix, int vector_type)
{ … }