Lines Matching refs:lp
233 #define MEM lp->mem
473 struct lance_private *lp; in lance_probe1() local
532 lp = netdev_priv(dev); in lance_probe1()
534 IO = lp->iobase = (struct lance_ioreg *)ioaddr; in lance_probe1()
536 lp->memcpy_f = init_rec->slow_flag ? slow_memcpy : memcpy; in lance_probe1()
545 lp->cardtype = PAM_CARD; in lance_probe1()
548 lp->cardtype = NEW_RIEBL; in lance_probe1()
551 lp->cardtype = OLD_RIEBL; in lance_probe1()
553 if (lp->cardtype == PAM_CARD || in lance_probe1()
579 dev->name, lance_names[lp->cardtype], in lance_probe1()
586 switch( lp->cardtype ) { in lance_probe1()
592 lp->memcpy_f(dev->dev_addr, RIEBL_HWADDR_ADDR, ETH_ALEN); in lance_probe1()
604 if (lp->cardtype == OLD_RIEBL) { in lance_probe1()
610 spin_lock_init(&lp->devlock); in lance_probe1()
624 if (lp->cardtype == PAM_CARD) in lance_probe1()
643 struct lance_private *lp = netdev_priv(dev); in lance_open() local
644 struct lance_ioreg *IO = lp->iobase; in lance_open()
652 REGA( CSR3 ) = CSR3_BSWP | (lp->cardtype == PAM_CARD ? CSR3_ACON : 0); in lance_open()
684 struct lance_private *lp = netdev_priv(dev); in lance_init_ring() local
688 lp->tx_full = 0; in lance_init_ring()
689 lp->cur_rx = lp->cur_tx = 0; in lance_init_ring()
690 lp->dirty_tx = 0; in lance_init_ring()
698 if (lp->cardtype == OLD_RIEBL || lp->cardtype == NEW_RIEBL) { \ in lance_init_ring()
732 struct lance_private *lp = netdev_priv(dev); in lance_tx_timeout() local
733 struct lance_ioreg *IO = lp->iobase; in lance_tx_timeout()
743 REGA( CSR3 ) = CSR3_BSWP | (lp->cardtype == PAM_CARD ? CSR3_ACON : 0); in lance_tx_timeout()
748 lp->dirty_tx, lp->cur_tx, in lance_tx_timeout()
749 lp->tx_full ? " (full)" : "", in lance_tx_timeout()
750 lp->cur_rx )); in lance_tx_timeout()
775 struct lance_private *lp = netdev_priv(dev); in lance_start_xmit() local
776 struct lance_ioreg *IO = lp->iobase; in lance_start_xmit()
790 else if (lp->cardtype == PAM_CARD && (len & 1)) in lance_start_xmit()
811 spin_lock_irqsave (&lp->devlock, flags); in lance_start_xmit()
814 entry = lp->cur_tx & TX_RING_MOD_MASK; in lance_start_xmit()
824 lp->memcpy_f( PKTBUF_ADDR(head), (void *)skb->data, skb->len ); in lance_start_xmit()
828 lp->cur_tx++; in lance_start_xmit()
829 while( lp->cur_tx >= TX_RING_SIZE && lp->dirty_tx >= TX_RING_SIZE ) { in lance_start_xmit()
830 lp->cur_tx -= TX_RING_SIZE; in lance_start_xmit()
831 lp->dirty_tx -= TX_RING_SIZE; in lance_start_xmit()
841 lp->tx_full = 1; in lance_start_xmit()
842 spin_unlock_irqrestore (&lp->devlock, flags); in lance_start_xmit()
852 struct lance_private *lp; in lance_interrupt() local
862 lp = netdev_priv(dev); in lance_interrupt()
863 IO = lp->iobase; in lance_interrupt()
864 spin_lock (&lp->devlock); in lance_interrupt()
882 int dirty_tx = lp->dirty_tx; in lance_interrupt()
884 while( dirty_tx < lp->cur_tx) { in lance_interrupt()
920 if (lp->cur_tx - dirty_tx >= TX_RING_SIZE) { in lance_interrupt()
923 dirty_tx, lp->cur_tx, lp->tx_full )); in lance_interrupt()
928 if (lp->tx_full && (netif_queue_stopped(dev)) && in lance_interrupt()
929 dirty_tx > lp->cur_tx - TX_RING_SIZE + 2) { in lance_interrupt()
931 lp->tx_full = 0; in lance_interrupt()
935 lp->dirty_tx = dirty_tx; in lance_interrupt()
956 spin_unlock (&lp->devlock); in lance_interrupt()
963 struct lance_private *lp = netdev_priv(dev); in lance_rx() local
964 int entry = lp->cur_rx & RX_RING_MOD_MASK; in lance_rx()
1007 lp->cur_rx++; in lance_rx()
1027 lp->memcpy_f( skb->data, PKTBUF_ADDR(head), pkt_len ); in lance_rx()
1036 entry = (++lp->cur_rx) & RX_RING_MOD_MASK; in lance_rx()
1038 lp->cur_rx &= RX_RING_MOD_MASK; in lance_rx()
1050 struct lance_private *lp = netdev_priv(dev); in lance_close() local
1051 struct lance_ioreg *IO = lp->iobase; in lance_close()
1077 struct lance_private *lp = netdev_priv(dev); in set_multicast_list() local
1078 struct lance_ioreg *IO = lp->iobase; in set_multicast_list()
1108 REGA( CSR3 ) = CSR3_BSWP | (lp->cardtype == PAM_CARD ? CSR3_ACON : 0); in set_multicast_list()
1119 struct lance_private *lp = netdev_priv(dev); in lance_set_mac_address() local
1123 if (lp->cardtype != OLD_RIEBL && lp->cardtype != NEW_RIEBL) in lance_set_mac_address()
1136 lp->memcpy_f( RIEBL_HWADDR_ADDR, dev->dev_addr, 6 ); in lance_set_mac_address()