95 #ifdef STMMAC_VLAN_TAG_USED
105 static int enh_desc_get_tx_len(
struct dma_desc *p)
110 static int enh_desc_coe_rdes0(
int ipc_err,
int type,
int payload_err)
113 u32 status = (type << 2 | ipc_err << 1 | payload_err) & 0x7;
129 }
else if (status == 0x4) {
132 }
else if (status == 0x5) {
135 }
else if (status == 0x6) {
138 }
else if (status == 0x7) {
140 "RX Des0 status: IPv4/6 Header and Payload Error.\n");
142 }
else if (status == 0x1) {
144 "RX Des0 status: IPv4/6 unsupported IP PAYLOAD.\n");
146 }
else if (status == 0x3) {
200 ret = enh_desc_coe_rdes0(p->
des01.
erx.ipc_csum_error,
222 #ifdef STMMAC_VLAN_TAG_USED
239 ehn_desc_rx_set_on_ring_chain(p, (i == ring_size - 1));
247 static void enh_desc_init_tx_desc(
struct dma_desc *p,
unsigned int ring_size)
253 ehn_desc_tx_set_on_ring_chain(p, (i == ring_size - 1));
258 static int enh_desc_get_tx_owner(
struct dma_desc *p)
263 static int enh_desc_get_rx_owner(
struct dma_desc *p)
268 static void enh_desc_set_tx_owner(
struct dma_desc *p)
273 static void enh_desc_set_rx_owner(
struct dma_desc *p)
278 static int enh_desc_get_tx_ls(
struct dma_desc *p)
283 static void enh_desc_release_tx_desc(
struct dma_desc *p)
288 enh_desc_end_tx_desc(p, ter);
291 static void enh_desc_prepare_tx_desc(
struct dma_desc *p,
int is_fs,
int len,
296 enh_set_tx_desc_len(p, len);
302 static void enh_desc_clear_tx_ic(
struct dma_desc *p)
307 static void enh_desc_close_tx_desc(
struct dma_desc *p)
313 static int enh_desc_get_rx_frame_len(
struct dma_desc *p,
int rx_coe_type)
321 return p->
des01.
erx.frame_length - 2;
327 .tx_status = enh_desc_get_tx_status,
328 .rx_status = enh_desc_get_rx_status,
329 .get_tx_len = enh_desc_get_tx_len,
330 .init_rx_desc = enh_desc_init_rx_desc,
331 .init_tx_desc = enh_desc_init_tx_desc,
332 .get_tx_owner = enh_desc_get_tx_owner,
333 .get_rx_owner = enh_desc_get_rx_owner,
334 .release_tx_desc = enh_desc_release_tx_desc,
335 .prepare_tx_desc = enh_desc_prepare_tx_desc,
336 .clear_tx_ic = enh_desc_clear_tx_ic,
337 .close_tx_desc = enh_desc_close_tx_desc,
338 .get_tx_ls = enh_desc_get_tx_ls,
339 .set_tx_owner = enh_desc_set_tx_owner,
340 .set_rx_owner = enh_desc_set_rx_owner,
341 .get_rx_frame_len = enh_desc_get_rx_frame_len,