Lines Matching refs:rbd
241 u32 rbd; member
410 struct i596_rbd *rbd; in i596_display_data() local
441 SWAP32(rfd->b_next), SWAP32(rfd->rbd), in i596_display_data()
445 rbd = lp->rbd_head; in i596_display_data()
446 printk(KERN_DEBUG "rbd_head = %p\n", rbd); in i596_display_data()
451 rbd, SWAP16(rbd->count), SWAP32(rbd->b_next), in i596_display_data()
452 SWAP32(rbd->b_data), SWAP16(rbd->size)); in i596_display_data()
453 rbd = rbd->v_next; in i596_display_data()
454 } while (rbd != lp->rbd_head); in i596_display_data()
467 struct i596_rbd *rbd; in init_rx_bufs() local
471 for (i = 0, rbd = dma->rbds; i < rx_ring_size; i++, rbd++) { in init_rx_bufs()
480 rbd->v_next = rbd+1; in init_rx_bufs()
481 rbd->b_next = SWAP32(virt_to_dma(lp, rbd+1)); in init_rx_bufs()
482 rbd->b_addr = SWAP32(virt_to_dma(lp, rbd)); in init_rx_bufs()
483 rbd->skb = skb; in init_rx_bufs()
484 rbd->v_data = skb->data; in init_rx_bufs()
485 rbd->b_data = SWAP32(dma_addr); in init_rx_bufs()
486 rbd->size = SWAP16(PKT_BUF_SZ); in init_rx_bufs()
489 rbd = dma->rbds + rx_ring_size - 1; in init_rx_bufs()
490 rbd->v_next = dma->rbds; in init_rx_bufs()
491 rbd->b_next = SWAP32(virt_to_dma(lp, dma->rbds)); in init_rx_bufs()
496 rfd->rbd = I596_NULL; in init_rx_bufs()
505 rfd->rbd = SWAP32(virt_to_dma(lp, lp->rbd_head)); in init_rx_bufs()
519 struct i596_rbd *rbd; in remove_rx_bufs() local
522 for (i = 0, rbd = lp->dma->rbds; i < rx_ring_size; i++, rbd++) { in remove_rx_bufs()
523 if (rbd->skb == NULL) in remove_rx_bufs()
526 (dma_addr_t)SWAP32(rbd->b_data), in remove_rx_bufs()
528 dev_kfree_skb(rbd->skb); in remove_rx_bufs()
542 dma->rfds[i].rbd = I596_NULL; in rebuild_rx_bufs()
549 dma->rfds[0].rbd = SWAP32(virt_to_dma(lp, dma->rbds)); in rebuild_rx_bufs()
653 struct i596_rbd *rbd; in i596_rx() local
665 if (rfd->rbd == I596_NULL) in i596_rx()
666 rbd = NULL; in i596_rx()
667 else if (rfd->rbd == lp->rbd_head->b_addr) { in i596_rx()
668 rbd = lp->rbd_head; in i596_rx()
669 DMA_INV(dev, rbd, sizeof(struct i596_rbd)); in i596_rx()
673 rbd = NULL; in i596_rx()
677 rfd, rfd->rbd, rfd->stat)); in i596_rx()
679 if (rbd != NULL && (rfd->stat & SWAP16(STAT_OK))) { in i596_rx()
681 int pkt_len = SWAP16(rbd->count) & 0x3fff; in i596_rx()
682 struct sk_buff *skb = rbd->skb; in i596_rx()
685 DEB(DEB_RXADDR, print_eth(rbd->v_data, "received")); in i596_rx()
697 (dma_addr_t)SWAP32(rbd->b_data), in i596_rx()
710 rbd->skb = newskb; in i596_rx()
715 rbd->v_data = newskb->data; in i596_rx()
716 rbd->b_data = SWAP32(dma_addr); in i596_rx()
717 DMA_WBACK_INV(dev, rbd, sizeof(struct i596_rbd)); in i596_rx()
731 (dma_addr_t)SWAP32(rbd->b_data), in i596_rx()
733 memcpy(skb_put(skb, pkt_len), rbd->v_data, pkt_len); in i596_rx()
735 (dma_addr_t)SWAP32(rbd->b_data), in i596_rx()
767 if (rbd != NULL && (rbd->count & SWAP16(0x4000))) { in i596_rx()
768 rbd->count = 0; in i596_rx()
769 lp->rbd_head = rbd->v_next; in i596_rx()
770 DMA_WBACK_INV(dev, rbd, sizeof(struct i596_rbd)); in i596_rx()
775 rfd->rbd = I596_NULL; in i596_rx()