0001
0002
0003
0004
0005
0006 #ifndef _FNIC_IO_H_
0007 #define _FNIC_IO_H_
0008
0009 #include <scsi/fc/fc_fcp.h>
0010
0011 #define FNIC_DFLT_SG_DESC_CNT 32
0012 #define FNIC_MAX_SG_DESC_CNT 256
0013 #define FNIC_SG_DESC_ALIGN 16
0014
0015 struct host_sg_desc {
0016 __le64 addr;
0017 __le32 len;
0018 u32 _resvd;
0019 };
0020
0021 struct fnic_dflt_sgl_list {
0022 struct host_sg_desc sg_desc[FNIC_DFLT_SG_DESC_CNT];
0023 };
0024
0025 struct fnic_sgl_list {
0026 struct host_sg_desc sg_desc[FNIC_MAX_SG_DESC_CNT];
0027 };
0028
0029 enum fnic_sgl_list_type {
0030 FNIC_SGL_CACHE_DFLT = 0,
0031 FNIC_SGL_CACHE_MAX,
0032 FNIC_SGL_NUM_CACHES
0033 };
0034
0035 enum fnic_ioreq_state {
0036 FNIC_IOREQ_NOT_INITED = 0,
0037 FNIC_IOREQ_CMD_PENDING,
0038 FNIC_IOREQ_ABTS_PENDING,
0039 FNIC_IOREQ_ABTS_COMPLETE,
0040 FNIC_IOREQ_CMD_COMPLETE,
0041 };
0042
0043 struct fnic_io_req {
0044 struct host_sg_desc *sgl_list;
0045 void *sgl_list_alloc;
0046 dma_addr_t sense_buf_pa;
0047 dma_addr_t sgl_list_pa;
0048 u16 sgl_cnt;
0049 u8 sgl_type;
0050 u8 io_completed:1;
0051 u32 port_id;
0052 unsigned long start_time;
0053 struct completion *abts_done;
0054 struct completion *dr_done;
0055 };
0056
0057 enum fnic_port_speeds {
0058 DCEM_PORTSPEED_NONE = 0,
0059 DCEM_PORTSPEED_1G = 1000,
0060 DCEM_PORTSPEED_10G = 10000,
0061 DCEM_PORTSPEED_20G = 20000,
0062 DCEM_PORTSPEED_25G = 25000,
0063 DCEM_PORTSPEED_40G = 40000,
0064 DCEM_PORTSPEED_4x10G = 41000,
0065 DCEM_PORTSPEED_100G = 100000,
0066 };
0067 #endif