xref: /linux/drivers/scsi/snic/vnic_snic.h (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
1 /*
2  * Copyright 2014 Cisco Systems, Inc.  All rights reserved.
3  *
4  * This program is free software; you may redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; version 2 of the License.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
9  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
11  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
12  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
13  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
15  * SOFTWARE.
16  */
17 
18 #ifndef _VNIC_SNIC_H_
19 #define _VNIC_SNIC_H_
20 
21 #define VNIC_SNIC_WQ_DESCS_MIN              64
22 #define VNIC_SNIC_WQ_DESCS_MAX              1024
23 
24 #define VNIC_SNIC_MAXDATAFIELDSIZE_MIN      256
25 #define VNIC_SNIC_MAXDATAFIELDSIZE_MAX      2112
26 
27 #define VNIC_SNIC_IO_THROTTLE_COUNT_MIN     1
28 #define VNIC_SNIC_IO_THROTTLE_COUNT_MAX     1024
29 
30 #define VNIC_SNIC_PORT_DOWN_TIMEOUT_MIN     0
31 #define VNIC_SNIC_PORT_DOWN_TIMEOUT_MAX     240000
32 
33 #define VNIC_SNIC_PORT_DOWN_IO_RETRIES_MIN  0
34 #define VNIC_SNIC_PORT_DOWN_IO_RETRIES_MAX  255
35 
36 #define VNIC_SNIC_LUNS_PER_TARGET_MIN       1
37 #define VNIC_SNIC_LUNS_PER_TARGET_MAX       1024
38 
39 /* Device-specific region: scsi configuration */
40 struct vnic_snic_config {
41 	u32 flags;
42 	u32 wq_enet_desc_count;
43 	u32 io_throttle_count;
44 	u32 port_down_timeout;
45 	u32 port_down_io_retries;
46 	u32 luns_per_tgt;
47 	u16 maxdatafieldsize;
48 	u16 intr_timer;
49 	u8 intr_timer_type;
50 	u8 _resvd2;
51 	u8 xpt_type;
52 	u8 hid;
53 };
54 #endif /* _VNIC_SNIC_H_ */
55