Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vfdi.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Driver for Solarflare Solarstorm network controllers and boards
3  * Copyright 2010-2012 Solarflare Communications Inc.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 as published
7  * by the Free Software Foundation, incorporated herein by reference.
8  */
9 #ifndef _VFDI_H
10 #define _VFDI_H
11 
75 #define VFDI_EV_SEQ_LBN 24
76 #define VFDI_EV_SEQ_WIDTH 8
77 #define VFDI_EV_TYPE_LBN 16
78 #define VFDI_EV_TYPE_WIDTH 8
79 #define VFDI_EV_TYPE_REQ_WORD0 0
80 #define VFDI_EV_TYPE_REQ_WORD1 1
81 #define VFDI_EV_TYPE_REQ_WORD2 2
82 #define VFDI_EV_TYPE_REQ_WORD3 3
83 #define VFDI_EV_TYPE_STATUS 4
84 #define VFDI_EV_TYPE_RESET 5
85 #define VFDI_EV_DATA_LBN 0
86 #define VFDI_EV_DATA_WIDTH 16
87 
88 struct vfdi_endpoint {
91 };
92 
108 enum vfdi_op {
119 };
120 
121 /* Response codes for VFDI operations. Other values may be used in future. */
122 #define VFDI_RC_SUCCESS 0
123 #define VFDI_RC_ENOMEM (-12)
124 #define VFDI_RC_EINVAL (-22)
125 #define VFDI_RC_EOPNOTSUPP (-95)
126 #define VFDI_RC_ETIMEDOUT (-110)
127 
165 struct vfdi_req {
170  union {
171  struct {
175  } init_evq;
176  struct {
177  u32 index;
178  u32 buf_count;
182 #define VFDI_RXQ_FLAG_SCATTER_EN 1
184  u64 addr[];
185  } init_rxq;
186  struct {
187  u32 index;
188  u32 buf_count;
189  u32 evq;
190  u32 label;
191  u32 flags;
192 #define VFDI_TXQ_FLAG_IP_CSUM_DIS 1
193 #define VFDI_TXQ_FLAG_TCPUDP_CSUM_DIS 2
194  u32 reserved;
195  u64 addr[];
196  } init_txq;
197  struct {
199  u32 flags;
200 #define VFDI_MAC_FILTER_FLAG_RSS 1
201 #define VFDI_MAC_FILTER_FLAG_SCATTER 2
202  } mac_filter;
203  struct {
207  } set_status_page;
208  } u;
209 };
210 
237 struct vfdi_status {
249  struct vfdi_endpoint peers[256];
250 
251  /* Members below here extend version 1 of this structure */
253 };
254 
255 #endif