#include <linux/mempool.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/workqueue.h>
#include <linux/pci.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/gfp.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi_dbg.h>
#include "snic_io.h"
#include "snic.h"
#define snic_cmd_tag(sc) …
const char *snic_state_str[] = …;
static const char * const snic_req_state_str[] = …;
static const char * const snic_io_status_str[] = …;
static void snic_scsi_cleanup(struct snic *, int);
const char *
snic_state_to_str(unsigned int state)
{ … }
static const char *
snic_io_status_to_str(unsigned int state)
{ … }
static const char *
snic_ioreq_state_to_str(unsigned int state)
{ … }
static inline spinlock_t *
snic_io_lock_hash(struct snic *snic, struct scsi_cmnd *sc)
{ … }
static inline spinlock_t *
snic_io_lock_tag(struct snic *snic, int tag)
{ … }
static void
snic_release_req_buf(struct snic *snic,
struct snic_req_info *rqi,
struct scsi_cmnd *sc)
{ … }
static int
snic_queue_icmnd_req(struct snic *snic,
struct snic_req_info *rqi,
struct scsi_cmnd *sc,
int sg_cnt)
{ … }
static int
snic_issue_scsi_req(struct snic *snic,
struct snic_tgt *tgt,
struct scsi_cmnd *sc)
{ … }
int
snic_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *sc)
{ … }
static void
snic_proc_tmreq_pending_state(struct snic *snic,
struct scsi_cmnd *sc,
u8 cmpl_status)
{ … }
static void
snic_process_io_failed_state(struct snic *snic,
struct snic_icmnd_cmpl *icmnd_cmpl,
struct scsi_cmnd *sc,
u8 cmpl_stat)
{ … }
static int
snic_tmreq_pending(struct scsi_cmnd *sc)
{ … }
static int
snic_process_icmnd_cmpl_status(struct snic *snic,
struct snic_icmnd_cmpl *icmnd_cmpl,
u8 cmpl_stat,
struct scsi_cmnd *sc)
{ … }
static void
snic_icmnd_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq)
{ … }
static void
snic_proc_dr_cmpl_locked(struct snic *snic,
struct snic_fw_req *fwreq,
u8 cmpl_stat,
u32 cmnd_id,
struct scsi_cmnd *sc)
{ … }
static void
snic_update_abort_stats(struct snic *snic, u8 cmpl_stat)
{ … }
static int
snic_process_itmf_cmpl(struct snic *snic,
struct snic_fw_req *fwreq,
u32 cmnd_id,
u8 cmpl_stat,
struct scsi_cmnd *sc)
{ … }
static void
snic_itmf_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq)
{ … }
static void
snic_hba_reset_scsi_cleanup(struct snic *snic, struct scsi_cmnd *sc)
{ … }
static int
snic_hba_reset_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq)
{ … }
static void
snic_msg_ack_handler(struct snic *snic, struct snic_fw_req *fwreq)
{ … }
static void
snic_aen_handler(struct snic *snic, struct snic_fw_req *fwreq)
{ … }
static int
snic_io_cmpl_handler(struct vnic_dev *vdev,
unsigned int cq_idx,
struct snic_fw_req *fwreq)
{ … }
int
snic_fwcq_cmpl_handler(struct snic *snic, int io_cmpl_work)
{ … }
static int
snic_queue_itmf_req(struct snic *snic,
struct snic_host_req *tmreq,
struct scsi_cmnd *sc,
u32 tmf,
u32 req_id)
{ … }
static int
snic_issue_tm_req(struct snic *snic,
struct snic_req_info *rqi,
struct scsi_cmnd *sc,
int tmf)
{ … }
static int
snic_queue_abort_req(struct snic *snic,
struct snic_req_info *rqi,
struct scsi_cmnd *sc,
int tmf)
{ … }
static int
snic_abort_finish(struct snic *snic, struct scsi_cmnd *sc)
{ … }
static int
snic_send_abort_and_wait(struct snic *snic, struct scsi_cmnd *sc)
{ … }
int
snic_abort_cmd(struct scsi_cmnd *sc)
{ … }
static int
snic_is_abts_pending(struct snic *snic, struct scsi_cmnd *lr_sc)
{ … }
static int
snic_dr_clean_single_req(struct snic *snic,
u32 tag,
struct scsi_device *lr_sdev)
{ … }
static int
snic_dr_clean_pending_req(struct snic *snic, struct scsi_cmnd *lr_sc)
{ … }
static int
snic_dr_finish(struct snic *snic, struct scsi_cmnd *sc)
{ … }
static int
snic_queue_dr_req(struct snic *snic,
struct snic_req_info *rqi,
struct scsi_cmnd *sc)
{ … }
static int
snic_send_dr_and_wait(struct snic *snic, struct scsi_cmnd *sc)
{ … }
static int
snic_dev_reset_supported(struct scsi_device *sdev)
{ … }
static void
snic_unlink_and_release_req(struct snic *snic, struct scsi_cmnd *sc, int flag)
{ … }
int
snic_device_reset(struct scsi_cmnd *sc)
{ … }
static int
snic_issue_hba_reset(struct snic *snic, struct scsi_cmnd *sc)
{ … }
int
snic_reset(struct Scsi_Host *shost, struct scsi_cmnd *sc)
{ … }
int
snic_host_reset(struct scsi_cmnd *sc)
{ … }
static void
snic_cmpl_pending_tmreq(struct snic *snic, struct scsi_cmnd *sc)
{ … }
static void
snic_scsi_cleanup(struct snic *snic, int ex_tag)
{ … }
void
snic_shutdown_scsi_cleanup(struct snic *snic)
{ … }
static int
snic_internal_abort_io(struct snic *snic, struct scsi_cmnd *sc, int tmf)
{ … }
int
snic_tgt_scsi_abort_io(struct snic_tgt *tgt)
{ … }