2 * Copyright 2008 Cisco Systems, Inc. All rights reserved.
3 * Copyright 2007 Nuova Systems, Inc. All rights reserved.
5 * This program is free software; you may redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
9 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
10 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
12 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
13 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
14 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
15 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 #define VNIC_FNIC_WQ_COPY_COUNT_MIN 1
22 #define VNIC_FNIC_WQ_COPY_COUNT_MAX 1
24 #define VNIC_FNIC_WQ_DESCS_MIN 64
25 #define VNIC_FNIC_WQ_DESCS_MAX 128
27 #define VNIC_FNIC_WQ_COPY_DESCS_MIN 64
28 #define VNIC_FNIC_WQ_COPY_DESCS_MAX 512
30 #define VNIC_FNIC_RQ_DESCS_MIN 64
31 #define VNIC_FNIC_RQ_DESCS_MAX 128
33 #define VNIC_FNIC_EDTOV_MIN 1000
34 #define VNIC_FNIC_EDTOV_MAX 255000
35 #define VNIC_FNIC_EDTOV_DEF 2000
37 #define VNIC_FNIC_RATOV_MIN 1000
38 #define VNIC_FNIC_RATOV_MAX 255000
40 #define VNIC_FNIC_MAXDATAFIELDSIZE_MIN 256
41 #define VNIC_FNIC_MAXDATAFIELDSIZE_MAX 2112
43 #define VNIC_FNIC_FLOGI_RETRIES_MIN 0
44 #define VNIC_FNIC_FLOGI_RETRIES_MAX 0xffffffff
45 #define VNIC_FNIC_FLOGI_RETRIES_DEF 0xffffffff
47 #define VNIC_FNIC_FLOGI_TIMEOUT_MIN 1000
48 #define VNIC_FNIC_FLOGI_TIMEOUT_MAX 255000
50 #define VNIC_FNIC_PLOGI_RETRIES_MIN 0
51 #define VNIC_FNIC_PLOGI_RETRIES_MAX 255
52 #define VNIC_FNIC_PLOGI_RETRIES_DEF 8
54 #define VNIC_FNIC_PLOGI_TIMEOUT_MIN 1000
55 #define VNIC_FNIC_PLOGI_TIMEOUT_MAX 255000
57 #define VNIC_FNIC_IO_THROTTLE_COUNT_MIN 1
58 #define VNIC_FNIC_IO_THROTTLE_COUNT_MAX 2048
60 #define VNIC_FNIC_LINK_DOWN_TIMEOUT_MIN 0
61 #define VNIC_FNIC_LINK_DOWN_TIMEOUT_MAX 240000
63 #define VNIC_FNIC_PORT_DOWN_TIMEOUT_MIN 0
64 #define VNIC_FNIC_PORT_DOWN_TIMEOUT_MAX 240000
66 #define VNIC_FNIC_PORT_DOWN_IO_RETRIES_MIN 0
67 #define VNIC_FNIC_PORT_DOWN_IO_RETRIES_MAX 255
69 #define VNIC_FNIC_LUNS_PER_TARGET_MIN 1
70 #define VNIC_FNIC_LUNS_PER_TARGET_MAX 1024
72 /* Device-specific region: scsi configuration */
73 struct vnic_fc_config {
77 u32 wq_enet_desc_count;
78 u32 wq_copy_desc_count;
84 u32 io_throttle_count;
85 u32 link_down_timeout;
86 u32 port_down_timeout;
87 u32 port_down_io_retries;
96 #define VFCF_FCP_SEQ_LVL_ERR 0x1 /* Enable FCP-2 Error Recovery */
97 #define VFCF_PERBI 0x2 /* persistent binding info available */
98 #define VFCF_FIP_CAPABLE 0x4 /* firmware can handle FIP */
100 #endif /* _VNIC_SCSI_H_ */