• Home
  • Raw
  • Download

Lines Matching refs:bd

217 				 struct ethoc_bd *bd)  in ethoc_read_bd()  argument
220 bd->stat = ethoc_read(priv, offset + 0); in ethoc_read_bd()
221 bd->addr = ethoc_read(priv, offset + 4); in ethoc_read_bd()
225 const struct ethoc_bd *bd) in ethoc_write_bd() argument
228 ethoc_write(priv, offset + 0, bd->stat); in ethoc_write_bd()
229 ethoc_write(priv, offset + 4, bd->addr); in ethoc_write_bd()
261 struct ethoc_bd bd; in ethoc_init_ring() local
270 bd.stat = TX_BD_IRQ | TX_BD_CRC; in ethoc_init_ring()
271 bd.addr = 0; in ethoc_init_ring()
275 bd.addr = addr; in ethoc_init_ring()
279 bd.stat |= TX_BD_WRAP; in ethoc_init_ring()
281 ethoc_write_bd(priv, i, &bd); in ethoc_init_ring()
284 bd.stat = RX_BD_EMPTY | RX_BD_IRQ; in ethoc_init_ring()
288 bd.addr = addr; in ethoc_init_ring()
291 bd.addr = virt_to_phys(net_rx_packets[i]); in ethoc_init_ring()
294 bd.stat |= RX_BD_WRAP; in ethoc_init_ring()
298 ethoc_write_bd(priv, priv->num_tx + i, &bd); in ethoc_init_ring()
359 static int ethoc_update_rx_stats(struct ethoc_bd *bd) in ethoc_update_rx_stats() argument
363 if (bd->stat & RX_BD_TL) { in ethoc_update_rx_stats()
368 if (bd->stat & RX_BD_SF) { in ethoc_update_rx_stats()
373 if (bd->stat & RX_BD_DN) in ethoc_update_rx_stats()
376 if (bd->stat & RX_BD_CRC) { in ethoc_update_rx_stats()
381 if (bd->stat & RX_BD_OR) { in ethoc_update_rx_stats()
386 if (bd->stat & RX_BD_LC) { in ethoc_update_rx_stats()
396 struct ethoc_bd bd; in ethoc_rx_common() local
400 ethoc_read_bd(priv, entry, &bd); in ethoc_rx_common()
401 if (bd.stat & RX_BD_EMPTY) in ethoc_rx_common()
405 __func__, priv->cur_rx, bd.stat); in ethoc_rx_common()
406 if (ethoc_update_rx_stats(&bd) == 0) { in ethoc_rx_common()
407 int size = bd.stat >> 16; in ethoc_rx_common()
436 static int ethoc_update_tx_stats(struct ethoc_bd *bd) in ethoc_update_tx_stats() argument
438 if (bd->stat & TX_BD_LC) in ethoc_update_tx_stats()
441 if (bd->stat & TX_BD_RL) in ethoc_update_tx_stats()
444 if (bd->stat & TX_BD_UR) in ethoc_update_tx_stats()
447 if (bd->stat & TX_BD_CS) in ethoc_update_tx_stats()
456 struct ethoc_bd bd; in ethoc_tx() local
458 ethoc_read_bd(priv, entry, &bd); in ethoc_tx()
459 if ((bd.stat & TX_BD_READY) == 0) in ethoc_tx()
460 (void)ethoc_update_tx_stats(&bd); in ethoc_tx()
465 struct ethoc_bd bd; in ethoc_send_common() local
471 ethoc_read_bd(priv, entry, &bd); in ethoc_send_common()
473 bd.stat |= TX_BD_PAD; in ethoc_send_common()
475 bd.stat &= ~TX_BD_PAD; in ethoc_send_common()
483 bd.addr = virt_to_phys(packet); in ethoc_send_common()
486 bd.stat &= ~(TX_BD_STATS | TX_BD_LEN_MASK); in ethoc_send_common()
487 bd.stat |= TX_BD_LEN(length); in ethoc_send_common()
488 ethoc_write_bd(priv, entry, &bd); in ethoc_send_common()
491 bd.stat |= TX_BD_READY; in ethoc_send_common()
492 ethoc_write_bd(priv, entry, &bd); in ethoc_send_common()
518 struct ethoc_bd bd; in ethoc_free_pkt_common() local
523 ethoc_read_bd(priv, entry, &bd); in ethoc_free_pkt_common()
532 bd.stat &= ~RX_BD_STATS; in ethoc_free_pkt_common()
533 bd.stat |= RX_BD_EMPTY; in ethoc_free_pkt_common()
534 ethoc_write_bd(priv, entry, &bd); in ethoc_free_pkt_common()
757 static int ethoc_init(struct eth_device *dev, bd_t *bd) in ethoc_init() argument