Go to the documentation of this file.
22 #include <linux/netdevice.h>
24 #include <linux/bitops.h>
38 #define DRV_NAME "fnic"
39 #define DRV_DESCRIPTION "Cisco FCoE HBA Driver"
40 #define DRV_VERSION "1.5.0.2"
41 #define PFX DRV_NAME ": "
42 #define DFX DRV_NAME "%d: "
44 #define DESC_CLEAN_LOW_WATERMARK 8
45 #define FNIC_MAX_IO_REQ 2048
46 #define FNIC_IO_LOCKS 64
47 #define FNIC_DFLT_QUEUE_DEPTH 32
48 #define FNIC_STATS_RATE_LIMIT 4
53 #define FNIC_TAG_ABORT BIT(30)
54 #define FNIC_TAG_DEV_RST BIT(29)
55 #define FNIC_TAG_MASK (BIT(24) - 1)
56 #define FNIC_NO_TAG -1
62 #define CMD_SP(Cmnd) ((Cmnd)->SCp.ptr)
63 #define CMD_STATE(Cmnd) ((Cmnd)->SCp.phase)
64 #define CMD_ABTS_STATUS(Cmnd) ((Cmnd)->SCp.Message)
65 #define CMD_LR_STATUS(Cmnd) ((Cmnd)->SCp.have_data_in)
66 #define CMD_TAG(Cmnd) ((Cmnd)->SCp.sent_command)
68 #define FCPIO_INVALID_CODE 0x100
70 #define FNIC_LUN_RESET_TIMEOUT 10000
71 #define FNIC_HOST_RESET_TIMEOUT 10000
72 #define FNIC_RMDEVICE_TIMEOUT 1000
73 #define FNIC_HOST_RESET_SETTLE_TIME 30
75 #define FNIC_MAX_FCP_TARGET 256
79 #define FNIC_MAIN_LOGGING 0x01
80 #define FNIC_FCS_LOGGING 0x02
81 #define FNIC_SCSI_LOGGING 0x04
82 #define FNIC_ISR_LOGGING 0x08
84 #define FNIC_CHECK_LOGGING(LEVEL, CMD) \
86 if (unlikely(fnic_log_level & LEVEL)) \
92 #define FNIC_MAIN_DBG(kern_level, host, fmt, args...) \
93 FNIC_CHECK_LOGGING(FNIC_MAIN_LOGGING, \
94 shost_printk(kern_level, host, fmt, ##args);)
96 #define FNIC_FCS_DBG(kern_level, host, fmt, args...) \
97 FNIC_CHECK_LOGGING(FNIC_FCS_LOGGING, \
98 shost_printk(kern_level, host, fmt, ##args);)
100 #define FNIC_SCSI_DBG(kern_level, host, fmt, args...) \
101 FNIC_CHECK_LOGGING(FNIC_SCSI_LOGGING, \
102 shost_printk(kern_level, host, fmt, ##args);)
104 #define FNIC_ISR_DBG(kern_level, host, fmt, args...) \
105 FNIC_CHECK_LOGGING(FNIC_ISR_LOGGING, \
106 shost_printk(kern_level, host, fmt, ##args);)
139 #define FNIC_WQ_COPY_MAX 1
140 #define FNIC_WQ_MAX 1
141 #define FNIC_RQ_MAX 1
142 #define FNIC_CQ_MAX (FNIC_WQ_COPY_MAX + FNIC_WQ_MAX + FNIC_RQ_MAX)