1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright 2008 Cisco Systems, Inc. All rights reserved.
4 * Copyright 2007 Nuova Systems, Inc. All rights reserved.
9 #define VNIC_FNIC_WQ_COPY_COUNT_MIN 1
10 #define VNIC_FNIC_WQ_COPY_COUNT_MAX 1
12 #define VNIC_FNIC_WQ_DESCS_MIN 64
13 #define VNIC_FNIC_WQ_DESCS_MAX 128
15 #define VNIC_FNIC_WQ_COPY_DESCS_MIN 64
16 #define VNIC_FNIC_WQ_COPY_DESCS_MAX 512
18 #define VNIC_FNIC_RQ_DESCS_MIN 64
19 #define VNIC_FNIC_RQ_DESCS_MAX 128
21 #define VNIC_FNIC_EDTOV_MIN 1000
22 #define VNIC_FNIC_EDTOV_MAX 255000
23 #define VNIC_FNIC_EDTOV_DEF 2000
25 #define VNIC_FNIC_RATOV_MIN 1000
26 #define VNIC_FNIC_RATOV_MAX 255000
28 #define VNIC_FNIC_MAXDATAFIELDSIZE_MIN 256
29 #define VNIC_FNIC_MAXDATAFIELDSIZE_MAX 2048
31 #define VNIC_FNIC_FLOGI_RETRIES_MIN 0
32 #define VNIC_FNIC_FLOGI_RETRIES_MAX 0xffffffff
33 #define VNIC_FNIC_FLOGI_RETRIES_DEF 0xffffffff
35 #define VNIC_FNIC_FLOGI_TIMEOUT_MIN 1000
36 #define VNIC_FNIC_FLOGI_TIMEOUT_MAX 255000
38 #define VNIC_FNIC_PLOGI_RETRIES_MIN 0
39 #define VNIC_FNIC_PLOGI_RETRIES_MAX 255
40 #define VNIC_FNIC_PLOGI_RETRIES_DEF 8
42 #define VNIC_FNIC_PLOGI_TIMEOUT_MIN 1000
43 #define VNIC_FNIC_PLOGI_TIMEOUT_MAX 255000
45 #define VNIC_FNIC_IO_THROTTLE_COUNT_MIN 1
46 #define VNIC_FNIC_IO_THROTTLE_COUNT_MAX 2048
48 #define VNIC_FNIC_LINK_DOWN_TIMEOUT_MIN 0
49 #define VNIC_FNIC_LINK_DOWN_TIMEOUT_MAX 240000
51 #define VNIC_FNIC_PORT_DOWN_TIMEOUT_MIN 0
52 #define VNIC_FNIC_PORT_DOWN_TIMEOUT_MAX 240000
54 #define VNIC_FNIC_PORT_DOWN_IO_RETRIES_MIN 0
55 #define VNIC_FNIC_PORT_DOWN_IO_RETRIES_MAX 255
57 #define VNIC_FNIC_LUNS_PER_TARGET_MIN 1
58 #define VNIC_FNIC_LUNS_PER_TARGET_MAX 4096
60 /* Device-specific region: scsi configuration */
61 struct vnic_fc_config
{
65 u32 wq_enet_desc_count
;
66 u32 wq_copy_desc_count
;
72 u32 io_throttle_count
;
73 u32 link_down_timeout
;
74 u32 port_down_timeout
;
75 u32 port_down_io_retries
;
88 #define VFCF_FCP_SEQ_LVL_ERR 0x1 /* Enable FCP-2 Error Recovery */
89 #define VFCF_PERBI 0x2 /* persistent binding info available */
90 #define VFCF_FIP_CAPABLE 0x4 /* firmware can handle FIP */
92 #define VFCF_FC_INITIATOR 0x20 /* FC Initiator Mode */
93 #define VFCF_FC_TARGET 0x40 /* FC Target Mode */
94 #define VFCF_FC_NVME_INITIATOR 0x80 /* FC-NVMe Initiator Mode */
95 #define VFCF_FC_NVME_TARGET 0x100 /* FC-NVMe Target Mode */
97 #endif /* _VNIC_SCSI_H_ */