• Home
  • Raw
  • Download

Lines Matching refs: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
575 vp->dev = &idev->dev; in corkscrew_setup()
586 vp->product_name = "3c515"; in corkscrew_setup()
587 vp->options = dev->mem_start; in corkscrew_setup()
588 vp->our_dev = dev; in corkscrew_setup()
590 if (!vp->options) { in corkscrew_setup()
592 vp->options = -1; in corkscrew_setup()
594 vp->options = options[card_number]; in corkscrew_setup()
597 if (vp->options >= 0) { in corkscrew_setup()
598 vp->media_override = vp->options & 7; in corkscrew_setup()
599 if (vp->media_override == 2) in corkscrew_setup()
600 vp->media_override = 0; in corkscrew_setup()
601 vp->full_duplex = (vp->options & 8) ? 1 : 0; in corkscrew_setup()
602 vp->bus_master = (vp->options & 16) ? 1 : 0; in corkscrew_setup()
604 vp->media_override = 7; in corkscrew_setup()
605 vp->full_duplex = 0; in corkscrew_setup()
606 vp->bus_master = 0; in corkscrew_setup()
609 list_add(&vp->list, &root_corkscrew_dev); in corkscrew_setup()
612 pr_info("%s: 3Com %s at %#3x,", dev->name, vp->product_name, ioaddr); in corkscrew_setup()
614 spin_lock_init(&vp->lock); in corkscrew_setup()
616 timer_setup(&vp->timer, corkscrew_timer, 0); in corkscrew_setup()
657 vp->available_media = inw(ioaddr + Wn3_Options); in corkscrew_setup()
668 vp->default_media = (config & Xcvr) >> Xcvr_shift; in corkscrew_setup()
669 vp->autoselect = config & Autoselect ? 1 : 0; in corkscrew_setup()
670 dev->if_port = vp->default_media; in corkscrew_setup()
672 if (vp->media_override != 7) { in corkscrew_setup()
674 vp->media_override, in corkscrew_setup()
675 media_tbl[vp->media_override].name); in corkscrew_setup()
676 dev->if_port = vp->media_override; in corkscrew_setup()
679 vp->capabilities = eeprom[16]; in corkscrew_setup()
680 vp->full_bus_master_tx = (vp->capabilities & 0x20) ? 1 : 0; in corkscrew_setup()
683 vp->full_bus_master_rx = (vp->capabilities & 0x20) ? 1 : 0; in corkscrew_setup()
697 struct corkscrew_private *vp = netdev_priv(dev); in corkscrew_open() local
704 if (vp->full_duplex) in corkscrew_open()
708 if (vp->media_override != 7) { in corkscrew_open()
711 dev->name, vp->media_override, in corkscrew_open()
712 media_tbl[vp->media_override].name); in corkscrew_open()
713 dev->if_port = vp->media_override; in corkscrew_open()
714 } else if (vp->autoselect) { in corkscrew_open()
717 while (!(vp->available_media & media_tbl[dev->if_port].mask)) in corkscrew_open()
725 dev->if_port = vp->default_media; in corkscrew_open()
749 if (vp->capabilities == 0x11c7) { in corkscrew_open()
754 vp->product_name, dev)) in corkscrew_open()
759 vp->product_name, dev)) { in corkscrew_open()
764 mod_timer(&vp->timer, jiffies + media_tbl[dev->if_port].wait); in corkscrew_open()
802 if (vp->full_bus_master_rx) { /* Boomerang bus master. */ in corkscrew_open()
803 vp->cur_rx = vp->dirty_rx = 0; in corkscrew_open()
809 vp->rx_ring[i].next = in corkscrew_open()
810 isa_virt_to_bus(&vp->rx_ring[i + 1]); in corkscrew_open()
812 vp->rx_ring[i].next = 0; in corkscrew_open()
813 vp->rx_ring[i].status = 0; /* Clear complete bit. */ in corkscrew_open()
814 vp->rx_ring[i].length = PKT_BUF_SZ | 0x80000000; in corkscrew_open()
816 vp->rx_skbuff[i] = skb; in corkscrew_open()
820 vp->rx_ring[i].addr = isa_virt_to_bus(skb->data); in corkscrew_open()
823 vp->rx_ring[i - 1].next = in corkscrew_open()
824 isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */ in corkscrew_open()
825 outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr); in corkscrew_open()
827 if (vp->full_bus_master_tx) { /* Boomerang bus master Tx. */ in corkscrew_open()
828 vp->cur_tx = vp->dirty_tx = 0; in corkscrew_open()
832 vp->tx_skbuff[i] = NULL; in corkscrew_open()
845 (vp->full_bus_master_tx ? DownComplete : TxAvailable) | in corkscrew_open()
846 (vp->full_bus_master_rx ? UpComplete : RxComplete) | in corkscrew_open()
847 (vp->bus_master ? DMADone : 0), ioaddr + EL3_CMD); in corkscrew_open()
852 | (vp->bus_master ? DMADone : 0) | UpComplete | DownComplete, in corkscrew_open()
861 struct corkscrew_private *vp = from_timer(vp, t, timer); in corkscrew_timer() local
862 struct net_device *dev = vp->our_dev; in corkscrew_timer()
871 spin_lock_irqsave(&vp->lock, flags); in corkscrew_timer()
911 while (!(vp->available_media & media_tbl[dev->if_port].mask)); in corkscrew_timer()
914 dev->if_port = vp->default_media; in corkscrew_timer()
924 vp->timer.expires = jiffies + media_tbl[dev->if_port].wait; in corkscrew_timer()
925 add_timer(&vp->timer); in corkscrew_timer()
942 spin_unlock_irqrestore(&vp->lock, flags); in corkscrew_timer()
953 struct corkscrew_private *vp = netdev_priv(dev); in corkscrew_timeout() local
965 vp->full_bus_master_tx, vp->tx_full, vp->dirty_tx, in corkscrew_timeout()
966 vp->cur_tx); in corkscrew_timeout()
968 &vp->tx_ring[0]); in corkscrew_timeout()
971 &vp->tx_ring[i], in corkscrew_timeout()
972 vp->tx_ring[i].length, vp->tx_ring[i].status); in corkscrew_timeout()
990 struct corkscrew_private *vp = netdev_priv(dev); in corkscrew_start_xmit() local
997 if (vp->full_bus_master_tx) { /* BOOMERANG bus-master */ in corkscrew_start_xmit()
999 int entry = vp->cur_tx % TX_RING_SIZE; in corkscrew_start_xmit()
1004 if (vp->tx_full) /* No room to transmit with */ in corkscrew_start_xmit()
1006 if (vp->cur_tx != 0) in corkscrew_start_xmit()
1007 prev_entry = &vp->tx_ring[(vp->cur_tx - 1) % TX_RING_SIZE]; in corkscrew_start_xmit()
1012 dev->name, vp->cur_tx); in corkscrew_start_xmit()
1014 vp->tx_skbuff[entry] = skb; in corkscrew_start_xmit()
1015 vp->tx_ring[entry].next = 0; in corkscrew_start_xmit()
1016 vp->tx_ring[entry].addr = isa_virt_to_bus(skb->data); in corkscrew_start_xmit()
1017 vp->tx_ring[entry].length = skb->len | 0x80000000; in corkscrew_start_xmit()
1018 vp->tx_ring[entry].status = skb->len | 0x80000000; in corkscrew_start_xmit()
1020 spin_lock_irqsave(&vp->lock, flags); in corkscrew_start_xmit()
1027 prev_entry->next = isa_virt_to_bus(&vp->tx_ring[entry]); in corkscrew_start_xmit()
1029 outl(isa_virt_to_bus(&vp->tx_ring[entry]), in corkscrew_start_xmit()
1034 spin_unlock_irqrestore(&vp->lock, flags); in corkscrew_start_xmit()
1036 vp->cur_tx++; in corkscrew_start_xmit()
1037 if (vp->cur_tx - vp->dirty_tx > TX_RING_SIZE - 1) in corkscrew_start_xmit()
1038 vp->tx_full = 1; in corkscrew_start_xmit()
1050 if (vp->bus_master) { in corkscrew_start_xmit()
1054 vp->tx_skb = skb; in corkscrew_start_xmit()
1318 struct corkscrew_private *vp = netdev_priv(dev); in boomerang_rx() local
1319 int entry = vp->cur_rx % RX_RING_SIZE; in boomerang_rx()
1326 while ((rx_status = vp->rx_ring[entry].status) & RxDComplete) { in boomerang_rx()
1360 isa_bus_to_virt(vp->rx_ring[entry].addr), in boomerang_rx()
1366 skb = vp->rx_skbuff[entry]; in boomerang_rx()
1367 vp->rx_skbuff[entry] = NULL; in boomerang_rx()
1370 if (isa_bus_to_virt(vp->rx_ring[entry].addr) != temp) in boomerang_rx()
1373 isa_bus_to_virt(vp->rx_ring[entry].addr), in boomerang_rx()
1381 entry = (++vp->cur_rx) % RX_RING_SIZE; in boomerang_rx()
1384 for (; vp->cur_rx - vp->dirty_rx > 0; vp->dirty_rx++) { in boomerang_rx()
1386 entry = vp->dirty_rx % RX_RING_SIZE; in boomerang_rx()
1387 if (vp->rx_skbuff[entry] == NULL) { in boomerang_rx()
1392 vp->rx_ring[entry].addr = isa_virt_to_bus(skb->data); in boomerang_rx()
1393 vp->rx_skbuff[entry] = skb; in boomerang_rx()
1395 vp->rx_ring[entry].status = 0; /* Clear complete bit. */ in boomerang_rx()
1402 struct corkscrew_private *vp = netdev_priv(dev); in corkscrew_close() local
1416 del_timer_sync(&vp->timer); in corkscrew_close()
1434 if (vp->full_bus_master_rx) { /* Free Boomerang bus master Rx buffers. */ in corkscrew_close()
1437 if (vp->rx_skbuff[i]) { in corkscrew_close()
1438 dev_kfree_skb(vp->rx_skbuff[i]); in corkscrew_close()
1439 vp->rx_skbuff[i] = NULL; in corkscrew_close()
1442 if (vp->full_bus_master_tx) { /* Free Boomerang bus master Tx buffers. */ in corkscrew_close()
1445 if (vp->tx_skbuff[i]) { in corkscrew_close()
1446 dev_kfree_skb(vp->tx_skbuff[i]); in corkscrew_close()
1447 vp->tx_skbuff[i] = NULL; in corkscrew_close()
1456 struct corkscrew_private *vp = netdev_priv(dev); in corkscrew_get_stats() local
1460 spin_lock_irqsave(&vp->lock, flags); in corkscrew_get_stats()
1462 spin_unlock_irqrestore(&vp->lock, flags); in corkscrew_get_stats()
1555 struct corkscrew_private *vp; in cleanup_module() local
1557 vp = list_entry(root_corkscrew_dev.next, in cleanup_module()
1559 dev = vp->our_dev; in cleanup_module()