tag | line | file | source code |
lp | 65 | arch/i386/kernel/ldt.c | unsigned long *lp; |
lp | 94 | arch/i386/kernel/ldt.c | lp = (unsigned long *) ¤t->ldt[ldt_info.entry_number]; |
lp | 97 | arch/i386/kernel/ldt.c | *lp = 0; |
lp | 98 | arch/i386/kernel/ldt.c | *(lp+1) = 0; |
lp | 101 | arch/i386/kernel/ldt.c | *lp = ((ldt_info.base_addr & 0x0000ffff) << 16) | |
lp | 103 | arch/i386/kernel/ldt.c | *(lp+1) = (ldt_info.base_addr & 0xff000000) | |
lp | 9 | arch/ppc/kernel/mk_ramdisk.c | unsigned char *lp; |
lp | 38 | arch/ppc/kernel/mk_ramdisk.c | lp = (unsigned char *)buf; |
lp | 45 | arch/ppc/kernel/mk_ramdisk.c | fprintf(out, "0x%02X%02X%02X%02X", lp[0], lp[1], lp[2], lp[3]); |
lp | 46 | arch/ppc/kernel/mk_ramdisk.c | lp += 4; |
lp | 152 | drivers/char/lp.c | struct lp_struct *lp = &lp_table[0]; |
lp | 154 | drivers/char/lp.c | while (irq != lp->irq) { |
lp | 155 | drivers/char/lp.c | if (++lp >= &lp_table[LP_NO]) |
lp | 159 | drivers/char/lp.c | wake_up(&lp->lp_wait_q); |
lp | 167 | drivers/char/lp.c | struct lp_struct *lp = &lp_table[minor]; |
lp | 173 | drivers/char/lp.c | memcpy_fromfs(lp->lp_buffer, buf, copy_size); |
lp | 176 | drivers/char/lp.c | if (lp_char_interrupt(lp->lp_buffer[bytes_written], minor)) { |
lp | 210 | drivers/char/lp.c | interruptible_sleep_on(&lp->lp_wait_q); |
lp | 435 | drivers/char/lp.c | struct lp_struct *lp = &lp_table[minor]; |
lp | 444 | drivers/char/lp.c | lp->lp_buffer = (char *) kmalloc(LP_BUFFER_SIZE, GFP_KERNEL); |
lp | 445 | drivers/char/lp.c | if (!lp->lp_buffer) |
lp | 460 | drivers/char/lp.c | kfree_s(lp->lp_buffer, LP_BUFFER_SIZE); |
lp | 461 | drivers/char/lp.c | lp->lp_buffer = NULL; |
lp | 468 | drivers/char/lp.c | kfree_s(lp->lp_buffer, LP_BUFFER_SIZE); |
lp | 469 | drivers/char/lp.c | lp->lp_buffer = NULL; |
lp | 123 | drivers/isdn/isdn_net.c | isdn_net_bind_channel(isdn_net_local * lp, int idx) |
lp | 129 | drivers/isdn/isdn_net.c | lp->isdn_device = dev->drvmap[idx]; |
lp | 130 | drivers/isdn/isdn_net.c | lp->isdn_channel = dev->chanmap[idx]; |
lp | 131 | drivers/isdn/isdn_net.c | dev->rx_netdev[idx] = lp->netdev; |
lp | 132 | drivers/isdn/isdn_net.c | dev->st_netdev[idx] = lp->netdev; |
lp | 198 | drivers/isdn/isdn_net.c | isdn_net_local *lp = &(p->local); |
lp | 202 | drivers/isdn/isdn_net.c | if ((lp->flags & ISDN_NET_CONNECTED) && |
lp | 203 | drivers/isdn/isdn_net.c | (!lp->dialstate)) { |
lp | 204 | drivers/isdn/isdn_net.c | lp->stats.tx_packets++; |
lp | 211 | drivers/isdn/isdn_net.c | if (lp->dialstate == 4 || lp->dialstate == 7 |
lp | 212 | drivers/isdn/isdn_net.c | || lp->dialstate == 8) { |
lp | 213 | drivers/isdn/isdn_net.c | lp->dialstate++; |
lp | 219 | drivers/isdn/isdn_net.c | if ((!lp->dialstate) && (lp->flags & ISDN_NET_CONNECTED)) { |
lp | 220 | drivers/isdn/isdn_net.c | lp->flags &= ~ISDN_NET_CONNECTED; |
lp | 221 | drivers/isdn/isdn_net.c | isdn_free_channel(lp->isdn_device, lp->isdn_channel, |
lp | 224 | drivers/isdn/isdn_net.c | isdn_ppp_free(lp); |
lp | 226 | drivers/isdn/isdn_net.c | isdn_all_eaz(lp->isdn_device, lp->isdn_channel); |
lp | 227 | drivers/isdn/isdn_net.c | printk(KERN_INFO "%s: remote hangup\n", lp->name); |
lp | 228 | drivers/isdn/isdn_net.c | printk(KERN_INFO "%s: Chargesum is %d\n", lp->name, |
lp | 229 | drivers/isdn/isdn_net.c | lp->charge); |
lp | 230 | drivers/isdn/isdn_net.c | lp->isdn_device = -1; |
lp | 231 | drivers/isdn/isdn_net.c | lp->isdn_channel = -1; |
lp | 239 | drivers/isdn/isdn_net.c | if (lp->dialstate >= 5 && lp->dialstate <= 10) { |
lp | 240 | drivers/isdn/isdn_net.c | if (lp->dialstate <= 6) { |
lp | 245 | drivers/isdn/isdn_net.c | lp->dialstate = 0; |
lp | 247 | drivers/isdn/isdn_net.c | printk(KERN_INFO "isdn_net: %s connected\n", lp->name); |
lp | 251 | drivers/isdn/isdn_net.c | lp->chargetime = jiffies; |
lp | 253 | drivers/isdn/isdn_net.c | if (lp->first_skb) { |
lp | 254 | drivers/isdn/isdn_net.c | if (!(isdn_net_xmit(&p->dev,lp,lp->first_skb))) |
lp | 255 | drivers/isdn/isdn_net.c | lp->first_skb = NULL; |
lp | 262 | drivers/isdn/isdn_net.c | if (lp->dialstate == 4) { |
lp | 263 | drivers/isdn/isdn_net.c | lp->dialstate--; |
lp | 272 | drivers/isdn/isdn_net.c | lp->charge++; |
lp | 273 | drivers/isdn/isdn_net.c | if (lp->hupflags & 2) { |
lp | 274 | drivers/isdn/isdn_net.c | lp->hupflags &= ~1; |
lp | 275 | drivers/isdn/isdn_net.c | lp->chargeint = jiffies - lp->chargetime - (2 * HZ); |
lp | 277 | drivers/isdn/isdn_net.c | if (lp->hupflags & 1) |
lp | 278 | drivers/isdn/isdn_net.c | lp->hupflags |= 2; |
lp | 279 | drivers/isdn/isdn_net.c | lp->chargetime = jiffies; |
lp | 502 | drivers/isdn/isdn_net.c | isdn_net_local *lp = (isdn_net_local *) d->priv; |
lp | 508 | drivers/isdn/isdn_net.c | if (lp->flags & ISDN_NET_CONNECTED) { |
lp | 509 | drivers/isdn/isdn_net.c | printk(KERN_INFO "isdn_net: local hangup %s\n", lp->name); |
lp | 510 | drivers/isdn/isdn_net.c | lp->dialstate = 0; |
lp | 511 | drivers/isdn/isdn_net.c | dev->rx_netdev[isdn_dc2minor(lp->isdn_device,lp->isdn_channel)] = NULL; |
lp | 512 | drivers/isdn/isdn_net.c | dev->st_netdev[isdn_dc2minor(lp->isdn_device,lp->isdn_channel)] = NULL; |
lp | 513 | drivers/isdn/isdn_net.c | isdn_free_channel(lp->isdn_device, lp->isdn_channel, ISDN_USAGE_NET); |
lp | 515 | drivers/isdn/isdn_net.c | isdn_ppp_free(lp); |
lp | 517 | drivers/isdn/isdn_net.c | lp->flags &= ~ISDN_NET_CONNECTED; |
lp | 518 | drivers/isdn/isdn_net.c | cmd.driver = lp->isdn_device; |
lp | 520 | drivers/isdn/isdn_net.c | cmd.arg = lp->isdn_channel; |
lp | 522 | drivers/isdn/isdn_net.c | printk(KERN_INFO "%s: Chargesum is %d\n", lp->name, lp->charge); |
lp | 523 | drivers/isdn/isdn_net.c | isdn_all_eaz(lp->isdn_device, lp->isdn_channel); |
lp | 524 | drivers/isdn/isdn_net.c | lp->isdn_device = -1; |
lp | 525 | drivers/isdn/isdn_net.c | lp->isdn_channel = -1; |
lp | 536 | drivers/isdn/isdn_net.c | isdn_net_log_packet(u_char * buf, isdn_net_local * lp) |
lp | 546 | drivers/isdn/isdn_net.c | switch (lp->p_encap) { |
lp | 562 | drivers/isdn/isdn_net.c | if (lp->ppp_minor!=-1) { |
lp | 563 | drivers/isdn/isdn_net.c | if (ippp_table[lp->ppp_minor].mpppcfg & |
lp | 565 | drivers/isdn/isdn_net.c | if (ippp_table[lp->ppp_minor].mpppcfg & |
lp | 631 | drivers/isdn/isdn_net.c | isdn_net_send_skb(struct device *ndev, isdn_net_local *lp, |
lp | 636 | drivers/isdn/isdn_net.c | lp->transcount += skb->len; |
lp | 637 | drivers/isdn/isdn_net.c | if (dev->drv[lp->isdn_device]->interface->writebuf_skb) |
lp | 638 | drivers/isdn/isdn_net.c | ret = dev->drv[lp->isdn_device]->interface-> |
lp | 639 | drivers/isdn/isdn_net.c | writebuf_skb(lp->isdn_device, lp->isdn_channel, skb); |
lp | 641 | drivers/isdn/isdn_net.c | if ((ret = isdn_net_send(skb->data, lp->isdn_device, |
lp | 642 | drivers/isdn/isdn_net.c | lp->isdn_channel, skb->len))) |
lp | 664 | drivers/isdn/isdn_net.c | isdn_net_xmit(struct device *ndev, isdn_net_local *lp, struct sk_buff *skb) |
lp | 670 | drivers/isdn/isdn_net.c | if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP) |
lp | 674 | drivers/isdn/isdn_net.c | lp->huptimer = 0; |
lp | 675 | drivers/isdn/isdn_net.c | if (lp->cps > 7000) { |
lp | 682 | drivers/isdn/isdn_net.c | if (lp->master) |
lp | 684 | drivers/isdn/isdn_net.c | ret = isdn_net_send_skb(ndev, lp, skb); |
lp | 686 | drivers/isdn/isdn_net.c | isdn_net_local *slp = (isdn_net_local *) (lp->srobin->priv); |
lp | 688 | drivers/isdn/isdn_net.c | if (lp->srobin == ndev) |
lp | 689 | drivers/isdn/isdn_net.c | ret = isdn_net_send_skb(ndev, lp, skb); |
lp | 691 | drivers/isdn/isdn_net.c | ret = ndev->tbusy = isdn_net_start_xmit(skb, lp->srobin); |
lp | 692 | drivers/isdn/isdn_net.c | lp->srobin = (slp->slave) ? slp->slave : ndev; |
lp | 693 | drivers/isdn/isdn_net.c | slp = (isdn_net_local *) (lp->srobin->priv); |
lp | 695 | drivers/isdn/isdn_net.c | lp->srobin = ndev; |
lp | 698 | drivers/isdn/isdn_net.c | if (lp->slave) { |
lp | 699 | drivers/isdn/isdn_net.c | if (!lp->sqfull) { |
lp | 701 | drivers/isdn/isdn_net.c | lp->sqfull = 1; |
lp | 702 | drivers/isdn/isdn_net.c | lp->sqfull_stamp = jiffies; |
lp | 706 | drivers/isdn/isdn_net.c | if ((jiffies - lp->sqfull_stamp) > lp->slavedelay) |
lp | 707 | drivers/isdn/isdn_net.c | isdn_net_force_dial_lp((isdn_net_local *) lp->slave->priv); |
lp | 713 | drivers/isdn/isdn_net.c | ret = isdn_net_send_skb(ndev, lp, skb); |
lp | 714 | drivers/isdn/isdn_net.c | if (lp->sqfull && ((jiffies - lp->sqfull_stamp) > (lp->slavedelay + (10*HZ) ))) |
lp | 715 | drivers/isdn/isdn_net.c | lp->sqfull = 0; |
lp | 728 | drivers/isdn/isdn_net.c | isdn_net_local *lp = (isdn_net_local *) ndev->priv; |
lp | 734 | drivers/isdn/isdn_net.c | if (!lp->dialstate) |
lp | 735 | drivers/isdn/isdn_net.c | lp->stats.tx_errors++; |
lp | 753 | drivers/isdn/isdn_net.c | if (!(lp->flags & ISDN_NET_CONNECTED)) { |
lp | 755 | drivers/isdn/isdn_net.c | if (lp->phone[1]) { |
lp | 762 | drivers/isdn/isdn_net.c | lp->l2_proto, |
lp | 763 | drivers/isdn/isdn_net.c | lp->l3_proto, |
lp | 764 | drivers/isdn/isdn_net.c | lp->pre_device, |
lp | 765 | drivers/isdn/isdn_net.c | lp->pre_channel)) < 0) { |
lp | 774 | drivers/isdn/isdn_net.c | isdn_net_log_packet(buf, lp); |
lp | 775 | drivers/isdn/isdn_net.c | lp->dialstate = 1; |
lp | 776 | drivers/isdn/isdn_net.c | lp->flags |= ISDN_NET_CONNECTED; |
lp | 778 | drivers/isdn/isdn_net.c | isdn_net_bind_channel(lp, chi); |
lp | 780 | drivers/isdn/isdn_net.c | if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP) |
lp | 781 | drivers/isdn/isdn_net.c | if (isdn_ppp_bind(lp) < 0) { |
lp | 782 | drivers/isdn/isdn_net.c | lp->dialstate = 0; |
lp | 783 | drivers/isdn/isdn_net.c | isdn_free_channel(lp->isdn_device, |
lp | 784 | drivers/isdn/isdn_net.c | lp->isdn_channel, |
lp | 793 | drivers/isdn/isdn_net.c | lp->first_skb = skb; |
lp | 821 | drivers/isdn/isdn_net.c | if (!lp->dialstate) { |
lp | 822 | drivers/isdn/isdn_net.c | if (lp->first_skb) { |
lp | 823 | drivers/isdn/isdn_net.c | if (isdn_net_xmit(ndev,lp,lp->first_skb)) |
lp | 825 | drivers/isdn/isdn_net.c | lp->first_skb = NULL; |
lp | 827 | drivers/isdn/isdn_net.c | return(isdn_net_xmit(ndev, lp, skb)); |
lp | 865 | drivers/isdn/isdn_net.c | isdn_net_local *lp = (isdn_net_local *) dev->priv; |
lp | 866 | drivers/isdn/isdn_net.c | return &lp->stats; |
lp | 928 | drivers/isdn/isdn_net.c | isdn_net_local *lp = (isdn_net_local *) ndev->priv; |
lp | 930 | drivers/isdn/isdn_net.c | isdn_net_local *olp = lp; /* original 'lp' */ |
lp | 933 | drivers/isdn/isdn_net.c | lp->transcount += skb->len; |
lp | 934 | drivers/isdn/isdn_net.c | lp->stats.rx_packets++; |
lp | 935 | drivers/isdn/isdn_net.c | lp->huptimer = 0; |
lp | 937 | drivers/isdn/isdn_net.c | if (lp->master) { |
lp | 941 | drivers/isdn/isdn_net.c | ndev = lp->master; |
lp | 942 | drivers/isdn/isdn_net.c | lp = (isdn_net_local *) ndev->priv; |
lp | 943 | drivers/isdn/isdn_net.c | lp->stats.rx_packets++; |
lp | 944 | drivers/isdn/isdn_net.c | lp->huptimer = 0; |
lp | 953 | drivers/isdn/isdn_net.c | switch (lp->p_encap) { |
lp | 975 | drivers/isdn/isdn_net.c | isdn_ppp_receive(lp->netdev, olp, skb); |
lp | 980 | drivers/isdn/isdn_net.c | lp->name); |
lp | 1000 | drivers/isdn/isdn_net.c | isdn_net_local *lp = &p->local; |
lp | 1001 | drivers/isdn/isdn_net.c | if ((lp->flags & ISDN_NET_CONNECTED) && |
lp | 1002 | drivers/isdn/isdn_net.c | (!lp->dialstate)) { |
lp | 1026 | drivers/isdn/isdn_net.c | isdn_net_local *lp = &p->local; |
lp | 1027 | drivers/isdn/isdn_net.c | if ((lp->flags & ISDN_NET_CONNECTED) && |
lp | 1028 | drivers/isdn/isdn_net.c | (!lp->dialstate)) { |
lp | 1087 | drivers/isdn/isdn_net.c | isdn_net_local *lp = dev->priv; |
lp | 1090 | drivers/isdn/isdn_net.c | switch (lp->p_encap) { |
lp | 1115 | drivers/isdn/isdn_net.c | if (lp->ppp_minor!=-1) { |
lp | 1116 | drivers/isdn/isdn_net.c | if (ippp_table[lp->ppp_minor].mpppcfg & |
lp | 1118 | drivers/isdn/isdn_net.c | if (ippp_table[lp->ppp_minor].mpppcfg & |
lp | 1143 | drivers/isdn/isdn_net.c | isdn_net_local *lp = dev->priv; |
lp | 1146 | drivers/isdn/isdn_net.c | if (lp->p_encap == ISDN_NET_ENCAP_ETHER) { |
lp | 1177 | drivers/isdn/isdn_net.c | isdn_net_local *lp = (isdn_net_local *)ndev->priv; |
lp | 1190 | drivers/isdn/isdn_net.c | lp->org_hcb = ndev->header_cache_bind; |
lp | 1191 | drivers/isdn/isdn_net.c | lp->org_hcu = ndev->header_cache_update; |
lp | 1529 | drivers/isdn/isdn_net.c | isdn_net_local *lp = &(p->local); |
lp | 1539 | drivers/isdn/isdn_net.c | lp->name); |
lp | 1545 | drivers/isdn/isdn_net.c | if (lp->master) { |
lp | 1546 | drivers/isdn/isdn_net.c | isdn_net_local *mlp = (isdn_net_local *) lp->master->priv; |
lp | 1547 | drivers/isdn/isdn_net.c | printk(KERN_DEBUG "ICALLslv: %s\n", lp->name); |
lp | 1553 | drivers/isdn/isdn_net.c | if ((isdn_net_local *) mlp->slave->priv == lp) |
lp | 1566 | drivers/isdn/isdn_net.c | if (lp->flags & ISDN_NET_CALLBACK) { |
lp | 1569 | drivers/isdn/isdn_net.c | lp->name, nr, eaz); |
lp | 1570 | drivers/isdn/isdn_net.c | if (lp->phone[1]) { |
lp | 1572 | drivers/isdn/isdn_net.c | if ((chi = isdn_get_free_channel(ISDN_USAGE_NET, lp->l2_proto, |
lp | 1573 | drivers/isdn/isdn_net.c | lp->l3_proto, |
lp | 1574 | drivers/isdn/isdn_net.c | lp->pre_device, |
lp | 1575 | drivers/isdn/isdn_net.c | lp->pre_channel)) < 0) { |
lp | 1576 | drivers/isdn/isdn_net.c | printk(KERN_WARNING "isdn_net_find_icall: No channel for %s\n", lp->name); |
lp | 1581 | drivers/isdn/isdn_net.c | lp->dialstate = 1; |
lp | 1582 | drivers/isdn/isdn_net.c | lp->flags |= ISDN_NET_CONNECTED; |
lp | 1584 | drivers/isdn/isdn_net.c | isdn_net_bind_channel(lp, chi); |
lp | 1586 | drivers/isdn/isdn_net.c | if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP) |
lp | 1587 | drivers/isdn/isdn_net.c | if (isdn_ppp_bind(lp) < 0) { |
lp | 1590 | drivers/isdn/isdn_net.c | lp->dialstate = 0; |
lp | 1599 | drivers/isdn/isdn_net.c | printk(KERN_WARNING "isdn_net: %s: No phone number\n", lp->name); |
lp | 1603 | drivers/isdn/isdn_net.c | printk(KERN_DEBUG "%s: call from %s -> %s accepted\n", lp->name, nr, |
lp | 1623 | drivers/isdn/isdn_net.c | dev->st_netdev[idx] = lp->netdev; |
lp | 1634 | drivers/isdn/isdn_net.c | if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP) |
lp | 1635 | drivers/isdn/isdn_net.c | if (isdn_ppp_bind(lp) < 0) { |
lp | 1638 | drivers/isdn/isdn_net.c | lp->dialstate = 0; |
lp | 1678 | drivers/isdn/isdn_net.c | int isdn_net_force_dial_lp(isdn_net_local * lp) |
lp | 1680 | drivers/isdn/isdn_net.c | if ((!(lp->flags & ISDN_NET_CONNECTED)) && !lp->dialstate) { |
lp | 1682 | drivers/isdn/isdn_net.c | if (lp->phone[1]) { |
lp | 1687 | drivers/isdn/isdn_net.c | if ((chi = isdn_get_free_channel(ISDN_USAGE_NET, lp->l2_proto, |
lp | 1688 | drivers/isdn/isdn_net.c | lp->l3_proto, |
lp | 1689 | drivers/isdn/isdn_net.c | lp->pre_device, |
lp | 1690 | drivers/isdn/isdn_net.c | lp->pre_channel)) < 0) { |
lp | 1691 | drivers/isdn/isdn_net.c | printk(KERN_WARNING "isdn_net_force_dial: No channel for %s\n", lp->name); |
lp | 1695 | drivers/isdn/isdn_net.c | lp->dialstate = 1; |
lp | 1696 | drivers/isdn/isdn_net.c | lp->flags |= ISDN_NET_CONNECTED; |
lp | 1698 | drivers/isdn/isdn_net.c | isdn_net_bind_channel(lp, chi); |
lp | 1700 | drivers/isdn/isdn_net.c | if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP) |
lp | 1701 | drivers/isdn/isdn_net.c | if (isdn_ppp_bind(lp) < 0) { |
lp | 1702 | drivers/isdn/isdn_net.c | lp->dialstate = 0; |
lp | 1703 | drivers/isdn/isdn_net.c | isdn_free_channel(lp->isdn_device, lp->isdn_channel, ISDN_USAGE_NET); |
lp | 59 | drivers/isdn/isdn_ppp.c | static void isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, |
lp | 76 | drivers/isdn/isdn_ppp.c | int isdn_ppp_free(isdn_net_local * lp) |
lp | 78 | drivers/isdn/isdn_ppp.c | if (lp->ppp_minor < 0) |
lp | 82 | drivers/isdn/isdn_ppp.c | if(lp->master) |
lp | 85 | drivers/isdn/isdn_ppp.c | lp->last->next = lp->next; |
lp | 86 | drivers/isdn/isdn_ppp.c | lp->next->last = lp->last; |
lp | 87 | drivers/isdn/isdn_ppp.c | if(lp->netdev->queue == lp) |
lp | 88 | drivers/isdn/isdn_ppp.c | lp->netdev->queue = lp->next; |
lp | 89 | drivers/isdn/isdn_ppp.c | lp->next = lp->last = lp; |
lp | 91 | drivers/isdn/isdn_ppp.c | if(lp == &p->local) { |
lp | 92 | drivers/isdn/isdn_ppp.c | lp->netdev = p; |
lp | 98 | drivers/isdn/isdn_ppp.c | lp->netdev->ib.bundled = 0; |
lp | 104 | drivers/isdn/isdn_ppp.c | isdn_ppp_hangup(lp->ppp_minor); |
lp | 106 | drivers/isdn/isdn_ppp.c | printk(KERN_DEBUG "isdn_ppp_free %d %lx %lx\n", lp->ppp_minor, (long) lp,(long) ippp_table[lp->ppp_minor].lp); |
lp | 108 | drivers/isdn/isdn_ppp.c | ippp_table[lp->ppp_minor].lp = NULL; |
lp | 112 | drivers/isdn/isdn_ppp.c | int isdn_ppp_bind(isdn_net_local * lp) |
lp | 119 | drivers/isdn/isdn_ppp.c | if (lp->p_encap != ISDN_NET_ENCAP_SYNCPPP) |
lp | 131 | drivers/isdn/isdn_ppp.c | printk(KERN_DEBUG "find_minor, %d lp: %08lx\n", i, (long) lp); |
lp | 142 | drivers/isdn/isdn_ppp.c | lp->ppp_minor = i; |
lp | 143 | drivers/isdn/isdn_ppp.c | ippp_table[lp->ppp_minor].lp = lp; |
lp | 145 | drivers/isdn/isdn_ppp.c | name = lp->name; |
lp | 147 | drivers/isdn/isdn_ppp.c | ippp_table[lp->ppp_minor].unit = unit; |
lp | 149 | drivers/isdn/isdn_ppp.c | ippp_table[lp->ppp_minor].state = IPPP_OPEN | IPPP_CONNECT | IPPP_NOBLOCK; |
lp | 156 | drivers/isdn/isdn_ppp.c | if (ippp_table[lp->ppp_minor].wq) |
lp | 157 | drivers/isdn/isdn_ppp.c | wake_up_interruptible(&ippp_table[lp->ppp_minor].wq); |
lp | 159 | drivers/isdn/isdn_ppp.c | return lp->ppp_minor; |
lp | 186 | drivers/isdn/isdn_ppp.c | ippp_table[minor].lp = 0; |
lp | 226 | drivers/isdn/isdn_ppp.c | printk(KERN_DEBUG "ippp: release, minor: %d %lx\n", minor, (long) ippp_table[minor].lp); |
lp | 229 | drivers/isdn/isdn_ppp.c | if (ippp_table[minor].lp) { /* a lp address says: this link is still up */ |
lp | 232 | drivers/isdn/isdn_ppp.c | if(&p->local == ippp_table[minor].lp) |
lp | 238 | drivers/isdn/isdn_ppp.c | p = ippp_table[minor].lp->netdev; |
lp | 240 | drivers/isdn/isdn_ppp.c | ippp_table[minor].lp->ppp_minor = -1; |
lp | 242 | drivers/isdn/isdn_ppp.c | ippp_table[minor].lp = NULL; |
lp | 327 | drivers/isdn/isdn_ppp.c | ippp_table[minor].lp->netdev->dev.tbusy = 0; |
lp | 489 | drivers/isdn/isdn_ppp.c | isdn_net_local *lp; |
lp | 494 | drivers/isdn/isdn_ppp.c | lp = ippp_table[minor].lp; |
lp | 498 | drivers/isdn/isdn_ppp.c | if (!lp) |
lp | 501 | drivers/isdn/isdn_ppp.c | if (lp->isdn_device < 0 || lp->isdn_channel < 0) |
lp | 504 | drivers/isdn/isdn_ppp.c | if (dev->drv[lp->isdn_device]->running && lp->dialstate == 0 && |
lp | 505 | drivers/isdn/isdn_ppp.c | (lp->flags & ISDN_NET_CONNECTED)) |
lp | 506 | drivers/isdn/isdn_ppp.c | dev->drv[lp->isdn_device]->interface->writebuf( |
lp | 507 | drivers/isdn/isdn_ppp.c | lp->isdn_device,lp->isdn_channel, buf, count, 1); |
lp | 551 | drivers/isdn/isdn_ppp.c | void isdn_ppp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff *skb) |
lp | 559 | drivers/isdn/isdn_ppp.c | else if (ippp_table[lp->ppp_minor].pppcfg & SC_REJ_COMP_AC) |
lp | 563 | drivers/isdn/isdn_ppp.c | if (!(ippp_table[lp->ppp_minor].mpppcfg & SC_REJ_MP_PROT)) { |
lp | 578 | drivers/isdn/isdn_ppp.c | printk(KERN_DEBUG "recv: %d/%04x/%d -> %02x %02x %02x %02x %02x %02x\n", lp->ppp_minor, proto , |
lp | 582 | drivers/isdn/isdn_ppp.c | if (!(ippp_table[lp->ppp_minor].mpppcfg & SC_IN_SHORT_SEQ)) { |
lp | 590 | drivers/isdn/isdn_ppp.c | if ((tseq = ippp_table[lp->ppp_minor].last_link_seqno) >= sqno) { |
lp | 591 | drivers/isdn/isdn_ppp.c | int range = ippp_table[lp->ppp_minor].range; |
lp | 596 | drivers/isdn/isdn_ppp.c | ippp_table[lp->ppp_minor].last_link_seqno = sqno; |
lp | 599 | drivers/isdn/isdn_ppp.c | ippp_table[lp->ppp_minor].last_link_seqno = sqno; |
lp | 629 | drivers/isdn/isdn_ppp.c | printk(KERN_DEBUG "ippp: trying ;) to fill mp_queue %d .. UNTESTED!!\n", lp->ppp_minor); |
lp | 684 | drivers/isdn/isdn_ppp.c | isdn_ppp_push_higher(net_dev, lp, skb, -1); |
lp | 690 | drivers/isdn/isdn_ppp.c | isdn_ppp_push_higher(net_dev, lp, q->skb, -1); |
lp | 699 | drivers/isdn/isdn_ppp.c | isdn_ppp_push_higher(net_dev, lp, skb , proto); |
lp | 702 | drivers/isdn/isdn_ppp.c | isdn_ppp_push_higher(net_dev, lp, skb , -1); |
lp | 706 | drivers/isdn/isdn_ppp.c | static void isdn_ppp_push_higher(isdn_net_dev *net_dev, isdn_net_local *lp, struct sk_buff *skb,int proto) |
lp | 763 | drivers/isdn/isdn_ppp.c | lp->stats.rx_dropped++; |
lp | 773 | drivers/isdn/isdn_ppp.c | isdn_ppp_fill_rq(skb->data, skb->len, lp->ppp_minor); /* push data to pppd device */ |
lp | 781 | drivers/isdn/isdn_ppp.c | lp->huptimer = 0; |
lp | 793 | drivers/isdn/isdn_ppp.c | isdn_net_local *lp = nd->queue; |
lp | 795 | drivers/isdn/isdn_ppp.c | struct ippp_struct *ipt = ippp_table + lp->ppp_minor; |
lp | 796 | drivers/isdn/isdn_ppp.c | struct ippp_struct *ipts = ippp_table + lp->netdev->local.ppp_minor; |
lp | 803 | drivers/isdn/isdn_ppp.c | return (isdn_net_send_skb(dev , lp , skb)); |
lp | 875 | drivers/isdn/isdn_ppp.c | lp->huptimer = 0; |
lp | 877 | drivers/isdn/isdn_ppp.c | printk(KERN_INFO "isdn, xmit: Packet blocked: %d %d\n", lp->isdn_device, lp->isdn_channel); |
lp | 881 | drivers/isdn/isdn_ppp.c | return (isdn_net_send_skb(dev , lp , skb)); |
lp | 902 | drivers/isdn/isdn_ppp.c | isdn_net_local *lp,*nlp; |
lp | 914 | drivers/isdn/isdn_ppp.c | nlp = ippp_table[minor].lp; |
lp | 916 | drivers/isdn/isdn_ppp.c | lp = p->queue; |
lp | 918 | drivers/isdn/isdn_ppp.c | nlp->last = lp->last; |
lp | 919 | drivers/isdn/isdn_ppp.c | lp->last->next = nlp; |
lp | 920 | drivers/isdn/isdn_ppp.c | lp->last = nlp; |
lp | 921 | drivers/isdn/isdn_ppp.c | nlp->next = lp; |
lp | 924 | drivers/isdn/isdn_ppp.c | nlp->netdev = lp->netdev; |
lp | 926 | drivers/isdn/isdn_ppp.c | ippp_table[nlp->ppp_minor].unit = ippp_table[lp->ppp_minor].unit; |
lp | 928 | drivers/isdn/isdn_ppp.c | ippp_table[nlp->ppp_minor].pppcfg |= ippp_table[lp->ppp_minor].pppcfg & |
lp | 931 | drivers/isdn/isdn_ppp.c | ippp_table[nlp->ppp_minor].mpppcfg |= ippp_table[lp->ppp_minor].mpppcfg & |
lp | 934 | drivers/isdn/isdn_ppp.c | if (ippp_table[nlp->ppp_minor].mpppcfg != ippp_table[lp->ppp_minor].mpppcfg) { |
lp | 936 | drivers/isdn/isdn_ppp.c | ippp_table[nlp->ppp_minor].mpppcfg, ippp_table[lp->ppp_minor].mpppcfg); |
lp | 1127 | drivers/isdn/isdn_ppp.c | isdn_net_local *lp = &net_dev->local; |
lp | 1141 | drivers/isdn/isdn_ppp.c | isdn_ppp_push_higher(net_dev, lp, ql->skb, -1); |
lp | 1160 | drivers/isdn/isdn_ppp.c | isdn_net_local *lp = (isdn_net_local *) dev->priv; |
lp | 1162 | drivers/isdn/isdn_ppp.c | if (lp->p_encap != ISDN_NET_ENCAP_SYNCPPP) |
lp | 1204 | drivers/isdn/isdn_ppp.c | isdn_net_local *lp; |
lp | 1209 | drivers/isdn/isdn_ppp.c | lp = &ndev->local; |
lp | 1210 | drivers/isdn/isdn_ppp.c | if(!(lp->flags & ISDN_NET_CONNECTED)) |
lp | 1213 | drivers/isdn/isdn_ppp.c | sdev = lp->slave; |
lp | 378 | drivers/net/3c501.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 396 | drivers/net/3c501.c | lp->stats.tx_errors++; |
lp | 436 | drivers/net/3c501.c | lp->tx_pkt_start = gp_start; |
lp | 437 | drivers/net/3c501.c | lp->collisions = 0; |
lp | 451 | drivers/net/3c501.c | lp->loading=1; |
lp | 464 | drivers/net/3c501.c | if(lp->loading==2) /* A receive upset our load, despite our best efforts */ |
lp | 472 | drivers/net/3c501.c | lp->loading=0; |
lp | 494 | drivers/net/3c501.c | struct net_local *lp; |
lp | 505 | drivers/net/3c501.c | lp = (struct net_local *)dev->priv; |
lp | 523 | drivers/net/3c501.c | if(lp->loading==1 && !dev->tbusy) |
lp | 528 | drivers/net/3c501.c | lp->loading=2; /* So we can spot loading interruptions */ |
lp | 541 | drivers/net/3c501.c | if(lp->loading==1) |
lp | 548 | drivers/net/3c501.c | lp->loading=2; /* Force a reload */ |
lp | 576 | drivers/net/3c501.c | lp->stats.tx_aborted_errors++; |
lp | 591 | drivers/net/3c501.c | outw(lp->tx_pkt_start, GP_LOW); |
lp | 593 | drivers/net/3c501.c | lp->stats.collisions++; |
lp | 602 | drivers/net/3c501.c | lp->stats.tx_packets++; |
lp | 627 | drivers/net/3c501.c | lp->stats.rx_missed_errors++; |
lp | 630 | drivers/net/3c501.c | lp->stats.rx_length_errors++; |
lp | 675 | drivers/net/3c501.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 689 | drivers/net/3c501.c | lp->stats.rx_over_errors++; |
lp | 708 | drivers/net/3c501.c | lp->stats.rx_dropped++; |
lp | 723 | drivers/net/3c501.c | lp->stats.rx_packets++; |
lp | 777 | drivers/net/3c501.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 778 | drivers/net/3c501.c | return &lp->stats; |
lp | 453 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 468 | drivers/net/3c507.c | if (lp->last_restart == lp->stats.tx_packets) { |
lp | 477 | drivers/net/3c507.c | lp->last_restart = lp->stats.tx_packets; |
lp | 519 | drivers/net/3c507.c | struct net_local *lp; |
lp | 531 | drivers/net/3c507.c | lp = (struct net_local *)dev->priv; |
lp | 544 | drivers/net/3c507.c | while (lp->tx_reap != lp->tx_head) { |
lp | 545 | drivers/net/3c507.c | unsigned short tx_status = shmem[lp->tx_reap>>1]; |
lp | 548 | drivers/net/3c507.c | if (net_debug > 5) printk("Couldn't reap %#x.\n", lp->tx_reap); |
lp | 552 | drivers/net/3c507.c | lp->stats.tx_packets++; |
lp | 553 | drivers/net/3c507.c | lp->stats.collisions += tx_status & 0xf; |
lp | 557 | drivers/net/3c507.c | lp->stats.tx_errors++; |
lp | 558 | drivers/net/3c507.c | if (tx_status & 0x0600) lp->stats.tx_carrier_errors++; |
lp | 559 | drivers/net/3c507.c | if (tx_status & 0x0100) lp->stats.tx_fifo_errors++; |
lp | 560 | drivers/net/3c507.c | if (!(tx_status & 0x0040)) lp->stats.tx_heartbeat_errors++; |
lp | 561 | drivers/net/3c507.c | if (tx_status & 0x0020) lp->stats.tx_aborted_errors++; |
lp | 564 | drivers/net/3c507.c | printk("Reaped %x, Tx status %04x.\n" , lp->tx_reap, tx_status); |
lp | 565 | drivers/net/3c507.c | lp->tx_reap += TX_BUF_SIZE; |
lp | 566 | drivers/net/3c507.c | if (lp->tx_reap > RX_BUF_START - TX_BUF_SIZE) |
lp | 567 | drivers/net/3c507.c | lp->tx_reap = TX_BUF_START; |
lp | 574 | drivers/net/3c507.c | printk("Received packet, rx_head %04x.\n", lp->rx_head); |
lp | 648 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 652 | drivers/net/3c507.c | return &lp->stats; |
lp | 659 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 663 | drivers/net/3c507.c | int cur_rxbuf = lp->rx_head = RX_BUF_START; |
lp | 689 | drivers/net/3c507.c | lp->rx_tail = cur_rxbuf; |
lp | 696 | drivers/net/3c507.c | (dev->mem_start + lp->rx_tail + 2); |
lp | 698 | drivers/net/3c507.c | *write_ptr++ = lp->rx_head; /* Link */ |
lp | 705 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 728 | drivers/net/3c507.c | lp->tx_cmd_link = IDLELOOP + 4; |
lp | 729 | drivers/net/3c507.c | lp->tx_head = lp->tx_reap = TX_BUF_START; |
lp | 764 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 766 | drivers/net/3c507.c | ushort tx_block = lp->tx_head; |
lp | 790 | drivers/net/3c507.c | *(ushort*)(dev->mem_start + lp->tx_cmd_link) = tx_block; |
lp | 791 | drivers/net/3c507.c | lp->tx_cmd_link = tx_block + 20; |
lp | 794 | drivers/net/3c507.c | lp->tx_head = tx_block + TX_BUF_SIZE; |
lp | 795 | drivers/net/3c507.c | if (lp->tx_head > RX_BUF_START - TX_BUF_SIZE) |
lp | 796 | drivers/net/3c507.c | lp->tx_head = TX_BUF_START; |
lp | 800 | drivers/net/3c507.c | dev->name, ioaddr, length, tx_block, lp->tx_head); |
lp | 803 | drivers/net/3c507.c | if (lp->tx_head != lp->tx_reap) |
lp | 810 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 812 | drivers/net/3c507.c | ushort rx_head = lp->rx_head; |
lp | 813 | drivers/net/3c507.c | ushort rx_tail = lp->rx_tail; |
lp | 833 | drivers/net/3c507.c | lp->stats.rx_errors++; |
lp | 834 | drivers/net/3c507.c | if (frame_status & 0x0800) lp->stats.rx_crc_errors++; |
lp | 835 | drivers/net/3c507.c | if (frame_status & 0x0400) lp->stats.rx_frame_errors++; |
lp | 836 | drivers/net/3c507.c | if (frame_status & 0x0200) lp->stats.rx_fifo_errors++; |
lp | 837 | drivers/net/3c507.c | if (frame_status & 0x0100) lp->stats.rx_over_errors++; |
lp | 838 | drivers/net/3c507.c | if (frame_status & 0x0080) lp->stats.rx_length_errors++; |
lp | 847 | drivers/net/3c507.c | lp->stats.rx_dropped++; |
lp | 859 | drivers/net/3c507.c | lp->stats.rx_packets++; |
lp | 874 | drivers/net/3c507.c | lp->rx_head = rx_head; |
lp | 875 | drivers/net/3c507.c | lp->rx_tail = rx_tail; |
lp | 384 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
lp | 456 | drivers/net/3c509.c | if (tx_status & 0x38) lp->stats.tx_aborted_errors++; |
lp | 529 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
lp | 536 | drivers/net/3c509.c | return &lp->stats; |
lp | 546 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
lp | 554 | drivers/net/3c509.c | lp->stats.tx_carrier_errors += inb(ioaddr + 0); |
lp | 555 | drivers/net/3c509.c | lp->stats.tx_heartbeat_errors += inb(ioaddr + 1); |
lp | 557 | drivers/net/3c509.c | lp->stats.collisions += inb(ioaddr + 3); |
lp | 558 | drivers/net/3c509.c | lp->stats.tx_window_errors += inb(ioaddr + 4); |
lp | 559 | drivers/net/3c509.c | lp->stats.rx_fifo_errors += inb(ioaddr + 5); |
lp | 560 | drivers/net/3c509.c | lp->stats.tx_packets += inb(ioaddr + 6); |
lp | 575 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
lp | 585 | drivers/net/3c509.c | lp->stats.rx_errors++; |
lp | 587 | drivers/net/3c509.c | case 0x0000: lp->stats.rx_over_errors++; break; |
lp | 588 | drivers/net/3c509.c | case 0x0800: lp->stats.rx_length_errors++; break; |
lp | 589 | drivers/net/3c509.c | case 0x1000: lp->stats.rx_frame_errors++; break; |
lp | 590 | drivers/net/3c509.c | case 0x1800: lp->stats.rx_length_errors++; break; |
lp | 591 | drivers/net/3c509.c | case 0x2000: lp->stats.rx_frame_errors++; break; |
lp | 592 | drivers/net/3c509.c | case 0x2800: lp->stats.rx_crc_errors++; break; |
lp | 613 | drivers/net/3c509.c | lp->stats.rx_packets++; |
lp | 619 | drivers/net/3c509.c | lp->stats.rx_dropped++; |
lp | 746 | drivers/net/3c59x.c | struct vortex_private *lp; |
lp | 762 | drivers/net/3c59x.c | lp = (struct vortex_private *)dev->priv; |
lp | 197 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 201 | drivers/net/apricot.c | lp->scb.rfd = (struct i596_rfd *)I596_NULL; |
lp | 217 | drivers/net/apricot.c | lp->rx_tail = rfd; |
lp | 222 | drivers/net/apricot.c | rfd->next = lp->scb.rfd; |
lp | 223 | drivers/net/apricot.c | lp->scb.rfd = rfd; |
lp | 227 | drivers/net/apricot.c | lp->rx_tail->next = lp->scb.rfd; |
lp | 235 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 236 | drivers/net/apricot.c | struct i596_rfd *rfd = lp->scb.rfd; |
lp | 238 | drivers/net/apricot.c | lp->rx_tail->next = (struct i596_rfd *)I596_NULL; |
lp | 242 | drivers/net/apricot.c | lp->scb.rfd = rfd->next; |
lp | 244 | drivers/net/apricot.c | rfd = lp->scb.rfd; |
lp | 246 | drivers/net/apricot.c | while (rfd != lp->rx_tail); |
lp | 252 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 260 | drivers/net/apricot.c | outw(((((int)&lp->scp) & 0xffff) | 2), ioaddr); |
lp | 261 | drivers/net/apricot.c | outw((((int)&lp->scp)>>16) & 0xffff, ioaddr); |
lp | 263 | drivers/net/apricot.c | lp->last_cmd = jiffies; |
lp | 265 | drivers/net/apricot.c | lp->scp.sysbus = 0x00440000; |
lp | 266 | drivers/net/apricot.c | lp->scp.iscp = &(lp->iscp); |
lp | 267 | drivers/net/apricot.c | lp->iscp.scb = &(lp->scb); |
lp | 268 | drivers/net/apricot.c | lp->iscp.stat = 0x0001; |
lp | 269 | drivers/net/apricot.c | lp->cmd_backlog = 0; |
lp | 271 | drivers/net/apricot.c | lp->cmd_head = lp->scb.cmd = (struct i596_cmd *) I596_NULL; |
lp | 279 | drivers/net/apricot.c | while (lp->iscp.stat) |
lp | 283 | drivers/net/apricot.c | dev->name, lp->scb.status, lp->scb.command); |
lp | 287 | drivers/net/apricot.c | lp->scb.command = 0; |
lp | 289 | drivers/net/apricot.c | memcpy (lp->i596_config, init_setup, 14); |
lp | 290 | drivers/net/apricot.c | lp->set_conf.command = CmdConfigure; |
lp | 291 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->set_conf); |
lp | 293 | drivers/net/apricot.c | memcpy (lp->eth_addr, dev->dev_addr, 6); |
lp | 294 | drivers/net/apricot.c | lp->set_add.command = CmdSASetup; |
lp | 295 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->set_add); |
lp | 297 | drivers/net/apricot.c | lp->tdr.command = CmdTDR; |
lp | 298 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->tdr); |
lp | 301 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 305 | drivers/net/apricot.c | dev->name, lp->scb.status, lp->scb.command); |
lp | 309 | drivers/net/apricot.c | lp->scb.command = RX_START; |
lp | 313 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 317 | drivers/net/apricot.c | lp->scb.status, lp->scb.command); |
lp | 327 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 332 | drivers/net/apricot.c | while ((lp->scb.rfd->stat) & STAT_C) |
lp | 334 | drivers/net/apricot.c | if (i596_debug >2) print_eth(lp->scb.rfd->data); |
lp | 336 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & STAT_OK) |
lp | 339 | drivers/net/apricot.c | int pkt_len = lp->scb.rfd->count & 0x3fff; |
lp | 347 | drivers/net/apricot.c | lp->stats.rx_dropped++; |
lp | 352 | drivers/net/apricot.c | memcpy(skb_put(skb,pkt_len), lp->scb.rfd->data, pkt_len); |
lp | 356 | drivers/net/apricot.c | lp->stats.rx_packets++; |
lp | 362 | drivers/net/apricot.c | lp->stats.rx_errors++; |
lp | 363 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x0001) lp->stats.collisions++; |
lp | 364 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x0080) lp->stats.rx_length_errors++; |
lp | 365 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x0100) lp->stats.rx_over_errors++; |
lp | 366 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x0200) lp->stats.rx_fifo_errors++; |
lp | 367 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x0400) lp->stats.rx_frame_errors++; |
lp | 368 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x0800) lp->stats.rx_crc_errors++; |
lp | 369 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x1000) lp->stats.rx_length_errors++; |
lp | 372 | drivers/net/apricot.c | lp->scb.rfd->stat = 0; |
lp | 373 | drivers/net/apricot.c | lp->rx_tail->cmd = 0; |
lp | 374 | drivers/net/apricot.c | lp->rx_tail = lp->scb.rfd; |
lp | 375 | drivers/net/apricot.c | lp->scb.rfd = lp->scb.rfd->next; |
lp | 376 | drivers/net/apricot.c | lp->rx_tail->count = 0; |
lp | 377 | drivers/net/apricot.c | lp->rx_tail->cmd = CMD_EOL; |
lp | 387 | drivers/net/apricot.c | i596_cleanup_cmd(struct i596_private *lp) |
lp | 394 | drivers/net/apricot.c | while (lp->cmd_head != (struct i596_cmd *) I596_NULL) |
lp | 396 | drivers/net/apricot.c | ptr = lp->cmd_head; |
lp | 398 | drivers/net/apricot.c | lp->cmd_head = lp->cmd_head->next; |
lp | 399 | drivers/net/apricot.c | lp->cmd_backlog--; |
lp | 410 | drivers/net/apricot.c | lp->stats.tx_errors++; |
lp | 411 | drivers/net/apricot.c | lp->stats.tx_aborted_errors++; |
lp | 430 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 434 | drivers/net/apricot.c | lp->scb.status, lp->scb.command); |
lp | 438 | drivers/net/apricot.c | lp->scb.cmd = lp->cmd_head; |
lp | 442 | drivers/net/apricot.c | i596_reset(struct device *dev, struct i596_private *lp, int ioaddr) |
lp | 448 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 452 | drivers/net/apricot.c | lp->scb.status, lp->scb.command); |
lp | 459 | drivers/net/apricot.c | lp->scb.command = CUC_ABORT|RX_ABORT; |
lp | 465 | drivers/net/apricot.c | while ((lp->scb.status, lp->scb.command) || lp->scb.command) |
lp | 469 | drivers/net/apricot.c | lp->scb.status, lp->scb.command); |
lp | 473 | drivers/net/apricot.c | i596_cleanup_cmd(lp); |
lp | 484 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 497 | drivers/net/apricot.c | if (lp->cmd_head != (struct i596_cmd *) I596_NULL) |
lp | 498 | drivers/net/apricot.c | lp->cmd_tail->next = cmd; |
lp | 501 | drivers/net/apricot.c | lp->cmd_head = cmd; |
lp | 502 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 506 | drivers/net/apricot.c | lp->scb.status, lp->scb.command); |
lp | 510 | drivers/net/apricot.c | lp->scb.cmd = cmd; |
lp | 511 | drivers/net/apricot.c | lp->scb.command = CUC_START; |
lp | 514 | drivers/net/apricot.c | lp->cmd_tail = cmd; |
lp | 515 | drivers/net/apricot.c | lp->cmd_backlog++; |
lp | 517 | drivers/net/apricot.c | lp->cmd_head = lp->scb.cmd; |
lp | 520 | drivers/net/apricot.c | if (lp->cmd_backlog > 16) |
lp | 522 | drivers/net/apricot.c | int tickssofar = jiffies - lp->last_cmd; |
lp | 528 | drivers/net/apricot.c | i596_reset(dev, lp, ioaddr); |
lp | 571 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 584 | drivers/net/apricot.c | lp->stats.tx_errors++; |
lp | 586 | drivers/net/apricot.c | if (lp->last_restart == lp->stats.tx_packets) { |
lp | 590 | drivers/net/apricot.c | i596_reset(dev,lp, ioaddr); |
lp | 595 | drivers/net/apricot.c | lp->scb.command = CUC_START|RX_START; |
lp | 598 | drivers/net/apricot.c | lp->last_restart = lp->stats.tx_packets; |
lp | 630 | drivers/net/apricot.c | lp->stats.tx_dropped++; |
lp | 652 | drivers/net/apricot.c | lp->stats.tx_packets++; |
lp | 681 | drivers/net/apricot.c | struct i596_private *lp; |
lp | 736 | drivers/net/apricot.c | lp = (struct i596_private *)dev->priv; |
lp | 737 | drivers/net/apricot.c | memset((void *)lp, 0, sizeof(struct i596_private)); |
lp | 738 | drivers/net/apricot.c | lp->scb.command = 0; |
lp | 739 | drivers/net/apricot.c | lp->scb.cmd = (struct i596_cmd *) I596_NULL; |
lp | 740 | drivers/net/apricot.c | lp->scb.rfd = (struct i596_rfd *)I596_NULL; |
lp | 749 | drivers/net/apricot.c | struct i596_private *lp; |
lp | 768 | drivers/net/apricot.c | lp = (struct i596_private *)dev->priv; |
lp | 770 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 773 | drivers/net/apricot.c | printk("%s: i596 interrupt, timeout status %4.4x command %4.4x.\n", dev->name, lp->scb.status, lp->scb.command); |
lp | 776 | drivers/net/apricot.c | status = lp->scb.status; |
lp | 792 | drivers/net/apricot.c | while ((lp->cmd_head != (struct i596_cmd *) I596_NULL) && (lp->cmd_head->status & STAT_C)) |
lp | 794 | drivers/net/apricot.c | ptr = lp->cmd_head; |
lp | 796 | drivers/net/apricot.c | lp->cmd_head = lp->cmd_head->next; |
lp | 797 | drivers/net/apricot.c | lp->cmd_backlog--; |
lp | 814 | drivers/net/apricot.c | lp->stats.tx_errors++; |
lp | 815 | drivers/net/apricot.c | if ((ptr->status) & 0x0020) lp->stats.collisions++; |
lp | 816 | drivers/net/apricot.c | if (!((ptr->status) & 0x0040)) lp->stats.tx_heartbeat_errors++; |
lp | 817 | drivers/net/apricot.c | if ((ptr->status) & 0x0400) lp->stats.tx_carrier_errors++; |
lp | 818 | drivers/net/apricot.c | if ((ptr->status) & 0x0800) lp->stats.collisions++; |
lp | 819 | drivers/net/apricot.c | if ((ptr->status) & 0x1000) lp->stats.tx_aborted_errors++; |
lp | 859 | drivers/net/apricot.c | lp->last_cmd = jiffies; |
lp | 863 | drivers/net/apricot.c | ptr = lp->cmd_head; |
lp | 864 | drivers/net/apricot.c | while ((ptr != (struct i596_cmd *) I596_NULL) && (ptr != lp->cmd_tail)) |
lp | 870 | drivers/net/apricot.c | if ((lp->cmd_head != (struct i596_cmd *) I596_NULL) && (dev->start)) ack_cmd |= CUC_START; |
lp | 871 | drivers/net/apricot.c | lp->scb.cmd = lp->cmd_head; |
lp | 892 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 895 | drivers/net/apricot.c | printk("%s: i596 interrupt, timeout status %4.4x command %4.4x.\n", dev->name, lp->scb.status, lp->scb.command); |
lp | 898 | drivers/net/apricot.c | lp->scb.command = ack_cmd; |
lp | 915 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 923 | drivers/net/apricot.c | dev->name, lp->scb.status); |
lp | 925 | drivers/net/apricot.c | lp->scb.command = CUC_ABORT|RX_ABORT; |
lp | 928 | drivers/net/apricot.c | i596_cleanup_cmd(lp); |
lp | 930 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 934 | drivers/net/apricot.c | dev->name, lp->scb.status, lp->scb.command); |
lp | 948 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 950 | drivers/net/apricot.c | return &lp->stats; |
lp | 959 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 988 | drivers/net/apricot.c | if (lp->set_conf.next != (struct i596_cmd * ) I596_NULL) |
lp | 994 | drivers/net/apricot.c | lp->i596_config[8] &= ~0x01; |
lp | 997 | drivers/net/apricot.c | lp->i596_config[8] |= 0x01; |
lp | 999 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->set_conf); |
lp | 350 | drivers/net/arcnet.c | #define ADEV lp->adev |
lp | 353 | drivers/net/arcnet.c | #define EDEV lp->edev |
lp | 355 | drivers/net/arcnet.c | #define EDEV lp->adev |
lp | 359 | drivers/net/arcnet.c | #define SDEV lp->sdev |
lp | 361 | drivers/net/arcnet.c | #define SDEV lp->adev |
lp | 384 | drivers/net/arcnet.c | #define SETMASK outb(lp->intmask,INTMASK); |
lp | 1104 | drivers/net/arcnet.c | struct arcnet_local *lp; |
lp | 1148 | drivers/net/arcnet.c | lp=(struct arcnet_local *)(dev->priv); |
lp | 1166 | drivers/net/arcnet.c | lp->sequence=1; |
lp | 1167 | drivers/net/arcnet.c | lp->recbuf=0; |
lp | 1175 | drivers/net/arcnet.c | lp->stationid = first_mirror[1]; |
lp | 1176 | drivers/net/arcnet.c | if (lp->stationid==0) |
lp | 1179 | drivers/net/arcnet.c | else if (lp->stationid==255) |
lp | 1182 | drivers/net/arcnet.c | dev->dev_addr[0]=lp->stationid; |
lp | 1186 | drivers/net/arcnet.c | lp->stationid, |
lp | 1203 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)dev->priv; |
lp | 1205 | drivers/net/arcnet.c | int delayval,recbuf=lp->recbuf; |
lp | 1209 | drivers/net/arcnet.c | lp->intmask=0; |
lp | 1234 | drivers/net/arcnet.c | recbuf=lp->recbuf=0; |
lp | 1235 | drivers/net/arcnet.c | lp->txbuf=2; |
lp | 1250 | drivers/net/arcnet.c | lp->intmask|=NORXflag; |
lp | 1252 | drivers/net/arcnet.c | lp->intmask|=RECONflag; |
lp | 1309 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1336 | drivers/net/arcnet.c | lp->intx=0; |
lp | 1337 | drivers/net/arcnet.c | lp->in_txhandler=0; |
lp | 1340 | drivers/net/arcnet.c | lp->adev=dev; |
lp | 1345 | drivers/net/arcnet.c | lp->edev=(struct device *)kmalloc(sizeof(struct device),GFP_KERNEL); |
lp | 1346 | drivers/net/arcnet.c | if (lp->edev == NULL) |
lp | 1348 | drivers/net/arcnet.c | memcpy(lp->edev,dev,sizeof(struct device)); |
lp | 1349 | drivers/net/arcnet.c | lp->edev->name=(char *)kmalloc(10,GFP_KERNEL); |
lp | 1350 | drivers/net/arcnet.c | if (lp->edev->name == NULL) { |
lp | 1351 | drivers/net/arcnet.c | kfree(lp->edev); |
lp | 1352 | drivers/net/arcnet.c | lp->edev = NULL; |
lp | 1355 | drivers/net/arcnet.c | sprintf(lp->edev->name,"%se",dev->name); |
lp | 1356 | drivers/net/arcnet.c | lp->edev->init=arcnetE_init; |
lp | 1357 | drivers/net/arcnet.c | register_netdev(lp->edev); |
lp | 1364 | drivers/net/arcnet.c | lp->sdev=(struct device *)kmalloc(sizeof(struct device),GFP_KERNEL); |
lp | 1365 | drivers/net/arcnet.c | memcpy(lp->sdev,dev,sizeof(struct device)); |
lp | 1366 | drivers/net/arcnet.c | lp->sdev->name=(char *)kmalloc(10,GFP_KERNEL); |
lp | 1367 | drivers/net/arcnet.c | sprintf(lp->sdev->name,"%ss",dev->name); |
lp | 1368 | drivers/net/arcnet.c | lp->sdev->init=arcnetS_init; |
lp | 1369 | drivers/net/arcnet.c | register_netdev(lp->sdev); |
lp | 1400 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1409 | drivers/net/arcnet.c | lp->intmask=0; |
lp | 1419 | drivers/net/arcnet.c | lp->adev=NULL; |
lp | 1423 | drivers/net/arcnet.c | lp->edev->priv=NULL; |
lp | 1424 | drivers/net/arcnet.c | dev_close(lp->edev); |
lp | 1425 | drivers/net/arcnet.c | unregister_netdev(lp->edev); |
lp | 1426 | drivers/net/arcnet.c | kfree(lp->edev->name); |
lp | 1427 | drivers/net/arcnet.c | kfree(lp->edev); |
lp | 1428 | drivers/net/arcnet.c | lp->edev=NULL; |
lp | 1433 | drivers/net/arcnet.c | lp->sdev->priv=NULL; |
lp | 1434 | drivers/net/arcnet.c | dev_close(lp->sdev); |
lp | 1435 | drivers/net/arcnet.c | unregister_netdev(lp->sdev); |
lp | 1436 | drivers/net/arcnet.c | kfree(lp->sdev->name); |
lp | 1437 | drivers/net/arcnet.c | kfree(lp->sdev); |
lp | 1438 | drivers/net/arcnet.c | lp->sdev=NULL; |
lp | 1460 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1464 | drivers/net/arcnet.c | inb(STATUS),lp->intx); |
lp | 1466 | drivers/net/arcnet.c | if (lp->in_txhandler) |
lp | 1469 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 1473 | drivers/net/arcnet.c | if (lp->intx>1) |
lp | 1476 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 1491 | drivers/net/arcnet.c | status,tickssofar,lp->outgoing.skb, |
lp | 1492 | drivers/net/arcnet.c | lp->outgoing.numsegs, |
lp | 1493 | drivers/net/arcnet.c | lp->outgoing.segnum); |
lp | 1497 | drivers/net/arcnet.c | lp->intmask &= ~TXFREEflag; |
lp | 1503 | drivers/net/arcnet.c | status,tickssofar,lp->intmask,lp->lasttrans_dest); |
lp | 1504 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 1509 | drivers/net/arcnet.c | status,tickssofar,lp->intmask,lp->lasttrans_dest); |
lp | 1510 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 1511 | drivers/net/arcnet.c | lp->stats.tx_aborted_errors++; |
lp | 1516 | drivers/net/arcnet.c | if (lp->outgoing.skb) |
lp | 1518 | drivers/net/arcnet.c | dev_kfree_skb(lp->outgoing.skb,FREE_WRITE); |
lp | 1519 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 1521 | drivers/net/arcnet.c | lp->outgoing.skb=NULL; |
lp | 1524 | drivers/net/arcnet.c | lp->txready=0; |
lp | 1525 | drivers/net/arcnet.c | lp->sending=0; |
lp | 1535 | drivers/net/arcnet.c | inb(STATUS),lp->intx,jiffies-dev->trans_start); |
lp | 1536 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 1541 | drivers/net/arcnet.c | if (lp->txready) /* transmit already in progress! */ |
lp | 1545 | drivers/net/arcnet.c | lp->intmask &= ~TXFREEflag; |
lp | 1549 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 1550 | drivers/net/arcnet.c | lp->stats.tx_fifo_errors++; |
lp | 1551 | drivers/net/arcnet.c | lp->txready=0; /* we definitely need this line! */ |
lp | 1561 | drivers/net/arcnet.c | inb(STATUS),lp->intx,jiffies-dev->trans_start); |
lp | 1562 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 1563 | drivers/net/arcnet.c | lp->stats.tx_fifo_errors++; |
lp | 1576 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1578 | drivers/net/arcnet.c | struct Outgoing *out=&(lp->outgoing); |
lp | 1580 | drivers/net/arcnet.c | lp->intx++; |
lp | 1585 | drivers/net/arcnet.c | lp->intx--; |
lp | 1597 | drivers/net/arcnet.c | out->hdr->sequence=(lp->sequence++); |
lp | 1643 | drivers/net/arcnet.c | if (!lp->txready) |
lp | 1670 | drivers/net/arcnet.c | lp->intx--; |
lp | 1673 | drivers/net/arcnet.c | lp->intmask |= TXFREEflag; |
lp | 1686 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1688 | drivers/net/arcnet.c | struct Outgoing *out=&(lp->outgoing); |
lp | 1691 | drivers/net/arcnet.c | inb(STATUS),lp->intx,lp->in_txhandler,lp->intmask); |
lp | 1693 | drivers/net/arcnet.c | if (lp->txready) |
lp | 1734 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1737 | drivers/net/arcnet.c | (union ArcPacket *)(dev->mem_start+512*(lp->txbuf^1)); |
lp | 1744 | drivers/net/arcnet.c | lp->txbuf=lp->txbuf^1; /* XOR with 1 to alternate between 2 and 3 */ |
lp | 1754 | drivers/net/arcnet.c | memset((void *)dev->mem_start+lp->txbuf*512,0x42,512); |
lp | 1823 | drivers/net/arcnet.c | lp->lastload_dest=daddr; |
lp | 1824 | drivers/net/arcnet.c | lp->txready=lp->txbuf; /* packet is ready for sending */ |
lp | 1840 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)dev->priv; |
lp | 1844 | drivers/net/arcnet.c | inb(STATUS),lp->intmask,lp->txready,lp->sending); |
lp | 1846 | drivers/net/arcnet.c | if (lp->sending || !lp->txready) |
lp | 1848 | drivers/net/arcnet.c | if (enable_irq && lp->sending) |
lp | 1850 | drivers/net/arcnet.c | lp->intmask |= TXFREEflag; |
lp | 1857 | drivers/net/arcnet.c | outb(TXcmd|(lp->txready<<3),COMMAND); |
lp | 1859 | drivers/net/arcnet.c | lp->stats.tx_packets++; |
lp | 1860 | drivers/net/arcnet.c | lp->txready=0; |
lp | 1861 | drivers/net/arcnet.c | lp->sending++; |
lp | 1863 | drivers/net/arcnet.c | lp->lasttrans_dest=lp->lastload_dest; |
lp | 1864 | drivers/net/arcnet.c | lp->lastload_dest=0; |
lp | 1866 | drivers/net/arcnet.c | lp->intmask |= TXFREEflag; |
lp | 1923 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)dev->priv; |
lp | 1936 | drivers/net/arcnet.c | inb(STATUS),lp->intmask); |
lp | 1959 | drivers/net/arcnet.c | if (status & lp->intmask & NORXflag) |
lp | 1961 | drivers/net/arcnet.c | int recbuf=lp->recbuf=!lp->recbuf; |
lp | 1976 | drivers/net/arcnet.c | if (status & lp->intmask & TXFREEflag) |
lp | 1978 | drivers/net/arcnet.c | struct Outgoing *out=&(lp->outgoing); |
lp | 1979 | drivers/net/arcnet.c | int was_sending=lp->sending; |
lp | 1981 | drivers/net/arcnet.c | lp->intmask &= ~TXFREEflag; |
lp | 1983 | drivers/net/arcnet.c | lp->in_txhandler++; |
lp | 1984 | drivers/net/arcnet.c | if (was_sending) lp->sending--; |
lp | 1991 | drivers/net/arcnet.c | if (lp->lasttrans_dest != 0) |
lp | 1994 | drivers/net/arcnet.c | status,lp->lasttrans_dest); |
lp | 1995 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 1996 | drivers/net/arcnet.c | lp->stats.tx_carrier_errors++; |
lp | 2002 | drivers/net/arcnet.c | lp->lasttrans_dest); |
lp | 2010 | drivers/net/arcnet.c | if (lp->intx) |
lp | 2013 | drivers/net/arcnet.c | inb(STATUS),lp->intx); |
lp | 2014 | drivers/net/arcnet.c | lp->in_txhandler--; |
lp | 2018 | drivers/net/arcnet.c | if (!lp->outgoing.skb) |
lp | 2023 | drivers/net/arcnet.c | if (!lp->txready && IF_TBUSY) |
lp | 2028 | drivers/net/arcnet.c | lp->in_txhandler--; |
lp | 2051 | drivers/net/arcnet.c | if (!lp->txready && IF_TBUSY) |
lp | 2059 | drivers/net/arcnet.c | lp->in_txhandler--; |
lp | 2061 | drivers/net/arcnet.c | else if (lp->txready && !lp->sending && !lp->intx) |
lp | 2070 | drivers/net/arcnet.c | if (status & (lp->intmask) & RECONflag) |
lp | 2073 | drivers/net/arcnet.c | lp->stats.tx_carrier_errors++; |
lp | 2082 | drivers/net/arcnet.c | if (!lp->first_recon || !lp->last_recon || |
lp | 2083 | drivers/net/arcnet.c | jiffies-lp->last_recon > HZ*10) |
lp | 2085 | drivers/net/arcnet.c | if (lp->network_down) |
lp | 2087 | drivers/net/arcnet.c | lp->first_recon=lp->last_recon=jiffies; |
lp | 2088 | drivers/net/arcnet.c | lp->num_recons=lp->network_down=0; |
lp | 2094 | drivers/net/arcnet.c | lp->last_recon=jiffies; |
lp | 2095 | drivers/net/arcnet.c | lp->num_recons++; |
lp | 2098 | drivers/net/arcnet.c | lp->num_recons, |
lp | 2099 | drivers/net/arcnet.c | (lp->last_recon-lp->first_recon)/HZ, |
lp | 2100 | drivers/net/arcnet.c | lp->network_down); |
lp | 2109 | drivers/net/arcnet.c | if (!lp->network_down |
lp | 2110 | drivers/net/arcnet.c | && (lp->last_recon-lp->first_recon)<=HZ*60 |
lp | 2111 | drivers/net/arcnet.c | && lp->num_recons >= RECON_THRESHOLD) |
lp | 2113 | drivers/net/arcnet.c | lp->network_down=1; |
lp | 2116 | drivers/net/arcnet.c | else if (!lp->network_down |
lp | 2117 | drivers/net/arcnet.c | && lp->last_recon-lp->first_recon > HZ*60) |
lp | 2122 | drivers/net/arcnet.c | lp->first_recon=lp->last_recon; |
lp | 2123 | drivers/net/arcnet.c | lp->num_recons=1; |
lp | 2129 | drivers/net/arcnet.c | else if (lp->network_down && jiffies-lp->last_recon > HZ*10) |
lp | 2131 | drivers/net/arcnet.c | if (lp->network_down) |
lp | 2133 | drivers/net/arcnet.c | lp->first_recon=lp->last_recon=0; |
lp | 2134 | drivers/net/arcnet.c | lp->num_recons=lp->network_down=0; |
lp | 2166 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 2174 | drivers/net/arcnet.c | lp->stats.rx_packets++; |
lp | 2184 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2214 | drivers/net/arcnet.c | arcnetA_rx(lp->adev,arcsoft,length,saddr,daddr); |
lp | 2218 | drivers/net/arcnet.c | arcnetE_rx(lp->edev,arcsoft,length,saddr,daddr); |
lp | 2224 | drivers/net/arcnet.c | arcnetS_rx(lp->sdev,arcsoft,length,saddr,daddr); |
lp | 2231 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2232 | drivers/net/arcnet.c | lp->stats.rx_crc_errors++; |
lp | 2259 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 2284 | drivers/net/arcnet.c | struct Incoming *in=&lp->incoming[saddr]; |
lp | 2295 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2296 | drivers/net/arcnet.c | lp->stats.rx_missed_errors++; |
lp | 2305 | drivers/net/arcnet.c | lp->stats.rx_dropped++; |
lp | 2338 | drivers/net/arcnet.c | lp->stats.rx_crc_errors++; |
lp | 2351 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2352 | drivers/net/arcnet.c | lp->stats.rx_crc_errors++; |
lp | 2381 | drivers/net/arcnet.c | struct Incoming *in=&lp->incoming[saddr]; |
lp | 2393 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2394 | drivers/net/arcnet.c | lp->stats.rx_missed_errors++; |
lp | 2407 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2408 | drivers/net/arcnet.c | lp->stats.rx_missed_errors++; |
lp | 2420 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2421 | drivers/net/arcnet.c | lp->stats.rx_length_errors++; |
lp | 2430 | drivers/net/arcnet.c | lp->stats.rx_dropped++; |
lp | 2460 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2461 | drivers/net/arcnet.c | lp->stats.rx_missed_errors++; |
lp | 2473 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2474 | drivers/net/arcnet.c | lp->stats.rx_frame_errors++; |
lp | 2484 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2485 | drivers/net/arcnet.c | lp->stats.rx_missed_errors++; |
lp | 2544 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 2546 | drivers/net/arcnet.c | return &lp->stats; |
lp | 2560 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
lp | 2581 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
lp | 2611 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 2612 | drivers/net/arcnet.c | lp->stats.tx_aborted_errors++; |
lp | 2654 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
lp | 2665 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 2666 | drivers/net/arcnet.c | lp->stats.tx_aborted_errors++; |
lp | 2695 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *) (dev->priv); |
lp | 2724 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2725 | drivers/net/arcnet.c | lp->stats.rx_crc_errors++; |
lp | 2744 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 2748 | drivers/net/arcnet.c | dev->dev_addr[5]=lp->stationid; |
lp | 2765 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 2768 | drivers/net/arcnet.c | (union ArcPacket *)(dev->mem_start+512*(lp->txbuf^1)); |
lp | 2772 | drivers/net/arcnet.c | lp->intx++; |
lp | 2777 | drivers/net/arcnet.c | lp->intx--; |
lp | 2790 | drivers/net/arcnet.c | lp->intx--; |
lp | 2796 | drivers/net/arcnet.c | lp->txbuf=lp->txbuf^1; /* XOR with 1 to alternate btw 2 & 3 */ |
lp | 2801 | drivers/net/arcnet.c | memset((void *)dev->mem_start+lp->txbuf*512,0x42,512); |
lp | 2844 | drivers/net/arcnet.c | lp->lastload_dest=daddr; |
lp | 2845 | drivers/net/arcnet.c | lp->txready=lp->txbuf; /* packet is ready for sending */ |
lp | 2857 | drivers/net/arcnet.c | lp->intx--; |
lp | 2860 | drivers/net/arcnet.c | lp->intmask |= TXFREEflag; |
lp | 2873 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 2882 | drivers/net/arcnet.c | lp->stats.rx_dropped++; |
lp | 2911 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 2916 | drivers/net/arcnet.c | dev->dev_addr[0]=lp->stationid; |
lp | 2936 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 2940 | drivers/net/arcnet.c | lp->intx++; |
lp | 2945 | drivers/net/arcnet.c | lp->intx--; |
lp | 2980 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 2986 | drivers/net/arcnet.c | lp->intx--; |
lp | 2989 | drivers/net/arcnet.c | lp->intmask |= TXFREEflag; |
lp | 3002 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 3019 | drivers/net/arcnet.c | lp->stats.rx_dropped++; |
lp | 3054 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
lp | 3070 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 3071 | drivers/net/arcnet.c | lp->stats.tx_aborted_errors++; |
lp | 3109 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
lp | 3119 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 3120 | drivers/net/arcnet.c | lp->stats.tx_aborted_errors++; |
lp | 3144 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *) (dev->priv); |
lp | 3169 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 3170 | drivers/net/arcnet.c | lp->stats.rx_crc_errors++; |
lp | 321 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 346 | drivers/net/at1700.c | lp->tx_started = 0; |
lp | 347 | drivers/net/at1700.c | lp->tx_queue = 0; |
lp | 348 | drivers/net/at1700.c | lp->tx_queue_len = 0; |
lp | 366 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 382 | drivers/net/at1700.c | lp->stats.tx_errors++; |
lp | 390 | drivers/net/at1700.c | lp->tx_started = 0; |
lp | 391 | drivers/net/at1700.c | lp->tx_queue = 0; |
lp | 392 | drivers/net/at1700.c | lp->tx_queue_len = 0; |
lp | 417 | drivers/net/at1700.c | lp->tx_queue++; |
lp | 418 | drivers/net/at1700.c | lp->tx_queue_len += length + 2; |
lp | 420 | drivers/net/at1700.c | if (lp->tx_started == 0) { |
lp | 422 | drivers/net/at1700.c | outb(0x80 | lp->tx_queue, ioaddr + TX_START); |
lp | 423 | drivers/net/at1700.c | lp->tx_queue = 0; |
lp | 424 | drivers/net/at1700.c | lp->tx_queue_len = 0; |
lp | 426 | drivers/net/at1700.c | lp->tx_started = 1; |
lp | 428 | drivers/net/at1700.c | } else if (lp->tx_queue_len < 4096 - 1502) |
lp | 446 | drivers/net/at1700.c | struct net_local *lp; |
lp | 456 | drivers/net/at1700.c | lp = (struct net_local *)dev->priv; |
lp | 468 | drivers/net/at1700.c | lp->stats.tx_packets++; |
lp | 469 | drivers/net/at1700.c | if (lp->tx_queue) { |
lp | 470 | drivers/net/at1700.c | outb(0x80 | lp->tx_queue, ioaddr + TX_START); |
lp | 471 | drivers/net/at1700.c | lp->tx_queue = 0; |
lp | 472 | drivers/net/at1700.c | lp->tx_queue_len = 0; |
lp | 477 | drivers/net/at1700.c | lp->tx_started = 0; |
lp | 494 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 513 | drivers/net/at1700.c | lp->stats.rx_errors++; |
lp | 514 | drivers/net/at1700.c | if (status & 0x08) lp->stats.rx_length_errors++; |
lp | 515 | drivers/net/at1700.c | if (status & 0x04) lp->stats.rx_frame_errors++; |
lp | 516 | drivers/net/at1700.c | if (status & 0x02) lp->stats.rx_crc_errors++; |
lp | 517 | drivers/net/at1700.c | if (status & 0x01) lp->stats.rx_over_errors++; |
lp | 528 | drivers/net/at1700.c | lp->stats.rx_errors++; |
lp | 538 | drivers/net/at1700.c | lp->stats.rx_dropped++; |
lp | 547 | drivers/net/at1700.c | lp->stats.rx_packets++; |
lp | 598 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 604 | drivers/net/at1700.c | return &lp->stats; |
lp | 236 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 237 | drivers/net/atp.c | lp->addr_mode = CMR2h_Normal; |
lp | 344 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 353 | drivers/net/atp.c | write_reg_high(ioaddr, CMR2, lp->addr_mode); |
lp | 370 | drivers/net/atp.c | lp->tx_unit_busy = 0; |
lp | 371 | drivers/net/atp.c | lp->pac_cnt_in_tx_buf = 0; |
lp | 372 | drivers/net/atp.c | lp->saved_tx_size = 0; |
lp | 418 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 430 | drivers/net/atp.c | lp->stats.tx_errors++; |
lp | 464 | drivers/net/atp.c | lp->pac_cnt_in_tx_buf++; |
lp | 465 | drivers/net/atp.c | if (lp->tx_unit_busy == 0) { |
lp | 467 | drivers/net/atp.c | lp->saved_tx_size = 0; /* Redundant */ |
lp | 468 | drivers/net/atp.c | lp->re_tx = 0; |
lp | 469 | drivers/net/atp.c | lp->tx_unit_busy = 1; |
lp | 471 | drivers/net/atp.c | lp->saved_tx_size = length; |
lp | 490 | drivers/net/atp.c | struct net_local *lp; |
lp | 501 | drivers/net/atp.c | lp = (struct net_local *)dev->priv; |
lp | 524 | drivers/net/atp.c | lp->stats.rx_over_errors++; |
lp | 530 | drivers/net/atp.c | write_reg_high(ioaddr, CMR2, lp->addr_mode); |
lp | 544 | drivers/net/atp.c | lp->stats.collisions++; |
lp | 545 | drivers/net/atp.c | if (++lp->re_tx > 15) { |
lp | 546 | drivers/net/atp.c | lp->stats.tx_aborted_errors++; |
lp | 555 | drivers/net/atp.c | lp->stats.tx_packets++; |
lp | 556 | drivers/net/atp.c | lp->pac_cnt_in_tx_buf--; |
lp | 557 | drivers/net/atp.c | if ( lp->saved_tx_size) { |
lp | 558 | drivers/net/atp.c | trigger_send(ioaddr, lp->saved_tx_size); |
lp | 559 | drivers/net/atp.c | lp->saved_tx_size = 0; |
lp | 560 | drivers/net/atp.c | lp->re_tx = 0; |
lp | 562 | drivers/net/atp.c | lp->tx_unit_busy = 0; |
lp | 574 | drivers/net/atp.c | lp->stats.rx_missed_errors++; |
lp | 624 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)atp_timed_dev->priv; |
lp | 627 | drivers/net/atp.c | lp->stats.tx_errors++; |
lp | 629 | drivers/net/atp.c | lp->stats.tx_dropped++; |
lp | 631 | drivers/net/atp.c | lp->stats.collisions++; |
lp | 633 | drivers/net/atp.c | lp->stats.rx_errors++; |
lp | 648 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 663 | drivers/net/atp.c | lp->stats.rx_errors++; |
lp | 678 | drivers/net/atp.c | lp->stats.rx_dropped++; |
lp | 696 | drivers/net/atp.c | lp->stats.rx_packets++; |
lp | 727 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 734 | drivers/net/atp.c | lp->addr_mode = CMR2h_OFF; |
lp | 753 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 754 | drivers/net/atp.c | return &lp->stats; |
lp | 763 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 776 | drivers/net/atp.c | lp->addr_mode = num_addrs ? CMR2h_PROMISC : CMR2h_Normal; |
lp | 777 | drivers/net/atp.c | write_reg_high(ioaddr, CMR2, lp->addr_mode); |
lp | 354 | drivers/net/de4x5.c | imr |= lp->irq_en;\ |
lp | 360 | drivers/net/de4x5.c | imr &= ~lp->irq_en;\ |
lp | 365 | drivers/net/de4x5.c | imr |= lp->irq_mask;\ |
lp | 371 | drivers/net/de4x5.c | imr &= ~lp->irq_mask;\ |
lp | 524 | drivers/net/de4x5.c | #define TX_BUFFS_AVAIL ((lp->tx_old<=lp->tx_new)?\ |
lp | 525 | drivers/net/de4x5.c | lp->tx_old+lp->txRingSize-lp->tx_new-1:\ |
lp | 526 | drivers/net/de4x5.c | lp->tx_old -lp->tx_new-1) |
lp | 580 | drivers/net/de4x5.c | static int PCI_signature(char *name, struct bus_type *lp); |
lp | 582 | drivers/net/de4x5.c | static int de4x5_bad_srom(struct bus_type *lp); |
lp | 680 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 682 | drivers/net/de4x5.c | int i, media = *((char *)&(lp->srom) + *((char *)&(lp->srom) + 19) * 3); |
lp | 686 | drivers/net/de4x5.c | if (lp->chipset == DC21041) { |
lp | 700 | drivers/net/de4x5.c | if (lp->bus == PCI) { |
lp | 701 | drivers/net/de4x5.c | PCI_signature(name, lp); |
lp | 711 | drivers/net/de4x5.c | if (lp->bus == EISA) { |
lp | 716 | drivers/net/de4x5.c | iobase, lp->bus_num, lp->device); |
lp | 726 | drivers/net/de4x5.c | tmpbus = lp->bus; |
lp | 727 | drivers/net/de4x5.c | tmpchs = lp->chipset; |
lp | 733 | drivers/net/de4x5.c | struct de4x5_private *lp; |
lp | 750 | drivers/net/de4x5.c | lp = (struct de4x5_private *)dev->priv; |
lp | 752 | drivers/net/de4x5.c | lp->bus = tmpbus; |
lp | 753 | drivers/net/de4x5.c | lp->chipset = tmpchs; |
lp | 754 | drivers/net/de4x5.c | lp->cache.priv = tmp; |
lp | 772 | drivers/net/de4x5.c | lp->autosense = AUTO; |
lp | 774 | drivers/net/de4x5.c | if (lp->chipset != DC21140) { |
lp | 775 | drivers/net/de4x5.c | if ((lp->chipset == DC21040) && (de4x5_autosense & TP_NW)) { |
lp | 778 | drivers/net/de4x5.c | if ((lp->chipset == DC21041) && (de4x5_autosense & BNC_AUI)) { |
lp | 781 | drivers/net/de4x5.c | lp->autosense = de4x5_autosense & 0x001f; |
lp | 783 | drivers/net/de4x5.c | lp->autosense = de4x5_autosense & 0x00c0; |
lp | 787 | drivers/net/de4x5.c | sprintf(lp->adapter_name,"%s (%s)", name, dev->name); |
lp | 794 | drivers/net/de4x5.c | lp->cache.buf = tmp; |
lp | 797 | drivers/net/de4x5.c | lp->rx_ring[i].status = 0; |
lp | 798 | drivers/net/de4x5.c | lp->rx_ring[i].des1 = RX_BUFF_SZ; |
lp | 799 | drivers/net/de4x5.c | lp->rx_ring[i].buf = virt_to_bus(tmp + i * RX_BUFF_SZ); |
lp | 800 | drivers/net/de4x5.c | lp->rx_ring[i].next = (u32)NULL; |
lp | 804 | drivers/net/de4x5.c | request_region(iobase, (lp->bus == PCI ? DE4X5_PCI_TOTAL_SIZE : |
lp | 806 | drivers/net/de4x5.c | lp->adapter_name); |
lp | 808 | drivers/net/de4x5.c | lp->rxRingSize = NUM_RX_DESC; |
lp | 809 | drivers/net/de4x5.c | lp->txRingSize = NUM_TX_DESC; |
lp | 812 | drivers/net/de4x5.c | lp->rx_ring[lp->rxRingSize - 1].des1 |= RD_RER; |
lp | 813 | drivers/net/de4x5.c | lp->tx_ring[lp->txRingSize - 1].des1 |= TD_TER; |
lp | 816 | drivers/net/de4x5.c | outl(virt_to_bus(lp->rx_ring), DE4X5_RRBA); |
lp | 817 | drivers/net/de4x5.c | outl(virt_to_bus(lp->tx_ring), DE4X5_TRBA); |
lp | 820 | drivers/net/de4x5.c | lp->irq_mask = IMR_RIM | IMR_TIM | IMR_TUM ; |
lp | 821 | drivers/net/de4x5.c | lp->irq_en = IMR_NIM | IMR_AIM; |
lp | 824 | drivers/net/de4x5.c | create_packet(dev, lp->frame, sizeof(lp->frame)); |
lp | 827 | drivers/net/de4x5.c | lp->state = CLOSED; |
lp | 830 | drivers/net/de4x5.c | ((lp->bus == PCI) ? "PCI BIOS" : "EISA CNFG")); |
lp | 835 | drivers/net/de4x5.c | release_region(iobase, (lp->bus == PCI ? |
lp | 838 | drivers/net/de4x5.c | if (lp->rx_ring[0].buf) { |
lp | 839 | drivers/net/de4x5.c | kfree(bus_to_virt(lp->rx_ring[0].buf)); |
lp | 866 | drivers/net/de4x5.c | if (lp->chipset == DC21041) { |
lp | 878 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 886 | drivers/net/de4x5.c | if (lp->chipset == DC21041) { |
lp | 891 | drivers/net/de4x5.c | lp->state = OPEN; |
lp | 900 | drivers/net/de4x5.c | if (request_irq(dev->irq, (void *)de4x5_interrupt, 0, lp->adapter_name, dev)) { |
lp | 954 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 960 | drivers/net/de4x5.c | if (lp->phy[lp->active].id == 0) { |
lp | 971 | drivers/net/de4x5.c | bmr = (lp->chipset==DC21140 ? PBL_8 : PBL_4) | DESC_SKIP_LEN | CACHE_ALIGN; |
lp | 975 | drivers/net/de4x5.c | if (lp->chipset != DC21140) { |
lp | 977 | drivers/net/de4x5.c | lp->setup_f = HASH_PERF; |
lp | 979 | drivers/net/de4x5.c | omr |= OMR_SDP | OMR_SB | (!lp->phy[lp->active].id ? OMR_SF : 0); |
lp | 980 | drivers/net/de4x5.c | lp->setup_f = PERFECT; |
lp | 982 | drivers/net/de4x5.c | outl(virt_to_bus(lp->rx_ring), DE4X5_RRBA); |
lp | 983 | drivers/net/de4x5.c | outl(virt_to_bus(lp->tx_ring), DE4X5_TRBA); |
lp | 985 | drivers/net/de4x5.c | lp->rx_new = lp->rx_old = 0; |
lp | 986 | drivers/net/de4x5.c | lp->tx_new = lp->tx_old = 0; |
lp | 988 | drivers/net/de4x5.c | for (i = 0; i < lp->rxRingSize; i++) { |
lp | 989 | drivers/net/de4x5.c | lp->rx_ring[i].status = R_OWN; |
lp | 992 | drivers/net/de4x5.c | for (i = 0; i < lp->txRingSize; i++) { |
lp | 993 | drivers/net/de4x5.c | lp->tx_ring[i].status = 0; |
lp | 1001 | drivers/net/de4x5.c | if (lp->chipset != DC21140) { |
lp | 1002 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, HASH_F|TD_SET|SETUP_FRAME_LEN, NULL); |
lp | 1004 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, PERFECT_F|TD_SET|SETUP_FRAME_LEN, NULL); |
lp | 1012 | drivers/net/de4x5.c | if (lp->tx_ring[lp->tx_new].status >= 0) j=1; |
lp | 1022 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
lp | 1023 | drivers/net/de4x5.c | lp->tx_old = lp->tx_new; |
lp | 1034 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1043 | drivers/net/de4x5.c | if (lp->tx_enable == NO) { /* Cannot send for now */ |
lp | 1059 | drivers/net/de4x5.c | if (dev->tbusy || lp->skb[lp->tx_new]) { |
lp | 1066 | drivers/net/de4x5.c | printk("%s: transmit busy, lost media or stale skb found:\n STS:%08x\n tbusy:%ld\n lostMedia:%d\n IMR:%08x\n OMR:%08x\n Stale skb: %s\n",dev->name, inl(DE4X5_STS), dev->tbusy, lp->lostMedia, inl(DE4X5_IMR), inl(DE4X5_OMR), (lp->skb[lp->tx_new] ? "YES" : "NO")); |
lp | 1070 | drivers/net/de4x5.c | if (lp->cache.skb && !dev->interrupt) { |
lp | 1075 | drivers/net/de4x5.c | while (skb && !dev->tbusy && !lp->skb[lp->tx_new]) { |
lp | 1083 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
lp | 1093 | drivers/net/de4x5.c | if (skb && (dev->tbusy || lp->skb[lp->tx_new])) { |
lp | 1116 | drivers/net/de4x5.c | struct de4x5_private *lp; |
lp | 1124 | drivers/net/de4x5.c | lp = (struct de4x5_private *)dev->priv; |
lp | 1137 | drivers/net/de4x5.c | if (!(sts & lp->irq_mask)) break;/* All done */ |
lp | 1146 | drivers/net/de4x5.c | lp->lostMedia = LOST_MEDIA_THRESHOLD + 1; |
lp | 1147 | drivers/net/de4x5.c | lp->irq_mask &= ~IMR_LFM; |
lp | 1159 | drivers/net/de4x5.c | while (lp->cache.skb && !dev->tbusy && lp->tx_enable) { |
lp | 1172 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1177 | drivers/net/de4x5.c | for (entry=lp->rx_new; lp->rx_ring[entry].status>=0;entry=lp->rx_new) { |
lp | 1178 | drivers/net/de4x5.c | status = lp->rx_ring[entry].status; |
lp | 1181 | drivers/net/de4x5.c | lp->rx_old = entry; |
lp | 1185 | drivers/net/de4x5.c | lp->linkOK++; |
lp | 1187 | drivers/net/de4x5.c | lp->stats.rx_errors++; /* Update the error stats. */ |
lp | 1188 | drivers/net/de4x5.c | if (status & (RD_RF | RD_TL)) lp->stats.rx_frame_errors++; |
lp | 1189 | drivers/net/de4x5.c | if (status & RD_CE) lp->stats.rx_crc_errors++; |
lp | 1190 | drivers/net/de4x5.c | if (status & RD_OF) lp->stats.rx_fifo_errors++; |
lp | 1191 | drivers/net/de4x5.c | if (status & RD_TL) lp->stats.rx_length_errors++; |
lp | 1192 | drivers/net/de4x5.c | if (status & RD_RF) lp->pktStats.rx_runt_frames++; |
lp | 1193 | drivers/net/de4x5.c | if (status & RD_CS) lp->pktStats.rx_collision++; |
lp | 1194 | drivers/net/de4x5.c | if (status & RD_DB) lp->pktStats.rx_dribble++; |
lp | 1195 | drivers/net/de4x5.c | if (status & RD_OF) lp->pktStats.rx_overflow++; |
lp | 1198 | drivers/net/de4x5.c | short pkt_len = (short)(lp->rx_ring[entry].status >> 16) - 4; |
lp | 1203 | drivers/net/de4x5.c | lp->stats.rx_dropped++; /* Really, deferred. */ |
lp | 1209 | drivers/net/de4x5.c | if (entry < lp->rx_old) { /* Wrapped buffer */ |
lp | 1210 | drivers/net/de4x5.c | short len = (lp->rxRingSize - lp->rx_old) * RX_BUFF_SZ; |
lp | 1211 | drivers/net/de4x5.c | memcpy(skb_put(skb,len), bus_to_virt(lp->rx_ring[lp->rx_old].buf), len); |
lp | 1212 | drivers/net/de4x5.c | memcpy(skb_put(skb,pkt_len-len), bus_to_virt(lp->rx_ring[0].buf), pkt_len - len); |
lp | 1214 | drivers/net/de4x5.c | memcpy(skb_put(skb,pkt_len), bus_to_virt(lp->rx_ring[lp->rx_old].buf), pkt_len); |
lp | 1222 | drivers/net/de4x5.c | lp->stats.rx_packets++; |
lp | 1225 | drivers/net/de4x5.c | lp->pktStats.bins[i]++; |
lp | 1232 | drivers/net/de4x5.c | lp->pktStats.broadcast++; |
lp | 1234 | drivers/net/de4x5.c | lp->pktStats.multicast++; |
lp | 1238 | drivers/net/de4x5.c | lp->pktStats.unicast++; |
lp | 1241 | drivers/net/de4x5.c | lp->pktStats.bins[0]++; /* Duplicates stats.rx_packets */ |
lp | 1242 | drivers/net/de4x5.c | if (lp->pktStats.bins[0] == 0) { /* Reset counters */ |
lp | 1243 | drivers/net/de4x5.c | memset((char *)&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 1248 | drivers/net/de4x5.c | for (;lp->rx_old!=entry;lp->rx_old=(++lp->rx_old)%lp->rxRingSize) { |
lp | 1249 | drivers/net/de4x5.c | lp->rx_ring[lp->rx_old].status = R_OWN; |
lp | 1252 | drivers/net/de4x5.c | lp->rx_ring[entry].status = R_OWN; |
lp | 1259 | drivers/net/de4x5.c | lp->rx_new = (++lp->rx_new) % lp->rxRingSize; |
lp | 1271 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1276 | drivers/net/de4x5.c | for (entry = lp->tx_old; entry != lp->tx_new; entry = lp->tx_old) { |
lp | 1277 | drivers/net/de4x5.c | status = lp->tx_ring[entry].status; |
lp | 1281 | drivers/net/de4x5.c | lp->stats.tx_errors++; |
lp | 1282 | drivers/net/de4x5.c | if (status & TD_NC) lp->stats.tx_carrier_errors++; |
lp | 1283 | drivers/net/de4x5.c | if (status & TD_LC) lp->stats.tx_window_errors++; |
lp | 1284 | drivers/net/de4x5.c | if (status & TD_UF) lp->stats.tx_fifo_errors++; |
lp | 1285 | drivers/net/de4x5.c | if (status & TD_LC) lp->stats.collisions++; |
lp | 1286 | drivers/net/de4x5.c | if (status & TD_EC) lp->pktStats.excessive_collisions++; |
lp | 1287 | drivers/net/de4x5.c | if (status & TD_DE) lp->stats.tx_aborted_errors++; |
lp | 1291 | drivers/net/de4x5.c | lp->lostMedia++; |
lp | 1296 | drivers/net/de4x5.c | lp->stats.tx_packets++; |
lp | 1297 | drivers/net/de4x5.c | lp->lostMedia = 0; /* Remove transient problem */ |
lp | 1300 | drivers/net/de4x5.c | if (lp->skb[entry] != NULL) { |
lp | 1301 | drivers/net/de4x5.c | dev_kfree_skb(lp->skb[entry], FREE_WRITE); |
lp | 1302 | drivers/net/de4x5.c | lp->skb[entry] = NULL; |
lp | 1306 | drivers/net/de4x5.c | lp->tx_old = (++lp->tx_old) % lp->txRingSize; |
lp | 1320 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1325 | drivers/net/de4x5.c | if (lp->chipset == DC21140) { |
lp | 1327 | drivers/net/de4x5.c | } else if (lp->chipset == DC21041) { |
lp | 1329 | drivers/net/de4x5.c | } else if (lp->chipset == DC21040) { |
lp | 1332 | drivers/net/de4x5.c | lp->linkOK = 0; |
lp | 1341 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1365 | drivers/net/de4x5.c | lp->state = CLOSED; |
lp | 1370 | drivers/net/de4x5.c | if (lp->chipset == DC21041) { |
lp | 1381 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1384 | drivers/net/de4x5.c | lp->stats.rx_missed_errors = (int)(inl(DE4X5_MFC) & (MFC_OVFL | MFC_CNTR)); |
lp | 1386 | drivers/net/de4x5.c | return &lp->stats; |
lp | 1391 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1393 | drivers/net/de4x5.c | lp->tx_ring[lp->tx_new].buf = virt_to_bus(buf); |
lp | 1394 | drivers/net/de4x5.c | lp->tx_ring[lp->tx_new].des1 &= TD_TER; |
lp | 1395 | drivers/net/de4x5.c | lp->tx_ring[lp->tx_new].des1 |= flags; |
lp | 1396 | drivers/net/de4x5.c | lp->skb[lp->tx_new] = skb; |
lp | 1398 | drivers/net/de4x5.c | lp->tx_ring[lp->tx_new].status = T_OWN; |
lp | 1410 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1414 | drivers/net/de4x5.c | if (lp->state == OPEN) { |
lp | 1422 | drivers/net/de4x5.c | if (lp->setup_f == HASH_PERF) { |
lp | 1423 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | HASH_F | TD_SET | |
lp | 1426 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | |
lp | 1430 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
lp | 1446 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1461 | drivers/net/de4x5.c | } else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */ |
lp | 1482 | drivers/net/de4x5.c | lp->setup_frame[byte] |= bit; |
lp | 1510 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 1515 | drivers/net/de4x5.c | lp->bus = EISA; |
lp | 1533 | drivers/net/de4x5.c | lp->chipset = device; |
lp | 1578 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 1584 | drivers/net/de4x5.c | lp->bus = PCI; |
lp | 1605 | drivers/net/de4x5.c | lp->device = dev_num; |
lp | 1606 | drivers/net/de4x5.c | lp->bus_num = pb; |
lp | 1609 | drivers/net/de4x5.c | lp->chipset = device; |
lp | 1763 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1767 | drivers/net/de4x5.c | lp->linkOK = 0; |
lp | 1768 | drivers/net/de4x5.c | lp->c_media = AUTO; /* Bogus last media */ |
lp | 1771 | drivers/net/de4x5.c | lp->media = INIT; |
lp | 1772 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 1774 | drivers/net/de4x5.c | } else if (lp->chipset == DC21041) { |
lp | 1776 | drivers/net/de4x5.c | } else if (lp->chipset == DC21140) { |
lp | 1779 | drivers/net/de4x5.c | if (lp->autosense == AUTO) enable_ast(dev, next_tick); |
lp | 1781 | drivers/net/de4x5.c | return (lp->media); |
lp | 1798 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1803 | drivers/net/de4x5.c | switch (lp->media) { |
lp | 1806 | drivers/net/de4x5.c | lp->tx_enable = NO; |
lp | 1807 | drivers/net/de4x5.c | lp->timeout = -1; |
lp | 1809 | drivers/net/de4x5.c | if ((lp->autosense == AUTO) || (lp->autosense == TP)) { |
lp | 1810 | drivers/net/de4x5.c | lp->media = TP; |
lp | 1811 | drivers/net/de4x5.c | } else if ((lp->autosense == BNC) || (lp->autosense == AUI) || (lp->autosense == BNC_AUI)) { |
lp | 1812 | drivers/net/de4x5.c | lp->media = BNC_AUI; |
lp | 1813 | drivers/net/de4x5.c | } else if (lp->autosense == EXT_SIA) { |
lp | 1814 | drivers/net/de4x5.c | lp->media = EXT_SIA; |
lp | 1816 | drivers/net/de4x5.c | lp->media = NC; |
lp | 1818 | drivers/net/de4x5.c | lp->local_state = 0; |
lp | 1859 | drivers/net/de4x5.c | lp->media = INIT; |
lp | 1860 | drivers/net/de4x5.c | lp->tx_enable = NO; |
lp | 1872 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1876 | drivers/net/de4x5.c | switch (lp->local_state) { |
lp | 1879 | drivers/net/de4x5.c | lp->local_state++; |
lp | 1884 | drivers/net/de4x5.c | if (!lp->tx_enable) { |
lp | 1889 | drivers/net/de4x5.c | if (linkBad && (lp->autosense == AUTO)) { |
lp | 1890 | drivers/net/de4x5.c | lp->local_state = 0; |
lp | 1891 | drivers/net/de4x5.c | lp->media = next_state; |
lp | 1896 | drivers/net/de4x5.c | } else if (!lp->linkOK && (lp->autosense == AUTO)) { |
lp | 1897 | drivers/net/de4x5.c | lp->media = suspect_state; |
lp | 1911 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1915 | drivers/net/de4x5.c | switch (lp->local_state) { |
lp | 1917 | drivers/net/de4x5.c | if (lp->linkOK && !LOST_MEDIA) { |
lp | 1918 | drivers/net/de4x5.c | lp->media = prev_state; |
lp | 1920 | drivers/net/de4x5.c | lp->local_state++; |
lp | 1930 | drivers/net/de4x5.c | lp->local_state--; |
lp | 1931 | drivers/net/de4x5.c | lp->media = prev_state; |
lp | 1933 | drivers/net/de4x5.c | lp->media = INIT; |
lp | 1951 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1956 | drivers/net/de4x5.c | switch (lp->media) { |
lp | 1959 | drivers/net/de4x5.c | lp->tx_enable = NO; |
lp | 1960 | drivers/net/de4x5.c | lp->timeout = -1; |
lp | 1962 | drivers/net/de4x5.c | if ((lp->autosense == AUTO) || (lp->autosense == TP_NW)) { |
lp | 1963 | drivers/net/de4x5.c | lp->media = TP; /* On chip auto negotiation is broken */ |
lp | 1964 | drivers/net/de4x5.c | } else if (lp->autosense == TP) { |
lp | 1965 | drivers/net/de4x5.c | lp->media = TP; |
lp | 1966 | drivers/net/de4x5.c | } else if (lp->autosense == BNC) { |
lp | 1967 | drivers/net/de4x5.c | lp->media = BNC; |
lp | 1968 | drivers/net/de4x5.c | } else if (lp->autosense == AUI) { |
lp | 1969 | drivers/net/de4x5.c | lp->media = AUI; |
lp | 1971 | drivers/net/de4x5.c | lp->media = NC; |
lp | 1973 | drivers/net/de4x5.c | lp->local_state = 0; |
lp | 1978 | drivers/net/de4x5.c | if (lp->timeout < 0) { |
lp | 1989 | drivers/net/de4x5.c | lp->media = ANS; |
lp | 1991 | drivers/net/de4x5.c | lp->media = AUI; |
lp | 1998 | drivers/net/de4x5.c | if (!lp->tx_enable) { |
lp | 2005 | drivers/net/de4x5.c | if (!(sts & STS_LNP) && (lp->autosense == AUTO)) { |
lp | 2006 | drivers/net/de4x5.c | lp->media = TP; |
lp | 2012 | drivers/net/de4x5.c | } else if (!lp->linkOK && (lp->autosense == AUTO)) { |
lp | 2013 | drivers/net/de4x5.c | lp->media = ANS_SUSPECT; |
lp | 2023 | drivers/net/de4x5.c | if (!lp->tx_enable) { |
lp | 2024 | drivers/net/de4x5.c | if (lp->timeout < 0) { |
lp | 2034 | drivers/net/de4x5.c | if (!(sts & STS_LNP) && (lp->autosense == AUTO)) { |
lp | 2036 | drivers/net/de4x5.c | lp->media = AUI; /* Non selected port activity */ |
lp | 2038 | drivers/net/de4x5.c | lp->media = BNC; |
lp | 2045 | drivers/net/de4x5.c | } else if (!lp->linkOK && (lp->autosense == AUTO)) { |
lp | 2046 | drivers/net/de4x5.c | lp->media = TP_SUSPECT; |
lp | 2056 | drivers/net/de4x5.c | if (!lp->tx_enable) { |
lp | 2057 | drivers/net/de4x5.c | if (lp->timeout < 0) { |
lp | 2067 | drivers/net/de4x5.c | if (!(inl(DE4X5_SISR) & SISR_SRA) && (lp->autosense == AUTO)) { |
lp | 2068 | drivers/net/de4x5.c | lp->media = BNC; |
lp | 2074 | drivers/net/de4x5.c | } else if (!lp->linkOK && (lp->autosense == AUTO)) { |
lp | 2075 | drivers/net/de4x5.c | lp->media = AUI_SUSPECT; |
lp | 2085 | drivers/net/de4x5.c | switch (lp->local_state) { |
lp | 2087 | drivers/net/de4x5.c | if (lp->timeout < 0) { |
lp | 2097 | drivers/net/de4x5.c | if (!(inl(DE4X5_SISR) & SISR_SRA) && (lp->autosense == AUTO)) { |
lp | 2098 | drivers/net/de4x5.c | lp->media = NC; |
lp | 2100 | drivers/net/de4x5.c | lp->local_state++; /* Ensure media connected */ |
lp | 2107 | drivers/net/de4x5.c | if (!lp->tx_enable) { |
lp | 2112 | drivers/net/de4x5.c | lp->local_state = 0; |
lp | 2113 | drivers/net/de4x5.c | lp->media = NC; |
lp | 2118 | drivers/net/de4x5.c | } else if (!lp->linkOK && (lp->autosense == AUTO)) { |
lp | 2119 | drivers/net/de4x5.c | lp->media = BNC_SUSPECT; |
lp | 2135 | drivers/net/de4x5.c | lp->media = INIT; |
lp | 2136 | drivers/net/de4x5.c | lp->tx_enable = NO; |
lp | 2145 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2150 | drivers/net/de4x5.c | switch(lp->media) { |
lp | 2153 | drivers/net/de4x5.c | lp->tx_enable = FALSE; |
lp | 2154 | drivers/net/de4x5.c | lp->timeout = -1; |
lp | 2160 | drivers/net/de4x5.c | if (lp->autosense == _100Mb) { |
lp | 2161 | drivers/net/de4x5.c | lp->media = _100Mb; |
lp | 2162 | drivers/net/de4x5.c | } else if (lp->autosense == _10Mb) { |
lp | 2163 | drivers/net/de4x5.c | lp->media = _10Mb; |
lp | 2164 | drivers/net/de4x5.c | } else if ((lp->autosense == AUTO) && (sr=is_anc_capable(dev))) { |
lp | 2167 | drivers/net/de4x5.c | mii_wr(ana, MII_ANA, lp->phy[lp->active].addr, DE4X5_MII); |
lp | 2168 | drivers/net/de4x5.c | lp->media = ANS; |
lp | 2169 | drivers/net/de4x5.c | } else if (lp->autosense == AUTO) { |
lp | 2170 | drivers/net/de4x5.c | lp->media = SPD_DET; |
lp | 2172 | drivers/net/de4x5.c | lp->media = _100Mb; |
lp | 2174 | drivers/net/de4x5.c | lp->media = NC; |
lp | 2176 | drivers/net/de4x5.c | lp->local_state = 0; |
lp | 2182 | drivers/net/de4x5.c | switch (lp->local_state) { |
lp | 2184 | drivers/net/de4x5.c | if (lp->timeout < 0) { |
lp | 2185 | drivers/net/de4x5.c | mii_wr(MII_CR_ASSE | MII_CR_RAN, MII_CR, lp->phy[lp->active].addr, DE4X5_MII); |
lp | 2192 | drivers/net/de4x5.c | lp->local_state = 0; |
lp | 2193 | drivers/net/de4x5.c | lp->media = SPD_DET; |
lp | 2195 | drivers/net/de4x5.c | lp->local_state++; |
lp | 2205 | drivers/net/de4x5.c | lp->media = SPD_DET; |
lp | 2206 | drivers/net/de4x5.c | lp->local_state = 0; |
lp | 2208 | drivers/net/de4x5.c | anlpa = mii_rd(MII_ANLPA, lp->phy[lp->active].addr, DE4X5_MII); |
lp | 2209 | drivers/net/de4x5.c | ana = mii_rd(MII_ANA, lp->phy[lp->active].addr, DE4X5_MII); |
lp | 2214 | drivers/net/de4x5.c | lp->media = _100Mb; |
lp | 2217 | drivers/net/de4x5.c | lp->media = _10Mb; |
lp | 2228 | drivers/net/de4x5.c | if (!lp->phy[lp->active].id) { |
lp | 2232 | drivers/net/de4x5.c | lp->media = _100Mb; |
lp | 2234 | drivers/net/de4x5.c | lp->media = _10Mb; |
lp | 2236 | drivers/net/de4x5.c | lp->media = NC; |
lp | 2243 | drivers/net/de4x5.c | if (!lp->tx_enable) { |
lp | 2247 | drivers/net/de4x5.c | if (!lp->linkOK && (lp->autosense == AUTO)) { |
lp | 2249 | drivers/net/de4x5.c | lp->media = INIT; |
lp | 2258 | drivers/net/de4x5.c | if (!lp->tx_enable) { |
lp | 2262 | drivers/net/de4x5.c | if (!lp->linkOK && (lp->autosense == AUTO)) { |
lp | 2264 | drivers/net/de4x5.c | lp->media = INIT; |
lp | 2274 | drivers/net/de4x5.c | lp->media = INIT; |
lp | 2275 | drivers/net/de4x5.c | lp->tx_enable = FALSE; |
lp | 2284 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2292 | drivers/net/de4x5.c | lp->lostMedia = 0; |
lp | 2293 | drivers/net/de4x5.c | lp->tx_enable = YES; |
lp | 2302 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2306 | drivers/net/de4x5.c | if (lp->phy[lp->active].id) { |
lp | 2307 | drivers/net/de4x5.c | if (lp->timeout < 0) { |
lp | 2312 | drivers/net/de4x5.c | mii_wr(MII_CR_RST, MII_CR, lp->phy[lp->active].addr, DE4X5_MII); |
lp | 2323 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2327 | drivers/net/de4x5.c | if (lp->timeout < 0) { |
lp | 2328 | drivers/net/de4x5.c | lp->timeout = msec/100; |
lp | 2339 | drivers/net/de4x5.c | if (lp->chipset == DC21041) { |
lp | 2347 | drivers/net/de4x5.c | if (!(sts & irqs) && --lp->timeout) { |
lp | 2350 | drivers/net/de4x5.c | lp->timeout = -1; |
lp | 2358 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2362 | drivers/net/de4x5.c | if (lp->timeout < 0) { |
lp | 2363 | drivers/net/de4x5.c | lp->timeout = msec/100; |
lp | 2368 | drivers/net/de4x5.c | if (sisr && --lp->timeout) { |
lp | 2371 | drivers/net/de4x5.c | lp->timeout = -1; |
lp | 2383 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2386 | drivers/net/de4x5.c | if (lp->timeout < 0) { |
lp | 2387 | drivers/net/de4x5.c | lp->timeout = msec/100; |
lp | 2391 | drivers/net/de4x5.c | reg = mii_rd(reg, lp->phy[lp->active].addr, DE4X5_MII) & mask; |
lp | 2394 | drivers/net/de4x5.c | if (test && --lp->timeout) { |
lp | 2397 | drivers/net/de4x5.c | lp->timeout = -1; |
lp | 2405 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2409 | drivers/net/de4x5.c | if (lp->phy[lp->active].id) { |
lp | 2410 | drivers/net/de4x5.c | spd = mii_rd(lp->phy[lp->active].spd.reg, lp->phy[lp->active].addr, DE4X5_MII); |
lp | 2411 | drivers/net/de4x5.c | spd = ~(spd ^ lp->phy[lp->active].spd.value); |
lp | 2412 | drivers/net/de4x5.c | spd &= lp->phy[lp->active].spd.mask; |
lp | 2422 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2425 | drivers/net/de4x5.c | if (lp->phy[lp->active].id) { |
lp | 2427 | drivers/net/de4x5.c | mii_rd(MII_SR, lp->phy[lp->active].addr, DE4X5_MII); |
lp | 2428 | drivers/net/de4x5.c | return (mii_rd(MII_SR, lp->phy[lp->active].addr, DE4X5_MII) & MII_SR_LKS); |
lp | 2436 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2439 | drivers/net/de4x5.c | if (lp->phy[lp->active].id) { |
lp | 2441 | drivers/net/de4x5.c | mii_rd(MII_SR, lp->phy[lp->active].addr, DE4X5_MII); |
lp | 2442 | drivers/net/de4x5.c | return (mii_rd(MII_SR, lp->phy[lp->active].addr, DE4X5_MII) & MII_SR_LKS); |
lp | 2450 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2453 | drivers/net/de4x5.c | if (lp->phy[lp->active].id) { |
lp | 2454 | drivers/net/de4x5.c | return (mii_rd(MII_SR, lp->phy[lp->active].addr, DE4X5_MII) & MII_SR_ANC); |
lp | 2466 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2470 | drivers/net/de4x5.c | if (lp->timeout < 0) { |
lp | 2471 | drivers/net/de4x5.c | lp->timeout = msec/100; |
lp | 2473 | drivers/net/de4x5.c | lp->tmp = lp->tx_new; /* Remember the ring position */ |
lp | 2474 | drivers/net/de4x5.c | load_packet(dev, lp->frame, TD_LS | TD_FS | sizeof(lp->frame), NULL); |
lp | 2475 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
lp | 2481 | drivers/net/de4x5.c | if ((!(sisr & SISR_NCR)) && (lp->tx_ring[lp->tmp].status < 0) && (--lp->timeout)) { |
lp | 2485 | drivers/net/de4x5.c | !(lp->tx_ring[lp->tmp].status & (T_OWN | TD_ES)) && lp->timeout) { |
lp | 2490 | drivers/net/de4x5.c | lp->timeout = -1; |
lp | 2505 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2510 | drivers/net/de4x5.c | if (!lp->cache.save_cnt) { |
lp | 2513 | drivers/net/de4x5.c | for (i=lp->tx_new; i!=lp->tx_old; i--) { |
lp | 2514 | drivers/net/de4x5.c | if (lp->skb[i]) { |
lp | 2515 | drivers/net/de4x5.c | de4x5_putb_cache(dev, lp->skb[i]); |
lp | 2516 | drivers/net/de4x5.c | lp->skb[i] = NULL; |
lp | 2518 | drivers/net/de4x5.c | if (i==0) i=lp->txRingSize; |
lp | 2520 | drivers/net/de4x5.c | if (lp->skb[i]) { |
lp | 2521 | drivers/net/de4x5.c | de4x5_putb_cache(dev, lp->skb[i]); |
lp | 2522 | drivers/net/de4x5.c | lp->skb[i] = NULL; |
lp | 2529 | drivers/net/de4x5.c | lp->cache.save_cnt++; |
lp | 2538 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2544 | drivers/net/de4x5.c | if (lp->cache.save_cnt) { |
lp | 2551 | drivers/net/de4x5.c | for (i=0; TX_BUFFS_AVAIL && lp->cache.skb; i++) { |
lp | 2554 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
lp | 2559 | drivers/net/de4x5.c | lp->cache.save_cnt--; |
lp | 2568 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2574 | drivers/net/de4x5.c | lp->cache.csr0 = inl(DE4X5_BMR); |
lp | 2575 | drivers/net/de4x5.c | lp->cache.csr6 = (inl(DE4X5_OMR) & ~(OMR_ST | OMR_SR)); |
lp | 2576 | drivers/net/de4x5.c | lp->cache.csr7 = inl(DE4X5_IMR); |
lp | 2577 | drivers/net/de4x5.c | if (lp->chipset != DC21140) { |
lp | 2578 | drivers/net/de4x5.c | lp->cache.csr13 = inl(DE4X5_SICR); |
lp | 2579 | drivers/net/de4x5.c | lp->cache.csr14 = inl(DE4X5_STRR); |
lp | 2580 | drivers/net/de4x5.c | lp->cache.csr15 = inl(DE4X5_SIGR); |
lp | 2585 | drivers/net/de4x5.c | outl(lp->cache.csr0, DE4X5_BMR); |
lp | 2586 | drivers/net/de4x5.c | outl(lp->cache.csr6, DE4X5_OMR); |
lp | 2587 | drivers/net/de4x5.c | outl(lp->cache.csr7, DE4X5_IMR); |
lp | 2588 | drivers/net/de4x5.c | if (lp->chipset == DC21140) { |
lp | 2590 | drivers/net/de4x5.c | gep = (lp->media == _100Mb ? GEP_MODE : 0); |
lp | 2591 | drivers/net/de4x5.c | if (!lp->phy[lp->active].id && !de4x5_full_duplex) { |
lp | 2596 | drivers/net/de4x5.c | reset_init_sia(dev, lp->cache.csr13, lp->cache.csr14, |
lp | 2597 | drivers/net/de4x5.c | lp->cache.csr15); |
lp | 2607 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2610 | drivers/net/de4x5.c | if (lp->cache.skb) { |
lp | 2611 | drivers/net/de4x5.c | for (p=lp->cache.skb; p->next; p=p->next); |
lp | 2614 | drivers/net/de4x5.c | lp->cache.skb = skb; |
lp | 2623 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2624 | drivers/net/de4x5.c | struct sk_buff *p = lp->cache.skb; |
lp | 2626 | drivers/net/de4x5.c | lp->cache.skb = skb; |
lp | 2634 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2635 | drivers/net/de4x5.c | struct sk_buff *p = lp->cache.skb; |
lp | 2638 | drivers/net/de4x5.c | lp->cache.skb = p->next; |
lp | 2651 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2655 | drivers/net/de4x5.c | if (lp->timeout < 0) { |
lp | 2656 | drivers/net/de4x5.c | lp->timeout = msec/100; |
lp | 2667 | drivers/net/de4x5.c | if (!(sts & irqs) && (ans ^ ANS_NWOK) && --lp->timeout) { |
lp | 2670 | drivers/net/de4x5.c | lp->timeout = -1; |
lp | 2678 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2698 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2792 | drivers/net/de4x5.c | static int PCI_signature(char *name, struct bus_type *lp) |
lp | 2797 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 2800 | drivers/net/de4x5.c | int i = *((char *)&lp->srom + 19) * 3; |
lp | 2801 | drivers/net/de4x5.c | if (lp->chipset == DC21041) { |
lp | 2802 | drivers/net/de4x5.c | strncpy(name, (char *)&lp->srom + 26 + i, 8); |
lp | 2803 | drivers/net/de4x5.c | } else if (lp->chipset == DC21140) { |
lp | 2804 | drivers/net/de4x5.c | strncpy(name, (char *)&lp->srom + 26 + i, 8); |
lp | 2829 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 2831 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 2834 | drivers/net/de4x5.c | short *p = (short *)&lp->srom; |
lp | 2838 | drivers/net/de4x5.c | de4x5_dbg_srom((struct de4x5_srom *)&lp->srom); |
lp | 2849 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 2851 | drivers/net/de4x5.c | broken = de4x5_bad_srom(lp); |
lp | 2856 | drivers/net/de4x5.c | if (lp->bus == PCI) { |
lp | 2857 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 2865 | drivers/net/de4x5.c | dev->dev_addr[i] = (u_char) lp->srom.ieee_addr[i]; i++; |
lp | 2866 | drivers/net/de4x5.c | dev->dev_addr[i] = (u_char) lp->srom.ieee_addr[i]; i++; |
lp | 2868 | drivers/net/de4x5.c | dev->dev_addr[i] = *((u_char *)&lp->srom + i); i++; |
lp | 2869 | drivers/net/de4x5.c | dev->dev_addr[i] = *((u_char *)&lp->srom + i); i++; |
lp | 2882 | drivers/net/de4x5.c | if (lp->bus == PCI) { |
lp | 2883 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 2903 | drivers/net/de4x5.c | static int de4x5_bad_srom(struct bus_type *lp) |
lp | 2908 | drivers/net/de4x5.c | if (!de4x5_strncmp((char *)&lp->srom, (char *)&enet_det[i], 3) && |
lp | 2909 | drivers/net/de4x5.c | !de4x5_strncmp((char *)&lp->srom+0x10, (char *)&enet_det[i], 3)) { |
lp | 3197 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 3209 | drivers/net/de4x5.c | lp->active = 0; |
lp | 3210 | drivers/net/de4x5.c | for (lp->mii_cnt=0, i=1; i<DE4X5_MAX_MII; i++) { |
lp | 3215 | drivers/net/de4x5.c | for (k=0; lp->phy[k].id && (k < DE4X5_MAX_PHY); k++); |
lp | 3217 | drivers/net/de4x5.c | memcpy((char *)&lp->phy[k], |
lp | 3219 | drivers/net/de4x5.c | lp->phy[k].addr = i; |
lp | 3220 | drivers/net/de4x5.c | lp->mii_cnt++; |
lp | 3227 | drivers/net/de4x5.c | if (lp->phy[lp->active].id) { /* Reset the PHY devices */ |
lp | 3228 | drivers/net/de4x5.c | for (k=0; lp->phy[k].id && (k < DE4X5_MAX_PHY); k++) { /*For each PHY*/ |
lp | 3229 | drivers/net/de4x5.c | mii_wr(MII_CR_RST, MII_CR, lp->phy[k].addr, DE4X5_MII); |
lp | 3230 | drivers/net/de4x5.c | while (mii_rd(MII_CR, lp->phy[k].addr, DE4X5_MII) & MII_CR_RST); |
lp | 3236 | drivers/net/de4x5.c | return lp->mii_cnt; |
lp | 3241 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 3243 | drivers/net/de4x5.c | char *pa = lp->setup_frame; |
lp | 3247 | drivers/net/de4x5.c | memset(lp->setup_frame, 0, SETUP_FRAME_LEN); |
lp | 3250 | drivers/net/de4x5.c | if (lp->setup_f == HASH_PERF) { |
lp | 3251 | drivers/net/de4x5.c | for (pa=lp->setup_frame+IMPERF_PA_OFFSET, i=0; i<ETH_ALEN; i++) { |
lp | 3255 | drivers/net/de4x5.c | *(lp->setup_frame + (HASH_TABLE_LEN >> 3) - 3) = 0x80; |
lp | 3279 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 3281 | drivers/net/de4x5.c | del_timer(&lp->timer); |
lp | 3288 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 3301 | drivers/net/de4x5.c | if (lp->chipset == DC21140) { |
lp | 3314 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 3327 | drivers/net/de4x5.c | if (lp->chipset == DC21140) { |
lp | 3340 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 3344 | drivers/net/de4x5.c | del_timer(&lp->timer); |
lp | 3351 | drivers/net/de4x5.c | lp->timer.expires = jiffies + dt; |
lp | 3352 | drivers/net/de4x5.c | lp->timer.function = fn; |
lp | 3353 | drivers/net/de4x5.c | lp->timer.data = data; |
lp | 3354 | drivers/net/de4x5.c | add_timer(&lp->timer); |
lp | 3361 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 3372 | drivers/net/de4x5.c | printk("\t0x%8.8lx 0x%8.8lx\n",(u_long)lp->rx_ring,(u_long)lp->tx_ring); |
lp | 3374 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize-1;i++){ |
lp | 3376 | drivers/net/de4x5.c | printk("0x%8.8lx ",(u_long)&lp->rx_ring[i].status); |
lp | 3379 | drivers/net/de4x5.c | printk("...0x%8.8lx\n",(u_long)&lp->rx_ring[i].status); |
lp | 3381 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize-1;i++){ |
lp | 3383 | drivers/net/de4x5.c | printk("0x%8.8lx ", (u_long)&lp->tx_ring[i].status); |
lp | 3386 | drivers/net/de4x5.c | printk("...0x%8.8lx\n", (u_long)&lp->tx_ring[i].status); |
lp | 3388 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize-1;i++){ |
lp | 3390 | drivers/net/de4x5.c | printk("0x%8.8x ",lp->rx_ring[i].buf); |
lp | 3393 | drivers/net/de4x5.c | printk("...0x%8.8x\n",lp->rx_ring[i].buf); |
lp | 3395 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize-1;i++){ |
lp | 3397 | drivers/net/de4x5.c | printk("0x%8.8x ", lp->tx_ring[i].buf); |
lp | 3400 | drivers/net/de4x5.c | printk("...0x%8.8x\n", lp->tx_ring[i].buf); |
lp | 3402 | drivers/net/de4x5.c | (short)lp->rxRingSize, |
lp | 3403 | drivers/net/de4x5.c | (short)lp->txRingSize); |
lp | 3411 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 3415 | drivers/net/de4x5.c | printk("\nMII CR: %x\n",mii_rd(MII_CR,lp->phy[k].addr,DE4X5_MII)); |
lp | 3416 | drivers/net/de4x5.c | printk("MII SR: %x\n",mii_rd(MII_SR,lp->phy[k].addr,DE4X5_MII)); |
lp | 3417 | drivers/net/de4x5.c | printk("MII ID0: %x\n",mii_rd(MII_ID0,lp->phy[k].addr,DE4X5_MII)); |
lp | 3418 | drivers/net/de4x5.c | printk("MII ID1: %x\n",mii_rd(MII_ID1,lp->phy[k].addr,DE4X5_MII)); |
lp | 3419 | drivers/net/de4x5.c | if (lp->phy[k].id != BROADCOM_T4) { |
lp | 3420 | drivers/net/de4x5.c | printk("MII ANA: %x\n",mii_rd(0x04,lp->phy[k].addr,DE4X5_MII)); |
lp | 3421 | drivers/net/de4x5.c | printk("MII ANC: %x\n",mii_rd(0x05,lp->phy[k].addr,DE4X5_MII)); |
lp | 3423 | drivers/net/de4x5.c | printk("MII 16: %x\n",mii_rd(0x10,lp->phy[k].addr,DE4X5_MII)); |
lp | 3424 | drivers/net/de4x5.c | if (lp->phy[k].id != BROADCOM_T4) { |
lp | 3425 | drivers/net/de4x5.c | printk("MII 17: %x\n",mii_rd(0x11,lp->phy[k].addr,DE4X5_MII)); |
lp | 3426 | drivers/net/de4x5.c | printk("MII 18: %x\n",mii_rd(0x12,lp->phy[k].addr,DE4X5_MII)); |
lp | 3428 | drivers/net/de4x5.c | printk("MII 20: %x\n",mii_rd(0x14,lp->phy[k].addr,DE4X5_MII)); |
lp | 3437 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 3439 | drivers/net/de4x5.c | if (lp->media != lp->c_media) { |
lp | 3441 | drivers/net/de4x5.c | if (lp->chipset != DC21140) { |
lp | 3443 | drivers/net/de4x5.c | (lp->media == NC ? "unconnected!" : |
lp | 3444 | drivers/net/de4x5.c | (lp->media == TP ? "TP." : |
lp | 3445 | drivers/net/de4x5.c | (lp->media == ANS ? "TP/Nway." : |
lp | 3446 | drivers/net/de4x5.c | (lp->media == BNC ? "BNC." : |
lp | 3447 | drivers/net/de4x5.c | (lp->media == BNC_AUI ? "BNC/AUI." : |
lp | 3448 | drivers/net/de4x5.c | (lp->media == EXT_SIA ? "EXT SIA." : |
lp | 3453 | drivers/net/de4x5.c | (lp->media == NC ? "link down or incompatible connection.": |
lp | 3454 | drivers/net/de4x5.c | (lp->media == _100Mb ? "100Mb/s." : |
lp | 3455 | drivers/net/de4x5.c | (lp->media == _10Mb ? "10Mb/s." : |
lp | 3460 | drivers/net/de4x5.c | lp->c_media = lp->media; |
lp | 3495 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 3533 | drivers/net/de4x5.c | if (lp->setup_f == HASH_PERF) { |
lp | 3534 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | HASH_F | TD_SET | |
lp | 3537 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | |
lp | 3540 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
lp | 3573 | drivers/net/de4x5.c | memcpy_tofs(ioc->data, lp->setup_frame, ioc->len); |
lp | 3613 | drivers/net/de4x5.c | ioc->len = sizeof(lp->pktStats); |
lp | 3619 | drivers/net/de4x5.c | memcpy_tofs(ioc->data, &lp->pktStats, ioc->len); |
lp | 3626 | drivers/net/de4x5.c | memset(&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 3675 | drivers/net/de4x5.c | tmp.addr[j++] = lp->rxRingSize; |
lp | 3676 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)lp->rx_ring; j+=4; |
lp | 3677 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)lp->tx_ring; j+=4; |
lp | 3679 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize-1;i++){ |
lp | 3681 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)&lp->rx_ring[i].status; j+=4; |
lp | 3684 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)&lp->rx_ring[i].status; j+=4; |
lp | 3685 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize-1;i++){ |
lp | 3687 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)&lp->tx_ring[i].status; j+=4; |
lp | 3690 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)&lp->tx_ring[i].status; j+=4; |
lp | 3692 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize-1;i++){ |
lp | 3694 | drivers/net/de4x5.c | tmp.lval[j>>2] = (s32)lp->rx_ring[i].buf; j+=4; |
lp | 3697 | drivers/net/de4x5.c | tmp.lval[j>>2] = (s32)lp->rx_ring[i].buf; j+=4; |
lp | 3698 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize-1;i++){ |
lp | 3700 | drivers/net/de4x5.c | tmp.lval[j>>2] = (s32)lp->tx_ring[i].buf; j+=4; |
lp | 3703 | drivers/net/de4x5.c | tmp.lval[j>>2] = (s32)lp->tx_ring[i].buf; j+=4; |
lp | 3705 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize;i++){ |
lp | 3706 | drivers/net/de4x5.c | tmp.lval[j>>2] = lp->rx_ring[i].status; j+=4; |
lp | 3708 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize;i++){ |
lp | 3709 | drivers/net/de4x5.c | tmp.lval[j>>2] = lp->tx_ring[i].status; j+=4; |
lp | 3720 | drivers/net/de4x5.c | tmp.lval[j>>2] = lp->chipset; j+=4; |
lp | 3721 | drivers/net/de4x5.c | if (lp->chipset == DC21140) { |
lp | 3729 | drivers/net/de4x5.c | tmp.lval[j>>2] = lp->phy[lp->active].id; j+=4; |
lp | 3730 | drivers/net/de4x5.c | if (lp->phy[lp->active].id) { |
lp | 3731 | drivers/net/de4x5.c | tmp.lval[j>>2] = lp->active; j+=4; |
lp | 3732 | drivers/net/de4x5.c | tmp.lval[j>>2]=mii_rd(MII_CR,lp->phy[lp->active].addr,DE4X5_MII); j+=4; |
lp | 3733 | drivers/net/de4x5.c | tmp.lval[j>>2]=mii_rd(MII_SR,lp->phy[lp->active].addr,DE4X5_MII); j+=4; |
lp | 3734 | drivers/net/de4x5.c | tmp.lval[j>>2]=mii_rd(MII_ID0,lp->phy[lp->active].addr,DE4X5_MII); j+=4; |
lp | 3735 | drivers/net/de4x5.c | tmp.lval[j>>2]=mii_rd(MII_ID1,lp->phy[lp->active].addr,DE4X5_MII); j+=4; |
lp | 3736 | drivers/net/de4x5.c | if (lp->phy[lp->active].id != BROADCOM_T4) { |
lp | 3737 | drivers/net/de4x5.c | tmp.lval[j>>2]=mii_rd(MII_ANA,lp->phy[lp->active].addr,DE4X5_MII); j+=4; |
lp | 3738 | drivers/net/de4x5.c | tmp.lval[j>>2]=mii_rd(MII_ANLPA,lp->phy[lp->active].addr,DE4X5_MII); j+=4; |
lp | 3740 | drivers/net/de4x5.c | tmp.lval[j>>2]=mii_rd(0x10,lp->phy[lp->active].addr,DE4X5_MII); j+=4; |
lp | 3741 | drivers/net/de4x5.c | if (lp->phy[lp->active].id != BROADCOM_T4) { |
lp | 3742 | drivers/net/de4x5.c | tmp.lval[j>>2]=mii_rd(0x11,lp->phy[lp->active].addr,DE4X5_MII); j+=4; |
lp | 3743 | drivers/net/de4x5.c | tmp.lval[j>>2]=mii_rd(0x12,lp->phy[lp->active].addr,DE4X5_MII); j+=4; |
lp | 3745 | drivers/net/de4x5.c | tmp.lval[j>>2]=mii_rd(0x14,lp->phy[lp->active].addr,DE4X5_MII); j+=4; |
lp | 3749 | drivers/net/de4x5.c | tmp.addr[j++] = lp->txRingSize; |
lp | 3804 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *) thisDE4X5.priv; |
lp | 3821 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)p->priv; |
lp | 3822 | drivers/net/de4x5.c | if (lp->cache.buf) { /* MAC buffers allocated? */ |
lp | 3823 | drivers/net/de4x5.c | kfree(lp->cache.buf); /* Free the MAC buffers */ |
lp | 3825 | drivers/net/de4x5.c | release_region(p->base_addr, (lp->bus == PCI ? |
lp | 3828 | drivers/net/de4x5.c | kfree(lp->cache.priv); /* Free the private area */ |
lp | 3835 | drivers/net/de4x5.c | if (lp->cache.buf) { /* Are MAC buffers allocated */ |
lp | 3836 | drivers/net/de4x5.c | kfree(lp->cache.buf); |
lp | 3839 | drivers/net/de4x5.c | (lp->bus == PCI ? |
lp | 3842 | drivers/net/de4x5.c | kfree(lp->cache.priv); |
lp | 16 | drivers/net/de4x5.h | #define DE4X5_BMR iobase+(0x000 << lp->bus) /* Bus Mode Register */ |
lp | 17 | drivers/net/de4x5.h | #define DE4X5_TPD iobase+(0x008 << lp->bus) /* Transmit Poll Demand Reg */ |
lp | 18 | drivers/net/de4x5.h | #define DE4X5_RPD iobase+(0x010 << lp->bus) /* Receive Poll Demand Reg */ |
lp | 19 | drivers/net/de4x5.h | #define DE4X5_RRBA iobase+(0x018 << lp->bus) /* RX Ring Base Address Reg */ |
lp | 20 | drivers/net/de4x5.h | #define DE4X5_TRBA iobase+(0x020 << lp->bus) /* TX Ring Base Address Reg */ |
lp | 21 | drivers/net/de4x5.h | #define DE4X5_STS iobase+(0x028 << lp->bus) /* Status Register */ |
lp | 22 | drivers/net/de4x5.h | #define DE4X5_OMR iobase+(0x030 << lp->bus) /* Operation Mode Register */ |
lp | 23 | drivers/net/de4x5.h | #define DE4X5_IMR iobase+(0x038 << lp->bus) /* Interrupt Mask Register */ |
lp | 24 | drivers/net/de4x5.h | #define DE4X5_MFC iobase+(0x040 << lp->bus) /* Missed Frame Counter */ |
lp | 25 | drivers/net/de4x5.h | #define DE4X5_APROM iobase+(0x048 << lp->bus) /* Ethernet Address PROM */ |
lp | 26 | drivers/net/de4x5.h | #define DE4X5_BROM iobase+(0x048 << lp->bus) /* Boot ROM Register */ |
lp | 27 | drivers/net/de4x5.h | #define DE4X5_SROM iobase+(0x048 << lp->bus) /* Serial ROM Register */ |
lp | 28 | drivers/net/de4x5.h | #define DE4X5_MII iobase+(0x048 << lp->bus) /* MII Interface Register */ |
lp | 29 | drivers/net/de4x5.h | #define DE4X5_DDR iobase+(0x050 << lp->bus) /* Data Diagnostic Register */ |
lp | 30 | drivers/net/de4x5.h | #define DE4X5_FDR iobase+(0x058 << lp->bus) /* Full Duplex Register */ |
lp | 31 | drivers/net/de4x5.h | #define DE4X5_GPT iobase+(0x058 << lp->bus) /* General Purpose Timer Reg.*/ |
lp | 32 | drivers/net/de4x5.h | #define DE4X5_GEP iobase+(0x060 << lp->bus) /* General Purpose Register */ |
lp | 33 | drivers/net/de4x5.h | #define DE4X5_SISR iobase+(0x060 << lp->bus) /* SIA Status Register */ |
lp | 34 | drivers/net/de4x5.h | #define DE4X5_SICR iobase+(0x068 << lp->bus) /* SIA Connectivity Register */ |
lp | 35 | drivers/net/de4x5.h | #define DE4X5_STRR iobase+(0x070 << lp->bus) /* SIA TX/RX Register */ |
lp | 36 | drivers/net/de4x5.h | #define DE4X5_SIGR iobase+(0x078 << lp->bus) /* SIA General Register */ |
lp | 696 | drivers/net/de4x5.h | #define LOST_MEDIA (lp->lostMedia > LOST_MEDIA_THRESHOLD) |
lp | 745 | drivers/net/de4x5.h | if (lp->phy[lp->active].id) {\ |
lp | 746 | drivers/net/de4x5.h | mii_wr(MII_CR_10|MII_CR_ASSE,MII_CR,lp->phy[lp->active].addr,DE4X5_MII);\ |
lp | 760 | drivers/net/de4x5.h | if (lp->phy[lp->active].id) {\ |
lp | 761 | drivers/net/de4x5.h | mii_wr(MII_CR_100|MII_CR_ASSE, MII_CR, lp->phy[lp->active].addr, DE4X5_MII);\ |
lp | 763 | drivers/net/de4x5.h | sr = mii_rd(MII_SR, lp->phy[lp->active].addr, DE4X5_MII);\ |
lp | 375 | drivers/net/depca.c | #define TX_BUFFS_AVAIL ((lp->tx_old<=lp->tx_new)?\ |
lp | 376 | drivers/net/depca.c | lp->tx_old+lp->txRingMask-lp->tx_new:\ |
lp | 377 | drivers/net/depca.c | lp->tx_old -lp->tx_new-1) |
lp | 472 | drivers/net/depca.c | struct depca_private *lp; |
lp | 545 | drivers/net/depca.c | lp = (struct depca_private *)dev->priv; |
lp | 547 | drivers/net/depca.c | lp->adapter = adapter; |
lp | 548 | drivers/net/depca.c | sprintf(lp->adapter_name,"%s (%s)", name, dev->name); |
lp | 549 | drivers/net/depca.c | request_region(ioaddr, DEPCA_TOTAL_SIZE, lp->adapter_name); |
lp | 552 | drivers/net/depca.c | lp->sh_mem = mem_start; |
lp | 557 | drivers/net/depca.c | lp->rx_ring = (struct depca_rx_desc *)mem_start; |
lp | 560 | drivers/net/depca.c | lp->tx_ring = (struct depca_tx_desc *)mem_start; |
lp | 563 | drivers/net/depca.c | lp->bus_offset = mem_start & 0x00ff0000; |
lp | 566 | drivers/net/depca.c | lp->dma_buffs = mem_start; |
lp | 569 | drivers/net/depca.c | lp->rxRingMask = NUM_RX_DESC - 1; |
lp | 570 | drivers/net/depca.c | lp->txRingMask = NUM_TX_DESC - 1; |
lp | 573 | drivers/net/depca.c | for (i=0, j = lp->rxRingMask; j>0; i++) { |
lp | 576 | drivers/net/depca.c | lp->rx_rlen = (s32)(i << 29); |
lp | 577 | drivers/net/depca.c | for (i=0, j = lp->txRingMask; j>0; i++) { |
lp | 580 | drivers/net/depca.c | lp->tx_rlen = (s32)(i << 29); |
lp | 600 | drivers/net/depca.c | switch (lp->adapter) { |
lp | 686 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 707 | drivers/net/depca.c | if (request_irq(dev->irq, &depca_interrupt, 0, lp->adapter_name, NULL)) { |
lp | 738 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 745 | drivers/net/depca.c | lp->rx_new = lp->tx_new = 0; |
lp | 746 | drivers/net/depca.c | lp->rx_old = lp->tx_old = 0; |
lp | 749 | drivers/net/depca.c | for (i = 0; i <= lp->rxRingMask; i++) { |
lp | 750 | drivers/net/depca.c | writel((p=lp->dma_buffs+i*RX_BUFF_SZ) | R_OWN, &lp->rx_ring[i].base); |
lp | 751 | drivers/net/depca.c | writew(-RX_BUFF_SZ, &lp->rx_ring[i].buf_length); |
lp | 752 | drivers/net/depca.c | lp->rx_memcpy[i]=(char *)(p+lp->bus_offset); |
lp | 754 | drivers/net/depca.c | for (i = 0; i <= lp->txRingMask; i++) { |
lp | 755 | drivers/net/depca.c | writel((p=lp->dma_buffs+(i+lp->txRingMask+1)*TX_BUFF_SZ) & 0x00ffffff, |
lp | 756 | drivers/net/depca.c | &lp->tx_ring[i].base); |
lp | 757 | drivers/net/depca.c | lp->tx_memcpy[i]=(char *)(p+lp->bus_offset); |
lp | 761 | drivers/net/depca.c | lp->init_block.rx_ring = ((u32)((u_long)lp->rx_ring)&LA_MASK) | lp->rx_rlen; |
lp | 762 | drivers/net/depca.c | lp->init_block.tx_ring = ((u32)((u_long)lp->tx_ring)&LA_MASK) | lp->tx_rlen; |
lp | 767 | drivers/net/depca.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
lp | 770 | drivers/net/depca.c | lp->init_block.mode = 0x0000; /* Enable the Tx and Rx */ |
lp | 781 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 842 | drivers/net/depca.c | struct depca_private *lp; |
lp | 849 | drivers/net/depca.c | lp = (struct depca_private *)dev->priv; |
lp | 892 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 896 | drivers/net/depca.c | for (entry=lp->rx_new; |
lp | 897 | drivers/net/depca.c | !(readl(&lp->rx_ring[entry].base) & R_OWN); |
lp | 898 | drivers/net/depca.c | entry=lp->rx_new){ |
lp | 899 | drivers/net/depca.c | status = readl(&lp->rx_ring[entry].base) >> 16 ; |
lp | 901 | drivers/net/depca.c | lp->rx_old = entry; |
lp | 905 | drivers/net/depca.c | lp->stats.rx_errors++; /* Update the error stats. */ |
lp | 906 | drivers/net/depca.c | if (status & R_FRAM) lp->stats.rx_frame_errors++; |
lp | 907 | drivers/net/depca.c | if (status & R_OFLO) lp->stats.rx_over_errors++; |
lp | 908 | drivers/net/depca.c | if (status & R_CRC) lp->stats.rx_crc_errors++; |
lp | 909 | drivers/net/depca.c | if (status & R_BUFF) lp->stats.rx_fifo_errors++; |
lp | 911 | drivers/net/depca.c | short len, pkt_len = readw(&lp->rx_ring[entry].msg_length); |
lp | 920 | drivers/net/depca.c | if (entry < lp->rx_old) { /* Wrapped buffer */ |
lp | 921 | drivers/net/depca.c | len = (lp->rxRingMask - lp->rx_old + 1) * RX_BUFF_SZ; |
lp | 922 | drivers/net/depca.c | memcpy_fromio(buf, lp->rx_memcpy[lp->rx_old], len); |
lp | 923 | drivers/net/depca.c | memcpy_fromio(buf + len, lp->rx_memcpy[0], pkt_len-len); |
lp | 925 | drivers/net/depca.c | memcpy_fromio(buf, lp->rx_memcpy[lp->rx_old], pkt_len); |
lp | 938 | drivers/net/depca.c | lp->stats.rx_packets++; |
lp | 941 | drivers/net/depca.c | lp->pktStats.bins[i]++; |
lp | 949 | drivers/net/depca.c | lp->pktStats.broadcast++; |
lp | 951 | drivers/net/depca.c | lp->pktStats.multicast++; |
lp | 956 | drivers/net/depca.c | lp->pktStats.unicast++; |
lp | 959 | drivers/net/depca.c | lp->pktStats.bins[0]++; /* Duplicates stats.rx_packets */ |
lp | 960 | drivers/net/depca.c | if (lp->pktStats.bins[0] == 0) { /* Reset counters */ |
lp | 961 | drivers/net/depca.c | memset((char *)&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 965 | drivers/net/depca.c | lp->stats.rx_dropped++; /* Really, deferred. */ |
lp | 970 | drivers/net/depca.c | for (; lp->rx_old!=entry; lp->rx_old=(++lp->rx_old)&lp->rxRingMask) { |
lp | 971 | drivers/net/depca.c | writel(readl(&lp->rx_ring[lp->rx_old].base) | R_OWN, |
lp | 972 | drivers/net/depca.c | &lp->rx_ring[lp->rx_old].base); |
lp | 974 | drivers/net/depca.c | writel(readl(&lp->rx_ring[entry].base) | R_OWN, &lp->rx_ring[entry].base); |
lp | 980 | drivers/net/depca.c | lp->rx_new = (++lp->rx_new) & lp->rxRingMask; |
lp | 992 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 997 | drivers/net/depca.c | for (entry = lp->tx_old; entry != lp->tx_new; entry = lp->tx_old) { |
lp | 998 | drivers/net/depca.c | status = readl(&lp->tx_ring[entry].base) >> 16 ; |
lp | 1003 | drivers/net/depca.c | status = readl(&lp->tx_ring[entry].misc); |
lp | 1004 | drivers/net/depca.c | lp->stats.tx_errors++; |
lp | 1005 | drivers/net/depca.c | if (status & TMD3_RTRY) lp->stats.tx_aborted_errors++; |
lp | 1006 | drivers/net/depca.c | if (status & TMD3_LCAR) lp->stats.tx_carrier_errors++; |
lp | 1007 | drivers/net/depca.c | if (status & TMD3_LCOL) lp->stats.tx_window_errors++; |
lp | 1008 | drivers/net/depca.c | if (status & TMD3_UFLO) lp->stats.tx_fifo_errors++; |
lp | 1015 | drivers/net/depca.c | lp->stats.collisions++; |
lp | 1017 | drivers/net/depca.c | lp->stats.tx_packets++; |
lp | 1021 | drivers/net/depca.c | lp->tx_old = (++lp->tx_old) & lp->txRingMask; |
lp | 1030 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1053 | drivers/net/depca.c | if (lp->adapter != DEPCA) { |
lp | 1072 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1076 | drivers/net/depca.c | outw((u16)(lp->sh_mem & LA_MASK), DEPCA_DATA); |
lp | 1078 | drivers/net/depca.c | outw((u16)((lp->sh_mem & LA_MASK) >> 16), DEPCA_DATA); |
lp | 1089 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1094 | drivers/net/depca.c | memcpy_toio((char *)lp->sh_mem, &lp->init_block, sizeof(struct depca_init)); |
lp | 1107 | drivers/net/depca.c | dev->name, i, lp->sh_mem, inw(DEPCA_DATA)); |
lp | 1111 | drivers/net/depca.c | dev->name, i, lp->sh_mem, inw(DEPCA_DATA)); |
lp | 1121 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1125 | drivers/net/depca.c | return &lp->stats; |
lp | 1134 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1140 | drivers/net/depca.c | while(lp->tx_old != lp->tx_new); /* Wait for the ring to empty */ |
lp | 1146 | drivers/net/depca.c | lp->init_block.mode |= PROM; |
lp | 1149 | drivers/net/depca.c | lp->init_block.mode &= ~PROM; /* Unset promiscuous mode */ |
lp | 1166 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1175 | drivers/net/depca.c | lp->init_block.mcast_table[i] = (char)0xff; |
lp | 1179 | drivers/net/depca.c | lp->init_block.mcast_table[i]=0; |
lp | 1201 | drivers/net/depca.c | lp->init_block.mcast_table[byte] |= bit; |
lp | 1534 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1537 | drivers/net/depca.c | entry = lp->tx_new; /* Ring around buffer number. */ |
lp | 1538 | drivers/net/depca.c | end = (entry + (skb->len - 1) / TX_BUFF_SZ) & lp->txRingMask; |
lp | 1539 | drivers/net/depca.c | if (!(readl(&lp->tx_ring[end].base) & T_OWN)) {/* Enough room? */ |
lp | 1545 | drivers/net/depca.c | len = (lp->txRingMask - entry + 1) * TX_BUFF_SZ; |
lp | 1546 | drivers/net/depca.c | memcpy_toio(lp->tx_memcpy[entry], skb->data, len); |
lp | 1547 | drivers/net/depca.c | memcpy_toio(lp->tx_memcpy[0], skb->data + len, skb->len - len); |
lp | 1549 | drivers/net/depca.c | memcpy_toio(lp->tx_memcpy[entry], skb->data, skb->len); |
lp | 1554 | drivers/net/depca.c | for (i = entry; i != end; i = (++i) & lp->txRingMask) { |
lp | 1556 | drivers/net/depca.c | writel(readl(&lp->tx_ring[i].base) & ~T_FLAGS, &lp->tx_ring[i].base); |
lp | 1557 | drivers/net/depca.c | writew(0x0000, &lp->tx_ring[i].misc); /* clears other error flags */ |
lp | 1558 | drivers/net/depca.c | writew(-TX_BUFF_SZ, &lp->tx_ring[i].length);/* packet length in buffer */ |
lp | 1562 | drivers/net/depca.c | writel(readl(&lp->tx_ring[end].base) & ~T_FLAGS, &lp->tx_ring[end].base); |
lp | 1563 | drivers/net/depca.c | writew(0x0000, &lp->tx_ring[end].misc); /* clears other error flags */ |
lp | 1564 | drivers/net/depca.c | writew(-len, &lp->tx_ring[end].length); /* packet length in last buff */ |
lp | 1567 | drivers/net/depca.c | writel(readl(&lp->tx_ring[entry].base) | T_STP, &lp->tx_ring[entry].base); |
lp | 1569 | drivers/net/depca.c | writel(readl(&lp->tx_ring[end].base) | T_ENP, &lp->tx_ring[end].base); |
lp | 1573 | drivers/net/depca.c | writel(readl(&lp->tx_ring[i].base) | T_OWN, &lp->tx_ring[i].base); |
lp | 1574 | drivers/net/depca.c | if (i == 0) i=lp->txRingMask+1; |
lp | 1576 | drivers/net/depca.c | writel(readl(&lp->tx_ring[entry].base) | T_OWN, &lp->tx_ring[entry].base); |
lp | 1578 | drivers/net/depca.c | lp->tx_new = (++end) & lp->txRingMask; /* update current pointers */ |
lp | 1622 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1624 | drivers/net/depca.c | struct depca_init *p = (struct depca_init *)lp->sh_mem; |
lp | 1629 | drivers/net/depca.c | memcpy_toio((char *)lp->sh_mem,&lp->init_block,sizeof(struct depca_init)); |
lp | 1633 | drivers/net/depca.c | printk("\t0x%lx 0x%lx\n",(u_long)lp->rx_ring, (u_long)lp->tx_ring); |
lp | 1635 | drivers/net/depca.c | for (i=0;i<lp->rxRingMask;i++){ |
lp | 1637 | drivers/net/depca.c | printk("0x%8.8lx ", (long) &lp->rx_ring[i].base); |
lp | 1640 | drivers/net/depca.c | printk("...0x%8.8lx\n", (long) &lp->rx_ring[i].base); |
lp | 1642 | drivers/net/depca.c | for (i=0;i<lp->txRingMask;i++){ |
lp | 1644 | drivers/net/depca.c | printk("0x%8.8lx ", (long) &lp->tx_ring[i].base); |
lp | 1647 | drivers/net/depca.c | printk("...0x%8.8lx\n", (long) &lp->tx_ring[i].base); |
lp | 1649 | drivers/net/depca.c | for (i=0;i<lp->rxRingMask;i++){ |
lp | 1651 | drivers/net/depca.c | printk("0x%8.8x ", readl(&lp->rx_ring[i].base)); |
lp | 1654 | drivers/net/depca.c | printk("...0x%8.8x\n", readl(&lp->rx_ring[i].base)); |
lp | 1656 | drivers/net/depca.c | for (i=0;i<lp->txRingMask;i++){ |
lp | 1658 | drivers/net/depca.c | printk("0x%8.8x ", readl(&lp->tx_ring[i].base)); |
lp | 1661 | drivers/net/depca.c | printk("...0x%8.8x\n", readl(&lp->tx_ring[i].base)); |
lp | 1662 | drivers/net/depca.c | printk("Initialisation block at 0x%8.8lx\n",lp->sh_mem); |
lp | 1676 | drivers/net/depca.c | printk("dma_buffs: 0x%8.8lx\n",lp->dma_buffs); |
lp | 1678 | drivers/net/depca.c | (int)lp->rxRingMask + 1, |
lp | 1679 | drivers/net/depca.c | lp->rx_rlen); |
lp | 1681 | drivers/net/depca.c | (int)lp->txRingMask + 1, |
lp | 1682 | drivers/net/depca.c | lp->tx_rlen); |
lp | 1701 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1731 | drivers/net/depca.c | while(lp->tx_old != lp->tx_new);/* Wait for the ring to empty */ |
lp | 1748 | drivers/net/depca.c | while(lp->tx_old != lp->tx_new); /* Wait for the ring to empty */ |
lp | 1752 | drivers/net/depca.c | lp->init_block.mode |= PROM; /* Set promiscuous mode */ |
lp | 1766 | drivers/net/depca.c | while(lp->tx_old != lp->tx_new); /* Wait for the ring to empty */ |
lp | 1770 | drivers/net/depca.c | lp->init_block.mode &= ~PROM; /* Clear promiscuous mode */ |
lp | 1787 | drivers/net/depca.c | memcpy_tofs(ioc->data, lp->init_block.mcast_table, ioc->len); |
lp | 1820 | drivers/net/depca.c | ioc->len = sizeof(lp->pktStats); |
lp | 1822 | drivers/net/depca.c | memcpy_tofs(ioc->data, &lp->pktStats, ioc->len); |
lp | 1830 | drivers/net/depca.c | memset(&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 1842 | drivers/net/depca.c | memcpy(&tmp.sval[i], &lp->init_block, sizeof(struct depca_init)); |
lp | 502 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 510 | drivers/net/eepro.c | lp->eepro = 1; /* Yes, an Intel EtherExpress Pro/10 */ |
lp | 511 | drivers/net/eepro.c | else lp->eepro = 0; /* No, it is a generic 82585 lan card */ |
lp | 567 | drivers/net/eepro.c | lp->rx_start = (RCV_LOWER_LIMIT << 8) ; |
lp | 578 | drivers/net/eepro.c | lp->tx_start = lp->tx_end = XMT_LOWER_LIMIT << 8; /* or = RCV_RAM */ |
lp | 579 | drivers/net/eepro.c | lp->tx_last = 0; |
lp | 597 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 612 | drivers/net/eepro.c | lp->stats.tx_errors++; |
lp | 620 | drivers/net/eepro.c | lp->tx_start = lp->tx_end = RCV_RAM; |
lp | 621 | drivers/net/eepro.c | lp->tx_last = 0; |
lp | 717 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 734 | drivers/net/eepro.c | lp->tx_start = lp->tx_end = RCV_RAM ; |
lp | 735 | drivers/net/eepro.c | lp->tx_last = 0; |
lp | 766 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 768 | drivers/net/eepro.c | return &lp->stats; |
lp | 776 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 824 | drivers/net/eepro.c | outw(lp->tx_end, ioaddr + HOST_ADDRESS_REG); |
lp | 841 | drivers/net/eepro.c | outw(lp->tx_end, ioaddr + XMT_BAR); |
lp | 845 | drivers/net/eepro.c | i = lp->tx_end + XMT_HEADER + 6*(dev->mc_count + 1); |
lp | 846 | drivers/net/eepro.c | if (lp->tx_start != lp->tx_end) |
lp | 850 | drivers/net/eepro.c | outw(lp->tx_last + XMT_CHAIN, ioaddr + HOST_ADDRESS_REG); |
lp | 852 | drivers/net/eepro.c | outw(lp->tx_last + XMT_COUNT, ioaddr + HOST_ADDRESS_REG); |
lp | 855 | drivers/net/eepro.c | lp->tx_end = i ; |
lp | 857 | drivers/net/eepro.c | else lp->tx_start = lp->tx_end = i ; |
lp | 936 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 946 | drivers/net/eepro.c | if (lp->tx_end > lp->tx_start) |
lp | 947 | drivers/net/eepro.c | tx_available = XMT_RAM - (lp->tx_end - lp->tx_start); |
lp | 948 | drivers/net/eepro.c | else if (lp->tx_end < lp->tx_start) |
lp | 949 | drivers/net/eepro.c | tx_available = lp->tx_start - lp->tx_end; |
lp | 961 | drivers/net/eepro.c | last = lp->tx_end; |
lp | 981 | drivers/net/eepro.c | if (lp->tx_start != lp->tx_end) { |
lp | 984 | drivers/net/eepro.c | if (lp->tx_end != last) { |
lp | 985 | drivers/net/eepro.c | outw(lp->tx_last + XMT_CHAIN, ioaddr + HOST_ADDRESS_REG); |
lp | 988 | drivers/net/eepro.c | outw(lp->tx_last + XMT_COUNT, ioaddr + HOST_ADDRESS_REG); |
lp | 999 | drivers/net/eepro.c | if (lp->tx_start == lp->tx_end) { |
lp | 1002 | drivers/net/eepro.c | lp->tx_start = last; /* I don't like to change tx_start here */ |
lp | 1006 | drivers/net/eepro.c | lp->tx_last = last; |
lp | 1007 | drivers/net/eepro.c | lp->tx_end = end; |
lp | 1026 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 1029 | drivers/net/eepro.c | short rcv_car = lp->rx_start; |
lp | 1052 | drivers/net/eepro.c | lp->stats.rx_dropped++; |
lp | 1062 | drivers/net/eepro.c | lp->stats.rx_packets++; |
lp | 1066 | drivers/net/eepro.c | lp->stats.rx_errors++; |
lp | 1068 | drivers/net/eepro.c | lp->stats.rx_over_errors++; |
lp | 1070 | drivers/net/eepro.c | lp->stats.rx_frame_errors++; |
lp | 1072 | drivers/net/eepro.c | lp->stats.rx_crc_errors++; |
lp | 1077 | drivers/net/eepro.c | lp->stats.rx_length_errors++; |
lp | 1081 | drivers/net/eepro.c | rcv_car = lp->rx_start + RCV_HEADER + rcv_size; |
lp | 1082 | drivers/net/eepro.c | lp->rx_start = rcv_next_frame; |
lp | 1098 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 1103 | drivers/net/eepro.c | while (lp->tx_start != lp->tx_end) { |
lp | 1105 | drivers/net/eepro.c | outw(lp->tx_start, ioaddr + HOST_ADDRESS_REG); |
lp | 1109 | drivers/net/eepro.c | lp->tx_start = inw(ioaddr+IO_PORT); |
lp | 1117 | drivers/net/eepro.c | lp->stats.tx_packets++; |
lp | 1119 | drivers/net/eepro.c | lp->stats.tx_errors++; |
lp | 1121 | drivers/net/eepro.c | lp->stats.tx_carrier_errors++; |
lp | 1126 | drivers/net/eepro.c | lp->stats.collisions += (xmt_status & 0x000f); |
lp | 1128 | drivers/net/eepro.c | lp->stats.tx_heartbeat_errors++; |
lp | 337 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 345 | drivers/net/eexpress.c | return &lp->stats; |
lp | 355 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 373 | drivers/net/eexpress.c | if (lp->tx_link==lp->last_tx_restart) |
lp | 379 | drivers/net/eexpress.c | lp->last_tx_restart = 0; |
lp | 380 | drivers/net/eexpress.c | outw(lp->tx_link,ioaddr+SCB_CBL); |
lp | 391 | drivers/net/eexpress.c | outw(lp->tx_link,ioaddr+SCB_CBL); |
lp | 427 | drivers/net/eexpress.c | if ((jiffies-lp->init_time)>10) |
lp | 447 | drivers/net/eexpress.c | lp->stats.tx_errors++; |
lp | 458 | drivers/net/eexpress.c | lp->stats.tx_dropped++; |
lp | 484 | drivers/net/eexpress.c | struct net_local *lp; |
lp | 500 | drivers/net/eexpress.c | lp = (struct net_local *)dev->priv; |
lp | 514 | drivers/net/eexpress.c | outw(lp->tx_link,ioaddr+SCB_CBL); |
lp | 533 | drivers/net/eexpress.c | lp->stats.rx_errors++; |
lp | 561 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 565 | drivers/net/eexpress.c | unsigned short rx_block = lp->rx_first; |
lp | 597 | drivers/net/eexpress.c | lp->stats.rx_errors++; |
lp | 599 | drivers/net/eexpress.c | lp->stats.rx_crc_errors++; |
lp | 601 | drivers/net/eexpress.c | lp->stats.rx_frame_errors++; |
lp | 603 | drivers/net/eexpress.c | lp->stats.rx_fifo_errors++; |
lp | 605 | drivers/net/eexpress.c | lp->stats.rx_over_errors++; |
lp | 607 | drivers/net/eexpress.c | lp->stats.rx_length_errors++; |
lp | 617 | drivers/net/eexpress.c | lp->stats.rx_dropped++; |
lp | 626 | drivers/net/eexpress.c | lp->stats.rx_packets++; |
lp | 647 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 651 | drivers/net/eexpress.c | outw(lp->tx_head,ioaddr+WRITE_PTR); |
lp | 654 | drivers/net/eexpress.c | outw(lp->tx_head+0x08,ioaddr); |
lp | 655 | drivers/net/eexpress.c | outw(lp->tx_head+0x0e,ioaddr); |
lp | 658 | drivers/net/eexpress.c | outw(lp->tx_head+0x08,ioaddr); |
lp | 661 | drivers/net/eexpress.c | outw(lp->tx_head+0x16,ioaddr); |
lp | 664 | drivers/net/eexpress.c | outw(lp->tx_tail+0x0c,ioaddr+WRITE_PTR); |
lp | 665 | drivers/net/eexpress.c | outw(lp->tx_head,ioaddr); |
lp | 667 | drivers/net/eexpress.c | lp->tx_tail = lp->tx_head; |
lp | 668 | drivers/net/eexpress.c | if (lp->tx_head==TX_BUF_START+((NUM_TX_BUFS-1)*TX_BUF_SIZE)) |
lp | 669 | drivers/net/eexpress.c | lp->tx_head = TX_BUF_START; |
lp | 671 | drivers/net/eexpress.c | lp->tx_head += TX_BUF_SIZE; |
lp | 672 | drivers/net/eexpress.c | if (lp->tx_head != lp->tx_reap) |
lp | 841 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 845 | drivers/net/eexpress.c | unsigned short tx_block = lp->tx_reap; |
lp | 848 | drivers/net/eexpress.c | if (!test_bit(0,(void *)&dev->tbusy) && lp->tx_head==lp->tx_reap) |
lp | 857 | drivers/net/eexpress.c | lp->tx_link = tx_block; |
lp | 864 | drivers/net/eexpress.c | lp->last_tx_restart = 0; |
lp | 865 | drivers/net/eexpress.c | lp->stats.collisions += Stat_NoColl(status); |
lp | 869 | drivers/net/eexpress.c | lp->stats.tx_aborted_errors++; |
lp | 871 | drivers/net/eexpress.c | lp->stats.tx_carrier_errors++; |
lp | 873 | drivers/net/eexpress.c | lp->stats.tx_fifo_errors++; |
lp | 876 | drivers/net/eexpress.c | lp->stats.tx_packets++; |
lp | 879 | drivers/net/eexpress.c | lp->tx_reap = tx_block = TX_BUF_START; |
lp | 881 | drivers/net/eexpress.c | lp->tx_reap = tx_block += TX_BUF_SIZE; |
lp | 885 | drivers/net/eexpress.c | while (lp->tx_reap != lp->tx_head); |
lp | 887 | drivers/net/eexpress.c | lp->tx_link = lp->tx_tail + 0x08; |
lp | 903 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 906 | drivers/net/eexpress.c | lp->last_tx_restart = lp->tx_link; |
lp | 907 | drivers/net/eexpress.c | outw(lp->tx_link,ioaddr+SCB_CBL); |
lp | 922 | drivers/net/eexpress.c | outw(lp->tx_link,ioaddr+SCB_CBL); |
lp | 956 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 978 | drivers/net/eexpress.c | lp->tx_head = TX_BUF_START; |
lp | 979 | drivers/net/eexpress.c | lp->tx_reap = TX_BUF_START; |
lp | 980 | drivers/net/eexpress.c | lp->tx_tail = tx_block - TX_BUF_SIZE; |
lp | 981 | drivers/net/eexpress.c | lp->tx_link = lp->tx_tail + 0x08; |
lp | 1004 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 1010 | drivers/net/eexpress.c | lp->rx_first = rx_block; |
lp | 1025 | drivers/net/eexpress.c | lp->rx_last = rx_block; |
lp | 1029 | drivers/net/eexpress.c | outw(lp->rx_last+4,ioaddr+WRITE_PTR); |
lp | 1030 | drivers/net/eexpress.c | outw(lp->rx_first,ioaddr); |
lp | 1043 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 1050 | drivers/net/eexpress.c | outw((rx_buf==lp->rx_last)?lp->rx_first:(rx_buf+RX_BUF_SIZE),ioaddr); |
lp | 1072 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 1152 | drivers/net/eexpress.c | lp->init_time = jiffies; |
lp | 791 | drivers/net/eth16i.c | struct eth16i_local *lp = (struct eth16i_local *)dev->priv; |
lp | 803 | drivers/net/eth16i.c | lp->tx_buf_size = eth16i_tx_buf_map[ETH16I_TX_BUF_SIZE & 0x03]; |
lp | 806 | drivers/net/eth16i.c | printk("%s: transmit buffer size %d\n", dev->name, lp->tx_buf_size); |
lp | 814 | drivers/net/eth16i.c | lp->open_time = jiffies; |
lp | 815 | drivers/net/eth16i.c | lp->tx_started = 0; |
lp | 816 | drivers/net/eth16i.c | lp->tx_queue = 0; |
lp | 817 | drivers/net/eth16i.c | lp->tx_queue_len = 0; |
lp | 835 | drivers/net/eth16i.c | struct eth16i_local *lp = (struct eth16i_local *)dev->priv; |
lp | 838 | drivers/net/eth16i.c | lp->open_time = 0; |
lp | 861 | drivers/net/eth16i.c | struct eth16i_local *lp = (struct eth16i_local *)dev->priv; |
lp | 887 | drivers/net/eth16i.c | printk("lp->tx_queue = %d\n", lp->tx_queue); |
lp | 888 | drivers/net/eth16i.c | printk("lp->tx_queue_len = %d\n", lp->tx_queue_len); |
lp | 889 | drivers/net/eth16i.c | printk("lp->tx_started = %d\n", lp->tx_started); |
lp | 893 | drivers/net/eth16i.c | lp->stats.tx_errors++; |
lp | 903 | drivers/net/eth16i.c | lp->tx_started = 0; |
lp | 904 | drivers/net/eth16i.c | lp->tx_queue = 0; |
lp | 905 | drivers/net/eth16i.c | lp->tx_queue_len = 0; |
lp | 951 | drivers/net/eth16i.c | lp->tx_queue++; |
lp | 952 | drivers/net/eth16i.c | lp->tx_queue_len += length + 2; |
lp | 954 | drivers/net/eth16i.c | if(lp->tx_started == 0) { |
lp | 956 | drivers/net/eth16i.c | outb(TX_START | lp->tx_queue, ioaddr + TRANSMIT_START_REG); |
lp | 957 | drivers/net/eth16i.c | lp->tx_queue = 0; |
lp | 958 | drivers/net/eth16i.c | lp->tx_queue_len = 0; |
lp | 960 | drivers/net/eth16i.c | lp->tx_started = 1; |
lp | 963 | drivers/net/eth16i.c | else if(lp->tx_queue_len < lp->tx_buf_size - (ETH_FRAME_LEN + 2)) { |
lp | 980 | drivers/net/eth16i.c | struct eth16i_local *lp = (struct eth16i_local *)dev->priv; |
lp | 996 | drivers/net/eth16i.c | lp->stats.rx_errors++; |
lp | 997 | drivers/net/eth16i.c | if( status & PKT_SHORT ) lp->stats.rx_length_errors++; |
lp | 998 | drivers/net/eth16i.c | if( status & PKT_ALIGN_ERR ) lp->stats.rx_frame_errors++; |
lp | 999 | drivers/net/eth16i.c | if( status & PKT_CRC_ERR ) lp->stats.rx_crc_errors++; |
lp | 1000 | drivers/net/eth16i.c | if( status & PKT_RX_BUF_OVERFLOW) lp->stats.rx_over_errors++; |
lp | 1012 | drivers/net/eth16i.c | lp->stats.rx_dropped++; |
lp | 1021 | drivers/net/eth16i.c | lp->stats.rx_dropped++; |
lp | 1053 | drivers/net/eth16i.c | lp->stats.rx_packets++; |
lp | 1092 | drivers/net/eth16i.c | struct eth16i_local *lp; |
lp | 1107 | drivers/net/eth16i.c | lp = (struct eth16i_local *)dev->priv; |
lp | 1117 | drivers/net/eth16i.c | lp->stats.tx_packets++; |
lp | 1119 | drivers/net/eth16i.c | if(lp->tx_queue) { /* Is there still packets ? */ |
lp | 1122 | drivers/net/eth16i.c | outb(TX_START | lp->tx_queue, ioaddr + TRANSMIT_START_REG); |
lp | 1123 | drivers/net/eth16i.c | lp->tx_queue = 0; |
lp | 1124 | drivers/net/eth16i.c | lp->tx_queue_len = 0; |
lp | 1130 | drivers/net/eth16i.c | lp->tx_started = 0; |
lp | 1165 | drivers/net/eth16i.c | struct eth16i_local *lp = (struct eth16i_local *)dev->priv; |
lp | 1167 | drivers/net/eth16i.c | return &lp->stats; |
lp | 224 | drivers/net/ewrk3.c | icr |= lp->irq_mask;\ |
lp | 230 | drivers/net/ewrk3.c | icr &= ~lp->irq_mask;\ |
lp | 378 | drivers/net/ewrk3.c | struct ewrk3_private *lp; |
lp | 513 | drivers/net/ewrk3.c | lp = (struct ewrk3_private *)dev->priv; |
lp | 515 | drivers/net/ewrk3.c | lp->shmem_base = mem_start; |
lp | 516 | drivers/net/ewrk3.c | lp->shmem_length = shmem_length; |
lp | 517 | drivers/net/ewrk3.c | lp->lemac = lemac; |
lp | 518 | drivers/net/ewrk3.c | lp->hard_strapped = hard_strapped; |
lp | 520 | drivers/net/ewrk3.c | lp->mPage = 64; |
lp | 521 | drivers/net/ewrk3.c | if (cmr & CMR_DRAM) lp->mPage <<= 1 ;/* 2 DRAMS on module */ |
lp | 523 | drivers/net/ewrk3.c | sprintf(lp->adapter_name,"%s (%s)", name, dev->name); |
lp | 524 | drivers/net/ewrk3.c | request_region(iobase, EWRK3_TOTAL_SIZE, lp->adapter_name); |
lp | 526 | drivers/net/ewrk3.c | lp->irq_mask = ICR_TNEM|ICR_TXDM|ICR_RNEM|ICR_RXDM; |
lp | 616 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 626 | drivers/net/ewrk3.c | if (!lp->hard_strapped) { |
lp | 646 | drivers/net/ewrk3.c | if (lp->shmem_length == 0) { |
lp | 649 | drivers/net/ewrk3.c | printk(" start of shared memory: 0x%08lx\n",lp->shmem_base); |
lp | 650 | drivers/net/ewrk3.c | printk(" window length: 0x%04lx\n",lp->shmem_length); |
lp | 689 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 709 | drivers/net/ewrk3.c | for (page=1;page<lp->mPage;page++) { /* Write the free page numbers */ |
lp | 713 | drivers/net/ewrk3.c | lp->lock = 0; /* Ensure there are no locks */ |
lp | 724 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 730 | drivers/net/ewrk3.c | if (dev->tbusy || lp->lock) { |
lp | 734 | drivers/net/ewrk3.c | } else if (!lp->hard_strapped) { |
lp | 778 | drivers/net/ewrk3.c | if ((page = inb(EWRK3_FMQ)) < lp->mPage) { |
lp | 782 | drivers/net/ewrk3.c | while (set_bit(0, (void *)&lp->lock) != 0); /* Wait for lock to free */ |
lp | 783 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 785 | drivers/net/ewrk3.c | } else if (lp->shmem_length == SHMEM_2K) { |
lp | 786 | drivers/net/ewrk3.c | buf = lp->shmem_base; |
lp | 788 | drivers/net/ewrk3.c | } else if (lp->shmem_length == SHMEM_32K) { |
lp | 789 | drivers/net/ewrk3.c | buf = ((((short)page << 11) & 0x7800) + lp->shmem_base); |
lp | 791 | drivers/net/ewrk3.c | } else if (lp->shmem_length == SHMEM_64K) { |
lp | 792 | drivers/net/ewrk3.c | buf = ((((short)page << 11) & 0xf800) + lp->shmem_base); |
lp | 806 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 823 | drivers/net/ewrk3.c | if (lp->txc) { |
lp | 849 | drivers/net/ewrk3.c | lp->lock = 0; /* unlock the page register */ |
lp | 877 | drivers/net/ewrk3.c | struct ewrk3_private *lp; |
lp | 884 | drivers/net/ewrk3.c | lp = (struct ewrk3_private *)dev->priv; |
lp | 917 | drivers/net/ewrk3.c | lp->irq_mask |= ICR_TXDM|ICR_RXDM;/* enable the interrupt source */ |
lp | 923 | drivers/net/ewrk3.c | lp->irq_mask &= ~(ICR_TXDM|ICR_RXDM);/* disable the interrupt source */ |
lp | 940 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 947 | drivers/net/ewrk3.c | if ((page = inb(EWRK3_RQ)) < lp->mPage) {/* Get next entry's buffer page */ |
lp | 952 | drivers/net/ewrk3.c | if ((tmpLock = set_bit(0, (void *)&lp->lock)) == 1) { /* Assert lock */ |
lp | 953 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { /* Get existing page */ |
lp | 963 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 965 | drivers/net/ewrk3.c | } else if (lp->shmem_length == SHMEM_2K) { |
lp | 966 | drivers/net/ewrk3.c | buf = lp->shmem_base; |
lp | 968 | drivers/net/ewrk3.c | } else if (lp->shmem_length == SHMEM_32K) { |
lp | 969 | drivers/net/ewrk3.c | buf = ((((short)page << 11) & 0x7800) + lp->shmem_base); |
lp | 971 | drivers/net/ewrk3.c | } else if (lp->shmem_length == SHMEM_64K) { |
lp | 972 | drivers/net/ewrk3.c | buf = ((((short)page << 11) & 0xf800) + lp->shmem_base); |
lp | 983 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 995 | drivers/net/ewrk3.c | lp->stats.rx_errors++; /* Update the error stats. */ |
lp | 996 | drivers/net/ewrk3.c | if (rx_status & R_DBE) lp->stats.rx_frame_errors++; |
lp | 997 | drivers/net/ewrk3.c | if (rx_status & R_CRC) lp->stats.rx_crc_errors++; |
lp | 998 | drivers/net/ewrk3.c | if (rx_status & R_PLL) lp->stats.rx_fifo_errors++; |
lp | 1008 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1027 | drivers/net/ewrk3.c | lp->stats.rx_packets++; |
lp | 1030 | drivers/net/ewrk3.c | lp->pktStats.bins[i]++; |
lp | 1037 | drivers/net/ewrk3.c | lp->pktStats.broadcast++; |
lp | 1039 | drivers/net/ewrk3.c | lp->pktStats.multicast++; |
lp | 1043 | drivers/net/ewrk3.c | lp->pktStats.unicast++; |
lp | 1046 | drivers/net/ewrk3.c | lp->pktStats.bins[0]++; /* Duplicates stats.rx_packets */ |
lp | 1047 | drivers/net/ewrk3.c | if (lp->pktStats.bins[0] == 0) { /* Reset counters */ |
lp | 1048 | drivers/net/ewrk3.c | memset(&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 1052 | drivers/net/ewrk3.c | lp->stats.rx_dropped++; /* Really, deferred. */ |
lp | 1063 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { /* Replace old page */ |
lp | 1069 | drivers/net/ewrk3.c | lp->lock = 0; /* Unlock the page register */ |
lp | 1084 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 1091 | drivers/net/ewrk3.c | lp->stats.tx_errors++; |
lp | 1092 | drivers/net/ewrk3.c | if (tx_status & T_NCL) lp->stats.tx_carrier_errors++; |
lp | 1093 | drivers/net/ewrk3.c | if (tx_status & T_LCL) lp->stats.tx_window_errors++; |
lp | 1096 | drivers/net/ewrk3.c | lp->pktStats.tx_underruns++; |
lp | 1098 | drivers/net/ewrk3.c | lp->pktStats.excessive_underruns++; |
lp | 1102 | drivers/net/ewrk3.c | lp->stats.collisions++; |
lp | 1104 | drivers/net/ewrk3.c | lp->pktStats.excessive_collisions++; |
lp | 1108 | drivers/net/ewrk3.c | lp->stats.tx_packets++; |
lp | 1119 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 1148 | drivers/net/ewrk3.c | if (!lp->hard_strapped) { |
lp | 1162 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 1166 | drivers/net/ewrk3.c | return &lp->stats; |
lp | 1175 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 1182 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1183 | drivers/net/ewrk3.c | lp->mctbl = (char *) PAGE0_HTE; |
lp | 1185 | drivers/net/ewrk3.c | lp->mctbl = (char *)(lp->shmem_base + PAGE0_HTE); |
lp | 1210 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 1215 | drivers/net/ewrk3.c | short *p = (short *) lp->mctbl; |
lp | 1219 | drivers/net/ewrk3.c | while (set_bit(0, (void *)&lp->lock) != 0); /* Wait for lock to free */ |
lp | 1221 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1223 | drivers/net/ewrk3.c | outw(EEPROM_OFFSET(lp->mctbl), EWRK3_PIR1); |
lp | 1230 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1239 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1248 | drivers/net/ewrk3.c | memset_io(lp->mctbl, 0, (HASH_TABLE_LEN >> 3)); |
lp | 1249 | drivers/net/ewrk3.c | writeb(0x80, (char *)(lp->mctbl + (HASH_TABLE_LEN >> 4) - 1)); |
lp | 1269 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1272 | drivers/net/ewrk3.c | outw((short)((long)lp->mctbl) + byte, EWRK3_PIR1); |
lp | 1275 | drivers/net/ewrk3.c | outw((short)((long)lp->mctbl) + byte, EWRK3_PIR1); |
lp | 1278 | drivers/net/ewrk3.c | writeb(readb(lp->mctbl + byte) | bit, lp->mctbl + byte); |
lp | 1284 | drivers/net/ewrk3.c | lp->lock = 0; /* Unlock the page register */ |
lp | 1674 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 1743 | drivers/net/ewrk3.c | while (set_bit(0, (void *)&lp->lock) != 0); /* Wait for lock to free */ |
lp | 1744 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1752 | drivers/net/ewrk3.c | memcpy_fromio(tmp.addr, (char *)(lp->shmem_base + PAGE0_HTE), (HASH_TABLE_LEN >> 3)); |
lp | 1757 | drivers/net/ewrk3.c | lp->lock = 0; /* Unlock the page register */ |
lp | 1792 | drivers/net/ewrk3.c | ioc->len = sizeof(lp->pktStats); |
lp | 1794 | drivers/net/ewrk3.c | memcpy_tofs(ioc->data, &lp->pktStats, ioc->len); |
lp | 1802 | drivers/net/ewrk3.c | memset(&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 1870 | drivers/net/ewrk3.c | lp->txc = 1; |
lp | 1878 | drivers/net/ewrk3.c | lp->txc = 0; |
lp | 307 | drivers/net/hp100.c | struct hp100_private *lp; |
lp | 410 | drivers/net/hp100.c | lp = (struct hp100_private *)dev -> priv; |
lp | 411 | drivers/net/hp100.c | lp -> id = eid; |
lp | 412 | drivers/net/hp100.c | lp -> mem_mapped = mem_mapped; |
lp | 413 | drivers/net/hp100.c | lp -> mem_ptr_phys = mem_ptr_phys; |
lp | 414 | drivers/net/hp100.c | lp -> mem_ptr_virt = mem_ptr_virt; |
lp | 416 | drivers/net/hp100.c | lp -> soft_model = hp100_inb( SOFT_MODEL ); |
lp | 417 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE3; |
lp | 418 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE3; |
lp | 424 | drivers/net/hp100.c | lp -> memory_size = 0x200 << ( ( hp100_inb( SRAM ) & 0xe0 ) >> 5 ); |
lp | 425 | drivers/net/hp100.c | lp -> rx_ratio = hp100_rx_ratio; |
lp | 443 | drivers/net/hp100.c | lp -> lan_type = hp100_sense_lan( dev ); |
lp | 446 | drivers/net/hp100.c | dev -> name, lp -> id -> name, ioaddr, dev -> irq ); |
lp | 453 | drivers/net/hp100.c | lp -> memory_size >> ( 10 - 4 ), lp -> rx_ratio ); |
lp | 463 | drivers/net/hp100.c | if ( lp -> lan_type != HP100_LAN_ERR ) |
lp | 465 | drivers/net/hp100.c | switch ( lp -> lan_type ) { |
lp | 489 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 491 | drivers/net/hp100.c | if ( request_irq( dev -> irq, hp100_interrupt, SA_INTERRUPT, lp -> id -> name, NULL ) ) |
lp | 505 | drivers/net/hp100.c | lp -> lan_type = hp100_sense_lan( dev ); |
lp | 506 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE3; |
lp | 507 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE3; |
lp | 536 | drivers/net/hp100.c | hp100_outw( ( lp -> memory_size * lp -> rx_ratio ) / 100, RX_MEM_STOP ); |
lp | 537 | drivers/net/hp100.c | hp100_outw( lp -> memory_size - 1, TX_MEM_STOP ); |
lp | 540 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 ) |
lp | 541 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 551 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 558 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 ) /* relogin */ |
lp | 579 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 581 | drivers/net/hp100.c | if ( lp -> lan_type < 0 ) |
lp | 584 | drivers/net/hp100.c | if ( ( lp -> lan_type = hp100_sense_lan( dev ) ) < 0 ) |
lp | 590 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 ) |
lp | 591 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 601 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 && lp -> hub_status < 0 ) |
lp | 606 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 618 | drivers/net/hp100.c | if ( lp -> lan_type != i ) |
lp | 622 | drivers/net/hp100.c | lp -> lan_type = i; |
lp | 624 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 ) |
lp | 625 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 664 | drivers/net/hp100.c | if ( lp -> mem_mapped ) |
lp | 666 | drivers/net/hp100.c | if ( lp -> mem_ptr_virt ) |
lp | 668 | drivers/net/hp100.c | memcpy( lp -> mem_ptr_virt, skb -> data, skb -> len ); |
lp | 670 | drivers/net/hp100.c | memset( lp -> mem_ptr_virt, 0, HP100_MIN_PACKET_SIZE - skb -> len ); |
lp | 674 | drivers/net/hp100.c | memcpy_toio( lp -> mem_ptr_phys, skb -> data, skb -> len ); |
lp | 676 | drivers/net/hp100.c | memset_io( lp -> mem_ptr_phys, 0, HP100_MIN_PACKET_SIZE - skb -> len ); |
lp | 687 | drivers/net/hp100.c | lp -> stats.tx_packets++; |
lp | 708 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 713 | drivers/net/hp100.c | if ( lp -> lan_type < 0 ) |
lp | 715 | drivers/net/hp100.c | if ( ( lp -> lan_type = hp100_sense_lan( dev ) ) == HP100_LAN_100 ) |
lp | 716 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 734 | drivers/net/hp100.c | if ( lp -> mem_mapped ) |
lp | 736 | drivers/net/hp100.c | if ( lp -> mem_ptr_virt ) |
lp | 737 | drivers/net/hp100.c | header = *(__u32 *)lp -> mem_ptr_virt; |
lp | 739 | drivers/net/hp100.c | header = readl( lp -> mem_ptr_phys ); |
lp | 759 | drivers/net/hp100.c | lp -> stats.rx_dropped++; |
lp | 767 | drivers/net/hp100.c | if ( lp -> mem_mapped ) |
lp | 769 | drivers/net/hp100.c | if ( lp -> mem_ptr_virt ) |
lp | 770 | drivers/net/hp100.c | memcpy( ptr, lp -> mem_ptr_virt, ( pkt_len + 3 ) & ~3 ); |
lp | 772 | drivers/net/hp100.c | memcpy_fromio( ptr, lp -> mem_ptr_phys, ( pkt_len + 3 ) & ~3 ); |
lp | 778 | drivers/net/hp100.c | lp -> stats.rx_packets++; |
lp | 789 | drivers/net/hp100.c | lp -> stats.multicast++; break; |
lp | 815 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 819 | drivers/net/hp100.c | lp -> stats.rx_errors += val; |
lp | 820 | drivers/net/hp100.c | lp -> stats.rx_over_errors += val; |
lp | 822 | drivers/net/hp100.c | lp -> stats.rx_errors += val; |
lp | 823 | drivers/net/hp100.c | lp -> stats.rx_crc_errors += val; |
lp | 825 | drivers/net/hp100.c | lp -> stats.tx_errors += val; |
lp | 826 | drivers/net/hp100.c | lp -> stats.tx_aborted_errors += val; |
lp | 852 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 864 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE6; /* promiscuous mode, all good */ |
lp | 865 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE6; /* packets on the net */ |
lp | 870 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE5; /* multicast mode, packets for me */ |
lp | 871 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE5; /* broadcasts and all multicasts */ |
lp | 875 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE3; /* normal mode, packets for me */ |
lp | 876 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE3; /* and broadcasts */ |
lp | 879 | drivers/net/hp100.c | hp100_outb( lp -> mac2_mode, MAC_CFG_2 ); |
lp | 881 | drivers/net/hp100.c | hp100_orb( lp -> mac1_mode | |
lp | 896 | drivers/net/hp100.c | struct hp100_private *lp; |
lp | 922 | drivers/net/hp100.c | lp = (struct hp100_private *)dev -> priv; |
lp | 940 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 945 | drivers/net/hp100.c | hp100_outb( lp -> mac2_mode, MAC_CFG_2 ); |
lp | 947 | drivers/net/hp100.c | hp100_orb( lp -> mac1_mode | |
lp | 953 | drivers/net/hp100.c | if ( lp -> mem_mapped ) |
lp | 1001 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 1011 | drivers/net/hp100.c | if ( lp -> id -> id == 0x02019F022 ) /* HP J27248B doesn't have 100Mb/s interface */ |
lp | 336 | drivers/net/lance.c | struct lance_private *lp; |
lp | 406 | drivers/net/lance.c | lp = (struct lance_private *) kmalloc(sizeof(*lp), GFP_DMA | GFP_KERNEL); |
lp | 407 | drivers/net/lance.c | memset(lp, 0, sizeof(*lp)); |
lp | 408 | drivers/net/lance.c | dev->priv = lp; |
lp | 409 | drivers/net/lance.c | lp->name = chipname; |
lp | 410 | drivers/net/lance.c | lp->rx_buffs = (unsigned long) kmalloc(PKT_BUF_SZ*RX_RING_SIZE, GFP_DMA | GFP_KERNEL); |
lp | 411 | drivers/net/lance.c | lp->tx_bounce_buffs = NULL; |
lp | 413 | drivers/net/lance.c | lp->tx_bounce_buffs = kmalloc(PKT_BUF_SZ*TX_RING_SIZE, GFP_DMA | GFP_KERNEL); |
lp | 415 | drivers/net/lance.c | lp->chip_version = lance_version; |
lp | 417 | drivers/net/lance.c | lp->init_block.mode = 0x0003; /* Disable Rx and Tx. */ |
lp | 419 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
lp | 420 | drivers/net/lance.c | lp->init_block.filter[0] = 0x00000000; |
lp | 421 | drivers/net/lance.c | lp->init_block.filter[1] = 0x00000000; |
lp | 422 | drivers/net/lance.c | lp->init_block.rx_ring = (int)lp->rx_ring | RX_RING_LEN_BITS; |
lp | 423 | drivers/net/lance.c | lp->init_block.tx_ring = (int)lp->tx_ring | TX_RING_LEN_BITS; |
lp | 427 | drivers/net/lance.c | outw((short) (int) &lp->init_block, ioaddr+LANCE_DATA); |
lp | 430 | drivers/net/lance.c | outw(((int)&lp->init_block) >> 16, ioaddr+LANCE_DATA); |
lp | 538 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_ENABLE_AUTOSELECT) { |
lp | 562 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 567 | drivers/net/lance.c | request_irq(dev->irq, &lance_interrupt, 0, lp->name, NULL)) { |
lp | 586 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_MUST_UNRESET) |
lp | 589 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_ENABLE_AUTOSELECT) { |
lp | 597 | drivers/net/lance.c | dev->name, dev->irq, dev->dma, (int) lp->tx_ring, (int) lp->rx_ring, |
lp | 598 | drivers/net/lance.c | (int) &lp->init_block); |
lp | 603 | drivers/net/lance.c | outw((short) (int) &lp->init_block, ioaddr+LANCE_DATA); |
lp | 605 | drivers/net/lance.c | outw(((int)&lp->init_block) >> 16, ioaddr+LANCE_DATA); |
lp | 628 | drivers/net/lance.c | dev->name, i, (int) &lp->init_block, inw(ioaddr+LANCE_DATA)); |
lp | 648 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 652 | drivers/net/lance.c | if (lp->tx_skbuff[i]) { |
lp | 653 | drivers/net/lance.c | dev_kfree_skb(lp->tx_skbuff[i],FREE_WRITE); |
lp | 654 | drivers/net/lance.c | lp->tx_skbuff[i] = NULL; |
lp | 664 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 667 | drivers/net/lance.c | lp->lock = 0, lp->tx_full = 0; |
lp | 668 | drivers/net/lance.c | lp->cur_rx = lp->cur_tx = 0; |
lp | 669 | drivers/net/lance.c | lp->dirty_rx = lp->dirty_tx = 0; |
lp | 672 | drivers/net/lance.c | lp->rx_ring[i].base = (lp->rx_buffs + i*PKT_BUF_SZ) | 0x80000000; |
lp | 673 | drivers/net/lance.c | lp->rx_ring[i].buf_length = -PKT_BUF_SZ; |
lp | 678 | drivers/net/lance.c | lp->tx_ring[i].base = 0; |
lp | 681 | drivers/net/lance.c | lp->init_block.mode = 0x0000; |
lp | 683 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
lp | 684 | drivers/net/lance.c | lp->init_block.filter[0] = 0x00000000; |
lp | 685 | drivers/net/lance.c | lp->init_block.filter[1] = 0x00000000; |
lp | 686 | drivers/net/lance.c | lp->init_block.rx_ring = (int)lp->rx_ring | RX_RING_LEN_BITS; |
lp | 687 | drivers/net/lance.c | lp->init_block.tx_ring = (int)lp->tx_ring | TX_RING_LEN_BITS; |
lp | 693 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 696 | drivers/net/lance.c | (chip_table[lp->chip_version].flags & LANCE_MUST_REINIT_RING)) { |
lp | 707 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 721 | drivers/net/lance.c | lp->stats.tx_errors++; |
lp | 726 | drivers/net/lance.c | lp->dirty_tx, lp->cur_tx, lp->tx_full ? " (full)" : "", |
lp | 727 | drivers/net/lance.c | lp->cur_rx); |
lp | 730 | drivers/net/lance.c | lp->rx_ring[i].base, -lp->rx_ring[i].buf_length, |
lp | 731 | drivers/net/lance.c | lp->rx_ring[i].msg_length); |
lp | 734 | drivers/net/lance.c | lp->tx_ring[i].base, -lp->tx_ring[i].length, |
lp | 735 | drivers/net/lance.c | lp->tx_ring[i].misc); |
lp | 769 | drivers/net/lance.c | if (set_bit(0, (void*)&lp->lock) != 0) { |
lp | 779 | drivers/net/lance.c | entry = lp->cur_tx & TX_RING_MOD_MASK; |
lp | 785 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_MUST_PAD) { |
lp | 786 | drivers/net/lance.c | lp->tx_ring[entry].length = |
lp | 789 | drivers/net/lance.c | lp->tx_ring[entry].length = -skb->len; |
lp | 791 | drivers/net/lance.c | lp->tx_ring[entry].misc = 0x0000; |
lp | 799 | drivers/net/lance.c | memcpy(&lp->tx_bounce_buffs[entry], skb->data, skb->len); |
lp | 800 | drivers/net/lance.c | lp->tx_ring[entry].base = |
lp | 801 | drivers/net/lance.c | (int)(lp->tx_bounce_buffs + entry) | 0x83000000; |
lp | 804 | drivers/net/lance.c | lp->tx_skbuff[entry] = skb; |
lp | 805 | drivers/net/lance.c | lp->tx_ring[entry].base = (int)(skb->data) | 0x83000000; |
lp | 807 | drivers/net/lance.c | lp->cur_tx++; |
lp | 817 | drivers/net/lance.c | lp->lock = 0; |
lp | 818 | drivers/net/lance.c | if (lp->tx_ring[(entry+1) & TX_RING_MOD_MASK].base == 0) |
lp | 821 | drivers/net/lance.c | lp->tx_full = 1; |
lp | 832 | drivers/net/lance.c | struct lance_private *lp; |
lp | 842 | drivers/net/lance.c | lp = (struct lance_private *)dev->priv; |
lp | 864 | drivers/net/lance.c | int dirty_tx = lp->dirty_tx; |
lp | 866 | drivers/net/lance.c | while (dirty_tx < lp->cur_tx) { |
lp | 868 | drivers/net/lance.c | int status = lp->tx_ring[entry].base; |
lp | 873 | drivers/net/lance.c | lp->tx_ring[entry].base = 0; |
lp | 877 | drivers/net/lance.c | int err_status = lp->tx_ring[entry].misc; |
lp | 878 | drivers/net/lance.c | lp->stats.tx_errors++; |
lp | 879 | drivers/net/lance.c | if (err_status & 0x0400) lp->stats.tx_aborted_errors++; |
lp | 880 | drivers/net/lance.c | if (err_status & 0x0800) lp->stats.tx_carrier_errors++; |
lp | 881 | drivers/net/lance.c | if (err_status & 0x1000) lp->stats.tx_window_errors++; |
lp | 884 | drivers/net/lance.c | lp->stats.tx_fifo_errors++; |
lp | 893 | drivers/net/lance.c | lp->stats.collisions++; |
lp | 894 | drivers/net/lance.c | lp->stats.tx_packets++; |
lp | 899 | drivers/net/lance.c | if (lp->tx_skbuff[entry]) { |
lp | 900 | drivers/net/lance.c | dev_kfree_skb(lp->tx_skbuff[entry],FREE_WRITE); |
lp | 901 | drivers/net/lance.c | lp->tx_skbuff[entry] = 0; |
lp | 907 | drivers/net/lance.c | if (lp->cur_tx - dirty_tx >= TX_RING_SIZE) { |
lp | 909 | drivers/net/lance.c | dirty_tx, lp->cur_tx, lp->tx_full); |
lp | 914 | drivers/net/lance.c | if (lp->tx_full && dev->tbusy |
lp | 915 | drivers/net/lance.c | && dirty_tx > lp->cur_tx - TX_RING_SIZE + 2) { |
lp | 917 | drivers/net/lance.c | lp->tx_full = 0; |
lp | 922 | drivers/net/lance.c | lp->dirty_tx = dirty_tx; |
lp | 926 | drivers/net/lance.c | if (csr0 & 0x4000) lp->stats.tx_errors++; /* Tx babble. */ |
lp | 927 | drivers/net/lance.c | if (csr0 & 0x1000) lp->stats.rx_errors++; /* Missed a Rx frame. */ |
lp | 959 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 960 | drivers/net/lance.c | int entry = lp->cur_rx & RX_RING_MOD_MASK; |
lp | 964 | drivers/net/lance.c | while (lp->rx_ring[entry].base >= 0) { |
lp | 965 | drivers/net/lance.c | int status = lp->rx_ring[entry].base >> 24; |
lp | 973 | drivers/net/lance.c | lp->stats.rx_errors++; /* end of a packet.*/ |
lp | 974 | drivers/net/lance.c | if (status & 0x20) lp->stats.rx_frame_errors++; |
lp | 975 | drivers/net/lance.c | if (status & 0x10) lp->stats.rx_over_errors++; |
lp | 976 | drivers/net/lance.c | if (status & 0x08) lp->stats.rx_crc_errors++; |
lp | 977 | drivers/net/lance.c | if (status & 0x04) lp->stats.rx_fifo_errors++; |
lp | 978 | drivers/net/lance.c | lp->rx_ring[entry].base &= 0x03ffffff; |
lp | 983 | drivers/net/lance.c | short pkt_len = (lp->rx_ring[entry].msg_length & 0xfff)-4; |
lp | 989 | drivers/net/lance.c | lp->stats.rx_errors++; |
lp | 998 | drivers/net/lance.c | if (lp->rx_ring[(entry+i) & RX_RING_MOD_MASK].base < 0) |
lp | 1003 | drivers/net/lance.c | lp->stats.rx_dropped++; |
lp | 1004 | drivers/net/lance.c | lp->rx_ring[entry].base |= 0x80000000; |
lp | 1005 | drivers/net/lance.c | lp->cur_rx++; |
lp | 1013 | drivers/net/lance.c | (unsigned char *)(lp->rx_ring[entry].base & 0x00ffffff), |
lp | 1017 | drivers/net/lance.c | lp->stats.rx_packets++; |
lp | 1022 | drivers/net/lance.c | lp->rx_ring[entry].buf_length = -PKT_BUF_SZ; |
lp | 1023 | drivers/net/lance.c | lp->rx_ring[entry].base |= 0x80000000; |
lp | 1024 | drivers/net/lance.c | entry = (++lp->cur_rx) & RX_RING_MOD_MASK; |
lp | 1037 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 1042 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_HAS_MISSED_FRAME) { |
lp | 1044 | drivers/net/lance.c | lp->stats.rx_missed_errors = inw(ioaddr+LANCE_DATA); |
lp | 1069 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 1074 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_HAS_MISSED_FRAME) { |
lp | 1079 | drivers/net/lance.c | lp->stats.rx_missed_errors = inw(ioaddr+LANCE_DATA); |
lp | 1084 | drivers/net/lance.c | return &lp->stats; |
lp | 156 | drivers/net/pi2.c | static void rts(struct pi_local *lp, int x); |
lp | 157 | drivers/net/pi2.c | static void b_rxint(struct device *dev, struct pi_local *lp); |
lp | 158 | drivers/net/pi2.c | static void b_txint(struct pi_local *lp); |
lp | 159 | drivers/net/pi2.c | static void b_exint(struct pi_local *lp); |
lp | 160 | drivers/net/pi2.c | static void a_rxint(struct device *dev, struct pi_local *lp); |
lp | 161 | drivers/net/pi2.c | static void a_txint(struct pi_local *lp); |
lp | 162 | drivers/net/pi2.c | static void a_exint(struct pi_local *lp); |
lp | 200 | drivers/net/pi2.c | static void switchbuffers(struct pi_local *lp) |
lp | 202 | drivers/net/pi2.c | if (lp->rcvbuf == lp->rxdmabuf1) |
lp | 203 | drivers/net/pi2.c | lp->rcvbuf = lp->rxdmabuf2; |
lp | 205 | drivers/net/pi2.c | lp->rcvbuf = lp->rxdmabuf1; |
lp | 208 | drivers/net/pi2.c | static void hardware_send_packet(struct pi_local *lp, struct sk_buff *skb) |
lp | 213 | drivers/net/pi2.c | lp->stats.tx_packets++; |
lp | 217 | drivers/net/pi2.c | kickflag = (skb_peek(&lp->sndq) == NULL) && (lp->sndbuf == NULL); |
lp | 220 | drivers/net/pi2.c | skb_queue_tail(&lp->sndq, skb); |
lp | 223 | drivers/net/pi2.c | switch (lp->base & 2) { |
lp | 225 | drivers/net/pi2.c | a_txint(lp); /* process interrupt */ |
lp | 230 | drivers/net/pi2.c | if (lp->tstate == IDLE) |
lp | 231 | drivers/net/pi2.c | b_txint(lp); |
lp | 238 | drivers/net/pi2.c | static void setup_rx_dma(struct pi_local *lp) |
lp | 248 | drivers/net/pi2.c | dma_abs = (unsigned long) (lp->rcvbuf->data); |
lp | 249 | drivers/net/pi2.c | dmachan = lp->dmachan; |
lp | 250 | drivers/net/pi2.c | cmd = lp->base + CTL; |
lp | 256 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, WT_FN_RDYFN | WT_RDY_RT | INT_ERR_Rx | EXT_INT_ENAB); |
lp | 266 | drivers/net/pi2.c | set_dma_count(dmachan, lp->bufsiz); |
lp | 272 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_Rx_CRC); |
lp | 275 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, |
lp | 281 | drivers/net/pi2.c | static void setup_tx_dma(struct pi_local *lp, int length) |
lp | 290 | drivers/net/pi2.c | dmachan = lp->dmachan; |
lp | 291 | drivers/net/pi2.c | dma_abs = (unsigned long) (lp->txdmabuf); |
lp | 309 | drivers/net/pi2.c | static void tdelay(struct pi_local *lp, int time) |
lp | 315 | drivers/net/pi2.c | if (lp->base & 2) { /* If A channel */ |
lp | 318 | drivers/net/pi2.c | port = lp->cardbase + TMR1; |
lp | 322 | drivers/net/pi2.c | port = lp->cardbase + TMR2; |
lp | 323 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R1, INT_ALL_Rx | EXT_INT_ENAB); |
lp | 327 | drivers/net/pi2.c | outb_p(sc | LSB_MSB | MODE0, lp->cardbase + TMRCMD); |
lp | 334 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R15, CTSIE); |
lp | 335 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R0, RES_EXT_INT); |
lp | 343 | drivers/net/pi2.c | static void a_txint(struct pi_local *lp) |
lp | 351 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 353 | drivers/net/pi2.c | switch (lp->tstate) { |
lp | 356 | drivers/net/pi2.c | if ((lp->sndbuf = skb_dequeue(&lp->sndq)) == NULL) { |
lp | 357 | drivers/net/pi2.c | rts(lp, OFF); |
lp | 367 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 368 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 369 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0) & DCD) != 0) { |
lp | 370 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 371 | drivers/net/pi2.c | tdelay(lp, 100); |
lp | 373 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, CTSIE | DCDIE); |
lp | 377 | drivers/net/pi2.c | if (random() > lp->persist) { |
lp | 378 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 379 | drivers/net/pi2.c | tdelay(lp, lp->slotime); |
lp | 384 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R5, TxCRC_ENAB | RTS | Tx8); |
lp | 385 | drivers/net/pi2.c | rts(lp, ON); /* Transmitter on */ |
lp | 386 | drivers/net/pi2.c | lp->tstate = ST_TXDELAY; |
lp | 387 | drivers/net/pi2.c | tdelay(lp, lp->txdelay); |
lp | 397 | drivers/net/pi2.c | static void a_exint(struct pi_local *lp) |
lp | 407 | drivers/net/pi2.c | st = rdscc(lp->cardbase, lp->base + CTL, R0); /* Fetch status */ |
lp | 410 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R0, RES_EXT_INT); |
lp | 411 | drivers/net/pi2.c | cmd = lp->base + CTL; |
lp | 413 | drivers/net/pi2.c | if ((lp->rstate >= ACTIVE) && (st & BRK_ABRT)) { |
lp | 414 | drivers/net/pi2.c | setup_rx_dma(lp); |
lp | 415 | drivers/net/pi2.c | lp->rstate = ACTIVE; |
lp | 417 | drivers/net/pi2.c | switch (lp->tstate) { |
lp | 419 | drivers/net/pi2.c | free_p(lp->sndbuf); |
lp | 420 | drivers/net/pi2.c | lp->sndbuf = NULL; |
lp | 421 | drivers/net/pi2.c | lp->tstate = FLAGOUT; |
lp | 422 | drivers/net/pi2.c | tdelay(lp, lp->squeldelay); |
lp | 425 | drivers/net/pi2.c | if ((lp->sndbuf = skb_dequeue(&lp->sndq)) == NULL) { |
lp | 427 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 428 | drivers/net/pi2.c | rts(lp, OFF); |
lp | 435 | drivers/net/pi2.c | disable_dma(lp->dmachan); |
lp | 438 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, WT_FN_RDYFN | EXT_INT_ENAB); |
lp | 443 | drivers/net/pi2.c | length = lp->sndbuf->len - 1; |
lp | 444 | drivers/net/pi2.c | memcpy(lp->txdmabuf, &lp->sndbuf->data[1], length); |
lp | 448 | drivers/net/pi2.c | setup_tx_dma(lp, length); |
lp | 452 | drivers/net/pi2.c | enable_dma(lp->dmachan); |
lp | 455 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_Tx_CRC | RES_Tx_P); |
lp | 458 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, TxUIE); |
lp | 461 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, WT_RDY_ENAB | WT_FN_RDYFN | EXT_INT_ENAB); |
lp | 464 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EOM_L); |
lp | 468 | drivers/net/pi2.c | lp->tstate = ACTIVE; |
lp | 474 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 475 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 476 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0) & DCD) != 0) { |
lp | 477 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 478 | drivers/net/pi2.c | tdelay(lp, 100); |
lp | 480 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R15, CTSIE | DCDIE); |
lp | 484 | drivers/net/pi2.c | if (random() > lp->persist) { |
lp | 485 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 486 | drivers/net/pi2.c | tdelay(lp, lp->slotime); |
lp | 491 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R5, TxCRC_ENAB | RTS | Tx8); |
lp | 492 | drivers/net/pi2.c | rts(lp, ON); /* Transmitter on */ |
lp | 493 | drivers/net/pi2.c | lp->tstate = ST_TXDELAY; |
lp | 494 | drivers/net/pi2.c | tdelay(lp, lp->txdelay); |
lp | 504 | drivers/net/pi2.c | static void a_rxint(struct device *dev, struct pi_local *lp) |
lp | 517 | drivers/net/pi2.c | cmd = lp->base + CTL; |
lp | 519 | drivers/net/pi2.c | rse = rdscc(lp->cardbase, cmd, R1); /* Get special condition bits from R1 */ |
lp | 521 | drivers/net/pi2.c | lp->rstate = RXERROR; |
lp | 526 | drivers/net/pi2.c | clear_dma_ff(lp->dmachan); |
lp | 527 | drivers/net/pi2.c | bytecount = lp->bufsiz - get_dma_residue(lp->dmachan); |
lp | 529 | drivers/net/pi2.c | if ((rse & CRC_ERR) || (lp->rstate > ACTIVE) || (bytecount < 10)) { |
lp | 531 | drivers/net/pi2.c | lp->stats.rx_crc_errors++; |
lp | 533 | drivers/net/pi2.c | if (lp->rstate == RXERROR) { |
lp | 534 | drivers/net/pi2.c | lp->stats.rx_errors++; |
lp | 535 | drivers/net/pi2.c | lp->stats.rx_over_errors++; |
lp | 538 | drivers/net/pi2.c | lp->rstate = ACTIVE; |
lp | 539 | drivers/net/pi2.c | setup_rx_dma(lp); |
lp | 543 | drivers/net/pi2.c | pkt_len = lp->rcvbuf->cnt = bytecount - 2 + 1; |
lp | 546 | drivers/net/pi2.c | cur_buf = lp->rcvbuf; |
lp | 547 | drivers/net/pi2.c | switchbuffers(lp); |
lp | 548 | drivers/net/pi2.c | setup_rx_dma(lp); |
lp | 557 | drivers/net/pi2.c | lp->stats.rx_dropped++; |
lp | 573 | drivers/net/pi2.c | lp->stats.rx_packets++; |
lp | 576 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R0, ERR_RES); /* error reset */ |
lp | 580 | drivers/net/pi2.c | static void b_rxint(struct device *dev, struct pi_local *lp) |
lp | 592 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 594 | drivers/net/pi2.c | rse = rdscc(lp->cardbase, cmd, R1); /* get status byte from R1 */ |
lp | 596 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0)) & Rx_CH_AV) { |
lp | 603 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 604 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 606 | drivers/net/pi2.c | lp->rstate = RXERROR; /* set error flag */ |
lp | 607 | drivers/net/pi2.c | lp->stats.rx_errors++; |
lp | 608 | drivers/net/pi2.c | lp->stats.rx_over_errors++; |
lp | 609 | drivers/net/pi2.c | } else if (lp->rcvbuf->cnt >= lp->bufsiz) { |
lp | 612 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 613 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 614 | drivers/net/pi2.c | lp->rstate = TOOBIG;/* when set, chars are not stored */ |
lp | 617 | drivers/net/pi2.c | if (lp->rstate == ACTIVE) { /* If no errors... */ |
lp | 618 | drivers/net/pi2.c | *lp->rcp++ = rdscc(lp->cardbase, cmd, R8); /* char to rcv buff */ |
lp | 619 | drivers/net/pi2.c | lp->rcvbuf->cnt++; /* bump count */ |
lp | 622 | drivers/net/pi2.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 623 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, ERR_RES); /* reset err latch */ |
lp | 624 | drivers/net/pi2.c | lp->rstate = ACTIVE; |
lp | 629 | drivers/net/pi2.c | if (lp->rcvbuf->cnt > 0) { |
lp | 630 | drivers/net/pi2.c | if ((rse & CRC_ERR) || (lp->rstate > ACTIVE) || (lp->rcvbuf->cnt < 10)) { |
lp | 631 | drivers/net/pi2.c | if ((lp->rcvbuf->cnt >= 10) && (rse & CRC_ERR)) { |
lp | 632 | drivers/net/pi2.c | lp->stats.rx_crc_errors++; |
lp | 634 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 635 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 638 | drivers/net/pi2.c | pkt_len = lp->rcvbuf->cnt -= 2; /* Toss 2 crc bytes */ |
lp | 646 | drivers/net/pi2.c | lp->stats.rx_dropped++; |
lp | 656 | drivers/net/pi2.c | memcpy(cfix, lp->rcvbuf->data, pkt_len - 1); |
lp | 661 | drivers/net/pi2.c | lp->stats.rx_packets++; |
lp | 663 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 664 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 668 | drivers/net/pi2.c | lp->rstate = ACTIVE; /* and clear error status */ |
lp | 674 | drivers/net/pi2.c | static void b_txint(struct pi_local *lp) |
lp | 682 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 684 | drivers/net/pi2.c | switch (lp->tstate) { |
lp | 686 | drivers/net/pi2.c | lp->tstate = FLAGOUT; |
lp | 687 | drivers/net/pi2.c | tdelay(lp, lp->squeldelay); |
lp | 692 | drivers/net/pi2.c | if ((lp->sndbuf = skb_dequeue(&lp->sndq)) == NULL) { |
lp | 696 | drivers/net/pi2.c | rts(lp, OFF); |
lp | 701 | drivers/net/pi2.c | lp->txptr = lp->sndbuf->data; |
lp | 702 | drivers/net/pi2.c | lp->txptr++; /* Ignore KISS control byte */ |
lp | 703 | drivers/net/pi2.c | lp->txcnt = (int) lp->sndbuf->len - 1; |
lp | 708 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 709 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 710 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0) & DCD) != 0) { |
lp | 711 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 712 | drivers/net/pi2.c | tdelay(lp, 100); |
lp | 714 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, CTSIE | DCDIE); |
lp | 718 | drivers/net/pi2.c | if (random() > lp->persist) { |
lp | 719 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 720 | drivers/net/pi2.c | tdelay(lp, lp->slotime); |
lp | 724 | drivers/net/pi2.c | rts(lp, ON); /* Transmitter on */ |
lp | 725 | drivers/net/pi2.c | lp->tstate = ST_TXDELAY; |
lp | 726 | drivers/net/pi2.c | tdelay(lp, lp->txdelay); |
lp | 732 | drivers/net/pi2.c | if (lp->txcnt--) { |
lp | 733 | drivers/net/pi2.c | c = *lp->txptr++; |
lp | 735 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R8, c); |
lp | 739 | drivers/net/pi2.c | free_p(lp->sndbuf); |
lp | 740 | drivers/net/pi2.c | lp->sndbuf = NULL; |
lp | 741 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0) & 0x40)) { |
lp | 744 | drivers/net/pi2.c | lp->stats.tx_errors++; |
lp | 745 | drivers/net/pi2.c | lp->stats.tx_fifo_errors++; |
lp | 746 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, SEND_ABORT); |
lp | 747 | drivers/net/pi2.c | lp->tstate = FLAGOUT; |
lp | 748 | drivers/net/pi2.c | tdelay(lp, lp->squeldelay); |
lp | 752 | drivers/net/pi2.c | lp->tstate = UNDERRUN; /* Now we expect to underrun */ |
lp | 754 | drivers/net/pi2.c | if (lp->speed) { /* If internally clocked */ |
lp | 755 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZI); |
lp | 757 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS); |
lp | 759 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_Tx_P); /* reset Tx Int Pend */ |
lp | 774 | drivers/net/pi2.c | static void b_exint(struct pi_local *lp) |
lp | 781 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 784 | drivers/net/pi2.c | st = rdscc(lp->cardbase, cmd, R0); /* Fetch status */ |
lp | 786 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 789 | drivers/net/pi2.c | switch (lp->tstate) { |
lp | 791 | drivers/net/pi2.c | free_p(lp->sndbuf); |
lp | 792 | drivers/net/pi2.c | lp->sndbuf = NULL; |
lp | 793 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, SEND_ABORT); |
lp | 794 | drivers/net/pi2.c | lp->tstate = FLAGOUT; |
lp | 795 | drivers/net/pi2.c | lp->stats.tx_errors++; |
lp | 796 | drivers/net/pi2.c | lp->stats.tx_fifo_errors++; |
lp | 797 | drivers/net/pi2.c | tdelay(lp, lp->squeldelay); |
lp | 801 | drivers/net/pi2.c | lp->tstate = CRCOUT; |
lp | 806 | drivers/net/pi2.c | if ((lp->sndbuf = skb_dequeue(&lp->sndq)) == NULL) { |
lp | 810 | drivers/net/pi2.c | rts(lp, OFF); |
lp | 811 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 815 | drivers/net/pi2.c | lp->txptr = lp->sndbuf->data; |
lp | 816 | drivers/net/pi2.c | lp->txptr++; /* Ignore KISS control byte */ |
lp | 817 | drivers/net/pi2.c | lp->txcnt = (int) lp->sndbuf->len - 1; |
lp | 819 | drivers/net/pi2.c | lp->txcnt--; |
lp | 820 | drivers/net/pi2.c | c = *lp->txptr++; |
lp | 821 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_Tx_CRC); /* reset for next frame */ |
lp | 824 | drivers/net/pi2.c | if (lp->speed) { /* If internally clocked */ |
lp | 825 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZI | ABUNDER); |
lp | 827 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | ABUNDER); |
lp | 830 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R8, c); /* First char out now */ |
lp | 831 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EOM_L); /* Reset end of message latch */ |
lp | 835 | drivers/net/pi2.c | if (lp->txcnt) { |
lp | 836 | drivers/net/pi2.c | lp->txcnt--; |
lp | 837 | drivers/net/pi2.c | c = *lp->txptr++; |
lp | 839 | drivers/net/pi2.c | while((rdscc(lp->cardbase, cmd, R0) & 0x04) == 0) |
lp | 841 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R8, c); |
lp | 847 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, TxUIE); /* allow Underrun int only */ |
lp | 848 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 849 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, TxINT_ENAB | EXT_INT_ENAB); /* Tx/Ext ints */ |
lp | 851 | drivers/net/pi2.c | lp->tstate = ACTIVE; /* char going out now */ |
lp | 859 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 860 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 861 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0) & DCD) != 0) { |
lp | 862 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 863 | drivers/net/pi2.c | tdelay(lp, 100); |
lp | 865 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, CTSIE | DCDIE); |
lp | 869 | drivers/net/pi2.c | if (random() > lp->persist) { |
lp | 870 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 871 | drivers/net/pi2.c | tdelay(lp, lp->slotime); |
lp | 875 | drivers/net/pi2.c | rts(lp, ON); /* Transmitter on */ |
lp | 876 | drivers/net/pi2.c | lp->tstate = ST_TXDELAY; |
lp | 877 | drivers/net/pi2.c | tdelay(lp, lp->txdelay); |
lp | 884 | drivers/net/pi2.c | lp->txcnt--; |
lp | 885 | drivers/net/pi2.c | c = *lp->txptr++; |
lp | 886 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_Tx_CRC); /* reset for next frame */ |
lp | 889 | drivers/net/pi2.c | if (lp->speed) { /* If internally clocked */ |
lp | 890 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZI | ABUNDER); |
lp | 892 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | ABUNDER); |
lp | 895 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R8, c); /* First char out now */ |
lp | 896 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EOM_L); /* Reset end of message latch */ |
lp | 900 | drivers/net/pi2.c | if (lp->txcnt) { |
lp | 901 | drivers/net/pi2.c | lp->txcnt--; |
lp | 902 | drivers/net/pi2.c | c = *lp->txptr++; |
lp | 904 | drivers/net/pi2.c | while((rdscc(lp->cardbase, cmd, R0) & 0x04) == 0) |
lp | 906 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R8, c); |
lp | 912 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, TxUIE); /* allow Underrun int only */ |
lp | 913 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 915 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, TxINT_ENAB | EXT_INT_ENAB); |
lp | 917 | drivers/net/pi2.c | lp->tstate = ACTIVE; /* char going out now */ |
lp | 927 | drivers/net/pi2.c | if ((lp->rstate == ACTIVE) && (st & BRK_ABRT)) { |
lp | 928 | drivers/net/pi2.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 929 | drivers/net/pi2.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 930 | drivers/net/pi2.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 931 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 932 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; /* rewind on DCD transition */ |
lp | 998 | drivers/net/pi2.c | static void rts(struct pi_local *lp, int x) |
lp | 1006 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 1011 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, 0); |
lp | 1012 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R3, Rx8); /* Rx off */ |
lp | 1013 | drivers/net/pi2.c | lp->rstate = IDLE; |
lp | 1016 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, WT_FN_RDYFN | EXT_INT_ENAB); |
lp | 1018 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, 0); /* No interrupts */ |
lp | 1021 | drivers/net/pi2.c | if (!lp->clockmode) { |
lp | 1022 | drivers/net/pi2.c | if (lp->speed) { /* if internally clocked */ |
lp | 1023 | drivers/net/pi2.c | br = lp->speed; /* get desired speed */ |
lp | 1024 | drivers/net/pi2.c | tc = (lp->xtal / br) - 2; /* calc 1X BRG divisor */ |
lp | 1025 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R12, tc & 0xFF); /* lower byte */ |
lp | 1026 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R13, (tc >> 8) & 0xFF); /* upper byte */ |
lp | 1029 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R5, TxCRC_ENAB | RTS | TxENAB | Tx8 | DTR); |
lp | 1032 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 1033 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R5, Tx8 | DTR); /* TX off */ |
lp | 1035 | drivers/net/pi2.c | if (!lp->clockmode) { |
lp | 1036 | drivers/net/pi2.c | if (lp->speed) { /* if internally clocked */ |
lp | 1039 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC); |
lp | 1040 | drivers/net/pi2.c | br = lp->speed; /* get desired speed */ |
lp | 1042 | drivers/net/pi2.c | tc = ((lp->xtal / 32) / br) - 2; |
lp | 1043 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R12, tc & 0xFF); /* lower byte */ |
lp | 1044 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R13, (tc >> 8) & 0xFF); /* upper byte */ |
lp | 1046 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | SEARCH); |
lp | 1048 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | BRENABL); |
lp | 1052 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R3, Rx8); /* Make sure rx is off */ |
lp | 1053 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, ERR_RES); /* reset err latch */ |
lp | 1054 | drivers/net/pi2.c | dummy = rdscc(lp->cardbase, cmd, R1); /* get status byte from R1 */ |
lp | 1055 | drivers/net/pi2.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 1056 | drivers/net/pi2.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 1058 | drivers/net/pi2.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 1061 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R3, RxENABLE | Rx8); |
lp | 1062 | drivers/net/pi2.c | lp->rstate = ACTIVE; /* Normal state */ |
lp | 1065 | drivers/net/pi2.c | setup_rx_dma(lp); |
lp | 1068 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 1069 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 1070 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, (INT_ALL_Rx | EXT_INT_ENAB)); |
lp | 1072 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, BRKIE); /* allow ABORT int */ |
lp | 1093 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1101 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 1107 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R9, CHRA); /* Reset channel A */ |
lp | 1108 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R2, 0xff); /* Initialize interrupt vector */ |
lp | 1111 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R9, CHRB); /* Reset channel B */ |
lp | 1116 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, 0); |
lp | 1119 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, 0); |
lp | 1122 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R4, SDLC | X1CLK); |
lp | 1125 | drivers/net/pi2.c | if (lp->speed) { /* Use internal clocking */ |
lp | 1126 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZI); |
lp | 1127 | drivers/net/pi2.c | if (!lp->clockmode) |
lp | 1129 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R11, TCBR | RCDPLL | TRxCDP | TRxCOI); |
lp | 1132 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R11, TCDPLL | RCDPLL | TRxCBR | TRxCOI); |
lp | 1134 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS); |
lp | 1136 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R11, TCTRxCP); |
lp | 1140 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R6, 0); |
lp | 1143 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R7, FLAG); |
lp | 1148 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R5, Tx8 | DTR); |
lp | 1151 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R3, Rx8); /* 8 bits/char */ |
lp | 1154 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC); /* BRG off, keep Pclk source */ |
lp | 1158 | drivers/net/pi2.c | if (lp->speed) { |
lp | 1159 | drivers/net/pi2.c | br = lp->speed; /* get desired speed */ |
lp | 1160 | drivers/net/pi2.c | tc = ((lp->xtal / 32) / br) - 2; /* calc 32X BRG divisor */ |
lp | 1165 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R12, tc & 0xFF); /* lower byte */ |
lp | 1166 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R13, (tc >> 8) & 0xFF); /* upper byte */ |
lp | 1169 | drivers/net/pi2.c | rts(lp, OFF); /* TX OFF and RX ON */ |
lp | 1171 | drivers/net/pi2.c | if (lp->speed) { |
lp | 1173 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | SSBR); |
lp | 1176 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | SSRTxC); |
lp | 1178 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | SEARCH); /* SEARCH mode, keep BRG src */ |
lp | 1179 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | BRENABL); /* Enable the BRG */ |
lp | 1182 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, (INT_ALL_Rx | EXT_INT_ENAB)); |
lp | 1184 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, BRKIE); /* ABORT int */ |
lp | 1187 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R3, RxENABLE | RxCRC_ENAB | Rx8); |
lp | 1303 | drivers/net/pi2.c | struct pi_local *lp; |
lp | 1314 | drivers/net/pi2.c | lp = (struct pi_local *) dev->priv; |
lp | 1320 | drivers/net/pi2.c | lp->txdmabuf = get_dma_buffer(&mem_ptr); |
lp | 1321 | drivers/net/pi2.c | lp->rxdmabuf1 = (struct mbuf *) get_dma_buffer(&mem_ptr); |
lp | 1322 | drivers/net/pi2.c | lp->rxdmabuf2 = (struct mbuf *) get_dma_buffer(&mem_ptr); |
lp | 1325 | drivers/net/pi2.c | lp->rcvbuf = lp->rxdmabuf1; |
lp | 1326 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 1327 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 1330 | drivers/net/pi2.c | skb_queue_head_init(&lp->sndq); |
lp | 1334 | drivers/net/pi2.c | lp->xtal = (unsigned long) SINGLE / 2; |
lp | 1336 | drivers/net/pi2.c | lp->xtal = (unsigned long) DOUBLE / 2; |
lp | 1337 | drivers/net/pi2.c | lp->base = dev->base_addr; |
lp | 1338 | drivers/net/pi2.c | lp->cardbase = dev->base_addr & 0x3f0; |
lp | 1340 | drivers/net/pi2.c | lp->speed = DEF_A_SPEED; |
lp | 1342 | drivers/net/pi2.c | lp->txdelay = DEF_A_TXDELAY; |
lp | 1343 | drivers/net/pi2.c | lp->persist = DEF_A_PERSIST; |
lp | 1344 | drivers/net/pi2.c | lp->slotime = DEF_A_SLOTIME; |
lp | 1345 | drivers/net/pi2.c | lp->squeldelay = DEF_A_SQUELDELAY; |
lp | 1346 | drivers/net/pi2.c | lp->clockmode = DEF_A_CLOCKMODE; |
lp | 1349 | drivers/net/pi2.c | lp->speed = DEF_B_SPEED; |
lp | 1351 | drivers/net/pi2.c | lp->txdelay = DEF_B_TXDELAY; |
lp | 1352 | drivers/net/pi2.c | lp->persist = DEF_B_PERSIST; |
lp | 1353 | drivers/net/pi2.c | lp->slotime = DEF_B_SLOTIME; |
lp | 1354 | drivers/net/pi2.c | lp->squeldelay = DEF_B_SQUELDELAY; |
lp | 1355 | drivers/net/pi2.c | lp->clockmode = DEF_B_CLOCKMODE; |
lp | 1357 | drivers/net/pi2.c | lp->bufsiz = DMA_BUFF_SIZE; |
lp | 1358 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 1365 | drivers/net/pi2.c | lp->dmachan = dev->dma; |
lp | 1366 | drivers/net/pi2.c | if (lp->dmachan < 1 || lp->dmachan > 3) |
lp | 1367 | drivers/net/pi2.c | printk("PI: DMA channel %d out of range\n", lp->dmachan); |
lp | 1375 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R1, EXT_INT_ENAB); |
lp | 1377 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R9, MIE | NV); |
lp | 1380 | drivers/net/pi2.c | tdelay(lp, 1); |
lp | 1388 | drivers/net/pi2.c | wrtscc(lp->cardbase, dev->base_addr + CTL, R9, FHWRES); /* Hardware reset */ |
lp | 1390 | drivers/net/pi2.c | wrtscc(lp->cardbase, dev->base_addr + CTL, R9, 0); |
lp | 1459 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1472 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 1481 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R9, MIE | NV); |
lp | 1484 | drivers/net/pi2.c | lp->open_time = jiffies; |
lp | 1495 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1504 | drivers/net/pi2.c | hardware_send_packet(lp, skb); |
lp | 1515 | drivers/net/pi2.c | struct pi_local *lp; |
lp | 1530 | drivers/net/pi2.c | lp = (struct pi_local *) pi0a.priv; /* Assume channel A */ |
lp | 1531 | drivers/net/pi2.c | while ((st = rdscc(lp->cardbase, pi0a.base_addr | CHANA | CTL, R3)) != 0) { |
lp | 1534 | drivers/net/pi2.c | lp = (struct pi_local *) pi0b.priv; |
lp | 1535 | drivers/net/pi2.c | b_txint(lp); |
lp | 1538 | drivers/net/pi2.c | lp = (struct pi_local *) pi0a.priv; |
lp | 1539 | drivers/net/pi2.c | a_rxint(&pi0a, lp); |
lp | 1542 | drivers/net/pi2.c | lp = (struct pi_local *) pi0a.priv; |
lp | 1543 | drivers/net/pi2.c | a_txint(lp); |
lp | 1546 | drivers/net/pi2.c | lp = (struct pi_local *) pi0a.priv; |
lp | 1547 | drivers/net/pi2.c | a_exint(lp); |
lp | 1550 | drivers/net/pi2.c | lp = (struct pi_local *) pi0b.priv; |
lp | 1551 | drivers/net/pi2.c | b_rxint(&pi0b, lp); |
lp | 1554 | drivers/net/pi2.c | lp = (struct pi_local *) pi0b.priv; |
lp | 1555 | drivers/net/pi2.c | b_exint(lp); |
lp | 1560 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R0, RES_H_IUS); |
lp | 1570 | drivers/net/pi2.c | struct pi_local *lp; |
lp | 1576 | drivers/net/pi2.c | lp = (struct pi_local *) dev->priv; |
lp | 1580 | drivers/net/pi2.c | disable_dma(lp->dmachan); |
lp | 1582 | drivers/net/pi2.c | lp->open_time = 0; |
lp | 1588 | drivers/net/pi2.c | while ((ptr = skb_dequeue(&lp->sndq)) != NULL) |
lp | 1599 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1617 | drivers/net/pi2.c | lp->txdelay = rq.txdelay; |
lp | 1618 | drivers/net/pi2.c | lp->persist = rq.persist; |
lp | 1619 | drivers/net/pi2.c | lp->slotime = rq.slotime; |
lp | 1620 | drivers/net/pi2.c | lp->squeldelay = rq.squeldelay; |
lp | 1621 | drivers/net/pi2.c | lp->clockmode = rq.clockmode; |
lp | 1622 | drivers/net/pi2.c | lp->speed = rq.speed; |
lp | 1639 | drivers/net/pi2.c | free_dma(lp->dmachan); |
lp | 1640 | drivers/net/pi2.c | dev->dma = lp->dmachan = rq.dmachan; |
lp | 1641 | drivers/net/pi2.c | if (request_dma(lp->dmachan,"pi2")) |
lp | 1656 | drivers/net/pi2.c | rq.speed = lp->speed; |
lp | 1657 | drivers/net/pi2.c | rq.txdelay = lp->txdelay; |
lp | 1658 | drivers/net/pi2.c | rq.persist = lp->persist; |
lp | 1659 | drivers/net/pi2.c | rq.slotime = lp->slotime; |
lp | 1660 | drivers/net/pi2.c | rq.squeldelay = lp->squeldelay; |
lp | 1661 | drivers/net/pi2.c | rq.clockmode = lp->clockmode; |
lp | 1662 | drivers/net/pi2.c | rq.dmachan = lp->dmachan; |
lp | 1679 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1681 | drivers/net/pi2.c | return &lp->stats; |
lp | 127 | drivers/net/pt.c | static void pt_rts(struct pt_local *lp, int x); |
lp | 129 | drivers/net/pt.c | static void pt_txisr(struct pt_local *lp); |
lp | 130 | drivers/net/pt.c | static void pt_exisr(struct pt_local *lp); |
lp | 131 | drivers/net/pt.c | static void pt_tmrisr(struct pt_local *lp); |
lp | 135 | drivers/net/pt.c | static void tdelay(struct pt_local *lp, int time); |
lp | 136 | drivers/net/pt.c | static void empty_scc(struct pt_local *lp); |
lp | 169 | drivers/net/pt.c | static void switchbuffers(struct pt_local *lp) |
lp | 171 | drivers/net/pt.c | if (lp->rcvbuf == lp->rxdmabuf1) |
lp | 172 | drivers/net/pt.c | lp->rcvbuf = lp->rxdmabuf2; |
lp | 174 | drivers/net/pt.c | lp->rcvbuf = lp->rxdmabuf1; |
lp | 177 | drivers/net/pt.c | static void hardware_send_packet(struct pt_local *lp, struct sk_buff *skb) |
lp | 190 | drivers/net/pt.c | if ((struct pt_local*)(&pt0b.priv) == lp) |
lp | 199 | drivers/net/pt.c | lp->txdelay = ptr[1] * 10; |
lp | 200 | drivers/net/pt.c | send_kiss(dev, PARAM_TXDELAY, (u_char)(lp->txdelay/10)); |
lp | 203 | drivers/net/pt.c | lp->persist = ptr[1]; |
lp | 204 | drivers/net/pt.c | send_kiss(dev, PARAM_PERSIST, (u_char)(lp->persist)); |
lp | 207 | drivers/net/pt.c | lp->slotime = ptr[1]; |
lp | 208 | drivers/net/pt.c | send_kiss(dev, PARAM_SLOTTIME, (u_char)(lp->slotime/10)); |
lp | 221 | drivers/net/pt.c | lp->stats.tx_packets++; |
lp | 225 | drivers/net/pt.c | kickflag = (skb_peek(&lp->sndq) == NULL) && (lp->sndbuf == NULL); |
lp | 229 | drivers/net/pt.c | printk("PTd hardware_send_packet(): kickflag = %d (%d).\n", kickflag, lp->base & CHANA); |
lp | 231 | drivers/net/pt.c | skb_queue_tail(&lp->sndq, skb); |
lp | 234 | drivers/net/pt.c | if (lp->dmachan) |
lp | 236 | drivers/net/pt.c | pt_txisr(lp); |
lp | 240 | drivers/net/pt.c | if (lp->tstate == IDLE) |
lp | 241 | drivers/net/pt.c | pt_txisr(lp); |
lp | 247 | drivers/net/pt.c | static void setup_rx_dma(struct pt_local *lp) |
lp | 257 | drivers/net/pt.c | dma_abs = (unsigned long) (lp->rcvbuf->data); |
lp | 258 | drivers/net/pt.c | dmachan = lp->dmachan; |
lp | 259 | drivers/net/pt.c | cmd = lp->base + CTL; |
lp | 265 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R1, WT_FN_RDYFN | WT_RDY_RT | INT_ERR_Rx | EXT_INT_ENAB); |
lp | 275 | drivers/net/pt.c | set_dma_count(dmachan, lp->bufsiz); |
lp | 281 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, RES_Rx_CRC); |
lp | 284 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R1, |
lp | 290 | drivers/net/pt.c | static void setup_tx_dma(struct pt_local *lp, int length) |
lp | 299 | drivers/net/pt.c | dmachan = lp->dmachan; |
lp | 300 | drivers/net/pt.c | dma_abs = (unsigned long) (lp->txdmabuf); |
lp | 323 | drivers/net/pt.c | static void pt_loopback(struct pt_local *lp, int onoff) |
lp | 325 | drivers/net/pt.c | if (lp->base & CHANA) { |
lp | 327 | drivers/net/pt.c | outb_p(pt_sercfg |= PT_LOOPA_ON, lp->cardbase + SERIAL_CFG); |
lp | 329 | drivers/net/pt.c | outb_p(pt_sercfg &= ~PT_LOOPA_ON, lp->cardbase + SERIAL_CFG); |
lp | 332 | drivers/net/pt.c | outb_p(pt_sercfg |= PT_LOOPB_ON, lp->cardbase + SERIAL_CFG); |
lp | 334 | drivers/net/pt.c | outb_p(pt_sercfg &= ~PT_LOOPB_ON, lp->cardbase + SERIAL_CFG); |
lp | 364 | drivers/net/pt.c | struct pt_local *lp = (struct pt_local*) dev->priv; |
lp | 365 | drivers/net/pt.c | register int cmd = lp->base + CTL; |
lp | 369 | drivers/net/pt.c | printk("PTd scc_init(): (%d).\n", lp->base & CHANA); |
lp | 378 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R9, CHRA); /* Reset channel A */ |
lp | 379 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R2, 0xff); /* Initialise interrupt vector */ |
lp | 381 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R9, CHRB); /* Reset channel B */ |
lp | 385 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R1, 0); |
lp | 388 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R15, 0); |
lp | 391 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R4, SDLC | X1CLK); |
lp | 394 | drivers/net/pt.c | if (lp->nrzi) |
lp | 397 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZI); |
lp | 400 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R10, CRCPS); |
lp | 404 | drivers/net/pt.c | if (lp->speed) /* Use internal clocking */ |
lp | 407 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R11, TCBR | RCDPLL | TRxCDP | TRxCOI); |
lp | 411 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R11, TCTRxCP | RCRTxCP | TRxCBR); |
lp | 412 | drivers/net/pt.c | wrtscc(lp->cardbase,cmd, R14, 0); /* wiz1 */ |
lp | 416 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R6, 0); |
lp | 419 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R7, FLAG); |
lp | 422 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R5, Tx8 | DTR); |
lp | 425 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R3, AUTO_ENAB | Rx8); |
lp | 428 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R14, BRSRC); |
lp | 431 | drivers/net/pt.c | if (lp->speed) |
lp | 433 | drivers/net/pt.c | br = lp->speed; |
lp | 434 | drivers/net/pt.c | tc = ((lp->xtal / 32) / (br * 2)) - 2; |
lp | 435 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R12, tc & 0xff); /* lower byte */ |
lp | 436 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R13, (tc >> 8) & 0xff); /* upper byte */ |
lp | 440 | drivers/net/pt.c | pt_rts(lp, OFF); |
lp | 443 | drivers/net/pt.c | if (lp->speed) |
lp | 446 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | SSBR); |
lp | 447 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | SEARCH); /* SEARCH mode, keep BRG src */ |
lp | 448 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | BRENABL); /* Enable the BRG */ |
lp | 451 | drivers/net/pt.c | if (lp->base & CHANA) |
lp | 452 | drivers/net/pt.c | outb_p( (pt_sercfg &= ~PT_EXTCLKA), (lp->cardbase + SERIAL_CFG) ); |
lp | 454 | drivers/net/pt.c | outb_p( (pt_sercfg &= ~PT_EXTCLKB), (lp->cardbase + SERIAL_CFG) ); |
lp | 459 | drivers/net/pt.c | if (lp->base & CHANA) |
lp | 460 | drivers/net/pt.c | outb_p( (pt_sercfg |= PT_EXTCLKA), (lp->cardbase + SERIAL_CFG) ); |
lp | 462 | drivers/net/pt.c | outb_p( (pt_sercfg |= PT_EXTCLKB), (lp->cardbase + SERIAL_CFG) ); |
lp | 465 | drivers/net/pt.c | if (!lp->dmachan) |
lp | 466 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R1, (INT_ALL_Rx | EXT_INT_ENAB)); |
lp | 468 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R15, BRKIE); /* ABORT int */ |
lp | 471 | drivers/net/pt.c | if (lp->base & CHANA) |
lp | 472 | drivers/net/pt.c | outb_p( (pt_sercfg |= PT_DTRA_ON), (lp->cardbase + SERIAL_CFG) ); |
lp | 474 | drivers/net/pt.c | outb_p( (pt_sercfg |= PT_DTRB_ON), (lp->cardbase + SERIAL_CFG) ); |
lp | 477 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R3, RxENABLE | RxCRC_ENAB | AUTO_ENAB | Rx8 ); |
lp | 487 | drivers/net/pt.c | struct pt_local *lp = (struct pt_local*) dev->priv; |
lp | 493 | drivers/net/pt.c | if ( ((lp->base & CHANA) && !(pt_sercfg & PT_DTRB_ON)) || |
lp | 494 | drivers/net/pt.c | (!(lp->base & CHANA) && !(pt_sercfg & PT_DTRA_ON)) ) |
lp | 496 | drivers/net/pt.c | wrtscc(lp->cardbase, lp->base + CTL, R9, FHWRES); |
lp | 498 | drivers/net/pt.c | outb_p((pt_sercfg = 0), lp->cardbase + SERIAL_CFG); |
lp | 499 | drivers/net/pt.c | outb_p((pt_dmacfg = 0), lp->cardbase + DMA_CFG); |
lp | 501 | drivers/net/pt.c | printk("PTd chipset_init() Resetting SCC, called by ch (%d).\n", lp->base & CHANA); |
lp | 505 | drivers/net/pt.c | if (lp->base & CHANA) { |
lp | 506 | drivers/net/pt.c | wrtscc(lp->cardbase, lp->base + CTL, R9, MIE | DLC | NV | CHRA); |
lp | 507 | drivers/net/pt.c | outb_p( (pt_sercfg &= ~PT_DTRA_ON), lp->cardbase + SERIAL_CFG); |
lp | 509 | drivers/net/pt.c | wrtscc(lp->cardbase, lp->base + CTL, R9, MIE | DLC | NV | CHRB); |
lp | 510 | drivers/net/pt.c | outb_p( (pt_sercfg &= ~PT_DTRB_ON), lp->cardbase + SERIAL_CFG); |
lp | 638 | drivers/net/pt.c | static void pt_rts(struct pt_local *lp, int x) |
lp | 642 | drivers/net/pt.c | int cmd = lp->base + CTL; |
lp | 644 | drivers/net/pt.c | printk("PTd pt_rts(): Transmitter status will be %d (%d).\n", x, lp->base & CHANA); |
lp | 648 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R15, 0); |
lp | 649 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R3, AUTO_ENAB | Rx8); /* Rx off */ |
lp | 650 | drivers/net/pt.c | lp->rstate = IDLE; |
lp | 652 | drivers/net/pt.c | if(lp->dmachan) |
lp | 655 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R1, WT_FN_RDYFN | EXT_INT_ENAB); |
lp | 658 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R1, 0); |
lp | 661 | drivers/net/pt.c | if (!lp->clockmode) |
lp | 663 | drivers/net/pt.c | if (lp->speed) |
lp | 665 | drivers/net/pt.c | br = lp->speed; |
lp | 666 | drivers/net/pt.c | tc = (lp->xtal / (br * 2)) - 2; |
lp | 667 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R12, tc & 0xff); |
lp | 668 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R13, (tc >> 8) & 0xff); |
lp | 672 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R5, TxCRC_ENAB | RTS | TxENAB | Tx8 | DTR); |
lp | 675 | drivers/net/pt.c | lp->tstate = IDLE; |
lp | 678 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R5, Tx8 | DTR); |
lp | 679 | drivers/net/pt.c | if (!lp->clockmode) |
lp | 681 | drivers/net/pt.c | if (lp->speed) /* internally clocked */ |
lp | 685 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R14, BRSRC); |
lp | 686 | drivers/net/pt.c | br = lp->speed; |
lp | 687 | drivers/net/pt.c | tc = ((lp->xtal / 32) / (br * 2)) - 2; |
lp | 688 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R12, tc & 0xff); |
lp | 689 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R13, (tc >> 8) & 0xff); |
lp | 692 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | SEARCH); |
lp | 694 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | BRENABL); |
lp | 699 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R3, AUTO_ENAB | Rx8); |
lp | 702 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, ERR_RES); |
lp | 705 | drivers/net/pt.c | (void) rdscc(lp->cardbase, cmd, R1); |
lp | 708 | drivers/net/pt.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 709 | drivers/net/pt.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 710 | drivers/net/pt.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 713 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R3, RxENABLE | AUTO_ENAB | Rx8 ); |
lp | 715 | drivers/net/pt.c | lp->rstate = ACTIVE; |
lp | 717 | drivers/net/pt.c | if (lp->dmachan) |
lp | 719 | drivers/net/pt.c | setup_rx_dma(lp); |
lp | 722 | drivers/net/pt.c | lp->rcp = lp->rcvbuf->data; |
lp | 723 | drivers/net/pt.c | lp->rcvbuf->cnt = 0; |
lp | 725 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R1, INT_ALL_Rx | EXT_INT_ENAB); |
lp | 728 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R15, BRKIE ); |
lp | 770 | drivers/net/pt.c | struct pt_local *lp; |
lp | 783 | drivers/net/pt.c | lp = (struct pt_local*) dev->priv; |
lp | 789 | drivers/net/pt.c | lp->txdmabuf = get_dma_buffer(&mem_ptr); |
lp | 790 | drivers/net/pt.c | lp->rxdmabuf1 = (struct mbuf *) get_dma_buffer(&mem_ptr); |
lp | 791 | drivers/net/pt.c | lp->rxdmabuf2 = (struct mbuf *) get_dma_buffer(&mem_ptr); |
lp | 794 | drivers/net/pt.c | lp->rcvbuf = lp->rxdmabuf1; |
lp | 795 | drivers/net/pt.c | lp->rcp = lp->rcvbuf->data; |
lp | 796 | drivers/net/pt.c | lp->rcvbuf->cnt = 0; |
lp | 799 | drivers/net/pt.c | skb_queue_head_init(&lp->sndq); |
lp | 801 | drivers/net/pt.c | lp->base = dev->base_addr; |
lp | 802 | drivers/net/pt.c | lp->cardbase = dev->base_addr & 0x3f0; |
lp | 806 | drivers/net/pt.c | lp->xtal = XTAL; |
lp | 809 | drivers/net/pt.c | lp->speed = DEF_A_SPEED; |
lp | 810 | drivers/net/pt.c | lp->txdelay = DEF_A_TXDELAY; |
lp | 811 | drivers/net/pt.c | lp->persist = DEF_A_PERSIST; |
lp | 812 | drivers/net/pt.c | lp->slotime = DEF_A_SLOTIME; |
lp | 813 | drivers/net/pt.c | lp->squeldelay = DEF_A_SQUELDELAY; |
lp | 814 | drivers/net/pt.c | lp->clockmode = DEF_A_CLOCKMODE; |
lp | 815 | drivers/net/pt.c | lp->nrzi = DEF_A_NRZI; |
lp | 817 | drivers/net/pt.c | lp->speed = DEF_B_SPEED; |
lp | 818 | drivers/net/pt.c | lp->txdelay = DEF_B_TXDELAY; |
lp | 819 | drivers/net/pt.c | lp->persist = DEF_B_PERSIST; |
lp | 820 | drivers/net/pt.c | lp->slotime = DEF_B_SLOTIME; |
lp | 821 | drivers/net/pt.c | lp->squeldelay = DEF_B_SQUELDELAY; |
lp | 822 | drivers/net/pt.c | lp->clockmode = DEF_B_CLOCKMODE; |
lp | 823 | drivers/net/pt.c | lp->nrzi = DEF_B_NRZI; |
lp | 825 | drivers/net/pt.c | lp->bufsiz = DMA_BUFF_SIZE; |
lp | 826 | drivers/net/pt.c | lp->tstate = IDLE; |
lp | 838 | drivers/net/pt.c | lp->dmachan = 0; |
lp | 846 | drivers/net/pt.c | outb_p( pt_sercfg |= PT_EI, lp->cardbase + INT_CFG); |
lp | 850 | drivers/net/pt.c | tdelay(lp, 1); |
lp | 856 | drivers/net/pt.c | outb_p( (pt_sercfg &= ~ PT_EI), lp->cardbase + INT_CFG); |
lp | 926 | drivers/net/pt.c | struct pt_local *lp = dev->priv; |
lp | 944 | drivers/net/pt.c | lp->tstate = IDLE; |
lp | 953 | drivers/net/pt.c | lp->saved_RR0 = rdscc(lp->cardbase, lp->base + CTL, R0) & ~ZCOUNT; |
lp | 958 | drivers/net/pt.c | wrtscc(lp->cardbase, lp->base + CTL, R9, MIE | NV); |
lp | 959 | drivers/net/pt.c | outb_p( pt_sercfg |= PT_EI, lp->cardbase + INT_CFG); |
lp | 962 | drivers/net/pt.c | lp->open_time = jiffies; |
lp | 974 | drivers/net/pt.c | struct pt_local *lp = (struct pt_local *) dev->priv; |
lp | 977 | drivers/net/pt.c | printk("PTd pt_send_packet(): (%d)\n", lp->base & CHANA); |
lp | 986 | drivers/net/pt.c | hardware_send_packet(lp, skb); |
lp | 998 | drivers/net/pt.c | struct pt_local *lp = dev->priv; |
lp | 1002 | drivers/net/pt.c | cmd = lp->base + CTL; |
lp | 1009 | drivers/net/pt.c | disable_dma(lp->dmachan); |
lp | 1011 | drivers/net/pt.c | lp->open_time = 0; |
lp | 1016 | drivers/net/pt.c | while ((ptr = skb_dequeue(&lp->sndq)) != NULL) |
lp | 1022 | drivers/net/pt.c | printk("PTd pt_close(): Closing down channel (%d).\n", lp->base & CHANA); |
lp | 1033 | drivers/net/pt.c | struct pt_local *lp = (struct pt_local *) dev->priv; |
lp | 1051 | drivers/net/pt.c | lp->txdelay = rq.txdelay; |
lp | 1052 | drivers/net/pt.c | lp->persist = rq.persist; |
lp | 1053 | drivers/net/pt.c | lp->slotime = rq.slotime; |
lp | 1054 | drivers/net/pt.c | lp->squeldelay = rq.squeldelay; |
lp | 1055 | drivers/net/pt.c | lp->clockmode = rq.clockmode; |
lp | 1056 | drivers/net/pt.c | lp->speed = rq.speed; |
lp | 1073 | drivers/net/pt.c | free_dma(lp->dmachan); |
lp | 1074 | drivers/net/pt.c | dev->dma = lp->dmachan = rq.dmachan; |
lp | 1075 | drivers/net/pt.c | if (request_dma(lp->dmachan,"pt")) |
lp | 1090 | drivers/net/pt.c | rq.speed = lp->speed; |
lp | 1091 | drivers/net/pt.c | rq.txdelay = lp->txdelay; |
lp | 1092 | drivers/net/pt.c | rq.persist = lp->persist; |
lp | 1093 | drivers/net/pt.c | rq.slotime = lp->slotime; |
lp | 1094 | drivers/net/pt.c | rq.squeldelay = lp->squeldelay; |
lp | 1095 | drivers/net/pt.c | rq.clockmode = lp->clockmode; |
lp | 1096 | drivers/net/pt.c | rq.dmachan = lp->dmachan; |
lp | 1113 | drivers/net/pt.c | struct pt_local *lp = (struct pt_local *) dev->priv; |
lp | 1115 | drivers/net/pt.c | return &lp->stats; |
lp | 1129 | drivers/net/pt.c | static void tdelay(struct pt_local *lp, int time) |
lp | 1132 | drivers/net/pt.c | if (!lp->dmachan) |
lp | 1133 | drivers/net/pt.c | wrtscc(lp->cardbase, lp->base + CTL, R1, INT_ALL_Rx | EXT_INT_ENAB); |
lp | 1135 | drivers/net/pt.c | if (lp->base & CHANA) { |
lp | 1136 | drivers/net/pt.c | outb_p(time & 0xff, lp->cardbase + TMR1); |
lp | 1137 | drivers/net/pt.c | outb_p((time >> 8)&0xff, lp->cardbase + TMR1); |
lp | 1139 | drivers/net/pt.c | outb_p(time & 0xff, lp->cardbase + TMR2); |
lp | 1140 | drivers/net/pt.c | outb_p((time >> 8)&0xff, lp->cardbase + TMR2); |
lp | 1145 | drivers/net/pt.c | static void pt_txisr(struct pt_local *lp) |
lp | 1153 | drivers/net/pt.c | cmd = lp->base + CTL; |
lp | 1156 | drivers/net/pt.c | printk("PTd pt_txisr(): tstate = %d (%d).\n", lp->tstate, lp->base & CHANA); |
lp | 1159 | drivers/net/pt.c | switch (lp->tstate) |
lp | 1162 | drivers/net/pt.c | lp->tstate = FLAGOUT; |
lp | 1163 | drivers/net/pt.c | tdelay(lp, lp->squeldelay); |
lp | 1169 | drivers/net/pt.c | if ((lp->sndbuf = skb_dequeue(&lp->sndq)) == NULL) |
lp | 1174 | drivers/net/pt.c | pt_rts(lp, OFF); |
lp | 1179 | drivers/net/pt.c | if (!lp->dmachan) |
lp | 1181 | drivers/net/pt.c | lp->txptr = lp->sndbuf->data; |
lp | 1182 | drivers/net/pt.c | lp->txptr++; /* Ignore KISS control byte */ |
lp | 1183 | drivers/net/pt.c | lp->txcnt = (int) lp->sndbuf->len - 1; |
lp | 1190 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 1191 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 1192 | drivers/net/pt.c | if ((rdscc(lp->cardbase, cmd, R0) & DCD) != 0) |
lp | 1194 | drivers/net/pt.c | lp->tstate = DEFER; |
lp | 1195 | drivers/net/pt.c | tdelay(lp, 100); |
lp | 1197 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R15, DCDIE); |
lp | 1201 | drivers/net/pt.c | if (random() > lp->persist) |
lp | 1203 | drivers/net/pt.c | lp->tstate = DEFER; |
lp | 1204 | drivers/net/pt.c | tdelay(lp, lp->slotime); |
lp | 1208 | drivers/net/pt.c | pt_rts(lp, ON); /* Tx on */ |
lp | 1209 | drivers/net/pt.c | if (lp->dmachan) |
lp | 1210 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R5, TxCRC_ENAB | RTS | Tx8); |
lp | 1211 | drivers/net/pt.c | lp->tstate = ST_TXDELAY; |
lp | 1212 | drivers/net/pt.c | tdelay(lp, lp->txdelay); |
lp | 1218 | drivers/net/pt.c | if (lp->txcnt--) |
lp | 1223 | drivers/net/pt.c | c = *lp->txptr++; |
lp | 1225 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R8, c); |
lp | 1229 | drivers/net/pt.c | free_p(lp->sndbuf); |
lp | 1230 | drivers/net/pt.c | lp->sndbuf = NULL; |
lp | 1231 | drivers/net/pt.c | if ((rdscc(lp->cardbase, cmd, R0) & TxEOM)) |
lp | 1234 | drivers/net/pt.c | lp->stats.tx_errors++; |
lp | 1235 | drivers/net/pt.c | lp->stats.tx_fifo_errors++; |
lp | 1236 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, SEND_ABORT); |
lp | 1237 | drivers/net/pt.c | lp->tstate = FLAGOUT; |
lp | 1238 | drivers/net/pt.c | tdelay(lp, lp->squeldelay); |
lp | 1242 | drivers/net/pt.c | lp->tstate = UNDERRUN; |
lp | 1244 | drivers/net/pt.c | if (lp->nrzi) |
lp | 1246 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZI); |
lp | 1248 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZ); |
lp | 1251 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, RES_Tx_P); |
lp | 1256 | drivers/net/pt.c | printk("PT: pt_txisr(): Invlaid tstate (%d) for chan %s.\n", lp->tstate, (cmd & CHANA? "A": "B") ); |
lp | 1257 | drivers/net/pt.c | pt_rts(lp, OFF); |
lp | 1258 | drivers/net/pt.c | lp->tstate = IDLE; |
lp | 1266 | drivers/net/pt.c | struct pt_local *lp = (struct pt_local*) dev->priv; |
lp | 1267 | drivers/net/pt.c | int cmd = lp->base + CTL; |
lp | 1280 | drivers/net/pt.c | rse = rdscc(lp->cardbase, cmd, R1); |
lp | 1283 | drivers/net/pt.c | printk("PTd pt_rxisr(): R1 = %#3x. (%d)\n", rse, lp->base & CHANA); |
lp | 1286 | drivers/net/pt.c | if (lp->dmachan && (rse & Rx_OVR)) |
lp | 1287 | drivers/net/pt.c | lp->rstate = RXERROR; |
lp | 1289 | drivers/net/pt.c | if (rdscc(lp->cardbase, cmd, R0) & Rx_CH_AV && !lp->dmachan) |
lp | 1298 | drivers/net/pt.c | lp->rcp = lp->rcvbuf->data; |
lp | 1299 | drivers/net/pt.c | lp->rcvbuf->cnt = 0; |
lp | 1300 | drivers/net/pt.c | lp->rstate = RXERROR; |
lp | 1301 | drivers/net/pt.c | lp->stats.rx_errors++; |
lp | 1302 | drivers/net/pt.c | lp->stats.rx_fifo_errors++; |
lp | 1303 | drivers/net/pt.c | } else if (lp->rcvbuf->cnt >= lp->bufsiz) |
lp | 1308 | drivers/net/pt.c | lp->rcp = lp->rcvbuf->data; |
lp | 1309 | drivers/net/pt.c | lp->rcvbuf->cnt = 0; |
lp | 1310 | drivers/net/pt.c | lp->rstate = TOOBIG; |
lp | 1313 | drivers/net/pt.c | if (lp->rstate == ACTIVE) |
lp | 1315 | drivers/net/pt.c | *lp->rcp++ = rdscc(lp->cardbase, cmd, R8); |
lp | 1316 | drivers/net/pt.c | lp->rcvbuf->cnt++; |
lp | 1319 | drivers/net/pt.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 1320 | drivers/net/pt.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 1321 | drivers/net/pt.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 1324 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, ERR_RES); |
lp | 1325 | drivers/net/pt.c | lp->rstate = ACTIVE; |
lp | 1328 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R3, RxENABLE | ENT_HM | AUTO_ENAB | Rx8); |
lp | 1336 | drivers/net/pt.c | printk("PTd pt_rxisr() Got end of a %u byte frame.\n", lp->rcvbuf->cnt); |
lp | 1338 | drivers/net/pt.c | if (lp->dmachan) |
lp | 1340 | drivers/net/pt.c | clear_dma_ff(lp->dmachan); |
lp | 1341 | drivers/net/pt.c | bytecount = lp->bufsiz - get_dma_residue(lp->dmachan); |
lp | 1343 | drivers/net/pt.c | bytecount = lp->rcvbuf->cnt; |
lp | 1347 | drivers/net/pt.c | if (lp->rcvbuf->cnt > 0 || lp->dmachan) |
lp | 1349 | drivers/net/pt.c | if ((rse & CRC_ERR) || (lp->rstate > ACTIVE) || (bytecount < 10)) |
lp | 1353 | drivers/net/pt.c | lp->stats.rx_crc_errors++; |
lp | 1355 | drivers/net/pt.c | if (lp->dmachan) |
lp | 1357 | drivers/net/pt.c | if (lp->rstate == RXERROR) |
lp | 1359 | drivers/net/pt.c | lp->stats.rx_errors++; |
lp | 1360 | drivers/net/pt.c | lp->stats.rx_over_errors++; |
lp | 1362 | drivers/net/pt.c | lp->rstate = ACTIVE; |
lp | 1363 | drivers/net/pt.c | setup_rx_dma(lp); |
lp | 1366 | drivers/net/pt.c | lp->rcp = lp->rcvbuf->data; |
lp | 1367 | drivers/net/pt.c | lp->rcvbuf->cnt = 0; |
lp | 1370 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R3, RxENABLE | ENT_HM | AUTO_ENAB | Rx8); |
lp | 1378 | drivers/net/pt.c | if (lp->dmachan) |
lp | 1380 | drivers/net/pt.c | pkt_len = lp->rcvbuf->cnt = bytecount - 2 +1; |
lp | 1382 | drivers/net/pt.c | cur_buf = lp->rcvbuf; |
lp | 1383 | drivers/net/pt.c | switchbuffers(lp); |
lp | 1384 | drivers/net/pt.c | setup_rx_dma(lp); |
lp | 1386 | drivers/net/pt.c | pkt_len = lp->rcvbuf->cnt -= 2; /* Toss 2 CRC bytes */ |
lp | 1396 | drivers/net/pt.c | lp->stats.rx_dropped++; |
lp | 1406 | drivers/net/pt.c | if (lp->dmachan) |
lp | 1409 | drivers/net/pt.c | memcpy(cfix, lp->rcvbuf->data, pkt_len - 1); |
lp | 1414 | drivers/net/pt.c | lp->stats.rx_packets++; |
lp | 1415 | drivers/net/pt.c | if (!lp->dmachan) |
lp | 1418 | drivers/net/pt.c | lp->rcp = lp->rcvbuf->data; |
lp | 1419 | drivers/net/pt.c | lp->rcvbuf->cnt = 0; |
lp | 1424 | drivers/net/pt.c | lp->rstate = ACTIVE; |
lp | 1427 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, ERR_RES); |
lp | 1432 | drivers/net/pt.c | static void empty_scc(struct pt_local *lp) |
lp | 1434 | drivers/net/pt.c | while( rdscc(lp->cardbase, lp->base + CTL, R0) & Rx_CH_AV) { |
lp | 1436 | drivers/net/pt.c | (void) inb_p(lp->base + DATA); |
lp | 1445 | drivers/net/pt.c | static void pt_tmrisr(struct pt_local *lp) |
lp | 1450 | drivers/net/pt.c | printk("PTd pt_tmrisr(): tstate = %d (%d).\n", lp->tstate, lp->base & CHANA); |
lp | 1457 | drivers/net/pt.c | switch (lp->tstate) |
lp | 1465 | drivers/net/pt.c | pt_exisr(lp); |
lp | 1469 | drivers/net/pt.c | if (lp->base & CHANA) |
lp | 1470 | drivers/net/pt.c | printk("PT: pt_tmrisr(): Invalid tstate %d for Channel A\n", lp->tstate); |
lp | 1472 | drivers/net/pt.c | printk("PT: pt_tmrisr(): Invalid tstate %d for Channel B\n", lp->tstate); |
lp | 1487 | drivers/net/pt.c | struct pt_local *lp = dev->priv; |
lp | 1509 | drivers/net/pt.c | lp = (struct pt_local*)pt0a.priv; |
lp | 1513 | drivers/net/pt.c | lp = (struct pt_local*)pt0a.priv; |
lp | 1514 | drivers/net/pt.c | pt_txisr(lp); |
lp | 1517 | drivers/net/pt.c | lp = (struct pt_local*)pt0a.priv; |
lp | 1518 | drivers/net/pt.c | pt_exisr(lp); |
lp | 1521 | drivers/net/pt.c | lp= (struct pt_local*)pt0b.priv; |
lp | 1525 | drivers/net/pt.c | lp = (struct pt_local*)pt0b.priv; |
lp | 1526 | drivers/net/pt.c | pt_txisr(lp); |
lp | 1529 | drivers/net/pt.c | lp = (struct pt_local*)pt0b.priv; |
lp | 1530 | drivers/net/pt.c | pt_exisr(lp); |
lp | 1535 | drivers/net/pt.c | wrtscc(lp->cardbase, lp->base + CTL, R0, RES_H_IUS); |
lp | 1561 | drivers/net/pt.c | static void pt_exisr(struct pt_local *lp) |
lp | 1564 | drivers/net/pt.c | int cmd = lp->base + CTL; |
lp | 1573 | drivers/net/pt.c | st = rdscc(lp->cardbase, cmd, R0); |
lp | 1576 | drivers/net/pt.c | printk("PTd exisr(): R0 = %#3x tstate = %d (%d).\n", st, lp->tstate, lp->base & CHANA); |
lp | 1579 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 1581 | drivers/net/pt.c | if ((lp->rstate >= ACTIVE) && (st & BRK_ABRT) && lp->dmachan) |
lp | 1583 | drivers/net/pt.c | setup_rx_dma(lp); |
lp | 1584 | drivers/net/pt.c | lp->rstate = ACTIVE; |
lp | 1587 | drivers/net/pt.c | switch (lp->tstate) |
lp | 1593 | drivers/net/pt.c | free_p(lp->sndbuf); |
lp | 1594 | drivers/net/pt.c | lp->sndbuf = NULL; |
lp | 1595 | drivers/net/pt.c | if (!lp->dmachan) |
lp | 1597 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, SEND_ABORT); |
lp | 1598 | drivers/net/pt.c | lp->stats.tx_errors++; |
lp | 1599 | drivers/net/pt.c | lp->stats.tx_fifo_errors++; |
lp | 1601 | drivers/net/pt.c | lp->tstate = FLAGOUT; |
lp | 1602 | drivers/net/pt.c | tdelay(lp, lp->squeldelay); |
lp | 1606 | drivers/net/pt.c | lp->tstate = CRCOUT; |
lp | 1612 | drivers/net/pt.c | if ((lp->sndbuf = skb_dequeue(&lp->sndq)) == NULL) |
lp | 1615 | drivers/net/pt.c | pt_rts(lp, OFF); |
lp | 1616 | drivers/net/pt.c | lp->tstate = IDLE; |
lp | 1620 | drivers/net/pt.c | if (!lp->dmachan) |
lp | 1622 | drivers/net/pt.c | lp->txptr = lp->sndbuf->data; |
lp | 1623 | drivers/net/pt.c | lp->txptr++; /* Ignore KISS control byte */ |
lp | 1624 | drivers/net/pt.c | lp->txcnt = (int) lp->sndbuf->len - 1; |
lp | 1629 | drivers/net/pt.c | if (lp->dmachan) |
lp | 1632 | drivers/net/pt.c | disable_dma(lp->dmachan); |
lp | 1635 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R1, WT_FN_RDYFN | EXT_INT_ENAB); |
lp | 1637 | drivers/net/pt.c | length = lp->sndbuf->len - 1; |
lp | 1638 | drivers/net/pt.c | memcpy(lp->txdmabuf, &lp->sndbuf->data[1], length); |
lp | 1641 | drivers/net/pt.c | setup_tx_dma(lp, length); |
lp | 1643 | drivers/net/pt.c | enable_dma(lp->dmachan); |
lp | 1646 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, RES_Tx_CRC | RES_Tx_P); |
lp | 1649 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R15, TxUIE); |
lp | 1652 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R1, WT_RDY_ENAB | WT_FN_RDYFN | EXT_INT_ENAB); |
lp | 1655 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, RES_EOM_L); |
lp | 1657 | drivers/net/pt.c | lp->tstate = ACTIVE; |
lp | 1661 | drivers/net/pt.c | lp->txcnt--; |
lp | 1662 | drivers/net/pt.c | c = *lp->txptr++; |
lp | 1664 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, RES_Tx_CRC); |
lp | 1667 | drivers/net/pt.c | if (lp->nrzi) |
lp | 1669 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZI | ABUNDER); |
lp | 1671 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZ | ABUNDER); |
lp | 1674 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R8, c); |
lp | 1677 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, RES_EOM_L); |
lp | 1689 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R15, TxUIE); |
lp | 1692 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 1695 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R1, TxINT_ENAB | EXT_INT_ENAB); |
lp | 1697 | drivers/net/pt.c | lp->tstate = ACTIVE; |
lp | 1706 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 1707 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 1708 | drivers/net/pt.c | if ((rdscc(lp->cardbase, cmd, R0) & DCD) != 0) |
lp | 1710 | drivers/net/pt.c | lp->tstate = DEFER; |
lp | 1711 | drivers/net/pt.c | tdelay(lp, 100); |
lp | 1713 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R15, DCDIE); |
lp | 1717 | drivers/net/pt.c | if (random() > lp->persist) |
lp | 1719 | drivers/net/pt.c | lp->tstate = DEFER; |
lp | 1720 | drivers/net/pt.c | tdelay(lp, lp->slotime); |
lp | 1724 | drivers/net/pt.c | if (lp->dmachan) |
lp | 1725 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R5, TxCRC_ENAB | RTS | Tx8); |
lp | 1726 | drivers/net/pt.c | pt_rts(lp, ON); /* Tx on */ |
lp | 1727 | drivers/net/pt.c | lp->tstate = ST_TXDELAY; |
lp | 1728 | drivers/net/pt.c | tdelay(lp, lp->txdelay); |
lp | 1733 | drivers/net/pt.c | if (lp->dmachan) |
lp | 1746 | drivers/net/pt.c | if ((lp->rstate == ACTIVE) && (st & BRK_ABRT) ) |
lp | 1752 | drivers/net/pt.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 1753 | drivers/net/pt.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 1754 | drivers/net/pt.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 1756 | drivers/net/pt.c | lp->rcp = lp->rcvbuf->data; |
lp | 1757 | drivers/net/pt.c | lp->rcvbuf->cnt = 0; |
lp | 1760 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R3, RxENABLE | ENT_HM | AUTO_ENAB | Rx8); |
lp | 1765 | drivers/net/pt.c | if ( (st & DCD) != (lp->saved_RR0 & DCD)) |
lp | 1773 | drivers/net/pt.c | if (lp->rcvbuf->cnt > 0) |
lp | 1776 | drivers/net/pt.c | printk("PTd pt_exisr() dumping %u bytes from buffer.\n", lp->rcvbuf->cnt); |
lp | 1779 | drivers/net/pt.c | lp->rcp = lp->rcvbuf->data; |
lp | 1780 | drivers/net/pt.c | lp->rcvbuf->cnt = 0; |
lp | 1785 | drivers/net/pt.c | (void)rdscc(lp->cardbase, cmd, R8); |
lp | 1786 | drivers/net/pt.c | (void)rdscc(lp->cardbase, cmd, R8); |
lp | 1787 | drivers/net/pt.c | (void)rdscc(lp->cardbase, cmd, R8); |
lp | 1790 | drivers/net/pt.c | lp->rcp = lp->rcvbuf->data; |
lp | 1791 | drivers/net/pt.c | lp->rcvbuf->cnt = 0; |
lp | 1794 | drivers/net/pt.c | wrtscc(lp->cardbase, cmd, R3, RxENABLE | ENT_HM | AUTO_ENAB | Rx8); |
lp | 1799 | drivers/net/pt.c | lp->saved_RR0 = st &~ ZCOUNT; |
lp | 350 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 365 | drivers/net/seeq8005.c | lp->open_time = jiffies; |
lp | 424 | drivers/net/seeq8005.c | struct net_local *lp; |
lp | 437 | drivers/net/seeq8005.c | lp = (struct net_local *)dev->priv; |
lp | 453 | drivers/net/seeq8005.c | lp->stats.tx_packets++; |
lp | 475 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 487 | drivers/net/seeq8005.c | outw( lp->receive_ptr, SEEQ_DMAAR); |
lp | 494 | drivers/net/seeq8005.c | printk("%s: 0x%04x recv next=0x%04x, hdr=0x%04x\n",dev->name,lp->receive_ptr,next_packet,pkt_hdr); |
lp | 504 | drivers/net/seeq8005.c | if (next_packet < lp->receive_ptr) { |
lp | 505 | drivers/net/seeq8005.c | pkt_len = (next_packet + 0x10000 - ((DEFAULT_TEA+1)<<8)) - lp->receive_ptr - 4; |
lp | 507 | drivers/net/seeq8005.c | pkt_len = next_packet - lp->receive_ptr - 4; |
lp | 516 | drivers/net/seeq8005.c | lp->receive_ptr = next_packet; |
lp | 523 | drivers/net/seeq8005.c | lp->stats.rx_errors++; |
lp | 524 | drivers/net/seeq8005.c | if (pkt_hdr & SEEQPKTS_SHORT) lp->stats.rx_frame_errors++; |
lp | 525 | drivers/net/seeq8005.c | if (pkt_hdr & SEEQPKTS_DRIB) lp->stats.rx_frame_errors++; |
lp | 526 | drivers/net/seeq8005.c | if (pkt_hdr & SEEQPKTS_OVERSIZE) lp->stats.rx_over_errors++; |
lp | 527 | drivers/net/seeq8005.c | if (pkt_hdr & SEEQPKTS_CRC_ERR) lp->stats.rx_crc_errors++; |
lp | 530 | drivers/net/seeq8005.c | outw( (lp->receive_ptr & 0xff00)>>8, SEEQ_REA); |
lp | 539 | drivers/net/seeq8005.c | lp->stats.rx_dropped++; |
lp | 559 | drivers/net/seeq8005.c | lp->stats.rx_packets++; |
lp | 573 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 576 | drivers/net/seeq8005.c | lp->open_time = 0; |
lp | 599 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 601 | drivers/net/seeq8005.c | return &lp->stats; |
lp | 635 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 658 | drivers/net/seeq8005.c | lp->receive_ptr = (DEFAULT_TEA+1)<<8; /* so we can find our packet_header */ |
lp | 659 | drivers/net/seeq8005.c | outw( lp->receive_ptr, SEEQ_RPR); /* Receive Pointer Register is set to recv buffer memory */ |
lp | 310 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 332 | drivers/net/skeleton.c | lp->open_time = jiffies; |
lp | 346 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 390 | drivers/net/skeleton.c | lp->stats.tx_aborted_errors++; |
lp | 403 | drivers/net/skeleton.c | struct net_local *lp; |
lp | 413 | drivers/net/skeleton.c | lp = (struct net_local *)dev->priv; |
lp | 422 | drivers/net/skeleton.c | lp->stats.tx_packets++; |
lp | 428 | drivers/net/skeleton.c | lp->stats.tx_window_errors++; |
lp | 440 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 452 | drivers/net/skeleton.c | lp->stats.rx_errors++; |
lp | 453 | drivers/net/skeleton.c | if (status & 0x20) lp->stats.rx_frame_errors++; |
lp | 454 | drivers/net/skeleton.c | if (status & 0x10) lp->stats.rx_over_errors++; |
lp | 455 | drivers/net/skeleton.c | if (status & 0x08) lp->stats.rx_crc_errors++; |
lp | 456 | drivers/net/skeleton.c | if (status & 0x04) lp->stats.rx_fifo_errors++; |
lp | 465 | drivers/net/skeleton.c | lp->stats.rx_dropped++; |
lp | 477 | drivers/net/skeleton.c | lp->stats.rx_packets++; |
lp | 493 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 496 | drivers/net/skeleton.c | lp->open_time = 0; |
lp | 528 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 533 | drivers/net/skeleton.c | lp->stats.rx_missed_errors = inw(ioaddr+1); |
lp | 536 | drivers/net/skeleton.c | return &lp->stats; |
lp | 549 | drivers/net/smc9194.c | struct smc_local *lp = (struct smc_local *)dev->priv; |
lp | 555 | drivers/net/smc9194.c | if ( lp->saved_skb) { |
lp | 557 | drivers/net/smc9194.c | lp->stats.tx_aborted_errors++; |
lp | 561 | drivers/net/smc9194.c | lp->saved_skb = skb; |
lp | 576 | drivers/net/smc9194.c | lp->saved_skb = NULL; |
lp | 581 | drivers/net/smc9194.c | lp->packets_waiting++; |
lp | 643 | drivers/net/smc9194.c | struct smc_local *lp = (struct smc_local *)dev->priv; |
lp | 645 | drivers/net/smc9194.c | struct sk_buff * skb = lp->saved_skb; |
lp | 665 | drivers/net/smc9194.c | lp->saved_skb = NULL; |
lp | 726 | drivers/net/smc9194.c | lp->saved_skb = NULL; |
lp | 1286 | drivers/net/smc9194.c | struct smc_local *lp = (struct smc_local *)dev->priv; |
lp | 1352 | drivers/net/smc9194.c | lp->stats.collisions += card_stats & 0xF; |
lp | 1355 | drivers/net/smc9194.c | lp->stats.collisions += card_stats & 0xF; |
lp | 1369 | drivers/net/smc9194.c | lp->stats.tx_packets += lp->packets_waiting; |
lp | 1370 | drivers/net/smc9194.c | lp->packets_waiting = 0; |
lp | 1388 | drivers/net/smc9194.c | lp->stats.rx_errors++; |
lp | 1389 | drivers/net/smc9194.c | lp->stats.rx_fifo_errors++; |
lp | 1428 | drivers/net/smc9194.c | struct smc_local *lp = (struct smc_local *)dev->priv; |
lp | 1472 | drivers/net/smc9194.c | lp->stats.multicast++; |
lp | 1483 | drivers/net/smc9194.c | lp->stats.rx_dropped++; |
lp | 1532 | drivers/net/smc9194.c | lp->stats.rx_packets++; |
lp | 1535 | drivers/net/smc9194.c | lp->stats.rx_errors++; |
lp | 1537 | drivers/net/smc9194.c | if ( status & RS_ALGNERR ) lp->stats.rx_frame_errors++; |
lp | 1539 | drivers/net/smc9194.c | lp->stats.rx_length_errors++; |
lp | 1540 | drivers/net/smc9194.c | if ( status & RS_BADCRC) lp->stats.rx_crc_errors++; |
lp | 1568 | drivers/net/smc9194.c | struct smc_local *lp = (struct smc_local *)dev->priv; |
lp | 1589 | drivers/net/smc9194.c | lp->stats.tx_errors++; |
lp | 1590 | drivers/net/smc9194.c | if ( tx_status & TS_LOSTCAR ) lp->stats.tx_carrier_errors++; |
lp | 1594 | drivers/net/smc9194.c | lp->stats.tx_window_errors++; |
lp | 1612 | drivers/net/smc9194.c | lp->packets_waiting--; |
lp | 1647 | drivers/net/smc9194.c | struct smc_local *lp = (struct smc_local *)dev->priv; |
lp | 1649 | drivers/net/smc9194.c | return &lp->stats; |
lp | 171 | drivers/net/sunlance.c | #define TX_BUFFS_AVAIL ((lp->tx_old<=lp->tx_new)?\ |
lp | 172 | drivers/net/sunlance.c | lp->tx_old+TX_RING_MOD_MASK-lp->tx_new:\ |
lp | 173 | drivers/net/sunlance.c | lp->tx_old - lp->tx_new-1) |
lp | 189 | drivers/net/sunlance.c | static void load_csrs (struct lance_private *lp) |
lp | 191 | drivers/net/sunlance.c | volatile struct lance_regs *ll = lp->ll; |
lp | 192 | drivers/net/sunlance.c | volatile struct lance_init_block *ib = lp->init_block; |
lp | 214 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *) dev->priv; |
lp | 215 | drivers/net/sunlance.c | volatile struct lance_init_block *ib = lp->init_block; |
lp | 221 | drivers/net/sunlance.c | lp->rx_new = lp->tx_new = 0; |
lp | 222 | drivers/net/sunlance.c | lp->rx_old = lp->tx_old = 0; |
lp | 285 | drivers/net/sunlance.c | init_restart_lance (struct lance_private *lp) |
lp | 287 | drivers/net/sunlance.c | volatile struct lance_regs *ll = lp->ll; |
lp | 298 | drivers/net/sunlance.c | if (lp->ledma) |
lp | 299 | drivers/net/sunlance.c | printk ("dcsr=%8.8x\n", (unsigned int) lp->ledma->regs->cond_reg); |
lp | 308 | drivers/net/sunlance.c | if (lp->ledma) |
lp | 309 | drivers/net/sunlance.c | lp->ledma->regs->cond_reg |= DMA_INT_ENAB; |
lp | 317 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *) dev->priv; |
lp | 318 | drivers/net/sunlance.c | volatile struct lance_init_block *ib = lp->init_block; |
lp | 319 | drivers/net/sunlance.c | volatile struct lance_regs *ll = lp->ll; |
lp | 326 | drivers/net/sunlance.c | if (i == lp->rx_new) |
lp | 335 | drivers/net/sunlance.c | for (rd = &ib->brx_ring [lp->rx_new]; |
lp | 337 | drivers/net/sunlance.c | rd = &ib->brx_ring [lp->rx_new]){ |
lp | 344 | drivers/net/sunlance.c | lp->stats.rx_over_errors++; |
lp | 345 | drivers/net/sunlance.c | lp->stats.rx_errors++; |
lp | 349 | drivers/net/sunlance.c | if (bits & LE_R1_BUF) lp->stats.rx_fifo_errors++; |
lp | 350 | drivers/net/sunlance.c | if (bits & LE_R1_CRC) lp->stats.rx_crc_errors++; |
lp | 351 | drivers/net/sunlance.c | if (bits & LE_R1_OFL) lp->stats.rx_over_errors++; |
lp | 352 | drivers/net/sunlance.c | if (bits & LE_R1_FRA) lp->stats.rx_frame_errors++; |
lp | 353 | drivers/net/sunlance.c | if (bits & LE_R1_EOP) lp->stats.rx_errors++; |
lp | 359 | drivers/net/sunlance.c | lp->stats.rx_dropped++; |
lp | 361 | drivers/net/sunlance.c | lp->rx_new = (lp->rx_new + 1) & RX_RING_MOD_MASK; |
lp | 368 | drivers/net/sunlance.c | memcpy (buf, (char *) &(ib->rx_buf [lp->rx_new][0]), pkt_len); |
lp | 371 | drivers/net/sunlance.c | lp->stats.rx_packets++; |
lp | 376 | drivers/net/sunlance.c | lp->rx_new = (lp->rx_new + 1) & RX_RING_MOD_MASK; |
lp | 384 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *) dev->priv; |
lp | 385 | drivers/net/sunlance.c | volatile struct lance_init_block *ib = lp->init_block; |
lp | 386 | drivers/net/sunlance.c | volatile struct lance_regs *ll = lp->ll; |
lp | 394 | drivers/net/sunlance.c | j = lp->tx_old; |
lp | 401 | drivers/net/sunlance.c | if (status & LE_T3_RTY) lp->stats.tx_aborted_errors++; |
lp | 402 | drivers/net/sunlance.c | if (status & LE_T3_CLOS) lp->stats.tx_carrier_errors++; |
lp | 403 | drivers/net/sunlance.c | if (status & LE_T3_LCOL) lp->stats.tx_window_errors++; |
lp | 408 | drivers/net/sunlance.c | lp->stats.tx_fifo_errors++; |
lp | 415 | drivers/net/sunlance.c | load_csrs (lp); |
lp | 416 | drivers/net/sunlance.c | init_restart_lance (lp); |
lp | 420 | drivers/net/sunlance.c | lp->stats.tx_packets++; |
lp | 424 | drivers/net/sunlance.c | lp->tx_old = (lp->tx_old+1) & TX_RING_MOD_MASK; |
lp | 434 | drivers/net/sunlance.c | struct lance_private *lp; |
lp | 438 | drivers/net/sunlance.c | lp = (struct lance_private *) dev->priv; |
lp | 439 | drivers/net/sunlance.c | ll = lp->ll; |
lp | 441 | drivers/net/sunlance.c | if (lp->ledma) |
lp | 442 | drivers/net/sunlance.c | if (lp->ledma->regs->cond_reg & DMA_HNDL_ERROR){ |
lp | 444 | drivers/net/sunlance.c | (unsigned int) lp->ledma->regs->cond_reg, ll->rdp); |
lp | 485 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 486 | drivers/net/sunlance.c | volatile struct lance_regs *ll = lp->ll; |
lp | 502 | drivers/net/sunlance.c | if (lp->ledma) |
lp | 503 | drivers/net/sunlance.c | lp->ledma->regs->dma_test = ((unsigned int) lp->init_block) & 0xff000000; |
lp | 506 | drivers/net/sunlance.c | load_csrs (lp); |
lp | 512 | drivers/net/sunlance.c | status = init_restart_lance (lp); |
lp | 513 | drivers/net/sunlance.c | if (lp->ledma) |
lp | 514 | drivers/net/sunlance.c | lp->ledma->regs->cond_reg |= DMA_INT_ENAB; |
lp | 528 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *) dev->priv; |
lp | 529 | drivers/net/sunlance.c | volatile struct lance_regs *ll = lp->ll; |
lp | 547 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 548 | drivers/net/sunlance.c | volatile struct lance_regs *ll = lp->ll; |
lp | 556 | drivers/net/sunlance.c | if (lp->ledma){ |
lp | 558 | drivers/net/sunlance.c | lp->ledma->regs->cond_reg |= DMA_RST_ENET; |
lp | 560 | drivers/net/sunlance.c | lp->ledma->regs->cond_reg &= ~DMA_RST_ENET; |
lp | 561 | drivers/net/sunlance.c | lp->ledma->regs->cond_reg |= DMA_INT_ENAB; |
lp | 564 | drivers/net/sunlance.c | load_csrs (lp); |
lp | 569 | drivers/net/sunlance.c | status = init_restart_lance (lp); |
lp | 579 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 580 | drivers/net/sunlance.c | volatile struct lance_regs *ll = lp->ll; |
lp | 581 | drivers/net/sunlance.c | volatile struct lance_init_block *ib = lp->init_block; |
lp | 637 | drivers/net/sunlance.c | entry = lp->tx_new & TX_RING_MOD_MASK; |
lp | 651 | drivers/net/sunlance.c | lp->tx_new = (lp->tx_new+1) & TX_RING_MOD_MASK; |
lp | 668 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *) dev->priv; |
lp | 670 | drivers/net/sunlance.c | return &lp->stats; |
lp | 677 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *) dev->priv; |
lp | 678 | drivers/net/sunlance.c | volatile struct lance_init_block *ib = lp->init_block; |
lp | 679 | drivers/net/sunlance.c | volatile struct lance_regs *ll = lp->ll; |
lp | 690 | drivers/net/sunlance.c | load_csrs (lp); |
lp | 691 | drivers/net/sunlance.c | init_restart_lance (lp); |
lp | 717 | drivers/net/sunlance.c | struct lance_private *lp; |
lp | 770 | drivers/net/sunlance.c | lp = (struct lance_private *) dev->priv; |
lp | 773 | drivers/net/sunlance.c | lp->init_block = (void *) |
lp | 776 | drivers/net/sunlance.c | lp->ll = ll; |
lp | 777 | drivers/net/sunlance.c | lp->name = lancestr; |
lp | 778 | drivers/net/sunlance.c | lp->ledma = ledma; |
lp | 781 | drivers/net/sunlance.c | if ((int)(lp->init_block->brx_ring) & 0x07) { |
lp | 450 | drivers/net/tulip.c | struct tulip_private *lp; |
lp | 459 | drivers/net/tulip.c | lp = (struct tulip_private *)dev->priv; |
lp | 481 | drivers/net/tulip.c | int dirty_tx = lp->dirty_tx; |
lp | 483 | drivers/net/tulip.c | while (dirty_tx < lp->cur_tx) { |
lp | 485 | drivers/net/tulip.c | int status = lp->tx_ring[entry].status; |
lp | 492 | drivers/net/tulip.c | lp->stats.tx_errors++; |
lp | 493 | drivers/net/tulip.c | if (status & 0x4104) lp->stats.tx_aborted_errors++; |
lp | 494 | drivers/net/tulip.c | if (status & 0x0C00) lp->stats.tx_carrier_errors++; |
lp | 495 | drivers/net/tulip.c | if (status & 0x0200) lp->stats.tx_window_errors++; |
lp | 496 | drivers/net/tulip.c | if (status & 0x0002) lp->stats.tx_fifo_errors++; |
lp | 497 | drivers/net/tulip.c | if (status & 0x0080) lp->stats.tx_heartbeat_errors++; |
lp | 499 | drivers/net/tulip.c | if (status & 0x0100) lp->stats.collisions16++; |
lp | 503 | drivers/net/tulip.c | if (status & 0x0001) lp->stats.tx_deferred++; |
lp | 505 | drivers/net/tulip.c | lp->stats.collisions += (status >> 3) & 15; |
lp | 506 | drivers/net/tulip.c | lp->stats.tx_packets++; |
lp | 510 | drivers/net/tulip.c | dev_kfree_skb(lp->tx_skbuff[entry], FREE_WRITE); |
lp | 515 | drivers/net/tulip.c | if (lp->cur_tx - dirty_tx >= TX_RING_SIZE) { |
lp | 517 | drivers/net/tulip.c | dirty_tx, lp->cur_tx, lp->tx_full); |
lp | 522 | drivers/net/tulip.c | if (lp->tx_full && dev->tbusy |
lp | 523 | drivers/net/tulip.c | && dirty_tx > lp->cur_tx - TX_RING_SIZE + 2) { |
lp | 525 | drivers/net/tulip.c | lp->tx_full = 0; |
lp | 530 | drivers/net/tulip.c | lp->dirty_tx = dirty_tx; |
lp | 535 | drivers/net/tulip.c | if (csr5 & 0x0008) lp->stats.tx_errors++; /* Tx babble. */ |
lp | 537 | drivers/net/tulip.c | lp->stats.rx_errors++; |
lp | 538 | drivers/net/tulip.c | lp->stats.rx_missed_errors += inl(ioaddr + CSR8) & 0xffff; |
lp | 576 | drivers/net/tulip.c | struct tulip_private *lp = (struct tulip_private *)dev->priv; |
lp | 577 | drivers/net/tulip.c | int entry = lp->cur_rx % RX_RING_SIZE; |
lp | 583 | drivers/net/tulip.c | while (lp->rx_ring[entry].status >= 0) { |
lp | 584 | drivers/net/tulip.c | int status = lp->rx_ring[entry].status; |
lp | 593 | drivers/net/tulip.c | lp->stats.rx_errors++; /* end of a packet.*/ |
lp | 594 | drivers/net/tulip.c | if (status & 0x0890) lp->stats.rx_length_errors++; |
lp | 595 | drivers/net/tulip.c | if (status & 0x0004) lp->stats.rx_frame_errors++; |
lp | 596 | drivers/net/tulip.c | if (status & 0x0002) lp->stats.rx_crc_errors++; |
lp | 597 | drivers/net/tulip.c | if (status & 0x0001) lp->stats.rx_fifo_errors++; |
lp | 600 | drivers/net/tulip.c | short pkt_len = lp->rx_ring[entry].status >> 16; |
lp | 609 | drivers/net/tulip.c | if (lp->rx_ring[(entry+i) % RX_RING_SIZE].status < 0) |
lp | 613 | drivers/net/tulip.c | lp->stats.rx_dropped++; |
lp | 614 | drivers/net/tulip.c | lp->rx_ring[entry].status = 0x80000000; |
lp | 615 | drivers/net/tulip.c | lp->cur_rx++; |
lp | 621 | drivers/net/tulip.c | memcpy(skb_put(skb,pkt_len), lp->rx_ring[entry].buffer1, pkt_len); |
lp | 624 | drivers/net/tulip.c | lp->stats.rx_packets++; |
lp | 627 | drivers/net/tulip.c | lp->rx_ring[entry].status = 0x80000000; |
lp | 628 | drivers/net/tulip.c | entry = (++lp->cur_rx) % RX_RING_SIZE; |
lp | 192 | drivers/net/wavelan.c | net_local *lp; |
lp | 196 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 200 | drivers/net/wavelan.c | lp->hacr &= ~HACR_INTRON; |
lp | 201 | drivers/net/wavelan.c | hacr_write(ioaddr, lp->hacr); |
lp | 211 | drivers/net/wavelan.c | net_local *lp; |
lp | 215 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 219 | drivers/net/wavelan.c | lp->hacr |= HACR_INTRON; |
lp | 220 | drivers/net/wavelan.c | hacr_write(ioaddr, lp->hacr); |
lp | 382 | drivers/net/wavelan.c | net_local *lp; |
lp | 387 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 431 | drivers/net/wavelan.c | if (lp->promiscuous && lp->full_promiscuous) |
lp | 448 | drivers/net/wavelan.c | m.mmw_netw_id_l = lp->nwid[1]; |
lp | 449 | drivers/net/wavelan.c | m.mmw_netw_id_h = lp->nwid[0]; |
lp | 459 | drivers/net/wavelan.c | net_local *lp; |
lp | 464 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 474 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 498 | drivers/net/wavelan.c | net_local *lp; |
lp | 504 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 509 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 538 | drivers/net/wavelan.c | net_local *lp; |
lp | 551 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 553 | drivers/net/wavelan.c | lp->nresets++; |
lp | 556 | drivers/net/wavelan.c | lp->hacr = HACR_DEFAULT; |
lp | 570 | drivers/net/wavelan.c | psa_read(ioaddr, lp->hacr, 0, (unsigned char *)&psa, sizeof(psa)); |
lp | 594 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 697 | drivers/net/wavelan.c | AC_CFG_PRM(lp->promiscuous); |
lp | 861 | drivers/net/wavelan.c | net_local *lp; |
lp | 1016 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1020 | drivers/net/wavelan.c | first_wavelan = lp; |
lp | 1021 | drivers/net/wavelan.c | lp->prev = lp; |
lp | 1022 | drivers/net/wavelan.c | lp->next = lp; |
lp | 1026 | drivers/net/wavelan.c | lp->prev = first_wavelan->prev; |
lp | 1027 | drivers/net/wavelan.c | lp->next = first_wavelan; |
lp | 1028 | drivers/net/wavelan.c | first_wavelan->prev->next = lp; |
lp | 1029 | drivers/net/wavelan.c | first_wavelan->prev = lp; |
lp | 1031 | drivers/net/wavelan.c | lp->dev = dev; |
lp | 1033 | drivers/net/wavelan.c | lp->hacr = HACR_DEFAULT; |
lp | 1035 | drivers/net/wavelan.c | lp->full_promiscuous = enable_full_promiscuous; |
lp | 1036 | drivers/net/wavelan.c | lp->nwid[0] = psa.psa_nwid[0]; |
lp | 1037 | drivers/net/wavelan.c | lp->nwid[1] = psa.psa_nwid[1]; |
lp | 1039 | drivers/net/wavelan.c | lp->watchdog.function = wavelan_watchdog; |
lp | 1040 | drivers/net/wavelan.c | lp->watchdog.data = (unsigned long)dev; |
lp | 1073 | drivers/net/wavelan.c | net_local *lp; |
lp | 1082 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1088 | drivers/net/wavelan.c | lp->rx_head = OFFSET_RU; |
lp | 1090 | drivers/net/wavelan.c | for (i = 0, rx = lp->rx_head; i < NRXBLOCKS; i++, rx = rx_next) |
lp | 1092 | drivers/net/wavelan.c | rx_next = (i == NRXBLOCKS - 1) ? lp->rx_head : rx + RXBLOCKZ; |
lp | 1107 | drivers/net/wavelan.c | lp->rx_last = rx; |
lp | 1110 | drivers/net/wavelan.c | obram_write(ioaddr, scboff(OFFSET_SCB, scb_rfa_offset), (unsigned char *)&lp->rx_head, sizeof(lp->rx_head)); |
lp | 1115 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 1140 | drivers/net/wavelan.c | net_local *lp; |
lp | 1147 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1149 | drivers/net/wavelan.c | lp->tx_first_free = OFFSET_CU; |
lp | 1150 | drivers/net/wavelan.c | lp->tx_first_in_use = I82586NULL; |
lp | 1196 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 1210 | drivers/net/wavelan.c | lp->tx_n_in_use = 0; |
lp | 1219 | drivers/net/wavelan.c | net_local *lp; |
lp | 1227 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1282 | drivers/net/wavelan.c | net_local *lp; |
lp | 1295 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1299 | drivers/net/wavelan.c | txblock = lp->tx_first_free; |
lp | 1303 | drivers/net/wavelan.c | lp->tx_first_free += TXBLOCKZ; |
lp | 1304 | drivers/net/wavelan.c | if (lp->tx_first_free >= OFFSET_CU + NTXBLOCKS * TXBLOCKZ) |
lp | 1305 | drivers/net/wavelan.c | lp->tx_first_free -= NTXBLOCKS * TXBLOCKZ; |
lp | 1312 | drivers/net/wavelan.c | lp->tx_n_in_use++; |
lp | 1357 | drivers/net/wavelan.c | if (lp->tx_first_in_use == I82586NULL) |
lp | 1358 | drivers/net/wavelan.c | lp->tx_first_in_use = txblock; |
lp | 1360 | drivers/net/wavelan.c | if (lp->tx_n_in_use < NTXBLOCKS - 1) |
lp | 1365 | drivers/net/wavelan.c | if (lp->watchdog.next == (timer_list *)0) |
lp | 1484 | drivers/net/wavelan.c | net_local *lp; |
lp | 1488 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1499 | drivers/net/wavelan.c | obram_read(ioaddr, lp->rx_head, (unsigned char *)&fd, sizeof(fd)); |
lp | 1526 | drivers/net/wavelan.c | lp->stats.rx_errors++; |
lp | 1533 | drivers/net/wavelan.c | lp->stats.rx_length_errors++; |
lp | 1539 | drivers/net/wavelan.c | lp->stats.rx_over_errors++; |
lp | 1545 | drivers/net/wavelan.c | lp->stats.rx_fifo_errors++; |
lp | 1551 | drivers/net/wavelan.c | lp->stats.rx_frame_errors++; |
lp | 1557 | drivers/net/wavelan.c | lp->stats.rx_crc_errors++; |
lp | 1643 | drivers/net/wavelan.c | lp->stats.rx_dropped++; |
lp | 1681 | drivers/net/wavelan.c | lp->stats.rx_packets++; |
lp | 1686 | drivers/net/wavelan.c | obram_write(ioaddr, fdoff(lp->rx_head, fd_status), (unsigned char *)&fd.fd_status, sizeof(fd.fd_status)); |
lp | 1689 | drivers/net/wavelan.c | obram_write(ioaddr, fdoff(lp->rx_head, fd_command), (unsigned char *)&fd.fd_command, sizeof(fd.fd_command)); |
lp | 1692 | drivers/net/wavelan.c | obram_write(ioaddr, fdoff(lp->rx_last, fd_command), (unsigned char *)&fd.fd_command, sizeof(fd.fd_command)); |
lp | 1694 | drivers/net/wavelan.c | lp->rx_last = lp->rx_head; |
lp | 1695 | drivers/net/wavelan.c | lp->rx_head = fd.fd_link_offset; |
lp | 1710 | drivers/net/wavelan.c | wavelan_complete(device *dev, unsigned short ioaddr, net_local *lp) |
lp | 1720 | drivers/net/wavelan.c | if (lp->tx_first_in_use == I82586NULL) |
lp | 1723 | drivers/net/wavelan.c | obram_read(ioaddr, acoff(lp->tx_first_in_use, ac_status), (unsigned char *)&tx_status, sizeof(tx_status)); |
lp | 1730 | drivers/net/wavelan.c | --lp->tx_n_in_use; |
lp | 1737 | drivers/net/wavelan.c | if (lp->tx_n_in_use <= 0) |
lp | 1738 | drivers/net/wavelan.c | lp->tx_first_in_use = I82586NULL; |
lp | 1741 | drivers/net/wavelan.c | lp->tx_first_in_use += TXBLOCKZ; |
lp | 1742 | drivers/net/wavelan.c | if (lp->tx_first_in_use >= OFFSET_CU + NTXBLOCKS * TXBLOCKZ) |
lp | 1743 | drivers/net/wavelan.c | lp->tx_first_in_use -= NTXBLOCKS * TXBLOCKZ; |
lp | 1750 | drivers/net/wavelan.c | lp->stats.tx_packets++; |
lp | 1752 | drivers/net/wavelan.c | lp->stats.collisions += ncollisions; |
lp | 1760 | drivers/net/wavelan.c | lp->stats.tx_errors++; |
lp | 1763 | drivers/net/wavelan.c | lp->stats.tx_carrier_errors++; |
lp | 1769 | drivers/net/wavelan.c | lp->stats.tx_carrier_errors++; |
lp | 1774 | drivers/net/wavelan.c | lp->stats.tx_fifo_errors++; |
lp | 1779 | drivers/net/wavelan.c | lp->stats.tx_heartbeat_errors++; |
lp | 1785 | drivers/net/wavelan.c | lp->stats.tx_aborted_errors++; |
lp | 1803 | drivers/net/wavelan.c | if (lp->tx_n_in_use < NTXBLOCKS - 1) |
lp | 1817 | drivers/net/wavelan.c | net_local *lp; |
lp | 1826 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1828 | drivers/net/wavelan.c | if (lp->tx_n_in_use <= 0) |
lp | 1834 | drivers/net/wavelan.c | lp->watchdog.expires = jiffies+WATCHDOG_JIFFIES; |
lp | 1835 | drivers/net/wavelan.c | add_timer(&lp->watchdog); |
lp | 1843 | drivers/net/wavelan.c | nreaped = wavelan_complete(dev, ioaddr, lp); |
lp | 1845 | drivers/net/wavelan.c | printk("%s: warning: wavelan_watchdog(): %d reaped, %d remain.\n", dev->name, nreaped, lp->tx_n_in_use); |
lp | 1863 | drivers/net/wavelan.c | net_local *lp; |
lp | 1875 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1909 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 1921 | drivers/net/wavelan.c | (void)wavelan_complete(dev, ioaddr, lp); |
lp | 1966 | drivers/net/wavelan.c | net_local *lp; |
lp | 1973 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1983 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 2011 | drivers/net/wavelan.c | net_local *lp; |
lp | 2013 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2015 | drivers/net/wavelan.c | return &lp->stats; |
lp | 2022 | drivers/net/wavelan.c | net_local *lp; |
lp | 2028 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2035 | drivers/net/wavelan.c | lp->promiscuous = 1; |
lp | 2053 | drivers/net/wavelan.c | lp->promiscuous = 0; |
lp | 2071 | drivers/net/wavelan.c | net_local *lp; |
lp | 2075 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2077 | drivers/net/wavelan.c | if (lp == (net_local *)0) |
lp | 2095 | drivers/net/wavelan.c | lp->correct_nwid += (m.mmr_correct_nwid_h << 8) | m.mmr_correct_nwid_l; |
lp | 2096 | drivers/net/wavelan.c | lp->wrong_nwid += (m.mmr_wrong_nwid_h << 8) | m.mmr_wrong_nwid_l; |
lp | 2104 | drivers/net/wavelan.c | lp->correct_nwid, |
lp | 2105 | drivers/net/wavelan.c | lp->wrong_nwid, |
lp | 2109 | drivers/net/wavelan.c | lp->tx_n_in_use, |
lp | 2110 | drivers/net/wavelan.c | lp->nresets |
lp | 2136 | drivers/net/wavelan.c | net_local *lp; |
lp | 2138 | drivers/net/wavelan.c | lp = first_wavelan; |
lp | 2141 | drivers/net/wavelan.c | size = sprintf_stats(buffer + len, lp->dev); |
lp | 2155 | drivers/net/wavelan.c | while ((lp = lp->next) != first_wavelan); |
lp | 2204 | drivers/net/wavelan.c | wavelan_cu_show_one(device *dev, net_local *lp, int i, unsigned short p) |
lp | 2417 | drivers/net/wavelan.c | net_local *lp; |
lp | 2419 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2432 | drivers/net/wavelan.c | net_local *lp; |
lp | 2436 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2441 | drivers/net/wavelan.c | for (i = 0, p = lp->tx_first_in_use; i < NTXBLOCKS; i++) |
lp | 2443 | drivers/net/wavelan.c | wavelan_cu_show_one(dev, lp, i, p); |
lp | 2468 | drivers/net/wavelan.c | net_local *lp; |
lp | 2470 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2473 | drivers/net/wavelan.c | printk(" tx_n_in_use=%d,", lp->tx_n_in_use); |
lp | 2474 | drivers/net/wavelan.c | printk(" hacr=0x%x,", lp->hacr); |
lp | 2475 | drivers/net/wavelan.c | printk(" rx_head=0x%x,", lp->rx_head); |
lp | 2476 | drivers/net/wavelan.c | printk(" rx_last=0x%x,", lp->rx_last); |
lp | 2477 | drivers/net/wavelan.c | printk(" tx_first_free=0x%x,", lp->tx_first_free); |
lp | 2478 | drivers/net/wavelan.c | printk(" tx_first_in_use=0x%x,", lp->tx_first_in_use); |
lp | 437 | drivers/net/znet.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 443 | drivers/net/znet.c | lp->stats.tx_packets++; |
lp | 444 | drivers/net/znet.c | lp->stats.collisions += tx_status & 0xf; |
lp | 446 | drivers/net/znet.c | if (tx_status & 0x0600) lp->stats.tx_carrier_errors++; |
lp | 447 | drivers/net/znet.c | if (tx_status & 0x0100) lp->stats.tx_fifo_errors++; |
lp | 448 | drivers/net/znet.c | if (!(tx_status & 0x0040)) lp->stats.tx_heartbeat_errors++; |
lp | 449 | drivers/net/znet.c | if (tx_status & 0x0020) lp->stats.tx_aborted_errors++; |
lp | 452 | drivers/net/znet.c | lp->stats.tx_errors++; |
lp | 472 | drivers/net/znet.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 539 | drivers/net/znet.c | lp->stats.rx_errors++; |
lp | 540 | drivers/net/znet.c | if (status & 0x0800) lp->stats.rx_crc_errors++; |
lp | 541 | drivers/net/znet.c | if (status & 0x0400) lp->stats.rx_frame_errors++; |
lp | 542 | drivers/net/znet.c | if (status & 0x0200) lp->stats.rx_over_errors++; /* Wrong. */ |
lp | 543 | drivers/net/znet.c | if (status & 0x0100) lp->stats.rx_fifo_errors++; |
lp | 544 | drivers/net/znet.c | if (status & 0x0080) lp->stats.rx_length_errors++; |
lp | 546 | drivers/net/znet.c | lp->stats.rx_length_errors++; |
lp | 555 | drivers/net/znet.c | lp->stats.rx_dropped++; |
lp | 575 | drivers/net/znet.c | lp->stats.rx_packets++; |
lp | 621 | drivers/net/znet.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 623 | drivers/net/znet.c | return &lp->stats; |
lp | 5 | drivers/scsi/eata_dma_proc.c | u32 *lp, h_lp; |
lp | 9 | drivers/scsi/eata_dma_proc.c | lp = (u32 *)p; |
lp | 10 | drivers/scsi/eata_dma_proc.c | sp = ((short *)lp) + 1; /* Convert Header */ |
lp | 12 | drivers/scsi/eata_dma_proc.c | lp++; |
lp | 15 | drivers/scsi/eata_dma_proc.c | sp = (u16 *)lp; /* Convert SubHeader */ |
lp | 17 | drivers/scsi/eata_dma_proc.c | bp = (u8 *) lp; |
lp | 19 | drivers/scsi/eata_dma_proc.c | lp++; |
lp | 20 | drivers/scsi/eata_dma_proc.c | for (h_lp = (u32)lp; (u32)lp < h_lp + ((u32)*(bp + 3)); lp++) |
lp | 21 | drivers/scsi/eata_dma_proc.c | *lp = ntohl(*lp); |
lp | 22 | drivers/scsi/eata_dma_proc.c | }while ((u32)lp < ((u32)p) + 4 + h_sp); |
lp | 68 | fs/xiafs/bitmap.c | register long * lp; |
lp | 70 | fs/xiafs/bitmap.c | lp=(long *)bh->b_data; |
lp | 72 | fs/xiafs/bitmap.c | *lp++=0; |
lp | 244 | fs/xiafs/inode.c | dt_getblk(struct inode * inode, u_long *lp, int create, u_long prev_addr) |
lp | 250 | fs/xiafs/inode.c | if ((tmp=*lp)) { |
lp | 252 | fs/xiafs/inode.c | if (tmp == *lp) |
lp | 263 | fs/xiafs/inode.c | if (*lp) { |
lp | 268 | fs/xiafs/inode.c | *lp = tmp; |
lp | 278 | fs/xiafs/inode.c | u_long *lp; |
lp | 291 | fs/xiafs/inode.c | lp = nr + (u_long *) bh->b_data; |
lp | 293 | fs/xiafs/inode.c | if ((tmp=*lp)) { |
lp | 295 | fs/xiafs/inode.c | if (tmp == *lp) { |
lp | 312 | fs/xiafs/inode.c | if (*lp) { |
lp | 317 | fs/xiafs/inode.c | *lp = tmp; |
lp | 40 | fs/xiafs/truncate.c | u_long * lp; |
lp | 49 | fs/xiafs/truncate.c | lp=i + inode->u.xiafs_i.i_zone; |
lp | 50 | fs/xiafs/truncate.c | if (!(tmp = *lp)) |
lp | 57 | fs/xiafs/truncate.c | if ((bh && bh->b_count != 1) || tmp != *lp) |
lp | 60 | fs/xiafs/truncate.c | *lp = 0; |
lp | 70 | fs/xiafs/truncate.c | static int trunc_indirect(struct inode * inode, int addr_off, u_long * lp) |
lp | 80 | fs/xiafs/truncate.c | if ( !(tmp=*lp) ) |
lp | 83 | fs/xiafs/truncate.c | if (tmp != *lp) { |
lp | 88 | fs/xiafs/truncate.c | *lp = 0; |
lp | 119 | fs/xiafs/truncate.c | tmp = *lp; |
lp | 120 | fs/xiafs/truncate.c | *lp = 0; |
lp | 137 | fs/xiafs/truncate.c | u_long * dindp, * lp; |
lp | 140 | fs/xiafs/truncate.c | lp = &(inode->u.xiafs_i.i_dind_zone); |
lp | 141 | fs/xiafs/truncate.c | if (!(tmp = *lp)) |
lp | 144 | fs/xiafs/truncate.c | if (tmp != *lp) { |
lp | 149 | fs/xiafs/truncate.c | *lp = 0; |
lp | 168 | fs/xiafs/truncate.c | tmp = *lp; |
lp | 169 | fs/xiafs/truncate.c | *lp = 0; |
lp | 480 | include/linux/isdn.h | isdn_net_local *lp; |
lp | 1010 | kernel/sched.c | struct sched_param lp; |
lp | 1019 | kernel/sched.c | memcpy_fromfs(&lp, param, sizeof(struct sched_param)); |
lp | 1035 | kernel/sched.c | if (lp.sched_priority < 0 || lp.sched_priority > 99) |
lp | 1037 | kernel/sched.c | if ((policy == SCHED_OTHER) != (lp.sched_priority == 0)) |
lp | 1047 | kernel/sched.c | p->rt_priority = lp.sched_priority; |
lp | 1084 | kernel/sched.c | struct sched_param lp; |
lp | 1097 | kernel/sched.c | lp.sched_priority = p->rt_priority; |
lp | 1098 | kernel/sched.c | memcpy_tofs(param, &lp, sizeof(struct sched_param)); |
lp | 185 | net/ipv4/protocol.c | struct inet_protocol *lp = NULL; |
lp | 209 | net/ipv4/protocol.c | if (p->copy == 0 && lp != NULL) |
lp | 210 | net/ipv4/protocol.c | lp->copy = 0; |
lp | 215 | net/ipv4/protocol.c | lp = p; |