Lines Matching refs:rbd
239 u32 rbd; member
439 struct i596_rbd *rbd; in i596_display_data() local
470 SWAP32(rfd->b_next), SWAP32(rfd->rbd), in i596_display_data()
474 rbd = lp->rbd_head; in i596_display_data()
475 printk(KERN_DEBUG "rbd_head = %p\n", rbd); in i596_display_data()
480 rbd, SWAP16(rbd->count), SWAP32(rbd->b_next), in i596_display_data()
481 SWAP32(rbd->b_data), SWAP16(rbd->size)); in i596_display_data()
482 rbd = rbd->v_next; in i596_display_data()
483 } while (rbd != lp->rbd_head); in i596_display_data()
493 struct i596_rbd *rbd; in init_rx_bufs() local
497 for (i = 0, rbd = dma->rbds; i < rx_ring_size; i++, rbd++) { in init_rx_bufs()
506 rbd->v_next = rbd+1; in init_rx_bufs()
507 rbd->b_next = SWAP32(virt_to_dma(lp, rbd+1)); in init_rx_bufs()
508 rbd->b_addr = SWAP32(virt_to_dma(lp, rbd)); in init_rx_bufs()
509 rbd->skb = skb; in init_rx_bufs()
510 rbd->v_data = skb->data; in init_rx_bufs()
511 rbd->b_data = SWAP32(dma_addr); in init_rx_bufs()
512 rbd->size = SWAP16(PKT_BUF_SZ); in init_rx_bufs()
515 rbd = dma->rbds + rx_ring_size - 1; in init_rx_bufs()
516 rbd->v_next = dma->rbds; in init_rx_bufs()
517 rbd->b_next = SWAP32(virt_to_dma(lp, dma->rbds)); in init_rx_bufs()
522 rfd->rbd = I596_NULL; in init_rx_bufs()
531 rfd->rbd = SWAP32(virt_to_dma(lp, lp->rbd_head)); in init_rx_bufs()
545 struct i596_rbd *rbd; in remove_rx_bufs() local
548 for (i = 0, rbd = lp->dma->rbds; i < rx_ring_size; i++, rbd++) { in remove_rx_bufs()
549 if (rbd->skb == NULL) in remove_rx_bufs()
552 (dma_addr_t)SWAP32(rbd->b_data), in remove_rx_bufs()
554 dev_kfree_skb(rbd->skb); in remove_rx_bufs()
568 dma->rfds[i].rbd = I596_NULL; in rebuild_rx_bufs()
575 dma->rfds[0].rbd = SWAP32(virt_to_dma(lp, dma->rbds)); in rebuild_rx_bufs()
679 struct i596_rbd *rbd; in i596_rx() local
691 if (rfd->rbd == I596_NULL) in i596_rx()
692 rbd = NULL; in i596_rx()
693 else if (rfd->rbd == lp->rbd_head->b_addr) { in i596_rx()
694 rbd = lp->rbd_head; in i596_rx()
695 dma_sync_cpu(dev, rbd, sizeof(struct i596_rbd)); in i596_rx()
699 rbd = NULL; in i596_rx()
703 rfd, rfd->rbd, rfd->stat)); in i596_rx()
705 if (rbd != NULL && (rfd->stat & SWAP16(STAT_OK))) { in i596_rx()
707 int pkt_len = SWAP16(rbd->count) & 0x3fff; in i596_rx()
708 struct sk_buff *skb = rbd->skb; in i596_rx()
711 DEB(DEB_RXADDR, print_eth(rbd->v_data, "received")); in i596_rx()
723 (dma_addr_t)SWAP32(rbd->b_data), in i596_rx()
736 rbd->skb = newskb; in i596_rx()
741 rbd->v_data = newskb->data; in i596_rx()
742 rbd->b_data = SWAP32(dma_addr); in i596_rx()
743 dma_sync_dev(dev, rbd, sizeof(struct i596_rbd)); in i596_rx()
755 (dma_addr_t)SWAP32(rbd->b_data), in i596_rx()
757 skb_put_data(skb, rbd->v_data, in i596_rx()
760 (dma_addr_t)SWAP32(rbd->b_data), in i596_rx()
792 if (rbd != NULL && (rbd->count & SWAP16(0x4000))) { in i596_rx()
793 rbd->count = 0; in i596_rx()
794 lp->rbd_head = rbd->v_next; in i596_rx()
795 dma_sync_dev(dev, rbd, sizeof(struct i596_rbd)); in i596_rx()
800 rfd->rbd = I596_NULL; in i596_rx()