blob: 4b286e27c4ca5cdbbb7c457e31bef1b2e9e7bd94 [file] [log] [blame]
Alexandre TORGUE753a7102016-04-01 11:37:28 +02001/*
2 * This contains the functions to handle the descriptors for DesignWare databook
3 * 4.xx.
4 *
5 * Copyright (C) 2015 STMicroelectronics Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License,
9 * version 2, as published by the Free Software Foundation.
10 *
11 * Author: Alexandre Torgue <alexandre.torgue@st.com>
12 */
13
14#include <linux/stmmac.h>
15#include "common.h"
16#include "dwmac4_descs.h"
17
18static int dwmac4_wrback_get_tx_status(void *data, struct stmmac_extra_stats *x,
19 struct dma_desc *p,
20 void __iomem *ioaddr)
21{
22 struct net_device_stats *stats = (struct net_device_stats *)data;
23 unsigned int tdes3;
24 int ret = tx_done;
25
Michael Weiserf8be0d72016-11-14 18:58:05 +010026 tdes3 = le32_to_cpu(p->des3);
Alexandre TORGUE753a7102016-04-01 11:37:28 +020027
28 /* Get tx owner first */
29 if (unlikely(tdes3 & TDES3_OWN))
30 return tx_dma_own;
31
32 /* Verify tx error by looking at the last segment. */
33 if (likely(!(tdes3 & TDES3_LAST_DESCRIPTOR)))
34 return tx_not_ls;
35
36 if (unlikely(tdes3 & TDES3_ERROR_SUMMARY)) {
37 if (unlikely(tdes3 & TDES3_JABBER_TIMEOUT))
38 x->tx_jabber++;
39 if (unlikely(tdes3 & TDES3_PACKET_FLUSHED))
40 x->tx_frame_flushed++;
41 if (unlikely(tdes3 & TDES3_LOSS_CARRIER)) {
42 x->tx_losscarrier++;
43 stats->tx_carrier_errors++;
44 }
45 if (unlikely(tdes3 & TDES3_NO_CARRIER)) {
46 x->tx_carrier++;
47 stats->tx_carrier_errors++;
48 }
49 if (unlikely((tdes3 & TDES3_LATE_COLLISION) ||
50 (tdes3 & TDES3_EXCESSIVE_COLLISION)))
51 stats->collisions +=
52 (tdes3 & TDES3_COLLISION_COUNT_MASK)
53 >> TDES3_COLLISION_COUNT_SHIFT;
54
55 if (unlikely(tdes3 & TDES3_EXCESSIVE_DEFERRAL))
56 x->tx_deferred++;
57
58 if (unlikely(tdes3 & TDES3_UNDERFLOW_ERROR))
59 x->tx_underflow++;
60
61 if (unlikely(tdes3 & TDES3_IP_HDR_ERROR))
62 x->tx_ip_header_error++;
63
64 if (unlikely(tdes3 & TDES3_PAYLOAD_ERROR))
65 x->tx_payload_error++;
66
67 ret = tx_err;
68 }
69
70 if (unlikely(tdes3 & TDES3_DEFERRED))
71 x->tx_deferred++;
72
73 return ret;
74}
75
76static int dwmac4_wrback_get_rx_status(void *data, struct stmmac_extra_stats *x,
77 struct dma_desc *p)
78{
79 struct net_device_stats *stats = (struct net_device_stats *)data;
Michael Weiserf8be0d72016-11-14 18:58:05 +010080 unsigned int rdes1 = le32_to_cpu(p->des1);
81 unsigned int rdes2 = le32_to_cpu(p->des2);
82 unsigned int rdes3 = le32_to_cpu(p->des3);
Alexandre TORGUE753a7102016-04-01 11:37:28 +020083 int message_type;
84 int ret = good_frame;
85
86 if (unlikely(rdes3 & RDES3_OWN))
87 return dma_own;
88
89 /* Verify rx error by looking at the last segment. */
90 if (likely(!(rdes3 & RDES3_LAST_DESCRIPTOR)))
91 return discard_frame;
92
93 if (unlikely(rdes3 & RDES3_ERROR_SUMMARY)) {
94 if (unlikely(rdes3 & RDES3_GIANT_PACKET))
95 stats->rx_length_errors++;
96 if (unlikely(rdes3 & RDES3_OVERFLOW_ERROR))
97 x->rx_gmac_overflow++;
98
99 if (unlikely(rdes3 & RDES3_RECEIVE_WATCHDOG))
100 x->rx_watchdog++;
101
102 if (unlikely(rdes3 & RDES3_RECEIVE_ERROR))
103 x->rx_mii++;
104
105 if (unlikely(rdes3 & RDES3_CRC_ERROR)) {
LABBE Corentine0a76602017-02-08 09:31:17 +0100106 x->rx_crc_errors++;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200107 stats->rx_crc_errors++;
108 }
109
110 if (unlikely(rdes3 & RDES3_DRIBBLE_ERROR))
111 x->dribbling_bit++;
112
113 ret = discard_frame;
114 }
115
116 message_type = (rdes1 & ERDES4_MSG_TYPE_MASK) >> 8;
117
118 if (rdes1 & RDES1_IP_HDR_ERROR)
119 x->ip_hdr_err++;
120 if (rdes1 & RDES1_IP_CSUM_BYPASSED)
121 x->ip_csum_bypassed++;
122 if (rdes1 & RDES1_IPV4_HEADER)
123 x->ipv4_pkt_rcvd++;
124 if (rdes1 & RDES1_IPV6_HEADER)
125 x->ipv6_pkt_rcvd++;
Giuseppe CAVALLAROee112c12016-11-14 09:27:30 +0100126
127 if (message_type == RDES_EXT_NO_PTP)
128 x->no_ptp_rx_msg_type_ext++;
129 else if (message_type == RDES_EXT_SYNC)
130 x->ptp_rx_msg_type_sync++;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200131 else if (message_type == RDES_EXT_FOLLOW_UP)
Giuseppe CAVALLAROee112c12016-11-14 09:27:30 +0100132 x->ptp_rx_msg_type_follow_up++;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200133 else if (message_type == RDES_EXT_DELAY_REQ)
Giuseppe CAVALLAROee112c12016-11-14 09:27:30 +0100134 x->ptp_rx_msg_type_delay_req++;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200135 else if (message_type == RDES_EXT_DELAY_RESP)
Giuseppe CAVALLAROee112c12016-11-14 09:27:30 +0100136 x->ptp_rx_msg_type_delay_resp++;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200137 else if (message_type == RDES_EXT_PDELAY_REQ)
Giuseppe CAVALLAROee112c12016-11-14 09:27:30 +0100138 x->ptp_rx_msg_type_pdelay_req++;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200139 else if (message_type == RDES_EXT_PDELAY_RESP)
Giuseppe CAVALLAROee112c12016-11-14 09:27:30 +0100140 x->ptp_rx_msg_type_pdelay_resp++;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200141 else if (message_type == RDES_EXT_PDELAY_FOLLOW_UP)
Giuseppe CAVALLAROee112c12016-11-14 09:27:30 +0100142 x->ptp_rx_msg_type_pdelay_follow_up++;
143 else if (message_type == RDES_PTP_ANNOUNCE)
144 x->ptp_rx_msg_type_announce++;
145 else if (message_type == RDES_PTP_MANAGEMENT)
146 x->ptp_rx_msg_type_management++;
147 else if (message_type == RDES_PTP_PKT_RESERVED_TYPE)
148 x->ptp_rx_msg_pkt_reserved_type++;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200149
150 if (rdes1 & RDES1_PTP_PACKET_TYPE)
151 x->ptp_frame_type++;
152 if (rdes1 & RDES1_PTP_VER)
153 x->ptp_ver++;
154 if (rdes1 & RDES1_TIMESTAMP_DROPPED)
155 x->timestamp_dropped++;
156
157 if (unlikely(rdes2 & RDES2_SA_FILTER_FAIL)) {
158 x->sa_rx_filter_fail++;
159 ret = discard_frame;
160 }
161 if (unlikely(rdes2 & RDES2_DA_FILTER_FAIL)) {
162 x->da_rx_filter_fail++;
163 ret = discard_frame;
164 }
165
166 if (rdes2 & RDES2_L3_FILTER_MATCH)
167 x->l3_filter_match++;
168 if (rdes2 & RDES2_L4_FILTER_MATCH)
169 x->l4_filter_match++;
170 if ((rdes2 & RDES2_L3_L4_FILT_NB_MATCH_MASK)
171 >> RDES2_L3_L4_FILT_NB_MATCH_SHIFT)
172 x->l3_l4_filter_no_match++;
173
174 return ret;
175}
176
177static int dwmac4_rd_get_tx_len(struct dma_desc *p)
178{
Michael Weiserf8be0d72016-11-14 18:58:05 +0100179 return (le32_to_cpu(p->des2) & TDES2_BUFFER1_SIZE_MASK);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200180}
181
182static int dwmac4_get_tx_owner(struct dma_desc *p)
183{
Michael Weiserf8be0d72016-11-14 18:58:05 +0100184 return (le32_to_cpu(p->des3) & TDES3_OWN) >> TDES3_OWN_SHIFT;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200185}
186
187static void dwmac4_set_tx_owner(struct dma_desc *p)
188{
Michael Weiserf8be0d72016-11-14 18:58:05 +0100189 p->des3 |= cpu_to_le32(TDES3_OWN);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200190}
191
192static void dwmac4_set_rx_owner(struct dma_desc *p)
193{
Michael Weiserf8be0d72016-11-14 18:58:05 +0100194 p->des3 |= cpu_to_le32(RDES3_OWN);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200195}
196
197static int dwmac4_get_tx_ls(struct dma_desc *p)
198{
Michael Weiserf8be0d72016-11-14 18:58:05 +0100199 return (le32_to_cpu(p->des3) & TDES3_LAST_DESCRIPTOR)
200 >> TDES3_LAST_DESCRIPTOR_SHIFT;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200201}
202
203static int dwmac4_wrback_get_rx_frame_len(struct dma_desc *p, int rx_coe)
204{
Michael Weiserf8be0d72016-11-14 18:58:05 +0100205 return (le32_to_cpu(p->des3) & RDES3_PACKET_SIZE_MASK);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200206}
207
208static void dwmac4_rd_enable_tx_timestamp(struct dma_desc *p)
209{
Michael Weiserf8be0d72016-11-14 18:58:05 +0100210 p->des2 |= cpu_to_le32(TDES2_TIMESTAMP_ENABLE);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200211}
212
213static int dwmac4_wrback_get_tx_timestamp_status(struct dma_desc *p)
214{
Giuseppe CAVALLAROba1ffd72016-11-14 09:27:29 +0100215 /* Context type from W/B descriptor must be zero */
David S. Millerf9aa9dc2016-11-22 11:29:28 -0500216 if (le32_to_cpu(p->des3) & TDES3_CONTEXT_TYPE)
Mario Molitor33d4c482017-06-08 23:03:09 +0200217 return 0;
Giuseppe CAVALLAROba1ffd72016-11-14 09:27:29 +0100218
219 /* Tx Timestamp Status is 1 so des0 and des1'll have valid values */
David S. Millerf9aa9dc2016-11-22 11:29:28 -0500220 if (le32_to_cpu(p->des3) & TDES3_TIMESTAMP_STATUS)
Mario Molitor33d4c482017-06-08 23:03:09 +0200221 return 1;
Giuseppe CAVALLAROba1ffd72016-11-14 09:27:29 +0100222
Mario Molitor33d4c482017-06-08 23:03:09 +0200223 return 0;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200224}
225
Giuseppe CAVALLAROba1ffd72016-11-14 09:27:29 +0100226static inline u64 dwmac4_get_timestamp(void *desc, u32 ats)
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200227{
228 struct dma_desc *p = (struct dma_desc *)desc;
229 u64 ns;
230
Michael Weiserf8be0d72016-11-14 18:58:05 +0100231 ns = le32_to_cpu(p->des0);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200232 /* convert high/sec time stamp value to nanosecond */
Michael Weiserf8be0d72016-11-14 18:58:05 +0100233 ns += le32_to_cpu(p->des1) * 1000000000ULL;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200234
235 return ns;
236}
237
Giuseppe CAVALLAROba1ffd72016-11-14 09:27:29 +0100238static int dwmac4_rx_check_timestamp(void *desc)
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200239{
240 struct dma_desc *p = (struct dma_desc *)desc;
Giuseppe CAVALLAROba1ffd72016-11-14 09:27:29 +0100241 u32 own, ctxt;
242 int ret = 1;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200243
Giuseppe CAVALLAROba1ffd72016-11-14 09:27:29 +0100244 own = p->des3 & RDES3_OWN;
245 ctxt = ((p->des3 & RDES3_CONTEXT_DESCRIPTOR)
246 >> RDES3_CONTEXT_DESCRIPTOR_SHIFT);
247
248 if (likely(!own && ctxt)) {
249 if ((p->des0 == 0xffffffff) && (p->des1 == 0xffffffff))
250 /* Corrupted value */
251 ret = -EINVAL;
252 else
253 /* A valid Timestamp is ready to be read */
254 ret = 0;
255 }
256
257 /* Timestamp not ready */
258 return ret;
259}
260
261static int dwmac4_wrback_get_rx_timestamp_status(void *desc, u32 ats)
262{
263 struct dma_desc *p = (struct dma_desc *)desc;
264 int ret = -EINVAL;
265
266 /* Get the status from normal w/b descriptor */
267 if (likely(p->des3 & TDES3_RS1V)) {
David S. Millerf9aa9dc2016-11-22 11:29:28 -0500268 if (likely(le32_to_cpu(p->des1) & RDES1_TIMESTAMP_AVAILABLE)) {
Giuseppe CAVALLAROba1ffd72016-11-14 09:27:29 +0100269 int i = 0;
270
271 /* Check if timestamp is OK from context descriptor */
272 do {
273 ret = dwmac4_rx_check_timestamp(desc);
274 if (ret < 0)
275 goto exit;
276 i++;
277
Jose Abreu94543602017-10-20 14:37:36 +0100278 } while ((ret == 1) && (i < 10));
Giuseppe CAVALLAROba1ffd72016-11-14 09:27:29 +0100279
280 if (i == 10)
281 ret = -EBUSY;
282 }
283 }
284exit:
Mario Molitor33d4c482017-06-08 23:03:09 +0200285 if (likely(ret == 0))
286 return 1;
287
288 return 0;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200289}
290
291static void dwmac4_rd_init_rx_desc(struct dma_desc *p, int disable_rx_ic,
292 int mode, int end)
293{
Michael Weiserf8be0d72016-11-14 18:58:05 +0100294 p->des3 = cpu_to_le32(RDES3_OWN | RDES3_BUFFER1_VALID_ADDR);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200295
296 if (!disable_rx_ic)
Michael Weiserf8be0d72016-11-14 18:58:05 +0100297 p->des3 |= cpu_to_le32(RDES3_INT_ON_COMPLETION_EN);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200298}
299
300static void dwmac4_rd_init_tx_desc(struct dma_desc *p, int mode, int end)
301{
302 p->des0 = 0;
303 p->des1 = 0;
304 p->des2 = 0;
305 p->des3 = 0;
306}
307
308static void dwmac4_rd_prepare_tx_desc(struct dma_desc *p, int is_fs, int len,
309 bool csum_flag, int mode, bool tx_own,
Niklas Casselfe6af0e2017-04-10 20:33:29 +0200310 bool ls, unsigned int tot_pkt_len)
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200311{
Michael Weiserf8be0d72016-11-14 18:58:05 +0100312 unsigned int tdes3 = le32_to_cpu(p->des3);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200313
Michael Weiserf8be0d72016-11-14 18:58:05 +0100314 p->des2 |= cpu_to_le32(len & TDES2_BUFFER1_SIZE_MASK);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200315
Niklas Casselfe6af0e2017-04-10 20:33:29 +0200316 tdes3 |= tot_pkt_len & TDES3_PACKET_SIZE_MASK;
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200317 if (is_fs)
318 tdes3 |= TDES3_FIRST_DESCRIPTOR;
319 else
320 tdes3 &= ~TDES3_FIRST_DESCRIPTOR;
321
322 if (likely(csum_flag))
323 tdes3 |= (TX_CIC_FULL << TDES3_CHECKSUM_INSERTION_SHIFT);
324 else
325 tdes3 &= ~(TX_CIC_FULL << TDES3_CHECKSUM_INSERTION_SHIFT);
326
327 if (ls)
328 tdes3 |= TDES3_LAST_DESCRIPTOR;
329 else
330 tdes3 &= ~TDES3_LAST_DESCRIPTOR;
331
332 /* Finally set the OWN bit. Later the DMA will start! */
333 if (tx_own)
334 tdes3 |= TDES3_OWN;
335
336 if (is_fs & tx_own)
337 /* When the own bit, for the first frame, has to be set, all
338 * descriptors for the same frame has to be set before, to
339 * avoid race condition.
340 */
Pavel Machekad688cd2016-12-18 21:38:12 +0100341 dma_wmb();
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200342
Michael Weiserf8be0d72016-11-14 18:58:05 +0100343 p->des3 = cpu_to_le32(tdes3);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200344}
345
346static void dwmac4_rd_prepare_tso_tx_desc(struct dma_desc *p, int is_fs,
347 int len1, int len2, bool tx_own,
348 bool ls, unsigned int tcphdrlen,
349 unsigned int tcppayloadlen)
350{
Michael Weiserf8be0d72016-11-14 18:58:05 +0100351 unsigned int tdes3 = le32_to_cpu(p->des3);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200352
353 if (len1)
Michael Weiserf8be0d72016-11-14 18:58:05 +0100354 p->des2 |= cpu_to_le32((len1 & TDES2_BUFFER1_SIZE_MASK));
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200355
356 if (len2)
Michael Weiserf8be0d72016-11-14 18:58:05 +0100357 p->des2 |= cpu_to_le32((len2 << TDES2_BUFFER2_SIZE_MASK_SHIFT)
358 & TDES2_BUFFER2_SIZE_MASK);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200359
360 if (is_fs) {
361 tdes3 |= TDES3_FIRST_DESCRIPTOR |
362 TDES3_TCP_SEGMENTATION_ENABLE |
363 ((tcphdrlen << TDES3_HDR_LEN_SHIFT) &
364 TDES3_SLOT_NUMBER_MASK) |
365 ((tcppayloadlen & TDES3_TCP_PKT_PAYLOAD_MASK));
366 } else {
367 tdes3 &= ~TDES3_FIRST_DESCRIPTOR;
368 }
369
370 if (ls)
371 tdes3 |= TDES3_LAST_DESCRIPTOR;
372 else
373 tdes3 &= ~TDES3_LAST_DESCRIPTOR;
374
375 /* Finally set the OWN bit. Later the DMA will start! */
376 if (tx_own)
377 tdes3 |= TDES3_OWN;
378
379 if (is_fs & tx_own)
380 /* When the own bit, for the first frame, has to be set, all
381 * descriptors for the same frame has to be set before, to
382 * avoid race condition.
383 */
Pavel Machekad688cd2016-12-18 21:38:12 +0100384 dma_wmb();
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200385
Michael Weiserf8be0d72016-11-14 18:58:05 +0100386 p->des3 = cpu_to_le32(tdes3);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200387}
388
389static void dwmac4_release_tx_desc(struct dma_desc *p, int mode)
390{
391 p->des2 = 0;
392 p->des3 = 0;
393}
394
395static void dwmac4_rd_set_tx_ic(struct dma_desc *p)
396{
Michael Weiserf8be0d72016-11-14 18:58:05 +0100397 p->des2 |= cpu_to_le32(TDES2_INTERRUPT_ON_COMPLETION);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200398}
399
400static void dwmac4_display_ring(void *head, unsigned int size, bool rx)
401{
402 struct dma_desc *p = (struct dma_desc *)head;
403 int i;
404
405 pr_info("%s descriptor ring:\n", rx ? "RX" : "TX");
406
407 for (i = 0; i < size; i++) {
Giuseppe CAVALLARO8be03282016-10-20 10:01:28 +0200408 pr_info("%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n",
409 i, (unsigned int)virt_to_phys(p),
Michael Weiserf8be0d72016-11-14 18:58:05 +0100410 le32_to_cpu(p->des0), le32_to_cpu(p->des1),
411 le32_to_cpu(p->des2), le32_to_cpu(p->des3));
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200412 p++;
413 }
414}
415
416static void dwmac4_set_mss_ctxt(struct dma_desc *p, unsigned int mss)
417{
418 p->des0 = 0;
419 p->des1 = 0;
Michael Weiserf8be0d72016-11-14 18:58:05 +0100420 p->des2 = cpu_to_le32(mss);
421 p->des3 = cpu_to_le32(TDES3_CONTEXT_TYPE | TDES3_CTXT_TCMSSV);
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200422}
423
424const struct stmmac_desc_ops dwmac4_desc_ops = {
425 .tx_status = dwmac4_wrback_get_tx_status,
426 .rx_status = dwmac4_wrback_get_rx_status,
427 .get_tx_len = dwmac4_rd_get_tx_len,
428 .get_tx_owner = dwmac4_get_tx_owner,
429 .set_tx_owner = dwmac4_set_tx_owner,
430 .set_rx_owner = dwmac4_set_rx_owner,
431 .get_tx_ls = dwmac4_get_tx_ls,
432 .get_rx_frame_len = dwmac4_wrback_get_rx_frame_len,
433 .enable_tx_timestamp = dwmac4_rd_enable_tx_timestamp,
434 .get_tx_timestamp_status = dwmac4_wrback_get_tx_timestamp_status,
Giuseppe CAVALLAROba1ffd72016-11-14 09:27:29 +0100435 .get_rx_timestamp_status = dwmac4_wrback_get_rx_timestamp_status,
436 .get_timestamp = dwmac4_get_timestamp,
Alexandre TORGUE753a7102016-04-01 11:37:28 +0200437 .set_tx_ic = dwmac4_rd_set_tx_ic,
438 .prepare_tx_desc = dwmac4_rd_prepare_tx_desc,
439 .prepare_tso_tx_desc = dwmac4_rd_prepare_tso_tx_desc,
440 .release_tx_desc = dwmac4_release_tx_desc,
441 .init_rx_desc = dwmac4_rd_init_rx_desc,
442 .init_tx_desc = dwmac4_rd_init_tx_desc,
443 .display_ring = dwmac4_display_ring,
444 .set_mss = dwmac4_set_mss_ctxt,
445};
446
447const struct stmmac_mode_ops dwmac4_ring_mode_ops = { };