1
2
3
4
5
6
7#include "efx.h"
8#include "efx_impl.h"
9
10
11#if EFSYS_OPT_RIVERHEAD
12
13 __checkReturn efx_rc_t
14rhead_tx_init(
15 __in efx_nic_t *enp)
16{
17 _NOTE(ARGUNUSED(enp))
18
19 return (0);
20}
21
22 void
23rhead_tx_fini(
24 __in efx_nic_t *enp)
25{
26 _NOTE(ARGUNUSED(enp))
27
28}
29
30 __checkReturn efx_rc_t
31rhead_tx_qcreate(
32 __in efx_nic_t *enp,
33 __in unsigned int index,
34 __in unsigned int label,
35 __in efsys_mem_t *esmp,
36 __in size_t ndescs,
37 __in uint32_t id,
38 __in uint16_t flags,
39 __in efx_evq_t *eep,
40 __in efx_txq_t *etp,
41 __out unsigned int *addedp)
42{
43 efx_rc_t rc;
44
45
46
47
48
49 _NOTE(ARGUNUSED(id))
50
51 if ((rc = efx_mcdi_init_txq(enp, ndescs, eep->ee_index, label, index,
52 flags, esmp)) != 0)
53 goto fail1;
54
55
56
57
58
59 *addedp = 0;
60
61 return (0);
62
63fail1:
64 EFSYS_PROBE1(fail1, efx_rc_t, rc);
65
66 return (rc);
67}
68
69 void
70rhead_tx_qdestroy(
71 __in efx_txq_t *etp)
72{
73 _NOTE(ARGUNUSED(etp))
74
75}
76
77 __checkReturn efx_rc_t
78rhead_tx_qpost(
79 __in efx_txq_t *etp,
80 __in_ecount(ndescs) efx_buffer_t *eb,
81 __in unsigned int ndescs,
82 __in unsigned int completed,
83 __inout unsigned int *addedp)
84{
85 _NOTE(ARGUNUSED(etp))
86 _NOTE(ARGUNUSED(eb))
87 _NOTE(ARGUNUSED(ndescs))
88 _NOTE(ARGUNUSED(completed))
89 _NOTE(ARGUNUSED(addedp))
90
91
92
93 return (ENOTSUP);
94}
95
96 void
97rhead_tx_qpush(
98 __in efx_txq_t *etp,
99 __in unsigned int added,
100 __in unsigned int pushed)
101{
102 _NOTE(ARGUNUSED(etp, added, pushed))
103
104
105 EFSYS_ASSERT(B_FALSE);
106}
107
108 __checkReturn efx_rc_t
109rhead_tx_qpace(
110 __in efx_txq_t *etp,
111 __in unsigned int ns)
112{
113 _NOTE(ARGUNUSED(etp))
114 _NOTE(ARGUNUSED(ns))
115
116
117
118 return (ENOTSUP);
119}
120
121 __checkReturn efx_rc_t
122rhead_tx_qflush(
123 __in efx_txq_t *etp)
124{
125 efx_nic_t *enp = etp->et_enp;
126 efx_rc_t rc;
127
128 if ((rc = efx_mcdi_fini_txq(enp, etp->et_index)) != 0)
129 goto fail1;
130
131 return (0);
132
133fail1:
134
135
136
137
138
139
140 if (rc != EALREADY)
141 EFSYS_PROBE1(fail1, efx_rc_t, rc);
142
143 return (rc);
144}
145
146 void
147rhead_tx_qenable(
148 __in efx_txq_t *etp)
149{
150 _NOTE(ARGUNUSED(etp))
151
152}
153
154 __checkReturn efx_rc_t
155rhead_tx_qdesc_post(
156 __in efx_txq_t *etp,
157 __in_ecount(ndescs) efx_desc_t *ed,
158 __in unsigned int ndescs,
159 __in unsigned int completed,
160 __inout unsigned int *addedp)
161{
162 _NOTE(ARGUNUSED(etp))
163 _NOTE(ARGUNUSED(ed))
164 _NOTE(ARGUNUSED(ndescs))
165 _NOTE(ARGUNUSED(completed))
166 _NOTE(ARGUNUSED(addedp))
167
168
169
170 return (ENOTSUP);
171}
172
173#if EFSYS_OPT_QSTATS
174
175 void
176rhead_tx_qstats_update(
177 __in efx_txq_t *etp,
178 __inout_ecount(TX_NQSTATS) efsys_stat_t *stat)
179{
180 unsigned int id;
181
182 for (id = 0; id < TX_NQSTATS; id++) {
183 efsys_stat_t *essp = &stat[id];
184
185 EFSYS_STAT_INCR(essp, etp->et_stat[id]);
186 etp->et_stat[id] = 0;
187 }
188}
189
190#endif
191
192#endif
193