Lines Matching full:vp
460 struct corkscrew_private *vp = netdev_priv(dev); in cleanup_card() local
461 list_del_init(&vp->list); in cleanup_card()
466 if (vp->dev) in cleanup_card()
467 pnp_device_detach(to_pnp_dev(vp->dev)); in cleanup_card()
567 struct corkscrew_private *vp = netdev_priv(dev); in corkscrew_setup() local
576 vp->dev = &idev->dev; in corkscrew_setup()
587 vp->product_name = "3c515"; in corkscrew_setup()
588 vp->options = dev->mem_start; in corkscrew_setup()
589 vp->our_dev = dev; in corkscrew_setup()
591 if (!vp->options) { in corkscrew_setup()
593 vp->options = -1; in corkscrew_setup()
595 vp->options = options[card_number]; in corkscrew_setup()
598 if (vp->options >= 0) { in corkscrew_setup()
599 vp->media_override = vp->options & 7; in corkscrew_setup()
600 if (vp->media_override == 2) in corkscrew_setup()
601 vp->media_override = 0; in corkscrew_setup()
602 vp->full_duplex = (vp->options & 8) ? 1 : 0; in corkscrew_setup()
603 vp->bus_master = (vp->options & 16) ? 1 : 0; in corkscrew_setup()
605 vp->media_override = 7; in corkscrew_setup()
606 vp->full_duplex = 0; in corkscrew_setup()
607 vp->bus_master = 0; in corkscrew_setup()
610 list_add(&vp->list, &root_corkscrew_dev); in corkscrew_setup()
613 pr_info("%s: 3Com %s at %#3x,", dev->name, vp->product_name, ioaddr); in corkscrew_setup()
615 spin_lock_init(&vp->lock); in corkscrew_setup()
617 timer_setup(&vp->timer, corkscrew_timer, 0); in corkscrew_setup()
658 vp->available_media = inw(ioaddr + Wn3_Options); in corkscrew_setup()
669 vp->default_media = (config & Xcvr) >> Xcvr_shift; in corkscrew_setup()
670 vp->autoselect = config & Autoselect ? 1 : 0; in corkscrew_setup()
671 dev->if_port = vp->default_media; in corkscrew_setup()
673 if (vp->media_override != 7) { in corkscrew_setup()
675 vp->media_override, in corkscrew_setup()
676 media_tbl[vp->media_override].name); in corkscrew_setup()
677 dev->if_port = vp->media_override; in corkscrew_setup()
680 vp->capabilities = eeprom[16]; in corkscrew_setup()
681 vp->full_bus_master_tx = (vp->capabilities & 0x20) ? 1 : 0; in corkscrew_setup()
683 /* vp->full_bus_master_rx = 0; */ in corkscrew_setup()
684 vp->full_bus_master_rx = (vp->capabilities & 0x20) ? 1 : 0; in corkscrew_setup()
698 struct corkscrew_private *vp = netdev_priv(dev); in corkscrew_open() local
705 if (vp->full_duplex) in corkscrew_open()
709 if (vp->media_override != 7) { in corkscrew_open()
712 dev->name, vp->media_override, in corkscrew_open()
713 media_tbl[vp->media_override].name); in corkscrew_open()
714 dev->if_port = vp->media_override; in corkscrew_open()
715 } else if (vp->autoselect) { in corkscrew_open()
718 while (!(vp->available_media & media_tbl[dev->if_port].mask)) in corkscrew_open()
726 dev->if_port = vp->default_media; in corkscrew_open()
750 if (vp->capabilities == 0x11c7) { in corkscrew_open()
755 vp->product_name, dev)) in corkscrew_open()
760 vp->product_name, dev)) { in corkscrew_open()
765 mod_timer(&vp->timer, jiffies + media_tbl[dev->if_port].wait); in corkscrew_open()
803 if (vp->full_bus_master_rx) { /* Boomerang bus master. */ in corkscrew_open()
804 vp->cur_rx = vp->dirty_rx = 0; in corkscrew_open()
810 vp->rx_ring[i].next = in corkscrew_open()
811 isa_virt_to_bus(&vp->rx_ring[i + 1]); in corkscrew_open()
813 vp->rx_ring[i].next = 0; in corkscrew_open()
814 vp->rx_ring[i].status = 0; /* Clear complete bit. */ in corkscrew_open()
815 vp->rx_ring[i].length = PKT_BUF_SZ | 0x80000000; in corkscrew_open()
817 vp->rx_skbuff[i] = skb; in corkscrew_open()
821 vp->rx_ring[i].addr = isa_virt_to_bus(skb->data); in corkscrew_open()
824 vp->rx_ring[i - 1].next = in corkscrew_open()
825 isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */ in corkscrew_open()
826 outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr); in corkscrew_open()
828 if (vp->full_bus_master_tx) { /* Boomerang bus master Tx. */ in corkscrew_open()
829 vp->cur_tx = vp->dirty_tx = 0; in corkscrew_open()
833 vp->tx_skbuff[i] = NULL; in corkscrew_open()
846 (vp->full_bus_master_tx ? DownComplete : TxAvailable) | in corkscrew_open()
847 (vp->full_bus_master_rx ? UpComplete : RxComplete) | in corkscrew_open()
848 (vp->bus_master ? DMADone : 0), ioaddr + EL3_CMD); in corkscrew_open()
853 | (vp->bus_master ? DMADone : 0) | UpComplete | DownComplete, in corkscrew_open()
862 struct corkscrew_private *vp = from_timer(vp, t, timer); in corkscrew_timer() local
863 struct net_device *dev = vp->our_dev; in corkscrew_timer()
872 spin_lock_irqsave(&vp->lock, flags); in corkscrew_timer()
912 while (!(vp->available_media & media_tbl[dev->if_port].mask)); in corkscrew_timer()
915 dev->if_port = vp->default_media; in corkscrew_timer()
925 vp->timer.expires = jiffies + media_tbl[dev->if_port].wait; in corkscrew_timer()
926 add_timer(&vp->timer); in corkscrew_timer()
943 spin_unlock_irqrestore(&vp->lock, flags); in corkscrew_timer()
954 struct corkscrew_private *vp = netdev_priv(dev); in corkscrew_timeout() local
966 vp->full_bus_master_tx, vp->tx_full, vp->dirty_tx, in corkscrew_timeout()
967 vp->cur_tx); in corkscrew_timeout()
969 &vp->tx_ring[0]); in corkscrew_timeout()
972 &vp->tx_ring[i], in corkscrew_timeout()
973 vp->tx_ring[i].length, vp->tx_ring[i].status); in corkscrew_timeout()
991 struct corkscrew_private *vp = netdev_priv(dev); in corkscrew_start_xmit() local
998 if (vp->full_bus_master_tx) { /* BOOMERANG bus-master */ in corkscrew_start_xmit()
1000 int entry = vp->cur_tx % TX_RING_SIZE; in corkscrew_start_xmit()
1005 if (vp->tx_full) /* No room to transmit with */ in corkscrew_start_xmit()
1007 if (vp->cur_tx != 0) in corkscrew_start_xmit()
1008 prev_entry = &vp->tx_ring[(vp->cur_tx - 1) % TX_RING_SIZE]; in corkscrew_start_xmit()
1013 dev->name, vp->cur_tx); in corkscrew_start_xmit()
1014 /* vp->tx_full = 1; */ in corkscrew_start_xmit()
1015 vp->tx_skbuff[entry] = skb; in corkscrew_start_xmit()
1016 vp->tx_ring[entry].next = 0; in corkscrew_start_xmit()
1017 vp->tx_ring[entry].addr = isa_virt_to_bus(skb->data); in corkscrew_start_xmit()
1018 vp->tx_ring[entry].length = skb->len | 0x80000000; in corkscrew_start_xmit()
1019 vp->tx_ring[entry].status = skb->len | 0x80000000; in corkscrew_start_xmit()
1021 spin_lock_irqsave(&vp->lock, flags); in corkscrew_start_xmit()
1028 prev_entry->next = isa_virt_to_bus(&vp->tx_ring[entry]); in corkscrew_start_xmit()
1030 outl(isa_virt_to_bus(&vp->tx_ring[entry]), in corkscrew_start_xmit()
1035 spin_unlock_irqrestore(&vp->lock, flags); in corkscrew_start_xmit()
1037 vp->cur_tx++; in corkscrew_start_xmit()
1038 if (vp->cur_tx - vp->dirty_tx > TX_RING_SIZE - 1) in corkscrew_start_xmit()
1039 vp->tx_full = 1; in corkscrew_start_xmit()
1051 if (vp->bus_master) { in corkscrew_start_xmit()
1055 vp->tx_skb = skb; in corkscrew_start_xmit()
1319 struct corkscrew_private *vp = netdev_priv(dev); in boomerang_rx() local
1320 int entry = vp->cur_rx % RX_RING_SIZE; in boomerang_rx()
1327 while ((rx_status = vp->rx_ring[entry].status) & RxDComplete) { in boomerang_rx()
1361 isa_bus_to_virt(vp->rx_ring[entry].addr), in boomerang_rx()
1367 skb = vp->rx_skbuff[entry]; in boomerang_rx()
1368 vp->rx_skbuff[entry] = NULL; in boomerang_rx()
1371 if (isa_bus_to_virt(vp->rx_ring[entry].addr) != temp) in boomerang_rx()
1374 isa_bus_to_virt(vp->rx_ring[entry].addr), in boomerang_rx()
1382 entry = (++vp->cur_rx) % RX_RING_SIZE; in boomerang_rx()
1385 for (; vp->cur_rx - vp->dirty_rx > 0; vp->dirty_rx++) { in boomerang_rx()
1387 entry = vp->dirty_rx % RX_RING_SIZE; in boomerang_rx()
1388 if (vp->rx_skbuff[entry] == NULL) { in boomerang_rx()
1393 vp->rx_ring[entry].addr = isa_virt_to_bus(skb->data); in boomerang_rx()
1394 vp->rx_skbuff[entry] = skb; in boomerang_rx()
1396 vp->rx_ring[entry].status = 0; /* Clear complete bit. */ in boomerang_rx()
1403 struct corkscrew_private *vp = netdev_priv(dev); in corkscrew_close() local
1417 del_timer_sync(&vp->timer); in corkscrew_close()
1435 if (vp->full_bus_master_rx) { /* Free Boomerang bus master Rx buffers. */ in corkscrew_close()
1438 if (vp->rx_skbuff[i]) { in corkscrew_close()
1439 dev_kfree_skb(vp->rx_skbuff[i]); in corkscrew_close()
1440 vp->rx_skbuff[i] = NULL; in corkscrew_close()
1443 if (vp->full_bus_master_tx) { /* Free Boomerang bus master Tx buffers. */ in corkscrew_close()
1446 if (vp->tx_skbuff[i]) { in corkscrew_close()
1447 dev_kfree_skb(vp->tx_skbuff[i]); in corkscrew_close()
1448 vp->tx_skbuff[i] = NULL; in corkscrew_close()
1457 struct corkscrew_private *vp = netdev_priv(dev); in corkscrew_get_stats() local
1461 spin_lock_irqsave(&vp->lock, flags); in corkscrew_get_stats()
1463 spin_unlock_irqrestore(&vp->lock, flags); in corkscrew_get_stats()
1556 struct corkscrew_private *vp; in cleanup_module() local
1558 vp = list_entry(root_corkscrew_dev.next, in cleanup_module()
1560 dev = vp->our_dev; in cleanup_module()