tag | line | file | source code |
lp | 40 | arch/i386/kernel/ldt.c | unsigned long *lp; |
lp | 76 | arch/i386/kernel/ldt.c | lp = (unsigned long *) ¤t->ldt[ldt_info.entry_number]; |
lp | 79 | arch/i386/kernel/ldt.c | *lp = 0; |
lp | 80 | arch/i386/kernel/ldt.c | *(lp+1) = 0; |
lp | 83 | arch/i386/kernel/ldt.c | *lp = ((ldt_info.base_addr & 0x0000ffff) << 16) | |
lp | 85 | arch/i386/kernel/ldt.c | *(lp+1) = (ldt_info.base_addr & 0xff000000) | |
lp | 158 | drivers/char/lp.c | struct lp_struct *lp = &lp_table[0]; |
lp | 161 | drivers/char/lp.c | while (irq != lp->irq) { |
lp | 162 | drivers/char/lp.c | if (++lp >= lp_end) |
lp | 166 | drivers/char/lp.c | wake_up(&lp->lp_wait_q); |
lp | 175 | drivers/char/lp.c | struct lp_struct *lp = &lp_table[minor]; |
lp | 181 | drivers/char/lp.c | memcpy_fromfs(lp->lp_buffer, buf, copy_size); |
lp | 184 | drivers/char/lp.c | if (lp_char_interrupt(lp->lp_buffer[bytes_written], minor)) { |
lp | 213 | drivers/char/lp.c | interruptible_sleep_on(&lp->lp_wait_q); |
lp | 448 | drivers/char/lp.c | struct lp_struct *lp = &lp_table[minor]; |
lp | 457 | drivers/char/lp.c | lp->lp_buffer = (char *) kmalloc(LP_BUFFER_SIZE, GFP_KERNEL); |
lp | 458 | drivers/char/lp.c | if (!lp->lp_buffer) |
lp | 473 | drivers/char/lp.c | kfree_s(lp->lp_buffer, LP_BUFFER_SIZE); |
lp | 474 | drivers/char/lp.c | lp->lp_buffer = NULL; |
lp | 481 | drivers/char/lp.c | kfree_s(lp->lp_buffer, LP_BUFFER_SIZE); |
lp | 482 | drivers/char/lp.c | lp->lp_buffer = NULL; |
lp | 335 | drivers/net/3c501.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 348 | drivers/net/3c501.c | lp->stats.tx_errors++; |
lp | 378 | drivers/net/3c501.c | lp->tx_pkt_start = gp_start; |
lp | 379 | drivers/net/3c501.c | lp->collisions = 0; |
lp | 389 | drivers/net/3c501.c | lp->loading=1; |
lp | 400 | drivers/net/3c501.c | if(lp->loading==2) /* A receive upset our load, despite our best efforts */ |
lp | 423 | drivers/net/3c501.c | struct net_local *lp; |
lp | 433 | drivers/net/3c501.c | lp = (struct net_local *)dev->priv; |
lp | 442 | drivers/net/3c501.c | lp->loading=2; /* So we can spot loading interruptions */ |
lp | 474 | drivers/net/3c501.c | lp->stats.tx_aborted_errors++; |
lp | 482 | drivers/net/3c501.c | outw(lp->tx_pkt_start, GP_LOW); |
lp | 484 | drivers/net/3c501.c | lp->stats.collisions++; |
lp | 491 | drivers/net/3c501.c | lp->stats.tx_packets++; |
lp | 516 | drivers/net/3c501.c | lp->stats.rx_missed_errors++; |
lp | 518 | drivers/net/3c501.c | lp->stats.rx_length_errors++; |
lp | 552 | drivers/net/3c501.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 565 | drivers/net/3c501.c | lp->stats.rx_over_errors++; |
lp | 582 | drivers/net/3c501.c | lp->stats.rx_dropped++; |
lp | 597 | drivers/net/3c501.c | lp->stats.rx_packets++; |
lp | 651 | drivers/net/3c501.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 652 | drivers/net/3c501.c | return &lp->stats; |
lp | 449 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 464 | drivers/net/3c507.c | if (lp->last_restart == lp->stats.tx_packets) { |
lp | 473 | drivers/net/3c507.c | lp->last_restart = lp->stats.tx_packets; |
lp | 515 | drivers/net/3c507.c | struct net_local *lp; |
lp | 527 | drivers/net/3c507.c | lp = (struct net_local *)dev->priv; |
lp | 540 | drivers/net/3c507.c | while (lp->tx_reap != lp->tx_head) { |
lp | 541 | drivers/net/3c507.c | unsigned short tx_status = shmem[lp->tx_reap>>1]; |
lp | 544 | drivers/net/3c507.c | if (net_debug > 5) printk("Couldn't reap %#x.\n", lp->tx_reap); |
lp | 548 | drivers/net/3c507.c | lp->stats.tx_packets++; |
lp | 549 | drivers/net/3c507.c | lp->stats.collisions += tx_status & 0xf; |
lp | 553 | drivers/net/3c507.c | lp->stats.tx_errors++; |
lp | 554 | drivers/net/3c507.c | if (tx_status & 0x0600) lp->stats.tx_carrier_errors++; |
lp | 555 | drivers/net/3c507.c | if (tx_status & 0x0100) lp->stats.tx_fifo_errors++; |
lp | 556 | drivers/net/3c507.c | if (!(tx_status & 0x0040)) lp->stats.tx_heartbeat_errors++; |
lp | 557 | drivers/net/3c507.c | if (tx_status & 0x0020) lp->stats.tx_aborted_errors++; |
lp | 560 | drivers/net/3c507.c | printk("Reaped %x, Tx status %04x.\n" , lp->tx_reap, tx_status); |
lp | 561 | drivers/net/3c507.c | lp->tx_reap += TX_BUF_SIZE; |
lp | 562 | drivers/net/3c507.c | if (lp->tx_reap > RX_BUF_START - TX_BUF_SIZE) |
lp | 563 | drivers/net/3c507.c | lp->tx_reap = TX_BUF_START; |
lp | 570 | drivers/net/3c507.c | printk("Received packet, rx_head %04x.\n", lp->rx_head); |
lp | 642 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 646 | drivers/net/3c507.c | return &lp->stats; |
lp | 653 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 657 | drivers/net/3c507.c | int cur_rxbuf = lp->rx_head = RX_BUF_START; |
lp | 683 | drivers/net/3c507.c | lp->rx_tail = cur_rxbuf; |
lp | 690 | drivers/net/3c507.c | (dev->mem_start + lp->rx_tail + 2); |
lp | 692 | drivers/net/3c507.c | *write_ptr++ = lp->rx_head; /* Link */ |
lp | 699 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 722 | drivers/net/3c507.c | lp->tx_cmd_link = IDLELOOP + 4; |
lp | 723 | drivers/net/3c507.c | lp->tx_head = lp->tx_reap = TX_BUF_START; |
lp | 758 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 760 | drivers/net/3c507.c | ushort tx_block = lp->tx_head; |
lp | 784 | drivers/net/3c507.c | *(ushort*)(dev->mem_start + lp->tx_cmd_link) = tx_block; |
lp | 785 | drivers/net/3c507.c | lp->tx_cmd_link = tx_block + 20; |
lp | 788 | drivers/net/3c507.c | lp->tx_head = tx_block + TX_BUF_SIZE; |
lp | 789 | drivers/net/3c507.c | if (lp->tx_head > RX_BUF_START - TX_BUF_SIZE) |
lp | 790 | drivers/net/3c507.c | lp->tx_head = TX_BUF_START; |
lp | 794 | drivers/net/3c507.c | dev->name, ioaddr, length, tx_block, lp->tx_head); |
lp | 797 | drivers/net/3c507.c | if (lp->tx_head != lp->tx_reap) |
lp | 804 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 806 | drivers/net/3c507.c | ushort rx_head = lp->rx_head; |
lp | 807 | drivers/net/3c507.c | ushort rx_tail = lp->rx_tail; |
lp | 827 | drivers/net/3c507.c | lp->stats.rx_errors++; |
lp | 828 | drivers/net/3c507.c | if (frame_status & 0x0800) lp->stats.rx_crc_errors++; |
lp | 829 | drivers/net/3c507.c | if (frame_status & 0x0400) lp->stats.rx_frame_errors++; |
lp | 830 | drivers/net/3c507.c | if (frame_status & 0x0200) lp->stats.rx_fifo_errors++; |
lp | 831 | drivers/net/3c507.c | if (frame_status & 0x0100) lp->stats.rx_over_errors++; |
lp | 832 | drivers/net/3c507.c | if (frame_status & 0x0080) lp->stats.rx_length_errors++; |
lp | 841 | drivers/net/3c507.c | lp->stats.rx_dropped++; |
lp | 853 | drivers/net/3c507.c | lp->stats.rx_packets++; |
lp | 868 | drivers/net/3c507.c | lp->rx_head = rx_head; |
lp | 869 | drivers/net/3c507.c | lp->rx_tail = rx_tail; |
lp | 380 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
lp | 452 | drivers/net/3c509.c | if (tx_status & 0x38) lp->stats.tx_aborted_errors++; |
lp | 525 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
lp | 532 | drivers/net/3c509.c | return &lp->stats; |
lp | 542 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
lp | 550 | drivers/net/3c509.c | lp->stats.tx_carrier_errors += inb(ioaddr + 0); |
lp | 551 | drivers/net/3c509.c | lp->stats.tx_heartbeat_errors += inb(ioaddr + 1); |
lp | 553 | drivers/net/3c509.c | lp->stats.collisions += inb(ioaddr + 3); |
lp | 554 | drivers/net/3c509.c | lp->stats.tx_window_errors += inb(ioaddr + 4); |
lp | 555 | drivers/net/3c509.c | lp->stats.rx_fifo_errors += inb(ioaddr + 5); |
lp | 556 | drivers/net/3c509.c | lp->stats.tx_packets += inb(ioaddr + 6); |
lp | 571 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
lp | 581 | drivers/net/3c509.c | lp->stats.rx_errors++; |
lp | 583 | drivers/net/3c509.c | case 0x0000: lp->stats.rx_over_errors++; break; |
lp | 584 | drivers/net/3c509.c | case 0x0800: lp->stats.rx_length_errors++; break; |
lp | 585 | drivers/net/3c509.c | case 0x1000: lp->stats.rx_frame_errors++; break; |
lp | 586 | drivers/net/3c509.c | case 0x1800: lp->stats.rx_length_errors++; break; |
lp | 587 | drivers/net/3c509.c | case 0x2000: lp->stats.rx_frame_errors++; break; |
lp | 588 | drivers/net/3c509.c | case 0x2800: lp->stats.rx_crc_errors++; break; |
lp | 609 | drivers/net/3c509.c | lp->stats.rx_packets++; |
lp | 615 | drivers/net/3c509.c | lp->stats.rx_dropped++; |
lp | 202 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 206 | drivers/net/apricot.c | lp->scb.rfd = (struct i596_rfd *)I596_NULL; |
lp | 222 | drivers/net/apricot.c | lp->rx_tail = rfd; |
lp | 227 | drivers/net/apricot.c | rfd->next = lp->scb.rfd; |
lp | 228 | drivers/net/apricot.c | lp->scb.rfd = rfd; |
lp | 232 | drivers/net/apricot.c | lp->rx_tail->next = lp->scb.rfd; |
lp | 240 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 241 | drivers/net/apricot.c | struct i596_rfd *rfd = lp->scb.rfd; |
lp | 243 | drivers/net/apricot.c | lp->rx_tail->next = (struct i596_rfd *)I596_NULL; |
lp | 247 | drivers/net/apricot.c | lp->scb.rfd = rfd->next; |
lp | 249 | drivers/net/apricot.c | rfd = lp->scb.rfd; |
lp | 251 | drivers/net/apricot.c | while (rfd != lp->rx_tail); |
lp | 257 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 265 | drivers/net/apricot.c | outw(((((int)&lp->scp) & 0xffff) | 2), ioaddr); |
lp | 266 | drivers/net/apricot.c | outw((((int)&lp->scp)>>16) & 0xffff, ioaddr); |
lp | 268 | drivers/net/apricot.c | lp->last_cmd = jiffies; |
lp | 270 | drivers/net/apricot.c | lp->scp.sysbus = 0x00440000; |
lp | 271 | drivers/net/apricot.c | lp->scp.iscp = &(lp->iscp); |
lp | 272 | drivers/net/apricot.c | lp->iscp.scb = &(lp->scb); |
lp | 273 | drivers/net/apricot.c | lp->iscp.stat = 0x0001; |
lp | 274 | drivers/net/apricot.c | lp->cmd_backlog = 0; |
lp | 276 | drivers/net/apricot.c | lp->cmd_head = lp->scb.cmd = (struct i596_cmd *) I596_NULL; |
lp | 284 | drivers/net/apricot.c | while (lp->iscp.stat) |
lp | 288 | drivers/net/apricot.c | dev->name, lp->scb.status, lp->scb.command); |
lp | 292 | drivers/net/apricot.c | lp->scb.command = 0; |
lp | 294 | drivers/net/apricot.c | memcpy (lp->i596_config, init_setup, 14); |
lp | 295 | drivers/net/apricot.c | lp->set_conf.command = CmdConfigure; |
lp | 296 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->set_conf); |
lp | 298 | drivers/net/apricot.c | memcpy (lp->eth_addr, dev->dev_addr, 6); |
lp | 299 | drivers/net/apricot.c | lp->set_add.command = CmdSASetup; |
lp | 300 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->set_add); |
lp | 302 | drivers/net/apricot.c | lp->tdr.command = CmdTDR; |
lp | 303 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->tdr); |
lp | 306 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 310 | drivers/net/apricot.c | dev->name, lp->scb.status, lp->scb.command); |
lp | 314 | drivers/net/apricot.c | lp->scb.command = RX_START; |
lp | 318 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 322 | drivers/net/apricot.c | lp->scb.status, lp->scb.command); |
lp | 332 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 337 | drivers/net/apricot.c | while ((lp->scb.rfd->stat) & STAT_C) |
lp | 339 | drivers/net/apricot.c | if (i596_debug >2) print_eth(lp->scb.rfd->data); |
lp | 341 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & STAT_OK) |
lp | 344 | drivers/net/apricot.c | int pkt_len = lp->scb.rfd->count & 0x3fff; |
lp | 352 | drivers/net/apricot.c | lp->stats.rx_dropped++; |
lp | 357 | drivers/net/apricot.c | memcpy(skb_put(skb,pkt_len), lp->scb.rfd->data, pkt_len); |
lp | 361 | drivers/net/apricot.c | lp->stats.rx_packets++; |
lp | 367 | drivers/net/apricot.c | lp->stats.rx_errors++; |
lp | 368 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x0001) lp->stats.collisions++; |
lp | 369 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x0080) lp->stats.rx_length_errors++; |
lp | 370 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x0100) lp->stats.rx_over_errors++; |
lp | 371 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x0200) lp->stats.rx_fifo_errors++; |
lp | 372 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x0400) lp->stats.rx_frame_errors++; |
lp | 373 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x0800) lp->stats.rx_crc_errors++; |
lp | 374 | drivers/net/apricot.c | if ((lp->scb.rfd->stat) & 0x1000) lp->stats.rx_length_errors++; |
lp | 377 | drivers/net/apricot.c | lp->scb.rfd->stat = 0; |
lp | 378 | drivers/net/apricot.c | lp->rx_tail->cmd = 0; |
lp | 379 | drivers/net/apricot.c | lp->rx_tail = lp->scb.rfd; |
lp | 380 | drivers/net/apricot.c | lp->scb.rfd = lp->scb.rfd->next; |
lp | 381 | drivers/net/apricot.c | lp->rx_tail->count = 0; |
lp | 382 | drivers/net/apricot.c | lp->rx_tail->cmd = CMD_EOL; |
lp | 392 | drivers/net/apricot.c | i596_cleanup_cmd(struct i596_private *lp) |
lp | 399 | drivers/net/apricot.c | while (lp->cmd_head != (struct i596_cmd *) I596_NULL) |
lp | 401 | drivers/net/apricot.c | ptr = lp->cmd_head; |
lp | 403 | drivers/net/apricot.c | lp->cmd_head = lp->cmd_head->next; |
lp | 404 | drivers/net/apricot.c | lp->cmd_backlog--; |
lp | 415 | drivers/net/apricot.c | lp->stats.tx_errors++; |
lp | 416 | drivers/net/apricot.c | lp->stats.tx_aborted_errors++; |
lp | 435 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 439 | drivers/net/apricot.c | lp->scb.status, lp->scb.command); |
lp | 443 | drivers/net/apricot.c | lp->scb.cmd = lp->cmd_head; |
lp | 447 | drivers/net/apricot.c | i596_reset(struct device *dev, struct i596_private *lp, int ioaddr) |
lp | 453 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 457 | drivers/net/apricot.c | lp->scb.status, lp->scb.command); |
lp | 464 | drivers/net/apricot.c | lp->scb.command = CUC_ABORT|RX_ABORT; |
lp | 470 | drivers/net/apricot.c | while ((lp->scb.status, lp->scb.command) || lp->scb.command) |
lp | 474 | drivers/net/apricot.c | lp->scb.status, lp->scb.command); |
lp | 478 | drivers/net/apricot.c | i596_cleanup_cmd(lp); |
lp | 489 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 502 | drivers/net/apricot.c | if (lp->cmd_head != (struct i596_cmd *) I596_NULL) |
lp | 503 | drivers/net/apricot.c | lp->cmd_tail->next = cmd; |
lp | 506 | drivers/net/apricot.c | lp->cmd_head = cmd; |
lp | 507 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 511 | drivers/net/apricot.c | lp->scb.status, lp->scb.command); |
lp | 515 | drivers/net/apricot.c | lp->scb.cmd = cmd; |
lp | 516 | drivers/net/apricot.c | lp->scb.command = CUC_START; |
lp | 519 | drivers/net/apricot.c | lp->cmd_tail = cmd; |
lp | 520 | drivers/net/apricot.c | lp->cmd_backlog++; |
lp | 522 | drivers/net/apricot.c | lp->cmd_head = lp->scb.cmd; |
lp | 525 | drivers/net/apricot.c | if (lp->cmd_backlog > 16) |
lp | 527 | drivers/net/apricot.c | int tickssofar = jiffies - lp->last_cmd; |
lp | 533 | drivers/net/apricot.c | i596_reset(dev, lp, ioaddr); |
lp | 578 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 591 | drivers/net/apricot.c | lp->stats.tx_errors++; |
lp | 593 | drivers/net/apricot.c | if (lp->last_restart == lp->stats.tx_packets) { |
lp | 597 | drivers/net/apricot.c | i596_reset(dev,lp, ioaddr); |
lp | 602 | drivers/net/apricot.c | lp->scb.command = CUC_START|RX_START; |
lp | 605 | drivers/net/apricot.c | lp->last_restart = lp->stats.tx_packets; |
lp | 637 | drivers/net/apricot.c | lp->stats.tx_dropped++; |
lp | 659 | drivers/net/apricot.c | lp->stats.tx_packets++; |
lp | 688 | drivers/net/apricot.c | struct i596_private *lp; |
lp | 745 | drivers/net/apricot.c | lp = (struct i596_private *)dev->priv; |
lp | 746 | drivers/net/apricot.c | memset((void *)lp, 0, sizeof(struct i596_private)); |
lp | 747 | drivers/net/apricot.c | lp->scb.command = 0; |
lp | 748 | drivers/net/apricot.c | lp->scb.cmd = (struct i596_cmd *) I596_NULL; |
lp | 749 | drivers/net/apricot.c | lp->scb.rfd = (struct i596_rfd *)I596_NULL; |
lp | 758 | drivers/net/apricot.c | struct i596_private *lp; |
lp | 777 | drivers/net/apricot.c | lp = (struct i596_private *)dev->priv; |
lp | 779 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 782 | 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 | 785 | drivers/net/apricot.c | status = lp->scb.status; |
lp | 801 | drivers/net/apricot.c | while ((lp->cmd_head != (struct i596_cmd *) I596_NULL) && (lp->cmd_head->status & STAT_C)) |
lp | 803 | drivers/net/apricot.c | ptr = lp->cmd_head; |
lp | 805 | drivers/net/apricot.c | lp->cmd_head = lp->cmd_head->next; |
lp | 806 | drivers/net/apricot.c | lp->cmd_backlog--; |
lp | 823 | drivers/net/apricot.c | lp->stats.tx_errors++; |
lp | 824 | drivers/net/apricot.c | if ((ptr->status) & 0x0020) lp->stats.collisions++; |
lp | 825 | drivers/net/apricot.c | if (!((ptr->status) & 0x0040)) lp->stats.tx_heartbeat_errors++; |
lp | 826 | drivers/net/apricot.c | if ((ptr->status) & 0x0400) lp->stats.tx_carrier_errors++; |
lp | 827 | drivers/net/apricot.c | if ((ptr->status) & 0x0800) lp->stats.collisions++; |
lp | 828 | drivers/net/apricot.c | if ((ptr->status) & 0x1000) lp->stats.tx_aborted_errors++; |
lp | 868 | drivers/net/apricot.c | lp->last_cmd = jiffies; |
lp | 872 | drivers/net/apricot.c | ptr = lp->cmd_head; |
lp | 873 | drivers/net/apricot.c | while ((ptr != (struct i596_cmd *) I596_NULL) && (ptr != lp->cmd_tail)) |
lp | 879 | drivers/net/apricot.c | if ((lp->cmd_head != (struct i596_cmd *) I596_NULL) && (dev->start)) ack_cmd |= CUC_START; |
lp | 880 | drivers/net/apricot.c | lp->scb.cmd = lp->cmd_head; |
lp | 901 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 904 | 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 | 907 | drivers/net/apricot.c | lp->scb.command = ack_cmd; |
lp | 924 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 932 | drivers/net/apricot.c | dev->name, lp->scb.status); |
lp | 934 | drivers/net/apricot.c | lp->scb.command = CUC_ABORT|RX_ABORT; |
lp | 937 | drivers/net/apricot.c | i596_cleanup_cmd(lp); |
lp | 939 | drivers/net/apricot.c | while (lp->scb.status, lp->scb.command) |
lp | 943 | drivers/net/apricot.c | dev->name, lp->scb.status, lp->scb.command); |
lp | 960 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 962 | drivers/net/apricot.c | return &lp->stats; |
lp | 975 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
lp | 997 | drivers/net/apricot.c | if (lp->set_conf.next != (struct i596_cmd * ) I596_NULL) return; |
lp | 999 | drivers/net/apricot.c | lp->i596_config[8] &= ~0x01; |
lp | 1001 | drivers/net/apricot.c | lp->i596_config[8] |= 0x01; |
lp | 1003 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->set_conf); |
lp | 231 | drivers/net/arcnet.c | #define TBUSY lp->adev->tbusy \ |
lp | 232 | drivers/net/arcnet.c | =lp->wdev->tbusy |
lp | 233 | drivers/net/arcnet.c | #define IF_TBUSY (lp->adev->tbusy \ |
lp | 234 | drivers/net/arcnet.c | || lp->wdev->tbusy) |
lp | 235 | drivers/net/arcnet.c | #define START lp->adev->start \ |
lp | 236 | drivers/net/arcnet.c | =lp->wdev->start |
lp | 517 | drivers/net/arcnet.c | struct arcnet_local *lp; |
lp | 611 | drivers/net/arcnet.c | lp=(struct arcnet_local *)(dev->priv); |
lp | 644 | drivers/net/arcnet.c | lp->arcnum,lp->arcnum); |
lp | 645 | drivers/net/arcnet.c | if (lp->arcnum==0) |
lp | 647 | drivers/net/arcnet.c | if (lp->arcnum==255) |
lp | 649 | drivers/net/arcnet.c | dev->dev_addr[0]=lp->arcnum; |
lp | 650 | drivers/net/arcnet.c | lp->sequence=1; |
lp | 651 | drivers/net/arcnet.c | lp->recbuf=0; |
lp | 839 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)dev->priv; |
lp | 841 | drivers/net/arcnet.c | int delayval,recbuf=lp->recbuf; |
lp | 866 | drivers/net/arcnet.c | lp->arcnum=cardmem[1]; /* save address for later use */ |
lp | 869 | drivers/net/arcnet.c | recbuf=lp->recbuf=0; |
lp | 870 | drivers/net/arcnet.c | lp->txbuf=2; |
lp | 891 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 893 | drivers/net/arcnet.c | ether_setup(lp->wdev); |
lp | 895 | drivers/net/arcnet.c | dev->dev_addr[5]=lp->arcnum; |
lp | 897 | drivers/net/arcnet.c | lp->wdev->open=NULL; |
lp | 898 | drivers/net/arcnet.c | lp->wdev->stop=NULL; |
lp | 899 | drivers/net/arcnet.c | lp->wdev->hard_start_xmit=arcnetW_send_packet; |
lp | 903 | drivers/net/arcnet.c | lp->wdev->name); |
lp | 926 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 947 | drivers/net/arcnet.c | lp->intx=0; |
lp | 948 | drivers/net/arcnet.c | lp->in_txhandler=0; |
lp | 951 | drivers/net/arcnet.c | lp->adev=dev; |
lp | 954 | drivers/net/arcnet.c | lp->adev->name); |
lp | 957 | drivers/net/arcnet.c | lp->wdev=(struct device *)kmalloc(sizeof(struct device),GFP_KERNEL); |
lp | 958 | drivers/net/arcnet.c | memcpy(lp->wdev,dev,sizeof(struct device)); |
lp | 959 | drivers/net/arcnet.c | lp->wdev->name=(char *)kmalloc(10,GFP_KERNEL); |
lp | 960 | drivers/net/arcnet.c | sprintf(lp->wdev->name,"%sw",dev->name); |
lp | 961 | drivers/net/arcnet.c | lp->wdev->init=arcnetW_init; |
lp | 962 | drivers/net/arcnet.c | register_netdev(lp->wdev); |
lp | 981 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 993 | drivers/net/arcnet.c | lp->adev=NULL; |
lp | 996 | drivers/net/arcnet.c | lp->wdev->start=0; |
lp | 997 | drivers/net/arcnet.c | lp->wdev->priv=NULL; |
lp | 998 | drivers/net/arcnet.c | unregister_netdev(lp->wdev); |
lp | 999 | drivers/net/arcnet.c | kfree(lp->wdev->name); |
lp | 1000 | drivers/net/arcnet.c | kfree(lp->wdev); |
lp | 1001 | drivers/net/arcnet.c | lp->wdev=NULL; |
lp | 1026 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1029 | drivers/net/arcnet.c | lp->intx++; |
lp | 1033 | drivers/net/arcnet.c | inb(STATUS),lp->intx); |
lp | 1035 | drivers/net/arcnet.c | if (lp->in_txhandler) |
lp | 1038 | drivers/net/arcnet.c | lp->intx--; |
lp | 1047 | drivers/net/arcnet.c | int recbuf=lp->recbuf; |
lp | 1054 | drivers/net/arcnet.c | status,tickssofar,lp->outgoing.skb, |
lp | 1055 | drivers/net/arcnet.c | lp->outgoing.numsegs, |
lp | 1056 | drivers/net/arcnet.c | lp->outgoing.segnum); |
lp | 1057 | drivers/net/arcnet.c | lp->intx--; |
lp | 1063 | drivers/net/arcnet.c | status,lp->intx,lp->in_txhandler,tickssofar); |
lp | 1065 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 1075 | drivers/net/arcnet.c | if (lp->outgoing.skb) |
lp | 1077 | drivers/net/arcnet.c | dev_kfree_skb(lp->outgoing.skb,FREE_WRITE); |
lp | 1078 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 1080 | drivers/net/arcnet.c | lp->outgoing.skb=NULL; |
lp | 1083 | drivers/net/arcnet.c | lp->intx--; |
lp | 1086 | drivers/net/arcnet.c | lp->txready=0; |
lp | 1087 | drivers/net/arcnet.c | lp->sending=0; |
lp | 1101 | drivers/net/arcnet.c | inb(STATUS),lp->intx,jiffies-dev->trans_start); |
lp | 1103 | drivers/net/arcnet.c | lp->intx--; |
lp | 1107 | drivers/net/arcnet.c | if (lp->txready) /* transmit already in progress! */ |
lp | 1115 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 1116 | drivers/net/arcnet.c | lp->intx--; |
lp | 1117 | drivers/net/arcnet.c | lp->txready=0; /* we definitely need this line! */ |
lp | 1127 | drivers/net/arcnet.c | inb(STATUS),lp->intx,jiffies-dev->trans_start); |
lp | 1128 | drivers/net/arcnet.c | lp->intx--; |
lp | 1132 | drivers/net/arcnet.c | struct Outgoing *out=&(lp->outgoing); |
lp | 1151 | drivers/net/arcnet.c | out->hdr->sequence=(lp->sequence++); |
lp | 1153 | drivers/net/arcnet.c | if (lp->txready && inb(STATUS)&TXFREEflag) |
lp | 1175 | drivers/net/arcnet.c | if (!lp->sending) |
lp | 1199 | drivers/net/arcnet.c | if (lp->txready && inb(STATUS)&TXFREEflag) |
lp | 1202 | drivers/net/arcnet.c | if (!lp->txready) |
lp | 1208 | drivers/net/arcnet.c | if (!lp->sending) |
lp | 1212 | drivers/net/arcnet.c | if (!lp->sending) |
lp | 1231 | drivers/net/arcnet.c | lp->intx--; |
lp | 1232 | drivers/net/arcnet.c | lp->stats.tx_packets++; |
lp | 1244 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1246 | drivers/net/arcnet.c | struct Outgoing *out=&(lp->outgoing); |
lp | 1248 | drivers/net/arcnet.c | if (lp->txready) |
lp | 1287 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1290 | drivers/net/arcnet.c | (union ArcPacket *)(dev->mem_start+512*(lp->txbuf^1)); |
lp | 1295 | drivers/net/arcnet.c | lp->txbuf=lp->txbuf^1; /* XOR with 1 to alternate between 2 and 3 */ |
lp | 1305 | drivers/net/arcnet.c | memset((void *)dev->mem_start+lp->txbuf*512,0x42,512); |
lp | 1376 | drivers/net/arcnet.c | lp->outgoing.lastload_dest=hdr->daddr; |
lp | 1378 | drivers/net/arcnet.c | lp->txready=lp->txbuf; /* packet is ready for sending */ |
lp | 1387 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)dev->priv; |
lp | 1394 | drivers/net/arcnet.c | if (!(inb(STATUS)&TXFREEflag) || !lp->txready) return; |
lp | 1397 | drivers/net/arcnet.c | outb(TXcmd|(lp->txready<<3),COMMAND); |
lp | 1402 | drivers/net/arcnet.c | lp->txready=0; |
lp | 1403 | drivers/net/arcnet.c | lp->sending++; |
lp | 1405 | drivers/net/arcnet.c | lp->outgoing.lasttrans_dest=lp->outgoing.lastload_dest; |
lp | 1406 | drivers/net/arcnet.c | lp->outgoing.lastload_dest=0; |
lp | 1416 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1452 | drivers/net/arcnet.c | (union ArcPacket *)(dev->mem_start+512*(lp->txbuf^1)); |
lp | 1461 | drivers/net/arcnet.c | lp->adev->name,lp->wdev->name); |
lp | 1471 | drivers/net/arcnet.c | lp->txbuf=lp->txbuf^1; /* XOR with 1 to alternate btw 2 & 3 */ |
lp | 1475 | drivers/net/arcnet.c | memset((void *)dev->mem_start+lp->txbuf*512,0x42,512); |
lp | 1535 | drivers/net/arcnet.c | lp->outgoing.lastload_dest=daddr; |
lp | 1537 | drivers/net/arcnet.c | lp->txready=lp->txbuf; /* packet is ready for sending */ |
lp | 1583 | drivers/net/arcnet.c | struct arcnet_local *lp; |
lp | 1592 | drivers/net/arcnet.c | lp = (struct arcnet_local *)dev->priv; |
lp | 1634 | drivers/net/arcnet.c | lp->stats.tx_carrier_errors++; |
lp | 1641 | drivers/net/arcnet.c | int recbuf=lp->recbuf=!lp->recbuf; |
lp | 1657 | drivers/net/arcnet.c | if (status&TXFREEflag && !lp->in_txhandler && lp->sending) |
lp | 1659 | drivers/net/arcnet.c | struct Outgoing *out=&(lp->outgoing); |
lp | 1661 | drivers/net/arcnet.c | lp->in_txhandler++; |
lp | 1662 | drivers/net/arcnet.c | lp->sending--; |
lp | 1671 | drivers/net/arcnet.c | if (lp->outgoing.lasttrans_dest != 0) |
lp | 1676 | drivers/net/arcnet.c | lp->outgoing.lasttrans_dest); |
lp | 1677 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 1684 | drivers/net/arcnet.c | lp->outgoing.lasttrans_dest); |
lp | 1690 | drivers/net/arcnet.c | if (lp->txready) |
lp | 1696 | drivers/net/arcnet.c | if (lp->intx) |
lp | 1698 | drivers/net/arcnet.c | lp->in_txhandler--; |
lp | 1702 | drivers/net/arcnet.c | if (!lp->outgoing.skb) |
lp | 1708 | drivers/net/arcnet.c | if (!lp->txready && IF_TBUSY) |
lp | 1714 | drivers/net/arcnet.c | lp->in_txhandler--; |
lp | 1725 | drivers/net/arcnet.c | if (lp->txready && !lp->sending) |
lp | 1740 | drivers/net/arcnet.c | if (!lp->txready && IF_TBUSY) |
lp | 1748 | drivers/net/arcnet.c | lp->in_txhandler--; |
lp | 1757 | drivers/net/arcnet.c | if (dev->start && lp->sending ) |
lp | 1780 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1796 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 1869 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1893 | drivers/net/arcnet.c | struct Incoming *in=&lp->incoming[saddr]; |
lp | 1904 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 1905 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 1914 | drivers/net/arcnet.c | lp->stats.rx_dropped++; |
lp | 1960 | drivers/net/arcnet.c | lp->stats.rx_frame_errors++; |
lp | 1978 | drivers/net/arcnet.c | lp->stats.rx_packets++; |
lp | 1999 | drivers/net/arcnet.c | struct Incoming *in=&lp->incoming[saddr]; |
lp | 2011 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 2012 | drivers/net/arcnet.c | lp->stats.rx_fifo_errors++; |
lp | 2025 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 2026 | drivers/net/arcnet.c | lp->stats.rx_over_errors++; |
lp | 2038 | drivers/net/arcnet.c | lp->stats.rx_dropped++; |
lp | 2048 | drivers/net/arcnet.c | lp->stats.rx_dropped++; |
lp | 2078 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2099 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 2100 | drivers/net/arcnet.c | lp->stats.rx_fifo_errors++; |
lp | 2142 | drivers/net/arcnet.c | lp->stats.rx_packets++; |
lp | 2154 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 2164 | drivers/net/arcnet.c | lp->stats.rx_dropped++; |
lp | 2169 | drivers/net/arcnet.c | skb->dev = lp->wdev; |
lp | 2190 | drivers/net/arcnet.c | lp->stats.rx_packets++; |
lp | 2208 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 2210 | drivers/net/arcnet.c | return &lp->stats; |
lp | 2223 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
lp | 2351 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *) (dev->priv); |
lp | 2379 | drivers/net/arcnet.c | lp->stats.rx_frame_errors++; |
lp | 322 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 347 | drivers/net/at1700.c | lp->tx_started = 0; |
lp | 348 | drivers/net/at1700.c | lp->tx_queue = 0; |
lp | 349 | drivers/net/at1700.c | lp->tx_queue_len = 0; |
lp | 365 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 381 | drivers/net/at1700.c | lp->stats.tx_errors++; |
lp | 389 | drivers/net/at1700.c | lp->tx_started = 0; |
lp | 390 | drivers/net/at1700.c | lp->tx_queue = 0; |
lp | 391 | drivers/net/at1700.c | lp->tx_queue_len = 0; |
lp | 416 | drivers/net/at1700.c | lp->tx_queue++; |
lp | 417 | drivers/net/at1700.c | lp->tx_queue_len += length + 2; |
lp | 419 | drivers/net/at1700.c | if (lp->tx_started == 0) { |
lp | 421 | drivers/net/at1700.c | outb(0x80 | lp->tx_queue, ioaddr + TX_START); |
lp | 422 | drivers/net/at1700.c | lp->tx_queue = 0; |
lp | 423 | drivers/net/at1700.c | lp->tx_queue_len = 0; |
lp | 425 | drivers/net/at1700.c | lp->tx_started = 1; |
lp | 427 | drivers/net/at1700.c | } else if (lp->tx_queue_len < 4096 - 1502) |
lp | 445 | drivers/net/at1700.c | struct net_local *lp; |
lp | 455 | drivers/net/at1700.c | lp = (struct net_local *)dev->priv; |
lp | 467 | drivers/net/at1700.c | lp->stats.tx_packets++; |
lp | 468 | drivers/net/at1700.c | if (lp->tx_queue) { |
lp | 469 | drivers/net/at1700.c | outb(0x80 | lp->tx_queue, ioaddr + TX_START); |
lp | 470 | drivers/net/at1700.c | lp->tx_queue = 0; |
lp | 471 | drivers/net/at1700.c | lp->tx_queue_len = 0; |
lp | 476 | drivers/net/at1700.c | lp->tx_started = 0; |
lp | 493 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 512 | drivers/net/at1700.c | lp->stats.rx_errors++; |
lp | 513 | drivers/net/at1700.c | if (status & 0x08) lp->stats.rx_length_errors++; |
lp | 514 | drivers/net/at1700.c | if (status & 0x04) lp->stats.rx_frame_errors++; |
lp | 515 | drivers/net/at1700.c | if (status & 0x02) lp->stats.rx_crc_errors++; |
lp | 516 | drivers/net/at1700.c | if (status & 0x01) lp->stats.rx_over_errors++; |
lp | 527 | drivers/net/at1700.c | lp->stats.rx_errors++; |
lp | 537 | drivers/net/at1700.c | lp->stats.rx_dropped++; |
lp | 546 | drivers/net/at1700.c | lp->stats.rx_packets++; |
lp | 574 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 596 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 602 | drivers/net/at1700.c | return &lp->stats; |
lp | 234 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 235 | drivers/net/atp.c | lp->addr_mode = CMR2h_Normal; |
lp | 342 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 351 | drivers/net/atp.c | write_reg_high(ioaddr, CMR2, lp->addr_mode); |
lp | 368 | drivers/net/atp.c | lp->tx_unit_busy = 0; |
lp | 369 | drivers/net/atp.c | lp->pac_cnt_in_tx_buf = 0; |
lp | 370 | drivers/net/atp.c | lp->saved_tx_size = 0; |
lp | 416 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 428 | drivers/net/atp.c | lp->stats.tx_errors++; |
lp | 462 | drivers/net/atp.c | lp->pac_cnt_in_tx_buf++; |
lp | 463 | drivers/net/atp.c | if (lp->tx_unit_busy == 0) { |
lp | 465 | drivers/net/atp.c | lp->saved_tx_size = 0; /* Redundant */ |
lp | 466 | drivers/net/atp.c | lp->re_tx = 0; |
lp | 467 | drivers/net/atp.c | lp->tx_unit_busy = 1; |
lp | 469 | drivers/net/atp.c | lp->saved_tx_size = length; |
lp | 488 | drivers/net/atp.c | struct net_local *lp; |
lp | 499 | drivers/net/atp.c | lp = (struct net_local *)dev->priv; |
lp | 522 | drivers/net/atp.c | lp->stats.rx_over_errors++; |
lp | 528 | drivers/net/atp.c | write_reg_high(ioaddr, CMR2, lp->addr_mode); |
lp | 542 | drivers/net/atp.c | lp->stats.collisions++; |
lp | 543 | drivers/net/atp.c | if (++lp->re_tx > 15) { |
lp | 544 | drivers/net/atp.c | lp->stats.tx_aborted_errors++; |
lp | 553 | drivers/net/atp.c | lp->stats.tx_packets++; |
lp | 554 | drivers/net/atp.c | lp->pac_cnt_in_tx_buf--; |
lp | 555 | drivers/net/atp.c | if ( lp->saved_tx_size) { |
lp | 556 | drivers/net/atp.c | trigger_send(ioaddr, lp->saved_tx_size); |
lp | 557 | drivers/net/atp.c | lp->saved_tx_size = 0; |
lp | 558 | drivers/net/atp.c | lp->re_tx = 0; |
lp | 560 | drivers/net/atp.c | lp->tx_unit_busy = 0; |
lp | 572 | drivers/net/atp.c | lp->stats.rx_missed_errors++; |
lp | 622 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)atp_timed_dev->priv; |
lp | 625 | drivers/net/atp.c | lp->stats.tx_errors++; |
lp | 627 | drivers/net/atp.c | lp->stats.tx_dropped++; |
lp | 629 | drivers/net/atp.c | lp->stats.collisions++; |
lp | 631 | drivers/net/atp.c | lp->stats.rx_errors++; |
lp | 646 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 661 | drivers/net/atp.c | lp->stats.rx_errors++; |
lp | 676 | drivers/net/atp.c | lp->stats.rx_dropped++; |
lp | 694 | drivers/net/atp.c | lp->stats.rx_packets++; |
lp | 725 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 732 | drivers/net/atp.c | lp->addr_mode = CMR2h_OFF; |
lp | 751 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 752 | drivers/net/atp.c | return &lp->stats; |
lp | 764 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 766 | drivers/net/atp.c | lp->addr_mode = num_addrs ? CMR2h_PROMISC : CMR2h_Normal; |
lp | 767 | drivers/net/atp.c | write_reg_high(ioaddr, CMR2, lp->addr_mode); |
lp | 270 | drivers/net/de4x5.c | imr |= lp->irq_en;\ |
lp | 276 | drivers/net/de4x5.c | imr &= ~lp->irq_en;\ |
lp | 281 | drivers/net/de4x5.c | imr |= lp->irq_mask;\ |
lp | 287 | drivers/net/de4x5.c | imr &= ~lp->irq_mask;\ |
lp | 397 | drivers/net/de4x5.c | #define TX_BUFFS_AVAIL ((lp->tx_old<=lp->tx_new)?\ |
lp | 398 | drivers/net/de4x5.c | lp->tx_old+lp->txRingSize-lp->tx_new-1:\ |
lp | 399 | drivers/net/de4x5.c | lp->tx_old -lp->tx_new-1) |
lp | 532 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 537 | drivers/net/de4x5.c | if (lp->chipset == DC21041) { |
lp | 548 | drivers/net/de4x5.c | if (lp->bus == PCI) { |
lp | 550 | drivers/net/de4x5.c | if ((lp->chipset == DC21040) || (lp->chipset == DC21041)) { |
lp | 552 | drivers/net/de4x5.c | } else if (lp->chipset == DC21140) { |
lp | 564 | drivers/net/de4x5.c | if (lp->bus == EISA) { |
lp | 569 | drivers/net/de4x5.c | iobase, lp->bus_num, lp->device); |
lp | 579 | drivers/net/de4x5.c | tmpbus = lp->bus; |
lp | 580 | drivers/net/de4x5.c | tmpchs = lp->chipset; |
lp | 583 | drivers/net/de4x5.c | struct de4x5_private *lp; |
lp | 595 | drivers/net/de4x5.c | lp = (struct de4x5_private *)dev->priv; |
lp | 597 | drivers/net/de4x5.c | lp->bus = tmpbus; |
lp | 598 | drivers/net/de4x5.c | lp->chipset = tmpchs; |
lp | 604 | drivers/net/de4x5.c | lp->autosense = AUTO; |
lp | 606 | drivers/net/de4x5.c | if (lp->chipset != DC21140) { |
lp | 607 | drivers/net/de4x5.c | if ((lp->chipset == DC21040) && (de4x5_autosense & TP_NW)) { |
lp | 610 | drivers/net/de4x5.c | if ((lp->chipset == DC21041) && (de4x5_autosense & BNC_AUI)) { |
lp | 613 | drivers/net/de4x5.c | lp->autosense = de4x5_autosense & 0x001f; |
lp | 615 | drivers/net/de4x5.c | lp->autosense = de4x5_autosense & 0x00c0; |
lp | 619 | drivers/net/de4x5.c | sprintf(lp->adapter_name,"%s (%s)", name, dev->name); |
lp | 620 | drivers/net/de4x5.c | request_region(iobase, (lp->bus == PCI ? DE4X5_PCI_TOTAL_SIZE : |
lp | 622 | drivers/net/de4x5.c | lp->adapter_name); |
lp | 634 | drivers/net/de4x5.c | lp->rx_ring[i].status = 0; |
lp | 635 | drivers/net/de4x5.c | lp->rx_ring[i].des1 = RX_BUFF_SZ; |
lp | 636 | drivers/net/de4x5.c | lp->rx_ring[i].buf = virt_to_bus(tmp + i * RX_BUFF_SZ); |
lp | 637 | drivers/net/de4x5.c | lp->rx_ring[i].next = (u32)NULL; |
lp | 644 | drivers/net/de4x5.c | lp->rxRingSize = NUM_RX_DESC; |
lp | 645 | drivers/net/de4x5.c | lp->txRingSize = NUM_TX_DESC; |
lp | 648 | drivers/net/de4x5.c | lp->rx_ring[lp->rxRingSize - 1].des1 |= RD_RER; |
lp | 649 | drivers/net/de4x5.c | lp->tx_ring[lp->txRingSize - 1].des1 |= TD_TER; |
lp | 652 | drivers/net/de4x5.c | outl(virt_to_bus(lp->rx_ring), DE4X5_RRBA); |
lp | 653 | drivers/net/de4x5.c | outl(virt_to_bus(lp->tx_ring), DE4X5_TRBA); |
lp | 656 | drivers/net/de4x5.c | lp->irq_mask = IMR_RIM | IMR_TIM | IMR_TUM ; |
lp | 657 | drivers/net/de4x5.c | lp->irq_en = IMR_NIM | IMR_AIM; |
lp | 659 | drivers/net/de4x5.c | lp->tx_enable = TRUE; |
lp | 700 | drivers/net/de4x5.c | if (status) release_region(iobase, (lp->bus == PCI ? |
lp | 735 | drivers/net/de4x5.c | if (lp->chipset == DC21041) { |
lp | 740 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 741 | drivers/net/de4x5.c | if (lp) { |
lp | 742 | drivers/net/de4x5.c | kfree_s(bus_to_virt(lp->rx_ring[0].buf), |
lp | 758 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 766 | drivers/net/de4x5.c | if (lp->chipset == DC21041) { |
lp | 771 | drivers/net/de4x5.c | if (request_irq(dev->irq, (void *)de4x5_interrupt, 0, lp->adapter_name)) { |
lp | 790 | drivers/net/de4x5.c | printk("\t0x%8.8lx 0x%8.8lx\n",(u_long)lp->rx_ring,(u_long)lp->tx_ring); |
lp | 792 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize-1;i++){ |
lp | 794 | drivers/net/de4x5.c | printk("0x%8.8lx ",(u_long)&lp->rx_ring[i].status); |
lp | 797 | drivers/net/de4x5.c | printk("...0x%8.8lx\n",(u_long)&lp->rx_ring[i].status); |
lp | 799 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize-1;i++){ |
lp | 801 | drivers/net/de4x5.c | printk("0x%8.8lx ", (u_long)&lp->tx_ring[i].status); |
lp | 804 | drivers/net/de4x5.c | printk("...0x%8.8lx\n", (u_long)&lp->tx_ring[i].status); |
lp | 806 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize-1;i++){ |
lp | 808 | drivers/net/de4x5.c | printk("0x%8.8x ",lp->rx_ring[i].buf); |
lp | 811 | drivers/net/de4x5.c | printk("...0x%8.8x\n",lp->rx_ring[i].buf); |
lp | 813 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize-1;i++){ |
lp | 815 | drivers/net/de4x5.c | printk("0x%8.8x ", lp->tx_ring[i].buf); |
lp | 818 | drivers/net/de4x5.c | printk("...0x%8.8x\n", lp->tx_ring[i].buf); |
lp | 820 | drivers/net/de4x5.c | (short)lp->rxRingSize, |
lp | 821 | drivers/net/de4x5.c | (short)lp->txRingSize); |
lp | 871 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 885 | drivers/net/de4x5.c | if (lp->chipset != DC21140) { |
lp | 887 | drivers/net/de4x5.c | lp->setup_f = HASH_PERF; |
lp | 890 | drivers/net/de4x5.c | lp->setup_f = PERFECT; |
lp | 892 | drivers/net/de4x5.c | outl(virt_to_bus(lp->rx_ring), DE4X5_RRBA); |
lp | 893 | drivers/net/de4x5.c | outl(virt_to_bus(lp->tx_ring), DE4X5_TRBA); |
lp | 895 | drivers/net/de4x5.c | lp->rx_new = lp->rx_old = 0; |
lp | 896 | drivers/net/de4x5.c | lp->tx_new = lp->tx_old = 0; |
lp | 898 | drivers/net/de4x5.c | for (i = 0; i < lp->rxRingSize; i++) { |
lp | 899 | drivers/net/de4x5.c | lp->rx_ring[i].status = R_OWN; |
lp | 902 | drivers/net/de4x5.c | for (i = 0; i < lp->txRingSize; i++) { |
lp | 903 | drivers/net/de4x5.c | lp->tx_ring[i].status = 0; |
lp | 911 | drivers/net/de4x5.c | if (lp->chipset != DC21140) { |
lp | 912 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, HASH_F|TD_SET|SETUP_FRAME_LEN, NULL); |
lp | 914 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, PERFECT_F|TD_SET|SETUP_FRAME_LEN, NULL); |
lp | 920 | drivers/net/de4x5.c | if (lp->tx_ring[lp->tx_new].status >= 0) j=1; |
lp | 930 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
lp | 931 | drivers/net/de4x5.c | lp->tx_old = lp->tx_new; |
lp | 947 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 969 | drivers/net/de4x5.c | if (dev->tbusy || (lp->lostMedia > LOST_MEDIA_THRESHOLD)) { |
lp | 972 | drivers/net/de4x5.c | (lp->lostMedia <= LOST_MEDIA_THRESHOLD)) { |
lp | 976 | drivers/net/de4x5.c | printk("%s: transmit timed out, status %08x, tbusy:%ld, lostMedia:%d tickssofar:%ld, resetting.\n",dev->name, inl(DE4X5_STS), dev->tbusy, lp->lostMedia, tickssofar); |
lp | 983 | drivers/net/de4x5.c | for (i=lp->tx_old; i!=lp->tx_new; i=(++i)%lp->txRingSize) { |
lp | 984 | drivers/net/de4x5.c | if (lp->skb[i] != NULL) { |
lp | 985 | drivers/net/de4x5.c | if (lp->skb[i]->len != FAKE_FRAME_LEN) { |
lp | 986 | drivers/net/de4x5.c | if (lp->tx_ring[i].status == T_OWN) { |
lp | 987 | drivers/net/de4x5.c | dev_queue_xmit(lp->skb[i], dev, SOPRI_NORMAL); |
lp | 989 | drivers/net/de4x5.c | dev_kfree_skb(lp->skb[i], FREE_WRITE); |
lp | 992 | drivers/net/de4x5.c | dev_kfree_skb(lp->skb[i], FREE_WRITE); |
lp | 994 | drivers/net/de4x5.c | lp->skb[i] = NULL; |
lp | 1043 | drivers/net/de4x5.c | if (lp->tx_enable) { |
lp | 1047 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; /* Ensure a wrap */ |
lp | 1078 | drivers/net/de4x5.c | struct de4x5_private *lp; |
lp | 1085 | drivers/net/de4x5.c | lp = (struct de4x5_private *)dev->priv; |
lp | 1094 | drivers/net/de4x5.c | while ((sts = inl(DE4X5_STS)) & lp->irq_mask) { /* Read IRQ status */ |
lp | 1107 | drivers/net/de4x5.c | lp->lostMedia = LOST_MEDIA_THRESHOLD + 1; |
lp | 1108 | drivers/net/de4x5.c | lp->irq_mask &= ~IMR_LFM; |
lp | 1134 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1139 | drivers/net/de4x5.c | for (entry = lp->rx_new; lp->rx_ring[entry].status >= 0;entry = lp->rx_new) { |
lp | 1140 | drivers/net/de4x5.c | status = lp->rx_ring[entry].status; |
lp | 1143 | drivers/net/de4x5.c | lp->rx_old = entry; |
lp | 1148 | drivers/net/de4x5.c | lp->stats.rx_errors++; /* Update the error stats. */ |
lp | 1149 | drivers/net/de4x5.c | if (status & (RD_RF | RD_TL)) lp->stats.rx_frame_errors++; |
lp | 1150 | drivers/net/de4x5.c | if (status & RD_CE) lp->stats.rx_crc_errors++; |
lp | 1151 | drivers/net/de4x5.c | if (status & RD_OF) lp->stats.rx_fifo_errors++; |
lp | 1154 | drivers/net/de4x5.c | short pkt_len = (short)(lp->rx_ring[entry].status >> 16) - 4; |
lp | 1160 | drivers/net/de4x5.c | if (entry < lp->rx_old) { /* Wrapped buffer */ |
lp | 1161 | drivers/net/de4x5.c | short len = (lp->rxRingSize - lp->rx_old) * RX_BUFF_SZ; |
lp | 1162 | drivers/net/de4x5.c | memcpy(skb_put(skb,len), bus_to_virt(lp->rx_ring[lp->rx_old].buf), len); |
lp | 1163 | drivers/net/de4x5.c | memcpy(skb_put(skb,pkt_len-len), bus_to_virt(lp->rx_ring[0].buf), pkt_len - len); |
lp | 1165 | drivers/net/de4x5.c | memcpy(skb_put(skb,pkt_len), bus_to_virt(lp->rx_ring[lp->rx_old].buf), pkt_len); |
lp | 1173 | drivers/net/de4x5.c | lp->stats.rx_packets++; |
lp | 1176 | drivers/net/de4x5.c | lp->pktStats.bins[i]++; |
lp | 1183 | drivers/net/de4x5.c | lp->pktStats.broadcast++; |
lp | 1185 | drivers/net/de4x5.c | lp->pktStats.multicast++; |
lp | 1189 | drivers/net/de4x5.c | lp->pktStats.unicast++; |
lp | 1192 | drivers/net/de4x5.c | lp->pktStats.bins[0]++; /* Duplicates stats.rx_packets */ |
lp | 1193 | drivers/net/de4x5.c | if (lp->pktStats.bins[0] == 0) { /* Reset counters */ |
lp | 1194 | drivers/net/de4x5.c | memset((char *)&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 1198 | drivers/net/de4x5.c | lp->stats.rx_dropped++; /* Really, deferred. */ |
lp | 1204 | drivers/net/de4x5.c | for (; lp->rx_old!=entry; lp->rx_old=(++lp->rx_old)%lp->rxRingSize) { |
lp | 1205 | drivers/net/de4x5.c | lp->rx_ring[lp->rx_old].status = R_OWN; |
lp | 1208 | drivers/net/de4x5.c | lp->rx_ring[entry].status = R_OWN; |
lp | 1215 | drivers/net/de4x5.c | lp->rx_new = (++lp->rx_new) % lp->rxRingSize; |
lp | 1227 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1232 | drivers/net/de4x5.c | for (entry = lp->tx_old; entry != lp->tx_new; entry = lp->tx_old) { |
lp | 1233 | drivers/net/de4x5.c | status = lp->tx_ring[entry].status; |
lp | 1237 | drivers/net/de4x5.c | lp->stats.tx_errors++; |
lp | 1238 | drivers/net/de4x5.c | if (status & TD_NC) lp->stats.tx_carrier_errors++; |
lp | 1239 | drivers/net/de4x5.c | if (status & TD_LC) lp->stats.tx_window_errors++; |
lp | 1240 | drivers/net/de4x5.c | if (status & TD_UF) lp->stats.tx_fifo_errors++; |
lp | 1241 | drivers/net/de4x5.c | if (status & TD_LC) lp->stats.collisions++; |
lp | 1242 | drivers/net/de4x5.c | if (status & TD_EC) lp->pktStats.excessive_collisions++; |
lp | 1243 | drivers/net/de4x5.c | if (status & TD_DE) lp->stats.tx_aborted_errors++; |
lp | 1247 | drivers/net/de4x5.c | lp->lostMedia++; |
lp | 1248 | drivers/net/de4x5.c | if (lp->lostMedia > LOST_MEDIA_THRESHOLD) { /* Trip autosense */ |
lp | 1255 | drivers/net/de4x5.c | lp->stats.tx_packets++; |
lp | 1256 | drivers/net/de4x5.c | lp->lostMedia = 0; /* Remove transient problem */ |
lp | 1259 | drivers/net/de4x5.c | if (lp->skb[entry] != NULL) { |
lp | 1260 | drivers/net/de4x5.c | dev_kfree_skb(lp->skb[entry], FREE_WRITE); |
lp | 1261 | drivers/net/de4x5.c | lp->skb[entry] = NULL; |
lp | 1265 | drivers/net/de4x5.c | lp->tx_old = (++lp->tx_old) % lp->txRingSize; |
lp | 1274 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1280 | drivers/net/de4x5.c | if (lp->chipset == DC21140) { |
lp | 1282 | drivers/net/de4x5.c | if (((lp->media == _100Mb) && (gep & GEP_SLNK)) || |
lp | 1283 | drivers/net/de4x5.c | ((lp->media == _10Mb) && (gep & GEP_LNP)) || |
lp | 1284 | drivers/net/de4x5.c | ((lp->media == _10Mb) && !(gep & GEP_SLNK)) || |
lp | 1285 | drivers/net/de4x5.c | (lp->media == NC)) { |
lp | 1286 | drivers/net/de4x5.c | if (lp->linkProb || ((lp->media == NC) && (!(gep & GEP_LNP)))) { |
lp | 1287 | drivers/net/de4x5.c | lp->lostMedia = LOST_MEDIA_THRESHOLD + 1; |
lp | 1288 | drivers/net/de4x5.c | lp->linkProb = 0; |
lp | 1291 | drivers/net/de4x5.c | switch(lp->media) { |
lp | 1293 | drivers/net/de4x5.c | lp->linkProb = 0; |
lp | 1298 | drivers/net/de4x5.c | lp->linkProb = 1; /* Flag a potential problem */ |
lp | 1303 | drivers/net/de4x5.c | lp->linkProb = 1; /* Flag a potential problem */ |
lp | 1309 | drivers/net/de4x5.c | lp->linkProb = 0; /* Link OK */ |
lp | 1320 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1348 | drivers/net/de4x5.c | if (lp->chipset == DC21041) { |
lp | 1359 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1362 | drivers/net/de4x5.c | lp->stats.rx_missed_errors = (int) (inl(DE4X5_MFC) & (MFC_OVFL | MFC_CNTR)); |
lp | 1364 | drivers/net/de4x5.c | return &lp->stats; |
lp | 1369 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1371 | drivers/net/de4x5.c | lp->tx_ring[lp->tx_new].buf = virt_to_bus(buf); |
lp | 1372 | drivers/net/de4x5.c | lp->tx_ring[lp->tx_new].des1 &= TD_TER; |
lp | 1373 | drivers/net/de4x5.c | lp->tx_ring[lp->tx_new].des1 |= flags; |
lp | 1374 | drivers/net/de4x5.c | lp->skb[lp->tx_new] = skb; |
lp | 1376 | drivers/net/de4x5.c | lp->tx_ring[lp->tx_new].status = T_OWN; |
lp | 1394 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1401 | drivers/net/de4x5.c | if (lp->setup_f == HASH_PERF) { |
lp | 1402 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | HASH_F | TD_SET | |
lp | 1405 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | |
lp | 1409 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
lp | 1425 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1435 | drivers/net/de4x5.c | if (lp->setup_f == HASH_PERF) { |
lp | 1459 | drivers/net/de4x5.c | lp->setup_frame[byte] |= bit; |
lp | 1490 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 1496 | drivers/net/de4x5.c | lp->bus = EISA; |
lp | 1514 | drivers/net/de4x5.c | lp->bus = EISA; |
lp | 1515 | drivers/net/de4x5.c | lp->chipset = device; |
lp | 1561 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 1566 | drivers/net/de4x5.c | lp->bus = PCI; |
lp | 1586 | drivers/net/de4x5.c | lp->device = dev_num; |
lp | 1587 | drivers/net/de4x5.c | lp->bus_num = pb; |
lp | 1590 | drivers/net/de4x5.c | lp->chipset = device; |
lp | 1749 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1752 | drivers/net/de4x5.c | lp->tx_enable = YES; |
lp | 1754 | drivers/net/de4x5.c | if (lp->chipset != DC21140) { |
lp | 1761 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 1762 | drivers/net/de4x5.c | lp->media = (lp->autosense == AUTO ? TP : lp->autosense); |
lp | 1764 | drivers/net/de4x5.c | } else if (lp->chipset == DC21041) { |
lp | 1765 | drivers/net/de4x5.c | lp->media = (lp->autosense == AUTO ? TP_NW : lp->autosense); |
lp | 1767 | drivers/net/de4x5.c | } else if (lp->chipset == DC21140) { |
lp | 1769 | drivers/net/de4x5.c | lp->media = (lp->autosense == AUTO ? _10Mb : lp->autosense); |
lp | 1774 | drivers/net/de4x5.c | if (lp->chipset != DC21140) { |
lp | 1775 | drivers/net/de4x5.c | printk("media is %s\n", (lp->media == NC ? "unconnected!" : |
lp | 1776 | drivers/net/de4x5.c | (lp->media == TP ? "TP." : |
lp | 1777 | drivers/net/de4x5.c | (lp->media == ANS ? "TP/Nway." : |
lp | 1778 | drivers/net/de4x5.c | (lp->media == BNC ? "BNC." : |
lp | 1779 | drivers/net/de4x5.c | (lp->media == AUI ? "AUI." : |
lp | 1783 | drivers/net/de4x5.c | printk("mode is %s\n",(lp->media == NC ? "link down.": |
lp | 1784 | drivers/net/de4x5.c | (lp->media == _100Mb ? "100Mb/s." : |
lp | 1785 | drivers/net/de4x5.c | (lp->media == _10Mb ? "10Mb/s." : |
lp | 1791 | drivers/net/de4x5.c | if (lp->media) { |
lp | 1792 | drivers/net/de4x5.c | lp->lostMedia = 0; |
lp | 1794 | drivers/net/de4x5.c | if ((lp->media == TP) || (lp->media == ANS)) { |
lp | 1795 | drivers/net/de4x5.c | lp->irq_mask |= IMR_LFM; |
lp | 1800 | drivers/net/de4x5.c | return (lp->media); |
lp | 1805 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1810 | drivers/net/de4x5.c | switch (lp->media) { |
lp | 1817 | drivers/net/de4x5.c | if (linkBad && (lp->autosense == AUTO)) { |
lp | 1818 | drivers/net/de4x5.c | lp->media = BNC_AUI; |
lp | 1829 | drivers/net/de4x5.c | if (linkBad && (lp->autosense == AUTO)) { |
lp | 1830 | drivers/net/de4x5.c | lp->media = NC; |
lp | 1856 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1860 | drivers/net/de4x5.c | switch (lp->media) { |
lp | 1868 | drivers/net/de4x5.c | lp->media = ANS; |
lp | 1870 | drivers/net/de4x5.c | lp->media = AUI; |
lp | 1879 | drivers/net/de4x5.c | if (!(sts & STS_LNP) && (lp->autosense == AUTO)) { |
lp | 1880 | drivers/net/de4x5.c | lp->media = TP; |
lp | 1891 | drivers/net/de4x5.c | if (!(sts & STS_LNP) && (lp->autosense == AUTO)) { |
lp | 1893 | drivers/net/de4x5.c | lp->media = AUI; |
lp | 1895 | drivers/net/de4x5.c | lp->media = BNC; |
lp | 1907 | drivers/net/de4x5.c | if (!(inl(DE4X5_SISR) & SISR_SRA) && (lp->autosense == AUTO)) { |
lp | 1908 | drivers/net/de4x5.c | lp->media = BNC; |
lp | 1919 | drivers/net/de4x5.c | if (!(inl(DE4X5_SISR) & SISR_SRA) && (lp->autosense == AUTO)) { |
lp | 1920 | drivers/net/de4x5.c | lp->media = NC; |
lp | 1922 | drivers/net/de4x5.c | if (ping_media(dev)) lp->media = NC; |
lp | 1941 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1945 | drivers/net/de4x5.c | switch(lp->media) { |
lp | 1967 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2019 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2027 | drivers/net/de4x5.c | entry = lp->tx_new; /* Remember the ring position */ |
lp | 2033 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
lp | 2034 | drivers/net/de4x5.c | lp->tx_old = lp->tx_new; |
lp | 2039 | drivers/net/de4x5.c | if (lp->tx_ring[entry].status >= 0) linkBad=0; |
lp | 2044 | drivers/net/de4x5.c | return ((linkBad || (lp->tx_ring[entry].status & TD_ES)) ? 1 : 0); |
lp | 2053 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2080 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2096 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2100 | drivers/net/de4x5.c | if (lp->chipset == DC21140) { |
lp | 2218 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 2224 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 2226 | drivers/net/de4x5.c | if (lp->bus == PCI) { |
lp | 2248 | drivers/net/de4x5.c | short *p = (short *)&lp->srom; |
lp | 2262 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 2268 | drivers/net/de4x5.c | if (lp->bus == PCI) { |
lp | 2269 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 2277 | drivers/net/de4x5.c | dev->dev_addr[i] = (u_char) lp->srom.ieee_addr[i]; i++; |
lp | 2278 | drivers/net/de4x5.c | dev->dev_addr[i] = (u_char) lp->srom.ieee_addr[i]; i++; |
lp | 2291 | drivers/net/de4x5.c | if (lp->bus == PCI) { |
lp | 2292 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 2415 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2417 | drivers/net/de4x5.c | char *pa = lp->setup_frame; |
lp | 2421 | drivers/net/de4x5.c | memset(lp->setup_frame, 0, SETUP_FRAME_LEN); |
lp | 2424 | drivers/net/de4x5.c | if (lp->setup_f == HASH_PERF) { |
lp | 2425 | drivers/net/de4x5.c | for (pa=lp->setup_frame+IMPERF_PA_OFFSET, i=0; i<ETH_ALEN; i++) { |
lp | 2429 | drivers/net/de4x5.c | *(lp->setup_frame + (HASH_TABLE_LEN >> 3) - 3) = 0x80; /* B'cast address */ |
lp | 2446 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2449 | drivers/net/de4x5.c | lp->irq_mask |= IMR_TMM; |
lp | 2450 | drivers/net/de4x5.c | outl(lp->irq_mask, DE4X5_IMR); |
lp | 2458 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2461 | drivers/net/de4x5.c | lp->irq_mask &= ~IMR_TMM; |
lp | 2462 | drivers/net/de4x5.c | outl(lp->irq_mask, DE4X5_IMR); |
lp | 2488 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2526 | drivers/net/de4x5.c | if (lp->setup_f == HASH_PERF) { |
lp | 2527 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | HASH_F | TD_SET | |
lp | 2530 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | |
lp | 2533 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
lp | 2567 | drivers/net/de4x5.c | memcpy_tofs(ioc->data, lp->setup_frame, ioc->len); |
lp | 2604 | drivers/net/de4x5.c | ioc->len = sizeof(lp->pktStats); |
lp | 2610 | drivers/net/de4x5.c | memcpy_tofs(ioc->data, &lp->pktStats, ioc->len); |
lp | 2617 | drivers/net/de4x5.c | memset(&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 2666 | drivers/net/de4x5.c | tmp.addr[j++] = lp->rxRingSize; |
lp | 2667 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)lp->rx_ring; j+=4; |
lp | 2668 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)lp->tx_ring; j+=4; |
lp | 2670 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize-1;i++){ |
lp | 2672 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)&lp->rx_ring[i].status; j+=4; |
lp | 2675 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)&lp->rx_ring[i].status; j+=4; |
lp | 2676 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize-1;i++){ |
lp | 2678 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)&lp->tx_ring[i].status; j+=4; |
lp | 2681 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)&lp->tx_ring[i].status; j+=4; |
lp | 2683 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize-1;i++){ |
lp | 2685 | drivers/net/de4x5.c | tmp.lval[j>>2] = (s32)lp->rx_ring[i].buf; j+=4; |
lp | 2688 | drivers/net/de4x5.c | tmp.lval[j>>2] = (s32)lp->rx_ring[i].buf; j+=4; |
lp | 2689 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize-1;i++){ |
lp | 2691 | drivers/net/de4x5.c | tmp.lval[j>>2] = (s32)lp->tx_ring[i].buf; j+=4; |
lp | 2694 | drivers/net/de4x5.c | tmp.lval[j>>2] = (s32)lp->tx_ring[i].buf; j+=4; |
lp | 2696 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize;i++){ |
lp | 2697 | drivers/net/de4x5.c | tmp.lval[j>>2] = lp->rx_ring[i].status; j+=4; |
lp | 2699 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize;i++){ |
lp | 2700 | drivers/net/de4x5.c | tmp.lval[j>>2] = lp->tx_ring[i].status; j+=4; |
lp | 2712 | drivers/net/de4x5.c | tmp.addr[j++] = lp->txRingSize; |
lp | 2752 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *) thisDE4X5.priv; |
lp | 2757 | drivers/net/de4x5.c | if (lp) { |
lp | 2758 | drivers/net/de4x5.c | kfree_s(bus_to_virt(lp->rx_ring[0].buf), RX_BUFF_SZ * NUM_RX_DESC + ALIGN); |
lp | 2763 | drivers/net/de4x5.c | release_region(thisDE4X5.base_addr, (lp->bus == PCI ? |
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_DDR iobase+(0x050 << lp->bus) /* Data Diagnostic Register */ |
lp | 29 | drivers/net/de4x5.h | #define DE4X5_FDR iobase+(0x058 << lp->bus) /* Full Duplex Register */ |
lp | 30 | drivers/net/de4x5.h | #define DE4X5_GPT iobase+(0x058 << lp->bus) /* General Purpose Timer Reg.*/ |
lp | 31 | drivers/net/de4x5.h | #define DE4X5_GEP iobase+(0x060 << lp->bus) /* General Purpose Register */ |
lp | 32 | drivers/net/de4x5.h | #define DE4X5_SISR iobase+(0x060 << lp->bus) /* SIA Status Register */ |
lp | 33 | drivers/net/de4x5.h | #define DE4X5_SICR iobase+(0x068 << lp->bus) /* SIA Connectivity Register */ |
lp | 34 | drivers/net/de4x5.h | #define DE4X5_STRR iobase+(0x070 << lp->bus) /* SIA TX/RX Register */ |
lp | 35 | drivers/net/de4x5.h | #define DE4X5_SIGR iobase+(0x078 << lp->bus) /* SIA General Register */ |
lp | 360 | drivers/net/depca.c | #define TX_BUFFS_AVAIL ((lp->tx_old<=lp->tx_new)?\ |
lp | 361 | drivers/net/depca.c | lp->tx_old+lp->txRingMask-lp->tx_new:\ |
lp | 362 | drivers/net/depca.c | lp->tx_old -lp->tx_new-1) |
lp | 452 | drivers/net/depca.c | struct depca_private *lp; |
lp | 514 | drivers/net/depca.c | lp = (struct depca_private *)dev->priv; |
lp | 516 | drivers/net/depca.c | lp->adapter = adapter; |
lp | 517 | drivers/net/depca.c | sprintf(lp->adapter_name,"%s (%s)", name, dev->name); |
lp | 518 | drivers/net/depca.c | request_region(ioaddr, DEPCA_TOTAL_SIZE, lp->adapter_name); |
lp | 521 | drivers/net/depca.c | lp->sh_mem = mem_start; |
lp | 526 | drivers/net/depca.c | lp->rx_ring = (struct depca_rx_desc *)mem_start; |
lp | 529 | drivers/net/depca.c | lp->tx_ring = (struct depca_tx_desc *)mem_start; |
lp | 532 | drivers/net/depca.c | lp->bus_offset = mem_start & 0x00ff0000; |
lp | 535 | drivers/net/depca.c | lp->dma_buffs = mem_start; |
lp | 538 | drivers/net/depca.c | lp->rxRingMask = NUM_RX_DESC - 1; |
lp | 539 | drivers/net/depca.c | lp->txRingMask = NUM_TX_DESC - 1; |
lp | 542 | drivers/net/depca.c | for (i=0, j = lp->rxRingMask; j>0; i++) { |
lp | 545 | drivers/net/depca.c | lp->rx_rlen = (s32)(i << 29); |
lp | 546 | drivers/net/depca.c | for (i=0, j = lp->txRingMask; j>0; i++) { |
lp | 549 | drivers/net/depca.c | lp->tx_rlen = (s32)(i << 29); |
lp | 569 | drivers/net/depca.c | switch (lp->adapter) { |
lp | 655 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 659 | drivers/net/depca.c | struct depca_init *p = (struct depca_init *)lp->sh_mem; |
lp | 661 | drivers/net/depca.c | if (request_irq(dev->irq, &depca_interrupt, 0, lp->adapter_name)) { |
lp | 682 | drivers/net/depca.c | memcpy_toio((char *)lp->sh_mem, &lp->init_block, sizeof(struct depca_init)); |
lp | 686 | drivers/net/depca.c | printk("\t0x%lx 0x%lx\n",(u_long)lp->rx_ring, (u_long)lp->tx_ring); |
lp | 688 | drivers/net/depca.c | for (i=0;i<lp->rxRingMask;i++){ |
lp | 690 | drivers/net/depca.c | printk("0x%8.8lx ", (long) &lp->rx_ring[i].base); |
lp | 693 | drivers/net/depca.c | printk("...0x%8.8lx\n", (long) &lp->rx_ring[i].base); |
lp | 695 | drivers/net/depca.c | for (i=0;i<lp->txRingMask;i++){ |
lp | 697 | drivers/net/depca.c | printk("0x%8.8lx ", (long) &lp->tx_ring[i].base); |
lp | 700 | drivers/net/depca.c | printk("...0x%8.8lx\n", (long) &lp->tx_ring[i].base); |
lp | 702 | drivers/net/depca.c | for (i=0;i<lp->rxRingMask;i++){ |
lp | 704 | drivers/net/depca.c | printk("0x%8.8x ", readl(&lp->rx_ring[i].base)); |
lp | 707 | drivers/net/depca.c | printk("...0x%8.8x\n", readl(&lp->rx_ring[i].base)); |
lp | 709 | drivers/net/depca.c | for (i=0;i<lp->txRingMask;i++){ |
lp | 711 | drivers/net/depca.c | printk("0x%8.8x ", readl(&lp->tx_ring[i].base)); |
lp | 714 | drivers/net/depca.c | printk("...0x%8.8x\n", readl(&lp->tx_ring[i].base)); |
lp | 716 | drivers/net/depca.c | printk("Initialisation block at 0x%8.8lx\n",lp->sh_mem); |
lp | 730 | drivers/net/depca.c | printk("dma_buffs: 0x%8.8lx\n",lp->dma_buffs); |
lp | 732 | drivers/net/depca.c | (int)lp->rxRingMask + 1, |
lp | 733 | drivers/net/depca.c | lp->rx_rlen); |
lp | 735 | drivers/net/depca.c | (int)lp->txRingMask + 1, |
lp | 736 | drivers/net/depca.c | lp->tx_rlen); |
lp | 770 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 777 | drivers/net/depca.c | lp->rx_new = lp->tx_new = 0; |
lp | 778 | drivers/net/depca.c | lp->rx_old = lp->tx_old = 0; |
lp | 781 | drivers/net/depca.c | for (i = 0; i <= lp->rxRingMask; i++) { |
lp | 782 | drivers/net/depca.c | writel((p=lp->dma_buffs+i*RX_BUFF_SZ) | R_OWN, &lp->rx_ring[i].base); |
lp | 783 | drivers/net/depca.c | writew(-RX_BUFF_SZ, &lp->rx_ring[i].buf_length); |
lp | 784 | drivers/net/depca.c | lp->rx_memcpy[i]=(char *)(p+lp->bus_offset); |
lp | 786 | drivers/net/depca.c | for (i = 0; i <= lp->txRingMask; i++) { |
lp | 787 | drivers/net/depca.c | writel((p=lp->dma_buffs+(i+lp->txRingMask+1)*TX_BUFF_SZ) & 0x00ffffff, |
lp | 788 | drivers/net/depca.c | &lp->tx_ring[i].base); |
lp | 789 | drivers/net/depca.c | lp->tx_memcpy[i]=(char *)(p+lp->bus_offset); |
lp | 793 | drivers/net/depca.c | lp->init_block.rx_ring = ((u32)((u_long)lp->rx_ring)&LA_MASK) | lp->rx_rlen; |
lp | 794 | drivers/net/depca.c | lp->init_block.tx_ring = ((u32)((u_long)lp->tx_ring)&LA_MASK) | lp->tx_rlen; |
lp | 799 | drivers/net/depca.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
lp | 802 | drivers/net/depca.c | lp->init_block.mode = 0x0000; /* Enable the Tx and Rx */ |
lp | 813 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 874 | drivers/net/depca.c | struct depca_private *lp; |
lp | 881 | drivers/net/depca.c | lp = (struct depca_private *)dev->priv; |
lp | 924 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 928 | drivers/net/depca.c | for (entry=lp->rx_new; |
lp | 929 | drivers/net/depca.c | !(readl(&lp->rx_ring[entry].base) & R_OWN); |
lp | 930 | drivers/net/depca.c | entry=lp->rx_new){ |
lp | 931 | drivers/net/depca.c | status = readl(&lp->rx_ring[entry].base) >> 16 ; |
lp | 933 | drivers/net/depca.c | lp->rx_old = entry; |
lp | 937 | drivers/net/depca.c | lp->stats.rx_errors++; /* Update the error stats. */ |
lp | 938 | drivers/net/depca.c | if (status & R_FRAM) lp->stats.rx_frame_errors++; |
lp | 939 | drivers/net/depca.c | if (status & R_OFLO) lp->stats.rx_over_errors++; |
lp | 940 | drivers/net/depca.c | if (status & R_CRC) lp->stats.rx_crc_errors++; |
lp | 941 | drivers/net/depca.c | if (status & R_BUFF) lp->stats.rx_fifo_errors++; |
lp | 943 | drivers/net/depca.c | short len, pkt_len = readw(&lp->rx_ring[entry].msg_length); |
lp | 952 | drivers/net/depca.c | if (entry < lp->rx_old) { /* Wrapped buffer */ |
lp | 953 | drivers/net/depca.c | len = (lp->rxRingMask - lp->rx_old + 1) * RX_BUFF_SZ; |
lp | 954 | drivers/net/depca.c | memcpy_fromio(buf, lp->rx_memcpy[lp->rx_old], len); |
lp | 955 | drivers/net/depca.c | memcpy_fromio(buf + len, lp->rx_memcpy[0], pkt_len-len); |
lp | 957 | drivers/net/depca.c | memcpy_fromio(buf, lp->rx_memcpy[lp->rx_old], pkt_len); |
lp | 970 | drivers/net/depca.c | lp->stats.rx_packets++; |
lp | 973 | drivers/net/depca.c | lp->pktStats.bins[i]++; |
lp | 979 | drivers/net/depca.c | lp->pktStats.broadcast++; |
lp | 981 | drivers/net/depca.c | lp->pktStats.multicast++; |
lp | 985 | drivers/net/depca.c | lp->pktStats.unicast++; |
lp | 988 | drivers/net/depca.c | lp->pktStats.bins[0]++; /* Duplicates stats.rx_packets */ |
lp | 989 | drivers/net/depca.c | if (lp->pktStats.bins[0] == 0) { /* Reset counters */ |
lp | 990 | drivers/net/depca.c | memset((char *)&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 994 | drivers/net/depca.c | lp->stats.rx_dropped++; /* Really, deferred. */ |
lp | 999 | drivers/net/depca.c | for (; lp->rx_old!=entry; lp->rx_old=(++lp->rx_old)&lp->rxRingMask) { |
lp | 1000 | drivers/net/depca.c | writel(readl(&lp->rx_ring[lp->rx_old].base) | R_OWN, |
lp | 1001 | drivers/net/depca.c | &lp->rx_ring[lp->rx_old].base); |
lp | 1003 | drivers/net/depca.c | writel(readl(&lp->rx_ring[entry].base) | R_OWN, &lp->rx_ring[entry].base); |
lp | 1009 | drivers/net/depca.c | lp->rx_new = (++lp->rx_new) & lp->rxRingMask; |
lp | 1021 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1026 | drivers/net/depca.c | for (entry = lp->tx_old; entry != lp->tx_new; entry = lp->tx_old) { |
lp | 1027 | drivers/net/depca.c | status = readl(&lp->tx_ring[entry].base) >> 16 ; |
lp | 1032 | drivers/net/depca.c | status = readl(&lp->tx_ring[entry].misc); |
lp | 1033 | drivers/net/depca.c | lp->stats.tx_errors++; |
lp | 1034 | drivers/net/depca.c | if (status & TMD3_RTRY) lp->stats.tx_aborted_errors++; |
lp | 1035 | drivers/net/depca.c | if (status & TMD3_LCAR) lp->stats.tx_carrier_errors++; |
lp | 1036 | drivers/net/depca.c | if (status & TMD3_LCOL) lp->stats.tx_window_errors++; |
lp | 1037 | drivers/net/depca.c | if (status & TMD3_UFLO) lp->stats.tx_fifo_errors++; |
lp | 1044 | drivers/net/depca.c | lp->stats.collisions++; |
lp | 1046 | drivers/net/depca.c | lp->stats.tx_packets++; |
lp | 1050 | drivers/net/depca.c | lp->tx_old = (++lp->tx_old) & lp->txRingMask; |
lp | 1059 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1082 | drivers/net/depca.c | if (lp->adapter != DEPCA) { |
lp | 1101 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1105 | drivers/net/depca.c | outw((u16)(lp->sh_mem & LA_MASK), DEPCA_DATA); |
lp | 1107 | drivers/net/depca.c | outw((u16)((lp->sh_mem & LA_MASK) >> 16), DEPCA_DATA); |
lp | 1118 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1123 | drivers/net/depca.c | memcpy_toio((char *)lp->sh_mem, &lp->init_block, sizeof(struct depca_init)); |
lp | 1136 | drivers/net/depca.c | dev->name, i, lp->sh_mem, inw(DEPCA_DATA)); |
lp | 1140 | drivers/net/depca.c | dev->name, i, lp->sh_mem, inw(DEPCA_DATA)); |
lp | 1150 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1154 | drivers/net/depca.c | return &lp->stats; |
lp | 1167 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1173 | drivers/net/depca.c | while(lp->tx_old != lp->tx_new); /* Wait for the ring to empty */ |
lp | 1180 | drivers/net/depca.c | lp->init_block.mode &= ~PROM; /* Unset promiscuous mode */ |
lp | 1182 | drivers/net/depca.c | lp->init_block.mode |= PROM; /* Set promiscuous mode */ |
lp | 1199 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1206 | drivers/net/depca.c | lp->init_block.mcast_table[i] = (char)0xff; |
lp | 1211 | drivers/net/depca.c | lp->init_block.mcast_table[i]=0; |
lp | 1232 | drivers/net/depca.c | lp->init_block.mcast_table[byte] |= bit; |
lp | 1567 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1570 | drivers/net/depca.c | entry = lp->tx_new; /* Ring around buffer number. */ |
lp | 1571 | drivers/net/depca.c | end = (entry + (skb->len - 1) / TX_BUFF_SZ) & lp->txRingMask; |
lp | 1572 | drivers/net/depca.c | if (!(readl(&lp->tx_ring[end].base) & T_OWN)) {/* Enough room? */ |
lp | 1578 | drivers/net/depca.c | len = (lp->txRingMask - entry + 1) * TX_BUFF_SZ; |
lp | 1579 | drivers/net/depca.c | memcpy_toio(lp->tx_memcpy[entry], skb->data, len); |
lp | 1580 | drivers/net/depca.c | memcpy_toio(lp->tx_memcpy[0], skb->data + len, skb->len - len); |
lp | 1582 | drivers/net/depca.c | memcpy_toio(lp->tx_memcpy[entry], skb->data, skb->len); |
lp | 1587 | drivers/net/depca.c | for (i = entry; i != end; i = (++i) & lp->txRingMask) { |
lp | 1589 | drivers/net/depca.c | writel(readl(&lp->tx_ring[i].base) & ~T_FLAGS, &lp->tx_ring[i].base); |
lp | 1590 | drivers/net/depca.c | writew(0x0000, &lp->tx_ring[i].misc); /* clears other error flags */ |
lp | 1591 | drivers/net/depca.c | writew(-TX_BUFF_SZ, &lp->tx_ring[i].length);/* packet length in buffer */ |
lp | 1595 | drivers/net/depca.c | writel(readl(&lp->tx_ring[end].base) & ~T_FLAGS, &lp->tx_ring[end].base); |
lp | 1596 | drivers/net/depca.c | writew(0x0000, &lp->tx_ring[end].misc); /* clears other error flags */ |
lp | 1597 | drivers/net/depca.c | writew(-len, &lp->tx_ring[end].length); /* packet length in last buff */ |
lp | 1600 | drivers/net/depca.c | writel(readl(&lp->tx_ring[entry].base) | T_STP, &lp->tx_ring[entry].base); |
lp | 1602 | drivers/net/depca.c | writel(readl(&lp->tx_ring[end].base) | T_ENP, &lp->tx_ring[end].base); |
lp | 1606 | drivers/net/depca.c | writel(readl(&lp->tx_ring[i].base) | T_OWN, &lp->tx_ring[i].base); |
lp | 1607 | drivers/net/depca.c | if (i == 0) i=lp->txRingMask+1; |
lp | 1609 | drivers/net/depca.c | writel(readl(&lp->tx_ring[entry].base) | T_OWN, &lp->tx_ring[entry].base); |
lp | 1611 | drivers/net/depca.c | lp->tx_new = (++end) & lp->txRingMask; /* update current pointers */ |
lp | 1659 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
lp | 1689 | drivers/net/depca.c | while(lp->tx_old != lp->tx_new);/* Wait for the ring to empty */ |
lp | 1706 | drivers/net/depca.c | while(lp->tx_old != lp->tx_new); /* Wait for the ring to empty */ |
lp | 1710 | drivers/net/depca.c | lp->init_block.mode |= PROM; /* Set promiscuous mode */ |
lp | 1724 | drivers/net/depca.c | while(lp->tx_old != lp->tx_new); /* Wait for the ring to empty */ |
lp | 1728 | drivers/net/depca.c | lp->init_block.mode &= ~PROM; /* Clear promiscuous mode */ |
lp | 1745 | drivers/net/depca.c | memcpy_tofs(ioc->data, lp->init_block.mcast_table, ioc->len); |
lp | 1782 | drivers/net/depca.c | ioc->len = sizeof(lp->pktStats); |
lp | 1784 | drivers/net/depca.c | memcpy_tofs(ioc->data, &lp->pktStats, ioc->len); |
lp | 1792 | drivers/net/depca.c | memset(&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 1804 | drivers/net/depca.c | memcpy(&tmp.sval[i], &lp->init_block, sizeof(struct depca_init)); |
lp | 509 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 517 | drivers/net/eepro.c | lp->eepro = 1; /* Yes, an Intel EtherExpress Pro/10 */ |
lp | 518 | drivers/net/eepro.c | else lp->eepro = 0; /* No, it is a generic 82585 lan card */ |
lp | 574 | drivers/net/eepro.c | lp->rx_start = (RCV_LOWER_LIMIT << 8) ; |
lp | 585 | drivers/net/eepro.c | lp->tx_start = lp->tx_end = XMT_LOWER_LIMIT << 8; /* or = RCV_RAM */ |
lp | 586 | drivers/net/eepro.c | lp->tx_last = 0; |
lp | 606 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 621 | drivers/net/eepro.c | lp->stats.tx_errors++; |
lp | 629 | drivers/net/eepro.c | lp->tx_start = lp->tx_end = RCV_RAM; |
lp | 630 | drivers/net/eepro.c | lp->tx_last = 0; |
lp | 726 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 743 | drivers/net/eepro.c | lp->tx_start = lp->tx_end = RCV_RAM ; |
lp | 744 | drivers/net/eepro.c | lp->tx_last = 0; |
lp | 780 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 782 | drivers/net/eepro.c | return &lp->stats; |
lp | 794 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 830 | drivers/net/eepro.c | outw(lp->tx_end, ioaddr + HOST_ADDRESS_REG); |
lp | 844 | drivers/net/eepro.c | outw(lp->tx_end, ioaddr + XMT_BAR); |
lp | 848 | drivers/net/eepro.c | i = lp->tx_end + XMT_HEADER + 6*(num_addrs + 1); |
lp | 849 | drivers/net/eepro.c | if (lp->tx_start != lp->tx_end) { |
lp | 852 | drivers/net/eepro.c | outw(lp->tx_last + XMT_CHAIN, ioaddr + HOST_ADDRESS_REG); |
lp | 854 | drivers/net/eepro.c | outw(lp->tx_last + XMT_COUNT, ioaddr + HOST_ADDRESS_REG); |
lp | 857 | drivers/net/eepro.c | lp->tx_end = i ; |
lp | 858 | 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 | 454 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 467 | drivers/net/eexpress.c | lp->stats.tx_errors++; |
lp | 469 | drivers/net/eexpress.c | if (lp->last_restart == lp->stats.tx_packets) { |
lp | 478 | drivers/net/eexpress.c | lp->last_restart = lp->stats.tx_packets; |
lp | 510 | drivers/net/eexpress.c | lp->stats.tx_aborted_errors++; |
lp | 521 | drivers/net/eexpress.c | struct net_local *lp; |
lp | 532 | drivers/net/eexpress.c | lp = (struct net_local *)dev->priv; |
lp | 544 | drivers/net/eexpress.c | while (lp->tx_reap != lp->tx_head) { /* if (status & 0x8000) */ |
lp | 546 | drivers/net/eexpress.c | outw(lp->tx_reap, ioaddr + READ_PTR); |
lp | 549 | drivers/net/eexpress.c | if (net_debug > 5) printk("Couldn't reap %#x.\n", lp->tx_reap); |
lp | 553 | drivers/net/eexpress.c | lp->stats.tx_packets++; |
lp | 554 | drivers/net/eexpress.c | lp->stats.collisions += tx_status & 0xf; |
lp | 558 | drivers/net/eexpress.c | lp->stats.tx_errors++; |
lp | 559 | drivers/net/eexpress.c | if (tx_status & 0x0600) lp->stats.tx_carrier_errors++; |
lp | 560 | drivers/net/eexpress.c | if (tx_status & 0x0100) lp->stats.tx_fifo_errors++; |
lp | 561 | drivers/net/eexpress.c | if (!(tx_status & 0x0040)) lp->stats.tx_heartbeat_errors++; |
lp | 562 | drivers/net/eexpress.c | if (tx_status & 0x0020) lp->stats.tx_aborted_errors++; |
lp | 565 | drivers/net/eexpress.c | printk("Reaped %x, Tx status %04x.\n" , lp->tx_reap, tx_status); |
lp | 566 | drivers/net/eexpress.c | lp->tx_reap += TX_BUF_SIZE; |
lp | 567 | drivers/net/eexpress.c | if (lp->tx_reap > TX_BUF_END - TX_BUF_SIZE) |
lp | 568 | drivers/net/eexpress.c | lp->tx_reap = TX_BUF_START; |
lp | 575 | drivers/net/eexpress.c | printk("Received packet, rx_head %04x.\n", lp->rx_head); |
lp | 594 | drivers/net/eexpress.c | lp->tx_cmd_link = IDLELOOP + 4; |
lp | 595 | drivers/net/eexpress.c | lp->tx_head = lp->tx_reap = TX_BUF_START; |
lp | 605 | drivers/net/eexpress.c | lp->stats.rx_errors++; |
lp | 609 | drivers/net/eexpress.c | dev->name, status, lp->rx_head, lp->rx_tail); |
lp | 673 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 677 | drivers/net/eexpress.c | return &lp->stats; |
lp | 757 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 777 | drivers/net/eexpress.c | lp->tx_cmd_link = DUMP_DATA + 4; |
lp | 779 | drivers/net/eexpress.c | lp->tx_cmd_link = IDLELOOP + 4; |
lp | 781 | drivers/net/eexpress.c | lp->tx_head = lp->tx_reap = TX_BUF_START; |
lp | 815 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 818 | drivers/net/eexpress.c | int cur_rxbuf = lp->rx_head = RX_BUF_START; |
lp | 842 | drivers/net/eexpress.c | lp->rx_tail = cur_rxbuf; |
lp | 848 | drivers/net/eexpress.c | outw(lp->rx_tail + 2, ioaddr + WRITE_PTR); |
lp | 850 | drivers/net/eexpress.c | outw(lp->rx_head, ioaddr); /* Link */ |
lp | 856 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 858 | drivers/net/eexpress.c | short tx_block = lp->tx_head; |
lp | 883 | drivers/net/eexpress.c | outw(lp->tx_cmd_link, ioaddr + WRITE_PTR); |
lp | 885 | drivers/net/eexpress.c | lp->tx_cmd_link = tx_block + 20; |
lp | 888 | drivers/net/eexpress.c | lp->tx_head = tx_block + TX_BUF_SIZE; |
lp | 889 | drivers/net/eexpress.c | if (lp->tx_head > TX_BUF_END - TX_BUF_SIZE) |
lp | 890 | drivers/net/eexpress.c | lp->tx_head = TX_BUF_START; |
lp | 895 | drivers/net/eexpress.c | tx_block, lp->tx_head, lp->tx_reap, inw(ioaddr + SCB_STATUS)); |
lp | 898 | drivers/net/eexpress.c | if (lp->tx_head != lp->tx_reap) |
lp | 905 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 908 | drivers/net/eexpress.c | short rx_head = lp->rx_head; |
lp | 909 | drivers/net/eexpress.c | short rx_tail = lp->rx_tail; |
lp | 933 | drivers/net/eexpress.c | lp->stats.rx_errors++; |
lp | 934 | drivers/net/eexpress.c | if (frame_status & 0x0800) lp->stats.rx_crc_errors++; |
lp | 935 | drivers/net/eexpress.c | if (frame_status & 0x0400) lp->stats.rx_frame_errors++; |
lp | 936 | drivers/net/eexpress.c | if (frame_status & 0x0200) lp->stats.rx_fifo_errors++; |
lp | 937 | drivers/net/eexpress.c | if (frame_status & 0x0100) lp->stats.rx_over_errors++; |
lp | 938 | drivers/net/eexpress.c | if (frame_status & 0x0080) lp->stats.rx_length_errors++; |
lp | 947 | drivers/net/eexpress.c | lp->stats.rx_dropped++; |
lp | 959 | drivers/net/eexpress.c | lp->stats.rx_packets++; |
lp | 996 | drivers/net/eexpress.c | lp->rx_head = rx_head; |
lp | 997 | drivers/net/eexpress.c | lp->rx_tail = rx_tail; |
lp | 399 | drivers/net/ewrk3.c | struct ewrk3_private *lp; |
lp | 551 | drivers/net/ewrk3.c | lp = (struct ewrk3_private *)dev->priv; |
lp | 553 | drivers/net/ewrk3.c | lp->shmem_base = mem_start; |
lp | 554 | drivers/net/ewrk3.c | lp->shmem_length = shmem_length; |
lp | 555 | drivers/net/ewrk3.c | lp->lemac = lemac; |
lp | 556 | drivers/net/ewrk3.c | lp->hard_strapped = hard_strapped; |
lp | 558 | drivers/net/ewrk3.c | lp->mPage = 64; |
lp | 559 | drivers/net/ewrk3.c | if (cmr & DRAM) lp->mPage <<= 1 ; /* 2 DRAMS on module */ |
lp | 650 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 660 | drivers/net/ewrk3.c | if (!lp->hard_strapped) { |
lp | 681 | drivers/net/ewrk3.c | if (lp->shmem_length == 0) { |
lp | 684 | drivers/net/ewrk3.c | printk("\tstart of shared memory: 0x%08lx\n",lp->shmem_base); |
lp | 685 | drivers/net/ewrk3.c | printk("\twindow length: 0x%04lx\n",lp->shmem_length); |
lp | 727 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 747 | drivers/net/ewrk3.c | for (page=1;page<lp->mPage;page++) { /* Write the free page numbers */ |
lp | 751 | drivers/net/ewrk3.c | lp->lock = 0; /* Ensure there are no locks */ |
lp | 762 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 768 | drivers/net/ewrk3.c | if (dev->tbusy || lp->lock) { |
lp | 772 | drivers/net/ewrk3.c | } else if (!lp->hard_strapped) { |
lp | 816 | drivers/net/ewrk3.c | if ((page = inb(EWRK3_FMQ)) < lp->mPage) { |
lp | 822 | drivers/net/ewrk3.c | while (set_bit(0, (void *)&lp->lock) != 0); /* Wait for lock to free */ |
lp | 823 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 825 | drivers/net/ewrk3.c | } else if (lp->shmem_length == SHMEM_2K) { |
lp | 826 | drivers/net/ewrk3.c | buf = (char *) lp->shmem_base; |
lp | 828 | drivers/net/ewrk3.c | } else if (lp->shmem_length == SHMEM_32K) { |
lp | 829 | drivers/net/ewrk3.c | buf = (char *)((((short)page << 11) & 0x7800) + lp->shmem_base); |
lp | 831 | drivers/net/ewrk3.c | } else if (lp->shmem_length == SHMEM_64K) { |
lp | 832 | drivers/net/ewrk3.c | buf = (char *)((((short)page << 11) & 0xf800) + lp->shmem_base); |
lp | 846 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 861 | drivers/net/ewrk3.c | if (lp->txc) { |
lp | 884 | drivers/net/ewrk3.c | lp->lock = 0; /* unlock the page register */ |
lp | 912 | drivers/net/ewrk3.c | struct ewrk3_private *lp; |
lp | 919 | drivers/net/ewrk3.c | lp = (struct ewrk3_private *)dev->priv; |
lp | 976 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 982 | drivers/net/ewrk3.c | if ((page = inb(EWRK3_RQ)) < lp->mPage) {/* Get next entry's buffer page */ |
lp | 989 | drivers/net/ewrk3.c | if ((tmpLock = set_bit(0, (void *)&lp->lock)) == 1) { /* Assert lock */ |
lp | 990 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { /* Get existing page */ |
lp | 1000 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1002 | drivers/net/ewrk3.c | } else if (lp->shmem_length == SHMEM_2K) { |
lp | 1003 | drivers/net/ewrk3.c | buf = (char *) lp->shmem_base; |
lp | 1005 | drivers/net/ewrk3.c | } else if (lp->shmem_length == SHMEM_32K) { |
lp | 1006 | drivers/net/ewrk3.c | buf = (char *)((((short)page << 11) & 0x7800) + lp->shmem_base); |
lp | 1008 | drivers/net/ewrk3.c | } else if (lp->shmem_length == SHMEM_64K) { |
lp | 1009 | drivers/net/ewrk3.c | buf = (char *)((((short)page << 11) & 0xf800) + lp->shmem_base); |
lp | 1020 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1031 | drivers/net/ewrk3.c | lp->stats.rx_errors++; /* Update the error stats. */ |
lp | 1032 | drivers/net/ewrk3.c | if (rx_status & DBE) lp->stats.rx_frame_errors++; |
lp | 1033 | drivers/net/ewrk3.c | if (rx_status & CRC) lp->stats.rx_crc_errors++; |
lp | 1034 | drivers/net/ewrk3.c | if (rx_status & PLL) lp->stats.rx_fifo_errors++; |
lp | 1044 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1064 | drivers/net/ewrk3.c | lp->stats.rx_packets++; |
lp | 1067 | drivers/net/ewrk3.c | lp->pktStats.bins[i]++; |
lp | 1074 | drivers/net/ewrk3.c | lp->pktStats.broadcast++; |
lp | 1076 | drivers/net/ewrk3.c | lp->pktStats.multicast++; |
lp | 1080 | drivers/net/ewrk3.c | lp->pktStats.unicast++; |
lp | 1083 | drivers/net/ewrk3.c | lp->pktStats.bins[0]++; /* Duplicates stats.rx_packets */ |
lp | 1084 | drivers/net/ewrk3.c | if (lp->pktStats.bins[0] == 0) { /* Reset counters */ |
lp | 1085 | drivers/net/ewrk3.c | memset(&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 1089 | drivers/net/ewrk3.c | lp->stats.rx_dropped++; /* Really, deferred. */ |
lp | 1100 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { /* Replace old page */ |
lp | 1106 | drivers/net/ewrk3.c | lp->lock = 0; /* Unlock the page register */ |
lp | 1121 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 1128 | drivers/net/ewrk3.c | lp->stats.tx_errors++; |
lp | 1129 | drivers/net/ewrk3.c | if (tx_status & MAC_NCL) lp->stats.tx_carrier_errors++; |
lp | 1130 | drivers/net/ewrk3.c | if (tx_status & MAC_LCL) lp->stats.tx_window_errors++; |
lp | 1133 | drivers/net/ewrk3.c | lp->pktStats.tx_underruns++; |
lp | 1135 | drivers/net/ewrk3.c | lp->pktStats.excessive_underruns++; |
lp | 1139 | drivers/net/ewrk3.c | lp->stats.collisions++; |
lp | 1141 | drivers/net/ewrk3.c | lp->pktStats.excessive_collisions++; |
lp | 1145 | drivers/net/ewrk3.c | lp->stats.tx_packets++; |
lp | 1156 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 1185 | drivers/net/ewrk3.c | if (!lp->hard_strapped) { |
lp | 1201 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 1205 | drivers/net/ewrk3.c | return &lp->stats; |
lp | 1218 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 1225 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1228 | drivers/net/ewrk3.c | multicast_table = (char *)(lp->shmem_base + PAGE0_HTE); |
lp | 1253 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 1260 | drivers/net/ewrk3.c | while (set_bit(0, (void *)&lp->lock) != 0); /* Wait for lock to free */ |
lp | 1262 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1271 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1280 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1308 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1325 | drivers/net/ewrk3.c | lp->lock = 0; /* Unlock the page register */ |
lp | 1613 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
lp | 1685 | drivers/net/ewrk3.c | while (set_bit(0, (void *)&lp->lock) != 0); /* Wait for lock to free */ |
lp | 1686 | drivers/net/ewrk3.c | if (lp->shmem_length == IO_ONLY) { |
lp | 1694 | drivers/net/ewrk3.c | memcpy(tmp.addr, (char *)(lp->shmem_base + PAGE0_HTE), (HASH_TABLE_LEN >> 3)); |
lp | 1698 | drivers/net/ewrk3.c | lp->lock = 0; /* Unlock the page register */ |
lp | 1735 | drivers/net/ewrk3.c | err = verify_area(VERIFY_WRITE, (void *)ioc->data, sizeof(lp->pktStats)); |
lp | 1739 | drivers/net/ewrk3.c | memcpy_tofs(ioc->data, &lp->pktStats, sizeof(lp->pktStats)); |
lp | 1747 | drivers/net/ewrk3.c | memset(&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 1818 | drivers/net/ewrk3.c | lp->txc = 1; |
lp | 1826 | drivers/net/ewrk3.c | lp->txc = 0; |
lp | 214 | drivers/net/hp100.c | struct hp100_private *lp; |
lp | 293 | drivers/net/hp100.c | lp = (struct hp100_private *)dev -> priv; |
lp | 294 | drivers/net/hp100.c | lp -> id = eid; |
lp | 296 | drivers/net/hp100.c | lp -> soft_model = hp100_inb( SOFT_MODEL ); |
lp | 297 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE3; |
lp | 298 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE3; |
lp | 304 | drivers/net/hp100.c | lp -> memory_size = 0x200 << ( ( hp100_inb( SRAM ) & 0xe0 ) >> 5 ); |
lp | 306 | drivers/net/hp100.c | lp -> rx_ratio = HP100_RX_RATIO; |
lp | 308 | drivers/net/hp100.c | lp -> rx_ratio = hp100_default_rx_ratio; |
lp | 329 | drivers/net/hp100.c | lp -> lan_type = hp100_sense_lan( dev ); |
lp | 332 | drivers/net/hp100.c | dev -> name, lp -> id -> name, ioaddr, dev -> irq, |
lp | 333 | drivers/net/hp100.c | lp -> memory_size >> ( 10 - 4 ), lp -> rx_ratio ); |
lp | 334 | drivers/net/hp100.c | switch ( lp -> lan_type ) { |
lp | 352 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 354 | drivers/net/hp100.c | if ( request_irq( dev -> irq, hp100_interrupt, SA_INTERRUPT, lp -> id -> name ) ) |
lp | 370 | drivers/net/hp100.c | lp -> lan_type = hp100_sense_lan( dev ); |
lp | 371 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE3; |
lp | 372 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE3; |
lp | 405 | drivers/net/hp100.c | hp100_outw( ( lp -> memory_size * lp -> rx_ratio ) / 100, RX_MEM_STOP ); |
lp | 406 | drivers/net/hp100.c | hp100_outw( lp -> memory_size - 1, TX_MEM_STOP ); |
lp | 409 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 ) |
lp | 410 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 420 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 427 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 ) /* relogin */ |
lp | 450 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 452 | drivers/net/hp100.c | if ( lp -> lan_type < 0 ) |
lp | 455 | drivers/net/hp100.c | if ( ( lp -> lan_type = hp100_sense_lan( dev ) ) < 0 ) |
lp | 461 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 ) |
lp | 462 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 472 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 && lp -> hub_status < 0 ) |
lp | 477 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 489 | drivers/net/hp100.c | if ( lp -> lan_type != i ) |
lp | 493 | drivers/net/hp100.c | lp -> lan_type = i; |
lp | 495 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 ) |
lp | 496 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 548 | drivers/net/hp100.c | lp -> stats.tx_packets++; |
lp | 569 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 574 | drivers/net/hp100.c | if ( lp -> lan_type < 0 ) |
lp | 576 | drivers/net/hp100.c | if ( ( lp -> lan_type = hp100_sense_lan( dev ) ) == HP100_LAN_100 ) |
lp | 577 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 612 | drivers/net/hp100.c | lp -> stats.rx_dropped++; |
lp | 620 | drivers/net/hp100.c | lp -> stats.rx_packets++; |
lp | 626 | drivers/net/hp100.c | lp -> stats.multicast++; break; |
lp | 652 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 656 | drivers/net/hp100.c | lp -> stats.rx_errors += val; |
lp | 657 | drivers/net/hp100.c | lp -> stats.rx_over_errors += val; |
lp | 659 | drivers/net/hp100.c | lp -> stats.rx_errors += val; |
lp | 660 | drivers/net/hp100.c | lp -> stats.rx_crc_errors += val; |
lp | 662 | drivers/net/hp100.c | lp -> stats.tx_errors += val; |
lp | 663 | drivers/net/hp100.c | lp -> stats.tx_aborted_errors += val; |
lp | 685 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 697 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE6; /* promiscuous mode, all good */ |
lp | 698 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE6; /* packets on the net */ |
lp | 703 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE5; /* multicast mode, packets for me */ |
lp | 704 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE5; /* broadcasts and all multicasts */ |
lp | 708 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE3; /* normal mode, packets for me */ |
lp | 709 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE3; /* and broadcasts */ |
lp | 712 | drivers/net/hp100.c | hp100_outb( lp -> mac2_mode, MAC_CFG_2 ); |
lp | 714 | drivers/net/hp100.c | hp100_orb( lp -> mac1_mode, MAC_CFG_1 ); |
lp | 736 | drivers/net/hp100.c | struct hp100_private *lp; |
lp | 762 | drivers/net/hp100.c | lp = (struct hp100_private *)dev -> priv; |
lp | 780 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 785 | drivers/net/hp100.c | hp100_outb( lp -> mac2_mode, MAC_CFG_2 ); |
lp | 787 | drivers/net/hp100.c | hp100_orb( lp -> mac1_mode, MAC_CFG_1 ); |
lp | 836 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 846 | drivers/net/hp100.c | if ( lp -> id -> id == 0x02019F022 ) /* HP J27248B doesn't have 100Mb/s interface */ |
lp | 337 | drivers/net/lance.c | struct lance_private *lp; |
lp | 415 | drivers/net/lance.c | lp = (struct lance_private *)dev->priv; |
lp | 416 | drivers/net/lance.c | lp->name = chipname; |
lp | 417 | drivers/net/lance.c | lp->rx_buffs = (long)lp + ((sizeof(struct lance_private) + 7) & ~7); |
lp | 418 | drivers/net/lance.c | lp->tx_bounce_buffs = (char (*)[PKT_BUF_SZ]) |
lp | 419 | drivers/net/lance.c | (lp->rx_buffs + PKT_BUF_SZ*RX_RING_SIZE); |
lp | 421 | drivers/net/lance.c | lp->chip_version = lance_version; |
lp | 423 | drivers/net/lance.c | lp->init_block.mode = 0x0003; /* Disable Rx and Tx. */ |
lp | 425 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
lp | 426 | drivers/net/lance.c | lp->init_block.filter[0] = 0x00000000; |
lp | 427 | drivers/net/lance.c | lp->init_block.filter[1] = 0x00000000; |
lp | 428 | drivers/net/lance.c | lp->init_block.rx_ring = (int)lp->rx_ring | RX_RING_LEN_BITS; |
lp | 429 | drivers/net/lance.c | lp->init_block.tx_ring = (int)lp->tx_ring | TX_RING_LEN_BITS; |
lp | 433 | drivers/net/lance.c | outw((short) (int) &lp->init_block, ioaddr+LANCE_DATA); |
lp | 436 | drivers/net/lance.c | outw(((int)&lp->init_block) >> 16, ioaddr+LANCE_DATA); |
lp | 544 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_ENABLE_AUTOSELECT) { |
lp | 568 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 573 | drivers/net/lance.c | request_irq(dev->irq, &lance_interrupt, 0, lp->name)) { |
lp | 592 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_MUST_UNRESET) |
lp | 595 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_ENABLE_AUTOSELECT) { |
lp | 603 | drivers/net/lance.c | dev->name, dev->irq, dev->dma, (int) lp->tx_ring, (int) lp->rx_ring, |
lp | 604 | drivers/net/lance.c | (int) &lp->init_block); |
lp | 609 | drivers/net/lance.c | outw((short) (int) &lp->init_block, ioaddr+LANCE_DATA); |
lp | 611 | drivers/net/lance.c | outw(((int)&lp->init_block) >> 16, ioaddr+LANCE_DATA); |
lp | 634 | drivers/net/lance.c | dev->name, i, (int) &lp->init_block, inw(ioaddr+LANCE_DATA)); |
lp | 654 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 658 | drivers/net/lance.c | if (lp->tx_skbuff[i]) { |
lp | 659 | drivers/net/lance.c | dev_kfree_skb(lp->tx_skbuff[i],FREE_WRITE); |
lp | 660 | drivers/net/lance.c | lp->tx_skbuff[i] = NULL; |
lp | 670 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 673 | drivers/net/lance.c | lp->lock = 0, lp->tx_full = 0; |
lp | 674 | drivers/net/lance.c | lp->cur_rx = lp->cur_tx = 0; |
lp | 675 | drivers/net/lance.c | lp->dirty_rx = lp->dirty_tx = 0; |
lp | 678 | drivers/net/lance.c | lp->rx_ring[i].base = (lp->rx_buffs + i*PKT_BUF_SZ) | 0x80000000; |
lp | 679 | drivers/net/lance.c | lp->rx_ring[i].buf_length = -PKT_BUF_SZ; |
lp | 684 | drivers/net/lance.c | lp->tx_ring[i].base = 0; |
lp | 687 | drivers/net/lance.c | lp->init_block.mode = 0x0000; |
lp | 689 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
lp | 690 | drivers/net/lance.c | lp->init_block.filter[0] = 0x00000000; |
lp | 691 | drivers/net/lance.c | lp->init_block.filter[1] = 0x00000000; |
lp | 692 | drivers/net/lance.c | lp->init_block.rx_ring = (int)lp->rx_ring | RX_RING_LEN_BITS; |
lp | 693 | drivers/net/lance.c | lp->init_block.tx_ring = (int)lp->tx_ring | TX_RING_LEN_BITS; |
lp | 699 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 702 | drivers/net/lance.c | (chip_table[lp->chip_version].flags & LANCE_MUST_REINIT_RING)) { |
lp | 713 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 727 | drivers/net/lance.c | lp->stats.tx_errors++; |
lp | 732 | drivers/net/lance.c | lp->dirty_tx, lp->cur_tx, lp->tx_full ? " (full)" : "", |
lp | 733 | drivers/net/lance.c | lp->cur_rx); |
lp | 736 | drivers/net/lance.c | lp->rx_ring[i].base, -lp->rx_ring[i].buf_length, |
lp | 737 | drivers/net/lance.c | lp->rx_ring[i].msg_length); |
lp | 740 | drivers/net/lance.c | lp->tx_ring[i].base, -lp->tx_ring[i].length, |
lp | 741 | drivers/net/lance.c | lp->tx_ring[i].misc); |
lp | 775 | drivers/net/lance.c | if (set_bit(0, (void*)&lp->lock) != 0) { |
lp | 785 | drivers/net/lance.c | entry = lp->cur_tx & TX_RING_MOD_MASK; |
lp | 791 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_MUST_PAD) { |
lp | 792 | drivers/net/lance.c | lp->tx_ring[entry].length = |
lp | 795 | drivers/net/lance.c | lp->tx_ring[entry].length = -skb->len; |
lp | 797 | drivers/net/lance.c | lp->tx_ring[entry].misc = 0x0000; |
lp | 805 | drivers/net/lance.c | memcpy(&lp->tx_bounce_buffs[entry], skb->data, skb->len); |
lp | 806 | drivers/net/lance.c | lp->tx_ring[entry].base = |
lp | 807 | drivers/net/lance.c | (int)(lp->tx_bounce_buffs + entry) | 0x83000000; |
lp | 810 | drivers/net/lance.c | lp->tx_skbuff[entry] = skb; |
lp | 811 | drivers/net/lance.c | lp->tx_ring[entry].base = (int)(skb->data) | 0x83000000; |
lp | 813 | drivers/net/lance.c | lp->cur_tx++; |
lp | 823 | drivers/net/lance.c | lp->lock = 0; |
lp | 824 | drivers/net/lance.c | if (lp->tx_ring[(entry+1) & TX_RING_MOD_MASK].base == 0) |
lp | 827 | drivers/net/lance.c | lp->tx_full = 1; |
lp | 838 | drivers/net/lance.c | struct lance_private *lp; |
lp | 848 | drivers/net/lance.c | lp = (struct lance_private *)dev->priv; |
lp | 870 | drivers/net/lance.c | int dirty_tx = lp->dirty_tx; |
lp | 872 | drivers/net/lance.c | while (dirty_tx < lp->cur_tx) { |
lp | 874 | drivers/net/lance.c | int status = lp->tx_ring[entry].base; |
lp | 879 | drivers/net/lance.c | lp->tx_ring[entry].base = 0; |
lp | 883 | drivers/net/lance.c | int err_status = lp->tx_ring[entry].misc; |
lp | 884 | drivers/net/lance.c | lp->stats.tx_errors++; |
lp | 885 | drivers/net/lance.c | if (err_status & 0x0400) lp->stats.tx_aborted_errors++; |
lp | 886 | drivers/net/lance.c | if (err_status & 0x0800) lp->stats.tx_carrier_errors++; |
lp | 887 | drivers/net/lance.c | if (err_status & 0x1000) lp->stats.tx_window_errors++; |
lp | 890 | drivers/net/lance.c | lp->stats.tx_fifo_errors++; |
lp | 899 | drivers/net/lance.c | lp->stats.collisions++; |
lp | 900 | drivers/net/lance.c | lp->stats.tx_packets++; |
lp | 905 | drivers/net/lance.c | if (lp->tx_skbuff[entry]) { |
lp | 906 | drivers/net/lance.c | dev_kfree_skb(lp->tx_skbuff[entry],FREE_WRITE); |
lp | 907 | drivers/net/lance.c | lp->tx_skbuff[entry] = 0; |
lp | 913 | drivers/net/lance.c | if (lp->cur_tx - dirty_tx >= TX_RING_SIZE) { |
lp | 915 | drivers/net/lance.c | dirty_tx, lp->cur_tx, lp->tx_full); |
lp | 920 | drivers/net/lance.c | if (lp->tx_full && dev->tbusy |
lp | 921 | drivers/net/lance.c | && dirty_tx > lp->cur_tx - TX_RING_SIZE + 2) { |
lp | 923 | drivers/net/lance.c | lp->tx_full = 0; |
lp | 928 | drivers/net/lance.c | lp->dirty_tx = dirty_tx; |
lp | 932 | drivers/net/lance.c | if (csr0 & 0x4000) lp->stats.tx_errors++; /* Tx babble. */ |
lp | 933 | drivers/net/lance.c | if (csr0 & 0x1000) lp->stats.rx_errors++; /* Missed a Rx frame. */ |
lp | 965 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 966 | drivers/net/lance.c | int entry = lp->cur_rx & RX_RING_MOD_MASK; |
lp | 970 | drivers/net/lance.c | while (lp->rx_ring[entry].base >= 0) { |
lp | 971 | drivers/net/lance.c | int status = lp->rx_ring[entry].base >> 24; |
lp | 979 | drivers/net/lance.c | lp->stats.rx_errors++; /* end of a packet.*/ |
lp | 980 | drivers/net/lance.c | if (status & 0x20) lp->stats.rx_frame_errors++; |
lp | 981 | drivers/net/lance.c | if (status & 0x10) lp->stats.rx_over_errors++; |
lp | 982 | drivers/net/lance.c | if (status & 0x08) lp->stats.rx_crc_errors++; |
lp | 983 | drivers/net/lance.c | if (status & 0x04) lp->stats.rx_fifo_errors++; |
lp | 984 | drivers/net/lance.c | lp->rx_ring[entry].base &= 0x03ffffff; |
lp | 987 | drivers/net/lance.c | short pkt_len = (lp->rx_ring[entry].msg_length & 0xfff)-4; |
lp | 994 | drivers/net/lance.c | if (lp->rx_ring[(entry+i) & RX_RING_MOD_MASK].base < 0) |
lp | 998 | drivers/net/lance.c | lp->stats.rx_dropped++; |
lp | 999 | drivers/net/lance.c | lp->rx_ring[entry].base |= 0x80000000; |
lp | 1000 | drivers/net/lance.c | lp->cur_rx++; |
lp | 1008 | drivers/net/lance.c | (unsigned char *)(lp->rx_ring[entry].base & 0x00ffffff), |
lp | 1012 | drivers/net/lance.c | lp->stats.rx_packets++; |
lp | 1017 | drivers/net/lance.c | lp->rx_ring[entry].buf_length = -PKT_BUF_SZ; |
lp | 1018 | drivers/net/lance.c | lp->rx_ring[entry].base |= 0x80000000; |
lp | 1019 | drivers/net/lance.c | entry = (++lp->cur_rx) & RX_RING_MOD_MASK; |
lp | 1032 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 1037 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_HAS_MISSED_FRAME) { |
lp | 1039 | drivers/net/lance.c | lp->stats.rx_missed_errors = inw(ioaddr+LANCE_DATA); |
lp | 1064 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 1069 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_HAS_MISSED_FRAME) { |
lp | 1074 | drivers/net/lance.c | lp->stats.rx_missed_errors = inw(ioaddr+LANCE_DATA); |
lp | 1079 | drivers/net/lance.c | return &lp->stats; |
lp | 157 | drivers/net/pi2.c | static void rts(struct pi_local *lp, int x); |
lp | 158 | drivers/net/pi2.c | static void b_rxint(struct device *dev, struct pi_local *lp); |
lp | 159 | drivers/net/pi2.c | static void b_txint(struct pi_local *lp); |
lp | 160 | drivers/net/pi2.c | static void b_exint(struct pi_local *lp); |
lp | 161 | drivers/net/pi2.c | static void a_rxint(struct device *dev, struct pi_local *lp); |
lp | 162 | drivers/net/pi2.c | static void a_txint(struct pi_local *lp); |
lp | 163 | drivers/net/pi2.c | static void a_exint(struct pi_local *lp); |
lp | 201 | drivers/net/pi2.c | static void switchbuffers(struct pi_local *lp) |
lp | 203 | drivers/net/pi2.c | if (lp->rcvbuf == lp->rxdmabuf1) |
lp | 204 | drivers/net/pi2.c | lp->rcvbuf = lp->rxdmabuf2; |
lp | 206 | drivers/net/pi2.c | lp->rcvbuf = lp->rxdmabuf1; |
lp | 209 | drivers/net/pi2.c | static void hardware_send_packet(struct pi_local *lp, struct sk_buff *skb) |
lp | 214 | drivers/net/pi2.c | lp->stats.tx_packets++; |
lp | 218 | drivers/net/pi2.c | kickflag = (skb_peek(&lp->sndq) == NULL) && (lp->sndbuf == NULL); |
lp | 221 | drivers/net/pi2.c | skb_queue_tail(&lp->sndq, skb); |
lp | 224 | drivers/net/pi2.c | switch (lp->base & 2) { |
lp | 226 | drivers/net/pi2.c | a_txint(lp); /* process interrupt */ |
lp | 231 | drivers/net/pi2.c | if (lp->tstate == IDLE) |
lp | 232 | drivers/net/pi2.c | b_txint(lp); |
lp | 239 | drivers/net/pi2.c | static void setup_rx_dma(struct pi_local *lp) |
lp | 249 | drivers/net/pi2.c | dma_abs = (unsigned long) (lp->rcvbuf->data); |
lp | 250 | drivers/net/pi2.c | dmachan = lp->dmachan; |
lp | 251 | drivers/net/pi2.c | cmd = lp->base + CTL; |
lp | 257 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, WT_FN_RDYFN | WT_RDY_RT | INT_ERR_Rx | EXT_INT_ENAB); |
lp | 267 | drivers/net/pi2.c | set_dma_count(dmachan, lp->bufsiz); |
lp | 273 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_Rx_CRC); |
lp | 276 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, |
lp | 282 | drivers/net/pi2.c | static void setup_tx_dma(struct pi_local *lp, int length) |
lp | 291 | drivers/net/pi2.c | dmachan = lp->dmachan; |
lp | 292 | drivers/net/pi2.c | dma_abs = (unsigned long) (lp->txdmabuf); |
lp | 310 | drivers/net/pi2.c | static void tdelay(struct pi_local *lp, int time) |
lp | 316 | drivers/net/pi2.c | if (lp->base & 2) { /* If A channel */ |
lp | 319 | drivers/net/pi2.c | port = lp->cardbase + TMR1; |
lp | 323 | drivers/net/pi2.c | port = lp->cardbase + TMR2; |
lp | 324 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R1, INT_ALL_Rx | EXT_INT_ENAB); |
lp | 328 | drivers/net/pi2.c | outb_p(sc | LSB_MSB | MODE0, lp->cardbase + TMRCMD); |
lp | 335 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R15, CTSIE); |
lp | 336 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R0, RES_EXT_INT); |
lp | 344 | drivers/net/pi2.c | static void a_txint(struct pi_local *lp) |
lp | 352 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 354 | drivers/net/pi2.c | switch (lp->tstate) { |
lp | 357 | drivers/net/pi2.c | if ((lp->sndbuf = skb_dequeue(&lp->sndq)) == NULL) { |
lp | 358 | drivers/net/pi2.c | rts(lp, OFF); |
lp | 368 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 369 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 370 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0) & DCD) != 0) { |
lp | 371 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 372 | drivers/net/pi2.c | tdelay(lp, 100); |
lp | 374 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, CTSIE | DCDIE); |
lp | 378 | drivers/net/pi2.c | if (random() > lp->persist) { |
lp | 379 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 380 | drivers/net/pi2.c | tdelay(lp, lp->slotime); |
lp | 385 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R5, TxCRC_ENAB | RTS | Tx8); |
lp | 386 | drivers/net/pi2.c | rts(lp, ON); /* Transmitter on */ |
lp | 387 | drivers/net/pi2.c | lp->tstate = ST_TXDELAY; |
lp | 388 | drivers/net/pi2.c | tdelay(lp, lp->txdelay); |
lp | 398 | drivers/net/pi2.c | static void a_exint(struct pi_local *lp) |
lp | 408 | drivers/net/pi2.c | st = rdscc(lp->cardbase, lp->base + CTL, R0); /* Fetch status */ |
lp | 411 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R0, RES_EXT_INT); |
lp | 412 | drivers/net/pi2.c | cmd = lp->base + CTL; |
lp | 414 | drivers/net/pi2.c | if ((lp->rstate >= ACTIVE) && (st & BRK_ABRT)) { |
lp | 415 | drivers/net/pi2.c | setup_rx_dma(lp); |
lp | 416 | drivers/net/pi2.c | lp->rstate = ACTIVE; |
lp | 418 | drivers/net/pi2.c | switch (lp->tstate) { |
lp | 420 | drivers/net/pi2.c | free_p(lp->sndbuf); |
lp | 421 | drivers/net/pi2.c | lp->sndbuf = NULL; |
lp | 422 | drivers/net/pi2.c | lp->tstate = FLAGOUT; |
lp | 423 | drivers/net/pi2.c | tdelay(lp, lp->squeldelay); |
lp | 426 | drivers/net/pi2.c | if ((lp->sndbuf = skb_dequeue(&lp->sndq)) == NULL) { |
lp | 428 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 429 | drivers/net/pi2.c | rts(lp, OFF); |
lp | 436 | drivers/net/pi2.c | disable_dma(lp->dmachan); |
lp | 439 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, WT_FN_RDYFN | EXT_INT_ENAB); |
lp | 444 | drivers/net/pi2.c | length = lp->sndbuf->len - 1; |
lp | 445 | drivers/net/pi2.c | memcpy(lp->txdmabuf, &lp->sndbuf->data[1], length); |
lp | 449 | drivers/net/pi2.c | setup_tx_dma(lp, length); |
lp | 453 | drivers/net/pi2.c | enable_dma(lp->dmachan); |
lp | 456 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_Tx_CRC | RES_Tx_P); |
lp | 459 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, TxUIE); |
lp | 462 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, WT_RDY_ENAB | WT_FN_RDYFN | EXT_INT_ENAB); |
lp | 465 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EOM_L); |
lp | 469 | drivers/net/pi2.c | lp->tstate = ACTIVE; |
lp | 475 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 476 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 477 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0) & DCD) != 0) { |
lp | 478 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 479 | drivers/net/pi2.c | tdelay(lp, 100); |
lp | 481 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R15, CTSIE | DCDIE); |
lp | 485 | drivers/net/pi2.c | if (random() > lp->persist) { |
lp | 486 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 487 | drivers/net/pi2.c | tdelay(lp, lp->slotime); |
lp | 492 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R5, TxCRC_ENAB | RTS | Tx8); |
lp | 493 | drivers/net/pi2.c | rts(lp, ON); /* Transmitter on */ |
lp | 494 | drivers/net/pi2.c | lp->tstate = ST_TXDELAY; |
lp | 495 | drivers/net/pi2.c | tdelay(lp, lp->txdelay); |
lp | 505 | drivers/net/pi2.c | static void a_rxint(struct device *dev, struct pi_local *lp) |
lp | 518 | drivers/net/pi2.c | cmd = lp->base + CTL; |
lp | 520 | drivers/net/pi2.c | rse = rdscc(lp->cardbase, cmd, R1); /* Get special condition bits from R1 */ |
lp | 522 | drivers/net/pi2.c | lp->rstate = RXERROR; |
lp | 527 | drivers/net/pi2.c | clear_dma_ff(lp->dmachan); |
lp | 528 | drivers/net/pi2.c | bytecount = lp->bufsiz - get_dma_residue(lp->dmachan); |
lp | 530 | drivers/net/pi2.c | if ((rse & CRC_ERR) || (lp->rstate > ACTIVE) || (bytecount < 10)) { |
lp | 532 | drivers/net/pi2.c | lp->stats.rx_crc_errors++; |
lp | 534 | drivers/net/pi2.c | if (lp->rstate == RXERROR) { |
lp | 535 | drivers/net/pi2.c | lp->stats.rx_errors++; |
lp | 536 | drivers/net/pi2.c | lp->stats.rx_over_errors++; |
lp | 539 | drivers/net/pi2.c | lp->rstate = ACTIVE; |
lp | 540 | drivers/net/pi2.c | setup_rx_dma(lp); |
lp | 544 | drivers/net/pi2.c | pkt_len = lp->rcvbuf->cnt = bytecount - 2 + 1; |
lp | 547 | drivers/net/pi2.c | cur_buf = lp->rcvbuf; |
lp | 548 | drivers/net/pi2.c | switchbuffers(lp); |
lp | 549 | drivers/net/pi2.c | setup_rx_dma(lp); |
lp | 558 | drivers/net/pi2.c | lp->stats.rx_dropped++; |
lp | 574 | drivers/net/pi2.c | lp->stats.rx_packets++; |
lp | 577 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R0, ERR_RES); /* error reset */ |
lp | 581 | drivers/net/pi2.c | static void b_rxint(struct device *dev, struct pi_local *lp) |
lp | 593 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 595 | drivers/net/pi2.c | rse = rdscc(lp->cardbase, cmd, R1); /* get status byte from R1 */ |
lp | 597 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0)) & Rx_CH_AV) { |
lp | 604 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 605 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 607 | drivers/net/pi2.c | lp->rstate = RXERROR; /* set error flag */ |
lp | 608 | drivers/net/pi2.c | lp->stats.rx_errors++; |
lp | 609 | drivers/net/pi2.c | lp->stats.rx_over_errors++; |
lp | 610 | drivers/net/pi2.c | } else if (lp->rcvbuf->cnt >= lp->bufsiz) { |
lp | 613 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 614 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 615 | drivers/net/pi2.c | lp->rstate = TOOBIG;/* when set, chars are not stored */ |
lp | 618 | drivers/net/pi2.c | if (lp->rstate == ACTIVE) { /* If no errors... */ |
lp | 619 | drivers/net/pi2.c | *lp->rcp++ = rdscc(lp->cardbase, cmd, R8); /* char to rcv buff */ |
lp | 620 | drivers/net/pi2.c | lp->rcvbuf->cnt++; /* bump count */ |
lp | 623 | drivers/net/pi2.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 624 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, ERR_RES); /* reset err latch */ |
lp | 625 | drivers/net/pi2.c | lp->rstate = ACTIVE; |
lp | 630 | drivers/net/pi2.c | if (lp->rcvbuf->cnt > 0) { |
lp | 631 | drivers/net/pi2.c | if ((rse & CRC_ERR) || (lp->rstate > ACTIVE) || (lp->rcvbuf->cnt < 10)) { |
lp | 632 | drivers/net/pi2.c | if ((lp->rcvbuf->cnt >= 10) && (rse & CRC_ERR)) { |
lp | 633 | drivers/net/pi2.c | lp->stats.rx_crc_errors++; |
lp | 635 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 636 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 639 | drivers/net/pi2.c | pkt_len = lp->rcvbuf->cnt -= 2; /* Toss 2 crc bytes */ |
lp | 647 | drivers/net/pi2.c | lp->stats.rx_dropped++; |
lp | 657 | 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 | 1307 | drivers/net/pi2.c | struct pi_local *lp; |
lp | 1318 | drivers/net/pi2.c | lp = (struct pi_local *) dev->priv; |
lp | 1324 | drivers/net/pi2.c | lp->txdmabuf = get_dma_buffer(&mem_ptr); |
lp | 1325 | drivers/net/pi2.c | lp->rxdmabuf1 = (struct mbuf *) get_dma_buffer(&mem_ptr); |
lp | 1326 | drivers/net/pi2.c | lp->rxdmabuf2 = (struct mbuf *) get_dma_buffer(&mem_ptr); |
lp | 1329 | drivers/net/pi2.c | lp->rcvbuf = lp->rxdmabuf1; |
lp | 1330 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 1331 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 1334 | drivers/net/pi2.c | skb_queue_head_init(&lp->sndq); |
lp | 1338 | drivers/net/pi2.c | lp->xtal = (unsigned long) SINGLE / 2; |
lp | 1340 | drivers/net/pi2.c | lp->xtal = (unsigned long) DOUBLE / 2; |
lp | 1341 | drivers/net/pi2.c | lp->base = dev->base_addr; |
lp | 1342 | drivers/net/pi2.c | lp->cardbase = dev->base_addr & 0x3f0; |
lp | 1344 | drivers/net/pi2.c | lp->speed = DEF_A_SPEED; |
lp | 1346 | drivers/net/pi2.c | lp->txdelay = DEF_A_TXDELAY; |
lp | 1347 | drivers/net/pi2.c | lp->persist = DEF_A_PERSIST; |
lp | 1348 | drivers/net/pi2.c | lp->slotime = DEF_A_SLOTIME; |
lp | 1349 | drivers/net/pi2.c | lp->squeldelay = DEF_A_SQUELDELAY; |
lp | 1350 | drivers/net/pi2.c | lp->clockmode = DEF_A_CLOCKMODE; |
lp | 1353 | drivers/net/pi2.c | lp->speed = DEF_B_SPEED; |
lp | 1355 | drivers/net/pi2.c | lp->txdelay = DEF_B_TXDELAY; |
lp | 1356 | drivers/net/pi2.c | lp->persist = DEF_B_PERSIST; |
lp | 1357 | drivers/net/pi2.c | lp->slotime = DEF_B_SLOTIME; |
lp | 1358 | drivers/net/pi2.c | lp->squeldelay = DEF_B_SQUELDELAY; |
lp | 1359 | drivers/net/pi2.c | lp->clockmode = DEF_B_CLOCKMODE; |
lp | 1361 | drivers/net/pi2.c | lp->bufsiz = DMA_BUFF_SIZE; |
lp | 1362 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 1369 | drivers/net/pi2.c | lp->dmachan = dev->dma; |
lp | 1370 | drivers/net/pi2.c | if (lp->dmachan < 1 || lp->dmachan > 3) |
lp | 1371 | drivers/net/pi2.c | printk("PI: DMA channel %d out of range\n", lp->dmachan); |
lp | 1379 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R1, EXT_INT_ENAB); |
lp | 1381 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R9, MIE | NV); |
lp | 1384 | drivers/net/pi2.c | tdelay(lp, 1); |
lp | 1392 | drivers/net/pi2.c | wrtscc(lp->cardbase, dev->base_addr + CTL, R9, FHWRES); /* Hardware reset */ |
lp | 1394 | drivers/net/pi2.c | wrtscc(lp->cardbase, dev->base_addr + CTL, R9, 0); |
lp | 1463 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1476 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 1485 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R9, MIE | NV); |
lp | 1488 | drivers/net/pi2.c | lp->open_time = jiffies; |
lp | 1499 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1508 | drivers/net/pi2.c | hardware_send_packet(lp, skb); |
lp | 1519 | drivers/net/pi2.c | struct pi_local *lp; |
lp | 1534 | drivers/net/pi2.c | lp = (struct pi_local *) pi0a.priv; /* Assume channel A */ |
lp | 1535 | drivers/net/pi2.c | while ((st = rdscc(lp->cardbase, pi0a.base_addr | CHANA | CTL, R3)) != 0) { |
lp | 1538 | drivers/net/pi2.c | lp = (struct pi_local *) pi0b.priv; |
lp | 1539 | drivers/net/pi2.c | b_txint(lp); |
lp | 1542 | drivers/net/pi2.c | lp = (struct pi_local *) pi0a.priv; |
lp | 1543 | drivers/net/pi2.c | a_rxint(&pi0a, lp); |
lp | 1546 | drivers/net/pi2.c | lp = (struct pi_local *) pi0a.priv; |
lp | 1547 | drivers/net/pi2.c | a_txint(lp); |
lp | 1550 | drivers/net/pi2.c | lp = (struct pi_local *) pi0a.priv; |
lp | 1551 | drivers/net/pi2.c | a_exint(lp); |
lp | 1554 | drivers/net/pi2.c | lp = (struct pi_local *) pi0b.priv; |
lp | 1555 | drivers/net/pi2.c | b_rxint(&pi0b, lp); |
lp | 1558 | drivers/net/pi2.c | lp = (struct pi_local *) pi0b.priv; |
lp | 1559 | drivers/net/pi2.c | b_exint(lp); |
lp | 1564 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R0, RES_H_IUS); |
lp | 1574 | drivers/net/pi2.c | struct pi_local *lp; |
lp | 1580 | drivers/net/pi2.c | lp = (struct pi_local *) dev->priv; |
lp | 1584 | drivers/net/pi2.c | disable_dma(lp->dmachan); |
lp | 1586 | drivers/net/pi2.c | lp->open_time = 0; |
lp | 1592 | drivers/net/pi2.c | while ((ptr = skb_dequeue(&lp->sndq)) != NULL) |
lp | 1603 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1621 | drivers/net/pi2.c | lp->txdelay = rq.txdelay; |
lp | 1622 | drivers/net/pi2.c | lp->persist = rq.persist; |
lp | 1623 | drivers/net/pi2.c | lp->slotime = rq.slotime; |
lp | 1624 | drivers/net/pi2.c | lp->squeldelay = rq.squeldelay; |
lp | 1625 | drivers/net/pi2.c | lp->clockmode = rq.clockmode; |
lp | 1626 | drivers/net/pi2.c | lp->speed = rq.speed; |
lp | 1643 | drivers/net/pi2.c | free_dma(lp->dmachan); |
lp | 1644 | drivers/net/pi2.c | dev->dma = lp->dmachan = rq.dmachan; |
lp | 1645 | drivers/net/pi2.c | if (request_dma(lp->dmachan,"pi2")) |
lp | 1660 | drivers/net/pi2.c | rq.speed = lp->speed; |
lp | 1661 | drivers/net/pi2.c | rq.txdelay = lp->txdelay; |
lp | 1662 | drivers/net/pi2.c | rq.persist = lp->persist; |
lp | 1663 | drivers/net/pi2.c | rq.slotime = lp->slotime; |
lp | 1664 | drivers/net/pi2.c | rq.squeldelay = lp->squeldelay; |
lp | 1665 | drivers/net/pi2.c | rq.clockmode = lp->clockmode; |
lp | 1666 | drivers/net/pi2.c | rq.dmachan = lp->dmachan; |
lp | 1683 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1685 | drivers/net/pi2.c | return &lp->stats; |
lp | 353 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 368 | drivers/net/seeq8005.c | lp->open_time = jiffies; |
lp | 427 | drivers/net/seeq8005.c | struct net_local *lp; |
lp | 440 | drivers/net/seeq8005.c | lp = (struct net_local *)dev->priv; |
lp | 456 | drivers/net/seeq8005.c | lp->stats.tx_packets++; |
lp | 478 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 490 | drivers/net/seeq8005.c | outw( lp->receive_ptr, SEEQ_DMAAR); |
lp | 497 | 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 | 507 | drivers/net/seeq8005.c | if (next_packet < lp->receive_ptr) { |
lp | 508 | drivers/net/seeq8005.c | pkt_len = (next_packet + 0x10000 - ((DEFAULT_TEA+1)<<8)) - lp->receive_ptr - 4; |
lp | 510 | drivers/net/seeq8005.c | pkt_len = next_packet - lp->receive_ptr - 4; |
lp | 519 | drivers/net/seeq8005.c | lp->receive_ptr = next_packet; |
lp | 526 | drivers/net/seeq8005.c | lp->stats.rx_errors++; |
lp | 527 | drivers/net/seeq8005.c | if (pkt_hdr & SEEQPKTS_SHORT) lp->stats.rx_frame_errors++; |
lp | 528 | drivers/net/seeq8005.c | if (pkt_hdr & SEEQPKTS_DRIB) lp->stats.rx_frame_errors++; |
lp | 529 | drivers/net/seeq8005.c | if (pkt_hdr & SEEQPKTS_OVERSIZE) lp->stats.rx_over_errors++; |
lp | 530 | drivers/net/seeq8005.c | if (pkt_hdr & SEEQPKTS_CRC_ERR) lp->stats.rx_crc_errors++; |
lp | 533 | drivers/net/seeq8005.c | outw( (lp->receive_ptr & 0xff00)>>8, SEEQ_REA); |
lp | 542 | drivers/net/seeq8005.c | lp->stats.rx_dropped++; |
lp | 562 | drivers/net/seeq8005.c | lp->stats.rx_packets++; |
lp | 576 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 579 | drivers/net/seeq8005.c | lp->open_time = 0; |
lp | 602 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 604 | drivers/net/seeq8005.c | return &lp->stats; |
lp | 637 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 660 | drivers/net/seeq8005.c | lp->receive_ptr = (DEFAULT_TEA+1)<<8; /* so we can find our packet_header */ |
lp | 661 | drivers/net/seeq8005.c | outw( lp->receive_ptr, SEEQ_RPR); /* Receive Pointer Register is set to recv buffer memory */ |
lp | 280 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 299 | drivers/net/skeleton.c | lp->open_time = jiffies; |
lp | 310 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 350 | drivers/net/skeleton.c | lp->stats.tx_aborted_errors++; |
lp | 361 | drivers/net/skeleton.c | struct net_local *lp; |
lp | 371 | drivers/net/skeleton.c | lp = (struct net_local *)dev->priv; |
lp | 380 | drivers/net/skeleton.c | lp->stats.tx_packets++; |
lp | 386 | drivers/net/skeleton.c | lp->stats.tx_window_errors++; |
lp | 398 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 410 | drivers/net/skeleton.c | lp->stats.rx_errors++; |
lp | 411 | drivers/net/skeleton.c | if (status & 0x20) lp->stats.rx_frame_errors++; |
lp | 412 | drivers/net/skeleton.c | if (status & 0x10) lp->stats.rx_over_errors++; |
lp | 413 | drivers/net/skeleton.c | if (status & 0x08) lp->stats.rx_crc_errors++; |
lp | 414 | drivers/net/skeleton.c | if (status & 0x04) lp->stats.rx_fifo_errors++; |
lp | 422 | drivers/net/skeleton.c | lp->stats.rx_dropped++; |
lp | 434 | drivers/net/skeleton.c | lp->stats.rx_packets++; |
lp | 448 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 451 | drivers/net/skeleton.c | lp->open_time = 0; |
lp | 479 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 484 | drivers/net/skeleton.c | lp->stats.rx_missed_errors = inw(ioaddr+1); |
lp | 487 | drivers/net/skeleton.c | return &lp->stats; |
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 | 194 | drivers/net/wavelan.c | net_local *lp; |
lp | 198 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 202 | drivers/net/wavelan.c | lp->hacr &= ~HACR_INTRON; |
lp | 203 | drivers/net/wavelan.c | hacr_write(ioaddr, lp->hacr); |
lp | 213 | drivers/net/wavelan.c | net_local *lp; |
lp | 217 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 221 | drivers/net/wavelan.c | lp->hacr |= HACR_INTRON; |
lp | 222 | drivers/net/wavelan.c | hacr_write(ioaddr, lp->hacr); |
lp | 384 | drivers/net/wavelan.c | net_local *lp; |
lp | 389 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 433 | drivers/net/wavelan.c | if (lp->promiscuous && lp->full_promiscuous) |
lp | 450 | drivers/net/wavelan.c | m.mmw_netw_id_l = lp->nwid[1]; |
lp | 451 | drivers/net/wavelan.c | m.mmw_netw_id_h = lp->nwid[0]; |
lp | 461 | drivers/net/wavelan.c | net_local *lp; |
lp | 466 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 476 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 500 | drivers/net/wavelan.c | net_local *lp; |
lp | 506 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 511 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 540 | drivers/net/wavelan.c | net_local *lp; |
lp | 553 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 555 | drivers/net/wavelan.c | lp->nresets++; |
lp | 558 | drivers/net/wavelan.c | lp->hacr = HACR_DEFAULT; |
lp | 572 | drivers/net/wavelan.c | psa_read(ioaddr, lp->hacr, 0, (unsigned char *)&psa, sizeof(psa)); |
lp | 596 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 699 | drivers/net/wavelan.c | AC_CFG_PRM(lp->promiscuous); |
lp | 856 | drivers/net/wavelan.c | net_local *lp; |
lp | 1009 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1013 | drivers/net/wavelan.c | first_wavelan = lp; |
lp | 1014 | drivers/net/wavelan.c | lp->prev = lp; |
lp | 1015 | drivers/net/wavelan.c | lp->next = lp; |
lp | 1019 | drivers/net/wavelan.c | lp->prev = first_wavelan->prev; |
lp | 1020 | drivers/net/wavelan.c | lp->next = first_wavelan; |
lp | 1021 | drivers/net/wavelan.c | first_wavelan->prev->next = lp; |
lp | 1022 | drivers/net/wavelan.c | first_wavelan->prev = lp; |
lp | 1024 | drivers/net/wavelan.c | lp->dev = dev; |
lp | 1026 | drivers/net/wavelan.c | lp->hacr = HACR_DEFAULT; |
lp | 1028 | drivers/net/wavelan.c | lp->full_promiscuous = enable_full_promiscuous; |
lp | 1029 | drivers/net/wavelan.c | lp->nwid[0] = psa.psa_nwid[0]; |
lp | 1030 | drivers/net/wavelan.c | lp->nwid[1] = psa.psa_nwid[1]; |
lp | 1032 | drivers/net/wavelan.c | lp->watchdog.function = wavelan_watchdog; |
lp | 1033 | drivers/net/wavelan.c | lp->watchdog.data = (unsigned long)dev; |
lp | 1064 | drivers/net/wavelan.c | net_local *lp; |
lp | 1073 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1079 | drivers/net/wavelan.c | lp->rx_head = OFFSET_RU; |
lp | 1081 | drivers/net/wavelan.c | for (i = 0, rx = lp->rx_head; i < NRXBLOCKS; i++, rx = rx_next) |
lp | 1083 | drivers/net/wavelan.c | rx_next = (i == NRXBLOCKS - 1) ? lp->rx_head : rx + RXBLOCKZ; |
lp | 1098 | drivers/net/wavelan.c | lp->rx_last = rx; |
lp | 1101 | drivers/net/wavelan.c | obram_write(ioaddr, scboff(OFFSET_SCB, scb_rfa_offset), (unsigned char *)&lp->rx_head, sizeof(lp->rx_head)); |
lp | 1106 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 1131 | drivers/net/wavelan.c | net_local *lp; |
lp | 1138 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1140 | drivers/net/wavelan.c | lp->tx_first_free = OFFSET_CU; |
lp | 1141 | drivers/net/wavelan.c | lp->tx_first_in_use = I82586NULL; |
lp | 1187 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 1201 | drivers/net/wavelan.c | lp->tx_n_in_use = 0; |
lp | 1210 | drivers/net/wavelan.c | net_local *lp; |
lp | 1218 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1275 | drivers/net/wavelan.c | net_local *lp; |
lp | 1288 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1292 | drivers/net/wavelan.c | txblock = lp->tx_first_free; |
lp | 1296 | drivers/net/wavelan.c | lp->tx_first_free += TXBLOCKZ; |
lp | 1297 | drivers/net/wavelan.c | if (lp->tx_first_free >= OFFSET_CU + NTXBLOCKS * TXBLOCKZ) |
lp | 1298 | drivers/net/wavelan.c | lp->tx_first_free -= NTXBLOCKS * TXBLOCKZ; |
lp | 1305 | drivers/net/wavelan.c | lp->tx_n_in_use++; |
lp | 1350 | drivers/net/wavelan.c | if (lp->tx_first_in_use == I82586NULL) |
lp | 1351 | drivers/net/wavelan.c | lp->tx_first_in_use = txblock; |
lp | 1353 | drivers/net/wavelan.c | if (lp->tx_n_in_use < NTXBLOCKS - 1) |
lp | 1358 | drivers/net/wavelan.c | if (lp->watchdog.next == (timer_list *)0) |
lp | 1477 | drivers/net/wavelan.c | net_local *lp; |
lp | 1481 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1492 | drivers/net/wavelan.c | obram_read(ioaddr, lp->rx_head, (unsigned char *)&fd, sizeof(fd)); |
lp | 1519 | drivers/net/wavelan.c | lp->stats.rx_errors++; |
lp | 1526 | drivers/net/wavelan.c | lp->stats.rx_length_errors++; |
lp | 1532 | drivers/net/wavelan.c | lp->stats.rx_over_errors++; |
lp | 1538 | drivers/net/wavelan.c | lp->stats.rx_fifo_errors++; |
lp | 1544 | drivers/net/wavelan.c | lp->stats.rx_frame_errors++; |
lp | 1550 | drivers/net/wavelan.c | lp->stats.rx_crc_errors++; |
lp | 1636 | drivers/net/wavelan.c | lp->stats.rx_dropped++; |
lp | 1674 | drivers/net/wavelan.c | lp->stats.rx_packets++; |
lp | 1679 | drivers/net/wavelan.c | obram_write(ioaddr, fdoff(lp->rx_head, fd_status), (unsigned char *)&fd.fd_status, sizeof(fd.fd_status)); |
lp | 1682 | drivers/net/wavelan.c | obram_write(ioaddr, fdoff(lp->rx_head, fd_command), (unsigned char *)&fd.fd_command, sizeof(fd.fd_command)); |
lp | 1685 | drivers/net/wavelan.c | obram_write(ioaddr, fdoff(lp->rx_last, fd_command), (unsigned char *)&fd.fd_command, sizeof(fd.fd_command)); |
lp | 1687 | drivers/net/wavelan.c | lp->rx_last = lp->rx_head; |
lp | 1688 | drivers/net/wavelan.c | lp->rx_head = fd.fd_link_offset; |
lp | 1703 | drivers/net/wavelan.c | wavelan_complete(device *dev, unsigned short ioaddr, net_local *lp) |
lp | 1713 | drivers/net/wavelan.c | if (lp->tx_first_in_use == I82586NULL) |
lp | 1716 | drivers/net/wavelan.c | obram_read(ioaddr, acoff(lp->tx_first_in_use, ac_status), (unsigned char *)&tx_status, sizeof(tx_status)); |
lp | 1723 | drivers/net/wavelan.c | --lp->tx_n_in_use; |
lp | 1730 | drivers/net/wavelan.c | if (lp->tx_n_in_use <= 0) |
lp | 1731 | drivers/net/wavelan.c | lp->tx_first_in_use = I82586NULL; |
lp | 1734 | drivers/net/wavelan.c | lp->tx_first_in_use += TXBLOCKZ; |
lp | 1735 | drivers/net/wavelan.c | if (lp->tx_first_in_use >= OFFSET_CU + NTXBLOCKS * TXBLOCKZ) |
lp | 1736 | drivers/net/wavelan.c | lp->tx_first_in_use -= NTXBLOCKS * TXBLOCKZ; |
lp | 1743 | drivers/net/wavelan.c | lp->stats.tx_packets++; |
lp | 1745 | drivers/net/wavelan.c | lp->stats.collisions += ncollisions; |
lp | 1753 | drivers/net/wavelan.c | lp->stats.tx_errors++; |
lp | 1756 | drivers/net/wavelan.c | lp->stats.tx_carrier_errors++; |
lp | 1762 | drivers/net/wavelan.c | lp->stats.tx_carrier_errors++; |
lp | 1767 | drivers/net/wavelan.c | lp->stats.tx_fifo_errors++; |
lp | 1772 | drivers/net/wavelan.c | lp->stats.tx_heartbeat_errors++; |
lp | 1778 | drivers/net/wavelan.c | lp->stats.tx_aborted_errors++; |
lp | 1796 | drivers/net/wavelan.c | if (lp->tx_n_in_use < NTXBLOCKS - 1) |
lp | 1810 | drivers/net/wavelan.c | net_local *lp; |
lp | 1819 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1821 | drivers/net/wavelan.c | if (lp->tx_n_in_use <= 0) |
lp | 1827 | drivers/net/wavelan.c | lp->watchdog.expires = WATCHDOG_JIFFIES; |
lp | 1828 | drivers/net/wavelan.c | add_timer(&lp->watchdog); |
lp | 1836 | drivers/net/wavelan.c | nreaped = wavelan_complete(dev, ioaddr, lp); |
lp | 1838 | drivers/net/wavelan.c | printk("%s: warning: wavelan_watchdog(): %d reaped, %d remain.\n", dev->name, nreaped, lp->tx_n_in_use); |
lp | 1856 | drivers/net/wavelan.c | net_local *lp; |
lp | 1868 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1902 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 1914 | drivers/net/wavelan.c | (void)wavelan_complete(dev, ioaddr, lp); |
lp | 1959 | drivers/net/wavelan.c | net_local *lp; |
lp | 1966 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1976 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 2006 | drivers/net/wavelan.c | net_local *lp; |
lp | 2008 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2010 | drivers/net/wavelan.c | return &lp->stats; |
lp | 2017 | drivers/net/wavelan.c | net_local *lp; |
lp | 2023 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2031 | drivers/net/wavelan.c | lp->promiscuous = 1; |
lp | 2042 | drivers/net/wavelan.c | lp->promiscuous = 0; |
lp | 2068 | drivers/net/wavelan.c | net_local *lp; |
lp | 2072 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2074 | drivers/net/wavelan.c | if (lp == (net_local *)0) |
lp | 2092 | drivers/net/wavelan.c | lp->correct_nwid += (m.mmr_correct_nwid_h << 8) | m.mmr_correct_nwid_l; |
lp | 2093 | drivers/net/wavelan.c | lp->wrong_nwid += (m.mmr_wrong_nwid_h << 8) | m.mmr_wrong_nwid_l; |
lp | 2101 | drivers/net/wavelan.c | lp->correct_nwid, |
lp | 2102 | drivers/net/wavelan.c | lp->wrong_nwid, |
lp | 2106 | drivers/net/wavelan.c | lp->tx_n_in_use, |
lp | 2107 | drivers/net/wavelan.c | lp->nresets |
lp | 2133 | drivers/net/wavelan.c | net_local *lp; |
lp | 2135 | drivers/net/wavelan.c | lp = first_wavelan; |
lp | 2138 | drivers/net/wavelan.c | size = sprintf_stats(buffer + len, lp->dev); |
lp | 2152 | drivers/net/wavelan.c | while ((lp = lp->next) != first_wavelan); |
lp | 2197 | drivers/net/wavelan.c | wavelan_cu_show_one(device *dev, net_local *lp, int i, unsigned short p) |
lp | 2410 | drivers/net/wavelan.c | net_local *lp; |
lp | 2412 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2425 | drivers/net/wavelan.c | net_local *lp; |
lp | 2429 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2434 | drivers/net/wavelan.c | for (i = 0, p = lp->tx_first_in_use; i < NTXBLOCKS; i++) |
lp | 2436 | drivers/net/wavelan.c | wavelan_cu_show_one(dev, lp, i, p); |
lp | 2461 | drivers/net/wavelan.c | net_local *lp; |
lp | 2463 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2466 | drivers/net/wavelan.c | printk(" tx_n_in_use=%d,", lp->tx_n_in_use); |
lp | 2467 | drivers/net/wavelan.c | printk(" hacr=0x%x,", lp->hacr); |
lp | 2468 | drivers/net/wavelan.c | printk(" rx_head=0x%x,", lp->rx_head); |
lp | 2469 | drivers/net/wavelan.c | printk(" rx_last=0x%x,", lp->rx_last); |
lp | 2470 | drivers/net/wavelan.c | printk(" tx_first_free=0x%x,", lp->tx_first_free); |
lp | 2471 | 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 | 21 | drivers/scsi/eata_dma_proc.c | u32 *lp, h_lp; |
lp | 25 | drivers/scsi/eata_dma_proc.c | lp = (u32 *)p; |
lp | 26 | drivers/scsi/eata_dma_proc.c | sp = ((short *)lp) + 1; /* Convert Header */ |
lp | 28 | drivers/scsi/eata_dma_proc.c | lp++; |
lp | 31 | drivers/scsi/eata_dma_proc.c | sp = (u16 *)lp; /* Convert SubHeader */ |
lp | 33 | drivers/scsi/eata_dma_proc.c | bp = (u8 *) lp; |
lp | 35 | drivers/scsi/eata_dma_proc.c | lp++; |
lp | 36 | drivers/scsi/eata_dma_proc.c | for (h_lp = (u32)lp; (u32)lp < h_lp + ((u32)*(bp + 3)); lp++) |
lp | 37 | drivers/scsi/eata_dma_proc.c | *lp = ntohl(*lp); |
lp | 38 | drivers/scsi/eata_dma_proc.c | }while ((u32)lp < ((u32)p) + 4 + h_sp); |
lp | 72 | fs/xiafs/bitmap.c | register long * lp; |
lp | 74 | fs/xiafs/bitmap.c | lp=(long *)bh->b_data; |
lp | 76 | fs/xiafs/bitmap.c | *lp++=0; |
lp | 249 | fs/xiafs/inode.c | dt_getblk(struct inode * inode, u_long *lp, int create, u_long prev_addr) |
lp | 255 | fs/xiafs/inode.c | if ((tmp=*lp)) { |
lp | 257 | fs/xiafs/inode.c | if (tmp == *lp) |
lp | 268 | fs/xiafs/inode.c | if (*lp) { |
lp | 273 | fs/xiafs/inode.c | *lp = tmp; |
lp | 283 | fs/xiafs/inode.c | u_long *lp; |
lp | 296 | fs/xiafs/inode.c | lp = nr + (u_long *) bh->b_data; |
lp | 298 | fs/xiafs/inode.c | if ((tmp=*lp)) { |
lp | 300 | fs/xiafs/inode.c | if (tmp == *lp) { |
lp | 317 | fs/xiafs/inode.c | if (*lp) { |
lp | 322 | fs/xiafs/inode.c | *lp = tmp; |
lp | 44 | fs/xiafs/truncate.c | u_long * lp; |
lp | 53 | fs/xiafs/truncate.c | lp=i + inode->u.xiafs_i.i_zone; |
lp | 54 | fs/xiafs/truncate.c | if (!(tmp = *lp)) |
lp | 61 | fs/xiafs/truncate.c | if ((bh && bh->b_count != 1) || tmp != *lp) |
lp | 64 | fs/xiafs/truncate.c | *lp = 0; |
lp | 74 | fs/xiafs/truncate.c | static int trunc_indirect(struct inode * inode, int addr_off, u_long * lp) |
lp | 84 | fs/xiafs/truncate.c | if ( !(tmp=*lp) ) |
lp | 87 | fs/xiafs/truncate.c | if (tmp != *lp) { |
lp | 92 | fs/xiafs/truncate.c | *lp = 0; |
lp | 123 | fs/xiafs/truncate.c | tmp = *lp; |
lp | 124 | fs/xiafs/truncate.c | *lp = 0; |
lp | 141 | fs/xiafs/truncate.c | u_long * dindp, * lp; |
lp | 144 | fs/xiafs/truncate.c | lp = &(inode->u.xiafs_i.i_dind_zone); |
lp | 145 | fs/xiafs/truncate.c | if (!(tmp = *lp)) |
lp | 148 | fs/xiafs/truncate.c | if (tmp != *lp) { |
lp | 153 | fs/xiafs/truncate.c | *lp = 0; |
lp | 172 | fs/xiafs/truncate.c | tmp = *lp; |
lp | 173 | fs/xiafs/truncate.c | *lp = 0; |
lp | 167 | net/ipv4/protocol.c | struct inet_protocol *lp = NULL; |
lp | 188 | net/ipv4/protocol.c | if (p->copy == 0 && lp != NULL) lp->copy = 0; |
lp | 194 | net/ipv4/protocol.c | lp = p; |