Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / dev / pci / cxgb_ctl_defs.h
blobb92366267c391c2f65abdc46236b0d9b7a652df6
1 /*
2 * Copyright (C) 2003-2006 Chelsio Communications. All rights reserved.
4 * This program is distributed in the hope that it will be useful, but WITHOUT
5 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6 * FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file included in this
7 * release for licensing terms and conditions.
9 * $FreeBSD: src/sys/dev/cxgb/common/cxgb_ctl_defs.h,v 1.3 2007/09/09 01:28:03 kmacy Exp $
12 #ifndef _CXGB3_OFFLOAD_CTL_DEFS_H
13 #define _CXGB3_OFFLOAD_CTL_DEFS_H
15 enum {
16 GET_MAX_OUTSTANDING_WR,
17 GET_TX_MAX_CHUNK,
18 GET_TID_RANGE,
19 GET_STID_RANGE,
20 GET_RTBL_RANGE,
21 GET_L2T_CAPACITY,
22 GET_MTUS,
23 GET_WR_LEN,
24 GET_IFF_FROM_MAC,
25 GET_DDP_PARAMS,
26 GET_PORTS,
28 ULP_ISCSI_GET_PARAMS,
29 ULP_ISCSI_SET_PARAMS,
31 RDMA_GET_PARAMS,
32 RDMA_CQ_OP,
33 RDMA_CQ_SETUP,
34 RDMA_CQ_DISABLE,
35 RDMA_CTRL_QP_SETUP,
36 RDMA_GET_MEM,
38 FAILOVER = 30,
39 FAILOVER_DONE = 31,
40 FAILOVER_CLEAR = 32,
42 GET_CPUIDX_OF_QSET = 40,
44 GET_RX_PAGE_INFO = 50,
48 * Structure used to describe a TID range. Valid TIDs are [base, base+num).
50 struct tid_range {
51 unsigned int base; /* first TID */
52 unsigned int num; /* number of TIDs in range */
56 * Structure used to request the size and contents of the MTU table.
58 struct mtutab {
59 unsigned int size; /* # of entries in the MTU table */
60 const unsigned short *mtus; /* the MTU table values */
63 struct net_device;
66 * Structure used to request the adapter net_device owning a given MAC address.
68 struct iff_mac {
69 struct net_device *dev; /* the net_device */
70 const unsigned char *mac_addr; /* MAC address to lookup */
71 u16 vlan_tag;
74 struct pci_dev;
77 * Structure used to request the TCP DDP parameters.
79 struct ddp_params {
80 unsigned int llimit; /* TDDP region start address */
81 unsigned int ulimit; /* TDDP region end address */
82 unsigned int tag_mask; /* TDDP tag mask */
83 struct pci_dev *pdev;
86 struct adap_ports {
87 unsigned int nports; /* number of ports on this adapter */
88 struct net_device *lldevs[2];
92 * Structure used to return information to the iscsi layer.
94 struct ulp_iscsi_info {
95 unsigned int offset;
96 unsigned int llimit;
97 unsigned int ulimit;
98 unsigned int tagmask;
99 unsigned int pgsz3;
100 unsigned int pgsz2;
101 unsigned int pgsz1;
102 unsigned int pgsz0;
103 unsigned int max_rxsz;
104 unsigned int max_txsz;
105 struct pci_dev *pdev;
109 * Offload TX/RX page information.
111 struct ofld_page_info {
112 unsigned int page_size; /* Page size, should be a power of 2 */
113 unsigned int num; /* Number of pages */
117 * Structure used to return information to the RDMA layer.
119 struct rdma_info {
120 unsigned int tpt_base; /* TPT base address */
121 unsigned int tpt_top; /* TPT last entry address */
122 unsigned int pbl_base; /* PBL base address */
123 unsigned int pbl_top; /* PBL last entry address */
124 unsigned int rqt_base; /* RQT base address */
125 unsigned int rqt_top; /* RQT last entry address */
126 unsigned int udbell_len; /* user doorbell region length */
127 unsigned long udbell_physbase; /* user doorbell physical start addr */
128 void volatile *kdb_addr; /* kernel doorbell register address */
129 struct pci_dev *pdev; /* associated PCI device */
133 * Structure used to request an operation on an RDMA completion queue.
135 struct rdma_cq_op {
136 unsigned int id;
137 unsigned int op;
138 unsigned int credits;
142 * Structure used to setup RDMA completion queues.
144 struct rdma_cq_setup {
145 unsigned int id;
146 unsigned long long base_addr;
147 unsigned int size;
148 unsigned int credits;
149 unsigned int credit_thres;
150 unsigned int ovfl_mode;
154 * Structure used to setup the RDMA control egress context.
156 struct rdma_ctrlqp_setup {
157 unsigned long long base_addr;
158 unsigned int size;
160 #endif /* _CXGB3_OFFLOAD_CTL_DEFS_H */