Lines Matching +full:6 +full:bd
62 #define MODER_IFG (1 << 6) /* interframe gap for incoming frames */
81 #define INT_MASK_RXC (1 << 6) /* receive control frame */
159 #define RX_BD_OR (1 << 6) /* receiver overrun */
254 struct ethoc_bd *bd) in ethoc_read_bd() argument
257 bd->stat = ethoc_read(dev, offset + 0); in ethoc_read_bd()
258 bd->addr = ethoc_read(dev, offset + 4); in ethoc_read_bd()
262 const struct ethoc_bd *bd) in ethoc_write_bd() argument
265 ethoc_write(dev, offset + 0, bd->stat); in ethoc_write_bd()
266 ethoc_write(dev, offset + 4, bd->addr); in ethoc_write_bd()
304 struct ethoc_bd bd; in ethoc_init_ring() local
315 bd.addr = mem_start; in ethoc_init_ring()
316 bd.stat = TX_BD_IRQ | TX_BD_CRC; in ethoc_init_ring()
321 bd.stat |= TX_BD_WRAP; in ethoc_init_ring()
323 ethoc_write_bd(dev, i, &bd); in ethoc_init_ring()
324 bd.addr += ETHOC_BUFSIZ; in ethoc_init_ring()
330 bd.stat = RX_BD_EMPTY | RX_BD_IRQ; in ethoc_init_ring()
334 bd.stat |= RX_BD_WRAP; in ethoc_init_ring()
336 ethoc_write_bd(dev, dev->num_tx + i, &bd); in ethoc_init_ring()
337 bd.addr += ETHOC_BUFSIZ; in ethoc_init_ring()
374 struct ethoc_bd *bd) in ethoc_update_rx_stats() argument
379 if (bd->stat & RX_BD_TL) { in ethoc_update_rx_stats()
385 if (bd->stat & RX_BD_SF) { in ethoc_update_rx_stats()
391 if (bd->stat & RX_BD_DN) { in ethoc_update_rx_stats()
396 if (bd->stat & RX_BD_CRC) { in ethoc_update_rx_stats()
402 if (bd->stat & RX_BD_OR) { in ethoc_update_rx_stats()
408 if (bd->stat & RX_BD_MISS) in ethoc_update_rx_stats()
411 if (bd->stat & RX_BD_LC) { in ethoc_update_rx_stats()
427 struct ethoc_bd bd; in ethoc_rx() local
430 ethoc_read_bd(priv, entry, &bd); in ethoc_rx()
431 if (bd.stat & RX_BD_EMPTY) { in ethoc_rx()
440 ethoc_read_bd(priv, entry, &bd); in ethoc_rx()
441 if (bd.stat & RX_BD_EMPTY) in ethoc_rx()
445 if (ethoc_update_rx_stats(priv, &bd) == 0) { in ethoc_rx()
446 int size = bd.stat >> 16; in ethoc_rx()
470 bd.stat &= ~RX_BD_STATS; in ethoc_rx()
471 bd.stat |= RX_BD_EMPTY; in ethoc_rx()
472 ethoc_write_bd(priv, entry, &bd); in ethoc_rx()
480 static void ethoc_update_tx_stats(struct ethoc *dev, struct ethoc_bd *bd) in ethoc_update_tx_stats() argument
484 if (bd->stat & TX_BD_LC) { in ethoc_update_tx_stats()
489 if (bd->stat & TX_BD_RL) { in ethoc_update_tx_stats()
494 if (bd->stat & TX_BD_UR) { in ethoc_update_tx_stats()
499 if (bd->stat & TX_BD_CS) { in ethoc_update_tx_stats()
504 if (bd->stat & TX_BD_STATS) in ethoc_update_tx_stats()
507 netdev->stats.collisions += (bd->stat >> 4) & 0xf; in ethoc_update_tx_stats()
508 netdev->stats.tx_bytes += bd->stat >> 16; in ethoc_update_tx_stats()
516 struct ethoc_bd bd; in ethoc_tx() local
523 ethoc_read_bd(priv, entry, &bd); in ethoc_tx()
525 if (bd.stat & TX_BD_READY || (priv->dty_tx == priv->cur_tx)) { in ethoc_tx()
527 /* If interrupt came in between reading in the BD in ethoc_tx()
534 ethoc_read_bd(priv, entry, &bd); in ethoc_tx()
535 if (bd.stat & TX_BD_READY || in ethoc_tx()
540 ethoc_update_tx_stats(priv, &bd); in ethoc_tx()
883 struct ethoc_bd bd; in ethoc_start_xmit() local
901 ethoc_read_bd(priv, entry, &bd); in ethoc_start_xmit()
903 bd.stat |= TX_BD_PAD; in ethoc_start_xmit()
905 bd.stat &= ~TX_BD_PAD; in ethoc_start_xmit()
910 bd.stat &= ~(TX_BD_STATS | TX_BD_LEN_MASK); in ethoc_start_xmit()
911 bd.stat |= TX_BD_LEN(skb->len); in ethoc_start_xmit()
912 ethoc_write_bd(priv, entry, &bd); in ethoc_start_xmit()
914 bd.stat |= TX_BD_READY; in ethoc_start_xmit()
915 ethoc_write_bd(priv, entry, &bd); in ethoc_start_xmit()