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 | 160 | drivers/char/lp.c | while (irq != lp->irq) { |
lp | 161 | drivers/char/lp.c | if (++lp >= &lp_table[LP_NO]) |
lp | 165 | drivers/char/lp.c | wake_up(&lp->lp_wait_q); |
lp | 173 | drivers/char/lp.c | struct lp_struct *lp = &lp_table[minor]; |
lp | 179 | drivers/char/lp.c | memcpy_fromfs(lp->lp_buffer, buf, copy_size); |
lp | 182 | drivers/char/lp.c | if (lp_char_interrupt(lp->lp_buffer[bytes_written], minor)) { |
lp | 216 | drivers/char/lp.c | interruptible_sleep_on(&lp->lp_wait_q); |
lp | 441 | drivers/char/lp.c | struct lp_struct *lp = &lp_table[minor]; |
lp | 450 | drivers/char/lp.c | lp->lp_buffer = (char *) kmalloc(LP_BUFFER_SIZE, GFP_KERNEL); |
lp | 451 | drivers/char/lp.c | if (!lp->lp_buffer) |
lp | 466 | drivers/char/lp.c | kfree_s(lp->lp_buffer, LP_BUFFER_SIZE); |
lp | 467 | drivers/char/lp.c | lp->lp_buffer = NULL; |
lp | 474 | drivers/char/lp.c | kfree_s(lp->lp_buffer, LP_BUFFER_SIZE); |
lp | 475 | 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 | 457 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 472 | drivers/net/3c507.c | if (lp->last_restart == lp->stats.tx_packets) { |
lp | 481 | drivers/net/3c507.c | lp->last_restart = lp->stats.tx_packets; |
lp | 523 | drivers/net/3c507.c | struct net_local *lp; |
lp | 535 | drivers/net/3c507.c | lp = (struct net_local *)dev->priv; |
lp | 548 | drivers/net/3c507.c | while (lp->tx_reap != lp->tx_head) { |
lp | 549 | drivers/net/3c507.c | unsigned short tx_status = shmem[lp->tx_reap>>1]; |
lp | 552 | drivers/net/3c507.c | if (net_debug > 5) printk("Couldn't reap %#x.\n", lp->tx_reap); |
lp | 556 | drivers/net/3c507.c | lp->stats.tx_packets++; |
lp | 557 | drivers/net/3c507.c | lp->stats.collisions += tx_status & 0xf; |
lp | 561 | drivers/net/3c507.c | lp->stats.tx_errors++; |
lp | 562 | drivers/net/3c507.c | if (tx_status & 0x0600) lp->stats.tx_carrier_errors++; |
lp | 563 | drivers/net/3c507.c | if (tx_status & 0x0100) lp->stats.tx_fifo_errors++; |
lp | 564 | drivers/net/3c507.c | if (!(tx_status & 0x0040)) lp->stats.tx_heartbeat_errors++; |
lp | 565 | drivers/net/3c507.c | if (tx_status & 0x0020) lp->stats.tx_aborted_errors++; |
lp | 568 | drivers/net/3c507.c | printk("Reaped %x, Tx status %04x.\n" , lp->tx_reap, tx_status); |
lp | 569 | drivers/net/3c507.c | lp->tx_reap += TX_BUF_SIZE; |
lp | 570 | drivers/net/3c507.c | if (lp->tx_reap > RX_BUF_START - TX_BUF_SIZE) |
lp | 571 | drivers/net/3c507.c | lp->tx_reap = TX_BUF_START; |
lp | 578 | drivers/net/3c507.c | printk("Received packet, rx_head %04x.\n", lp->rx_head); |
lp | 654 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 658 | drivers/net/3c507.c | return &lp->stats; |
lp | 665 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 669 | drivers/net/3c507.c | int cur_rxbuf = lp->rx_head = RX_BUF_START; |
lp | 695 | drivers/net/3c507.c | lp->rx_tail = cur_rxbuf; |
lp | 702 | drivers/net/3c507.c | (dev->mem_start + lp->rx_tail + 2); |
lp | 704 | drivers/net/3c507.c | *write_ptr++ = lp->rx_head; /* Link */ |
lp | 711 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 734 | drivers/net/3c507.c | lp->tx_cmd_link = IDLELOOP + 4; |
lp | 735 | drivers/net/3c507.c | lp->tx_head = lp->tx_reap = TX_BUF_START; |
lp | 770 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 772 | drivers/net/3c507.c | ushort tx_block = lp->tx_head; |
lp | 796 | drivers/net/3c507.c | *(ushort*)(dev->mem_start + lp->tx_cmd_link) = tx_block; |
lp | 797 | drivers/net/3c507.c | lp->tx_cmd_link = tx_block + 20; |
lp | 800 | drivers/net/3c507.c | lp->tx_head = tx_block + TX_BUF_SIZE; |
lp | 801 | drivers/net/3c507.c | if (lp->tx_head > RX_BUF_START - TX_BUF_SIZE) |
lp | 802 | drivers/net/3c507.c | lp->tx_head = TX_BUF_START; |
lp | 806 | drivers/net/3c507.c | dev->name, ioaddr, length, tx_block, lp->tx_head); |
lp | 809 | drivers/net/3c507.c | if (lp->tx_head != lp->tx_reap) |
lp | 816 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 818 | drivers/net/3c507.c | ushort rx_head = lp->rx_head; |
lp | 819 | drivers/net/3c507.c | ushort rx_tail = lp->rx_tail; |
lp | 839 | drivers/net/3c507.c | lp->stats.rx_errors++; |
lp | 840 | drivers/net/3c507.c | if (frame_status & 0x0800) lp->stats.rx_crc_errors++; |
lp | 841 | drivers/net/3c507.c | if (frame_status & 0x0400) lp->stats.rx_frame_errors++; |
lp | 842 | drivers/net/3c507.c | if (frame_status & 0x0200) lp->stats.rx_fifo_errors++; |
lp | 843 | drivers/net/3c507.c | if (frame_status & 0x0100) lp->stats.rx_over_errors++; |
lp | 844 | drivers/net/3c507.c | if (frame_status & 0x0080) lp->stats.rx_length_errors++; |
lp | 853 | drivers/net/3c507.c | lp->stats.rx_dropped++; |
lp | 865 | drivers/net/3c507.c | lp->stats.rx_packets++; |
lp | 880 | drivers/net/3c507.c | lp->rx_head = rx_head; |
lp | 881 | drivers/net/3c507.c | lp->rx_tail = rx_tail; |
lp | 390 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
lp | 462 | drivers/net/3c509.c | if (tx_status & 0x38) lp->stats.tx_aborted_errors++; |
lp | 535 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
lp | 542 | drivers/net/3c509.c | return &lp->stats; |
lp | 552 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
lp | 560 | drivers/net/3c509.c | lp->stats.tx_carrier_errors += inb(ioaddr + 0); |
lp | 561 | drivers/net/3c509.c | lp->stats.tx_heartbeat_errors += inb(ioaddr + 1); |
lp | 563 | drivers/net/3c509.c | lp->stats.collisions += inb(ioaddr + 3); |
lp | 564 | drivers/net/3c509.c | lp->stats.tx_window_errors += inb(ioaddr + 4); |
lp | 565 | drivers/net/3c509.c | lp->stats.rx_fifo_errors += inb(ioaddr + 5); |
lp | 566 | drivers/net/3c509.c | lp->stats.tx_packets += inb(ioaddr + 6); |
lp | 581 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
lp | 591 | drivers/net/3c509.c | lp->stats.rx_errors++; |
lp | 593 | drivers/net/3c509.c | case 0x0000: lp->stats.rx_over_errors++; break; |
lp | 594 | drivers/net/3c509.c | case 0x0800: lp->stats.rx_length_errors++; break; |
lp | 595 | drivers/net/3c509.c | case 0x1000: lp->stats.rx_frame_errors++; break; |
lp | 596 | drivers/net/3c509.c | case 0x1800: lp->stats.rx_length_errors++; break; |
lp | 597 | drivers/net/3c509.c | case 0x2000: lp->stats.rx_frame_errors++; break; |
lp | 598 | drivers/net/3c509.c | case 0x2800: lp->stats.rx_crc_errors++; break; |
lp | 619 | drivers/net/3c509.c | lp->stats.rx_packets++; |
lp | 625 | 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 | 251 | drivers/net/arcnet.c | #define TBUSY lp->adev->tbusy \ |
lp | 252 | drivers/net/arcnet.c | =lp->edev->tbusy |
lp | 253 | drivers/net/arcnet.c | #define IF_TBUSY (lp->adev->tbusy \ |
lp | 254 | drivers/net/arcnet.c | || lp->edev->tbusy) |
lp | 255 | drivers/net/arcnet.c | #define START lp->adev->start \ |
lp | 256 | drivers/net/arcnet.c | =lp->edev->start |
lp | 543 | drivers/net/arcnet.c | struct arcnet_local *lp; |
lp | 637 | drivers/net/arcnet.c | lp=(struct arcnet_local *)(dev->priv); |
lp | 670 | drivers/net/arcnet.c | lp->arcnum,lp->arcnum); |
lp | 671 | drivers/net/arcnet.c | if (lp->arcnum==0) |
lp | 673 | drivers/net/arcnet.c | if (lp->arcnum==255) |
lp | 675 | drivers/net/arcnet.c | dev->dev_addr[0]=lp->arcnum; |
lp | 676 | drivers/net/arcnet.c | lp->sequence=1; |
lp | 677 | drivers/net/arcnet.c | lp->recbuf=0; |
lp | 869 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)dev->priv; |
lp | 871 | drivers/net/arcnet.c | int delayval,recbuf=lp->recbuf; |
lp | 896 | drivers/net/arcnet.c | lp->arcnum=cardmem[1]; /* save address for later use */ |
lp | 899 | drivers/net/arcnet.c | recbuf=lp->recbuf=0; |
lp | 900 | drivers/net/arcnet.c | lp->txbuf=2; |
lp | 921 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 923 | drivers/net/arcnet.c | ether_setup(lp->edev); |
lp | 925 | drivers/net/arcnet.c | dev->dev_addr[5]=lp->arcnum; |
lp | 927 | drivers/net/arcnet.c | lp->edev->open=NULL; |
lp | 928 | drivers/net/arcnet.c | lp->edev->stop=NULL; |
lp | 929 | drivers/net/arcnet.c | lp->edev->hard_start_xmit=arcnetE_send_packet; |
lp | 933 | drivers/net/arcnet.c | lp->edev->name); |
lp | 956 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 977 | drivers/net/arcnet.c | lp->intx=0; |
lp | 978 | drivers/net/arcnet.c | lp->in_txhandler=0; |
lp | 981 | drivers/net/arcnet.c | lp->adev=dev; |
lp | 984 | drivers/net/arcnet.c | lp->adev->name); |
lp | 987 | drivers/net/arcnet.c | lp->edev=(struct device *)kmalloc(sizeof(struct device),GFP_KERNEL); |
lp | 988 | drivers/net/arcnet.c | memcpy(lp->edev,dev,sizeof(struct device)); |
lp | 989 | drivers/net/arcnet.c | lp->edev->name=(char *)kmalloc(10,GFP_KERNEL); |
lp | 990 | drivers/net/arcnet.c | sprintf(lp->edev->name,"%se",dev->name); |
lp | 991 | drivers/net/arcnet.c | lp->edev->init=arcnetE_init; |
lp | 992 | drivers/net/arcnet.c | register_netdev(lp->edev); |
lp | 1011 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1023 | drivers/net/arcnet.c | lp->adev=NULL; |
lp | 1026 | drivers/net/arcnet.c | lp->edev->start=0; |
lp | 1027 | drivers/net/arcnet.c | lp->edev->priv=NULL; |
lp | 1028 | drivers/net/arcnet.c | unregister_netdev(lp->edev); |
lp | 1029 | drivers/net/arcnet.c | kfree(lp->edev->name); |
lp | 1030 | drivers/net/arcnet.c | kfree(lp->edev); |
lp | 1031 | drivers/net/arcnet.c | lp->edev=NULL; |
lp | 1056 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1059 | drivers/net/arcnet.c | lp->intx++; |
lp | 1063 | drivers/net/arcnet.c | inb(STATUS),lp->intx); |
lp | 1065 | drivers/net/arcnet.c | if (lp->in_txhandler) |
lp | 1068 | drivers/net/arcnet.c | lp->intx--; |
lp | 1077 | drivers/net/arcnet.c | int recbuf=lp->recbuf; |
lp | 1084 | drivers/net/arcnet.c | status,tickssofar,lp->outgoing.skb, |
lp | 1085 | drivers/net/arcnet.c | lp->outgoing.numsegs, |
lp | 1086 | drivers/net/arcnet.c | lp->outgoing.segnum); |
lp | 1087 | drivers/net/arcnet.c | lp->intx--; |
lp | 1093 | drivers/net/arcnet.c | status,lp->intx,lp->in_txhandler,tickssofar); |
lp | 1095 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 1105 | drivers/net/arcnet.c | if (lp->outgoing.skb) |
lp | 1107 | drivers/net/arcnet.c | dev_kfree_skb(lp->outgoing.skb,FREE_WRITE); |
lp | 1108 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 1110 | drivers/net/arcnet.c | lp->outgoing.skb=NULL; |
lp | 1113 | drivers/net/arcnet.c | lp->intx--; |
lp | 1116 | drivers/net/arcnet.c | lp->txready=0; |
lp | 1117 | drivers/net/arcnet.c | lp->sending=0; |
lp | 1131 | drivers/net/arcnet.c | inb(STATUS),lp->intx,jiffies-dev->trans_start); |
lp | 1133 | drivers/net/arcnet.c | lp->intx--; |
lp | 1137 | drivers/net/arcnet.c | if (lp->txready) /* transmit already in progress! */ |
lp | 1145 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 1146 | drivers/net/arcnet.c | lp->intx--; |
lp | 1147 | drivers/net/arcnet.c | lp->txready=0; /* we definitely need this line! */ |
lp | 1157 | drivers/net/arcnet.c | inb(STATUS),lp->intx,jiffies-dev->trans_start); |
lp | 1158 | drivers/net/arcnet.c | lp->intx--; |
lp | 1162 | drivers/net/arcnet.c | struct Outgoing *out=&(lp->outgoing); |
lp | 1181 | drivers/net/arcnet.c | out->hdr->sequence=(lp->sequence++); |
lp | 1183 | drivers/net/arcnet.c | if (lp->txready && inb(STATUS)&TXFREEflag) |
lp | 1205 | drivers/net/arcnet.c | if (!lp->sending) |
lp | 1229 | drivers/net/arcnet.c | if (lp->txready && inb(STATUS)&TXFREEflag) |
lp | 1232 | drivers/net/arcnet.c | if (!lp->txready) |
lp | 1238 | drivers/net/arcnet.c | if (!lp->sending) |
lp | 1242 | drivers/net/arcnet.c | if (!lp->sending) |
lp | 1261 | drivers/net/arcnet.c | lp->intx--; |
lp | 1262 | drivers/net/arcnet.c | lp->stats.tx_packets++; |
lp | 1274 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1276 | drivers/net/arcnet.c | struct Outgoing *out=&(lp->outgoing); |
lp | 1278 | drivers/net/arcnet.c | if (lp->txready) |
lp | 1317 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1320 | drivers/net/arcnet.c | (union ArcPacket *)(dev->mem_start+512*(lp->txbuf^1)); |
lp | 1325 | drivers/net/arcnet.c | lp->txbuf=lp->txbuf^1; /* XOR with 1 to alternate between 2 and 3 */ |
lp | 1335 | drivers/net/arcnet.c | memset((void *)dev->mem_start+lp->txbuf*512,0x42,512); |
lp | 1406 | drivers/net/arcnet.c | lp->outgoing.lastload_dest=hdr->daddr; |
lp | 1408 | drivers/net/arcnet.c | lp->txready=lp->txbuf; /* packet is ready for sending */ |
lp | 1417 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)dev->priv; |
lp | 1424 | drivers/net/arcnet.c | if (!(inb(STATUS)&TXFREEflag) || !lp->txready) return; |
lp | 1427 | drivers/net/arcnet.c | outb(TXcmd|(lp->txready<<3),COMMAND); |
lp | 1432 | drivers/net/arcnet.c | lp->txready=0; |
lp | 1433 | drivers/net/arcnet.c | lp->sending++; |
lp | 1435 | drivers/net/arcnet.c | lp->outgoing.lasttrans_dest=lp->outgoing.lastload_dest; |
lp | 1436 | drivers/net/arcnet.c | lp->outgoing.lastload_dest=0; |
lp | 1446 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1482 | drivers/net/arcnet.c | (union ArcPacket *)(dev->mem_start+512*(lp->txbuf^1)); |
lp | 1491 | drivers/net/arcnet.c | lp->adev->name,lp->edev->name); |
lp | 1501 | drivers/net/arcnet.c | lp->txbuf=lp->txbuf^1; /* XOR with 1 to alternate btw 2 & 3 */ |
lp | 1505 | drivers/net/arcnet.c | memset((void *)dev->mem_start+lp->txbuf*512,0x42,512); |
lp | 1565 | drivers/net/arcnet.c | lp->outgoing.lastload_dest=daddr; |
lp | 1567 | drivers/net/arcnet.c | lp->txready=lp->txbuf; /* packet is ready for sending */ |
lp | 1613 | drivers/net/arcnet.c | struct arcnet_local *lp; |
lp | 1622 | drivers/net/arcnet.c | lp = (struct arcnet_local *)dev->priv; |
lp | 1664 | drivers/net/arcnet.c | lp->stats.tx_carrier_errors++; |
lp | 1671 | drivers/net/arcnet.c | int recbuf=lp->recbuf=!lp->recbuf; |
lp | 1687 | drivers/net/arcnet.c | if (status&TXFREEflag && !lp->in_txhandler && lp->sending) |
lp | 1689 | drivers/net/arcnet.c | struct Outgoing *out=&(lp->outgoing); |
lp | 1691 | drivers/net/arcnet.c | lp->in_txhandler++; |
lp | 1692 | drivers/net/arcnet.c | lp->sending--; |
lp | 1701 | drivers/net/arcnet.c | if (lp->outgoing.lasttrans_dest != 0) |
lp | 1706 | drivers/net/arcnet.c | lp->outgoing.lasttrans_dest); |
lp | 1707 | drivers/net/arcnet.c | lp->stats.tx_errors++; |
lp | 1714 | drivers/net/arcnet.c | lp->outgoing.lasttrans_dest); |
lp | 1720 | drivers/net/arcnet.c | if (lp->txready) |
lp | 1726 | drivers/net/arcnet.c | if (lp->intx) |
lp | 1728 | drivers/net/arcnet.c | lp->in_txhandler--; |
lp | 1732 | drivers/net/arcnet.c | if (!lp->outgoing.skb) |
lp | 1738 | drivers/net/arcnet.c | if (!lp->txready && IF_TBUSY) |
lp | 1744 | drivers/net/arcnet.c | lp->in_txhandler--; |
lp | 1755 | drivers/net/arcnet.c | if (lp->txready && !lp->sending) |
lp | 1770 | drivers/net/arcnet.c | if (!lp->txready && IF_TBUSY) |
lp | 1778 | drivers/net/arcnet.c | lp->in_txhandler--; |
lp | 1787 | drivers/net/arcnet.c | if (dev->start && lp->sending ) |
lp | 1810 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1826 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 1904 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 1928 | drivers/net/arcnet.c | struct Incoming *in=&lp->incoming[saddr]; |
lp | 1939 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 1940 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 1949 | drivers/net/arcnet.c | lp->stats.rx_dropped++; |
lp | 1995 | drivers/net/arcnet.c | lp->stats.rx_frame_errors++; |
lp | 2015 | drivers/net/arcnet.c | lp->stats.rx_packets++; |
lp | 2036 | drivers/net/arcnet.c | struct Incoming *in=&lp->incoming[saddr]; |
lp | 2048 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 2049 | drivers/net/arcnet.c | lp->stats.rx_fifo_errors++; |
lp | 2062 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 2063 | drivers/net/arcnet.c | lp->stats.rx_over_errors++; |
lp | 2075 | drivers/net/arcnet.c | lp->stats.rx_dropped++; |
lp | 2085 | drivers/net/arcnet.c | lp->stats.rx_dropped++; |
lp | 2115 | drivers/net/arcnet.c | lp->stats.rx_errors++; |
lp | 2136 | drivers/net/arcnet.c | lp->stats.tx_dropped++; |
lp | 2137 | drivers/net/arcnet.c | lp->stats.rx_fifo_errors++; |
lp | 2182 | drivers/net/arcnet.c | lp->stats.rx_packets++; |
lp | 2194 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 2204 | drivers/net/arcnet.c | lp->stats.rx_dropped++; |
lp | 2209 | drivers/net/arcnet.c | skb->dev = lp->edev; |
lp | 2232 | drivers/net/arcnet.c | lp->stats.rx_packets++; |
lp | 2250 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
lp | 2252 | drivers/net/arcnet.c | return &lp->stats; |
lp | 2265 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
lp | 2403 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *) (dev->priv); |
lp | 2433 | drivers/net/arcnet.c | lp->stats.rx_frame_errors++; |
lp | 325 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 350 | drivers/net/at1700.c | lp->tx_started = 0; |
lp | 351 | drivers/net/at1700.c | lp->tx_queue = 0; |
lp | 352 | drivers/net/at1700.c | lp->tx_queue_len = 0; |
lp | 372 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 388 | drivers/net/at1700.c | lp->stats.tx_errors++; |
lp | 396 | drivers/net/at1700.c | lp->tx_started = 0; |
lp | 397 | drivers/net/at1700.c | lp->tx_queue = 0; |
lp | 398 | drivers/net/at1700.c | lp->tx_queue_len = 0; |
lp | 423 | drivers/net/at1700.c | lp->tx_queue++; |
lp | 424 | drivers/net/at1700.c | lp->tx_queue_len += length + 2; |
lp | 426 | drivers/net/at1700.c | if (lp->tx_started == 0) { |
lp | 428 | drivers/net/at1700.c | outb(0x80 | lp->tx_queue, ioaddr + TX_START); |
lp | 429 | drivers/net/at1700.c | lp->tx_queue = 0; |
lp | 430 | drivers/net/at1700.c | lp->tx_queue_len = 0; |
lp | 432 | drivers/net/at1700.c | lp->tx_started = 1; |
lp | 434 | drivers/net/at1700.c | } else if (lp->tx_queue_len < 4096 - 1502) |
lp | 452 | drivers/net/at1700.c | struct net_local *lp; |
lp | 462 | drivers/net/at1700.c | lp = (struct net_local *)dev->priv; |
lp | 474 | drivers/net/at1700.c | lp->stats.tx_packets++; |
lp | 475 | drivers/net/at1700.c | if (lp->tx_queue) { |
lp | 476 | drivers/net/at1700.c | outb(0x80 | lp->tx_queue, ioaddr + TX_START); |
lp | 477 | drivers/net/at1700.c | lp->tx_queue = 0; |
lp | 478 | drivers/net/at1700.c | lp->tx_queue_len = 0; |
lp | 483 | drivers/net/at1700.c | lp->tx_started = 0; |
lp | 500 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 519 | drivers/net/at1700.c | lp->stats.rx_errors++; |
lp | 520 | drivers/net/at1700.c | if (status & 0x08) lp->stats.rx_length_errors++; |
lp | 521 | drivers/net/at1700.c | if (status & 0x04) lp->stats.rx_frame_errors++; |
lp | 522 | drivers/net/at1700.c | if (status & 0x02) lp->stats.rx_crc_errors++; |
lp | 523 | drivers/net/at1700.c | if (status & 0x01) lp->stats.rx_over_errors++; |
lp | 534 | drivers/net/at1700.c | lp->stats.rx_errors++; |
lp | 544 | drivers/net/at1700.c | lp->stats.rx_dropped++; |
lp | 553 | drivers/net/at1700.c | lp->stats.rx_packets++; |
lp | 606 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 612 | 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 | 1430 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1440 | drivers/net/de4x5.c | if (lp->setup_f == HASH_PERF) { |
lp | 1464 | drivers/net/de4x5.c | lp->setup_frame[byte] |= bit; |
lp | 1498 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 1504 | drivers/net/de4x5.c | lp->bus = EISA; |
lp | 1522 | drivers/net/de4x5.c | lp->bus = EISA; |
lp | 1523 | drivers/net/de4x5.c | lp->chipset = device; |
lp | 1569 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 1574 | drivers/net/de4x5.c | lp->bus = PCI; |
lp | 1594 | drivers/net/de4x5.c | lp->device = dev_num; |
lp | 1595 | drivers/net/de4x5.c | lp->bus_num = pb; |
lp | 1598 | drivers/net/de4x5.c | lp->chipset = device; |
lp | 1757 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1760 | drivers/net/de4x5.c | lp->tx_enable = YES; |
lp | 1762 | drivers/net/de4x5.c | if (lp->chipset != DC21140) { |
lp | 1769 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 1770 | drivers/net/de4x5.c | lp->media = (lp->autosense == AUTO ? TP : lp->autosense); |
lp | 1772 | drivers/net/de4x5.c | } else if (lp->chipset == DC21041) { |
lp | 1773 | drivers/net/de4x5.c | lp->media = (lp->autosense == AUTO ? TP_NW : lp->autosense); |
lp | 1775 | drivers/net/de4x5.c | } else if (lp->chipset == DC21140) { |
lp | 1777 | drivers/net/de4x5.c | lp->media = (lp->autosense == AUTO ? _10Mb : lp->autosense); |
lp | 1782 | drivers/net/de4x5.c | if (lp->chipset != DC21140) { |
lp | 1783 | drivers/net/de4x5.c | printk("media is %s\n", (lp->media == NC ? "unconnected!" : |
lp | 1784 | drivers/net/de4x5.c | (lp->media == TP ? "TP." : |
lp | 1785 | drivers/net/de4x5.c | (lp->media == ANS ? "TP/Nway." : |
lp | 1786 | drivers/net/de4x5.c | (lp->media == BNC ? "BNC." : |
lp | 1787 | drivers/net/de4x5.c | (lp->media == AUI ? "AUI." : |
lp | 1791 | drivers/net/de4x5.c | printk("mode is %s\n",(lp->media == NC ? "link down.": |
lp | 1792 | drivers/net/de4x5.c | (lp->media == _100Mb ? "100Mb/s." : |
lp | 1793 | drivers/net/de4x5.c | (lp->media == _10Mb ? "10Mb/s." : |
lp | 1799 | drivers/net/de4x5.c | if (lp->media) { |
lp | 1800 | drivers/net/de4x5.c | lp->lostMedia = 0; |
lp | 1802 | drivers/net/de4x5.c | if ((lp->media == TP) || (lp->media == ANS)) { |
lp | 1803 | drivers/net/de4x5.c | lp->irq_mask |= IMR_LFM; |
lp | 1808 | drivers/net/de4x5.c | return (lp->media); |
lp | 1813 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1818 | drivers/net/de4x5.c | switch (lp->media) { |
lp | 1825 | drivers/net/de4x5.c | if (linkBad && (lp->autosense == AUTO)) { |
lp | 1826 | drivers/net/de4x5.c | lp->media = BNC_AUI; |
lp | 1837 | drivers/net/de4x5.c | if (linkBad && (lp->autosense == AUTO)) { |
lp | 1838 | drivers/net/de4x5.c | lp->media = NC; |
lp | 1864 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1868 | drivers/net/de4x5.c | switch (lp->media) { |
lp | 1876 | drivers/net/de4x5.c | lp->media = ANS; |
lp | 1878 | drivers/net/de4x5.c | lp->media = AUI; |
lp | 1887 | drivers/net/de4x5.c | if (!(sts & STS_LNP) && (lp->autosense == AUTO)) { |
lp | 1888 | drivers/net/de4x5.c | lp->media = TP; |
lp | 1899 | drivers/net/de4x5.c | if (!(sts & STS_LNP) && (lp->autosense == AUTO)) { |
lp | 1901 | drivers/net/de4x5.c | lp->media = AUI; |
lp | 1903 | drivers/net/de4x5.c | lp->media = BNC; |
lp | 1915 | drivers/net/de4x5.c | if (!(inl(DE4X5_SISR) & SISR_SRA) && (lp->autosense == AUTO)) { |
lp | 1916 | drivers/net/de4x5.c | lp->media = BNC; |
lp | 1927 | drivers/net/de4x5.c | if (!(inl(DE4X5_SISR) & SISR_SRA) && (lp->autosense == AUTO)) { |
lp | 1928 | drivers/net/de4x5.c | lp->media = NC; |
lp | 1930 | drivers/net/de4x5.c | if (ping_media(dev)) lp->media = NC; |
lp | 1949 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 1953 | drivers/net/de4x5.c | switch(lp->media) { |
lp | 1975 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2027 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2035 | drivers/net/de4x5.c | entry = lp->tx_new; /* Remember the ring position */ |
lp | 2041 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
lp | 2042 | drivers/net/de4x5.c | lp->tx_old = lp->tx_new; |
lp | 2047 | drivers/net/de4x5.c | if (lp->tx_ring[entry].status >= 0) linkBad=0; |
lp | 2052 | drivers/net/de4x5.c | return ((linkBad || (lp->tx_ring[entry].status & TD_ES)) ? 1 : 0); |
lp | 2061 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2088 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2104 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2108 | drivers/net/de4x5.c | if (lp->chipset == DC21140) { |
lp | 2226 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 2232 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 2234 | drivers/net/de4x5.c | if (lp->bus == PCI) { |
lp | 2256 | drivers/net/de4x5.c | short *p = (short *)&lp->srom; |
lp | 2270 | drivers/net/de4x5.c | struct bus_type *lp = &bus; |
lp | 2276 | drivers/net/de4x5.c | if (lp->bus == PCI) { |
lp | 2277 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 2285 | drivers/net/de4x5.c | dev->dev_addr[i] = (u_char) lp->srom.ieee_addr[i]; i++; |
lp | 2286 | drivers/net/de4x5.c | dev->dev_addr[i] = (u_char) lp->srom.ieee_addr[i]; i++; |
lp | 2299 | drivers/net/de4x5.c | if (lp->bus == PCI) { |
lp | 2300 | drivers/net/de4x5.c | if (lp->chipset == DC21040) { |
lp | 2423 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2425 | drivers/net/de4x5.c | char *pa = lp->setup_frame; |
lp | 2429 | drivers/net/de4x5.c | memset(lp->setup_frame, 0, SETUP_FRAME_LEN); |
lp | 2432 | drivers/net/de4x5.c | if (lp->setup_f == HASH_PERF) { |
lp | 2433 | drivers/net/de4x5.c | for (pa=lp->setup_frame+IMPERF_PA_OFFSET, i=0; i<ETH_ALEN; i++) { |
lp | 2437 | drivers/net/de4x5.c | *(lp->setup_frame + (HASH_TABLE_LEN >> 3) - 3) = 0x80; /* B'cast address */ |
lp | 2454 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2457 | drivers/net/de4x5.c | lp->irq_mask |= IMR_TMM; |
lp | 2458 | drivers/net/de4x5.c | outl(lp->irq_mask, DE4X5_IMR); |
lp | 2466 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2469 | drivers/net/de4x5.c | lp->irq_mask &= ~IMR_TMM; |
lp | 2470 | drivers/net/de4x5.c | outl(lp->irq_mask, DE4X5_IMR); |
lp | 2496 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
lp | 2534 | drivers/net/de4x5.c | if (lp->setup_f == HASH_PERF) { |
lp | 2535 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | HASH_F | TD_SET | |
lp | 2538 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | |
lp | 2541 | drivers/net/de4x5.c | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
lp | 2575 | drivers/net/de4x5.c | memcpy_tofs(ioc->data, lp->setup_frame, ioc->len); |
lp | 2612 | drivers/net/de4x5.c | ioc->len = sizeof(lp->pktStats); |
lp | 2618 | drivers/net/de4x5.c | memcpy_tofs(ioc->data, &lp->pktStats, ioc->len); |
lp | 2625 | drivers/net/de4x5.c | memset(&lp->pktStats, 0, sizeof(lp->pktStats)); |
lp | 2674 | drivers/net/de4x5.c | tmp.addr[j++] = lp->rxRingSize; |
lp | 2675 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)lp->rx_ring; j+=4; |
lp | 2676 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)lp->tx_ring; j+=4; |
lp | 2678 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize-1;i++){ |
lp | 2680 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)&lp->rx_ring[i].status; j+=4; |
lp | 2683 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)&lp->rx_ring[i].status; j+=4; |
lp | 2684 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize-1;i++){ |
lp | 2686 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)&lp->tx_ring[i].status; j+=4; |
lp | 2689 | drivers/net/de4x5.c | tmp.lval[j>>2] = (long)&lp->tx_ring[i].status; j+=4; |
lp | 2691 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize-1;i++){ |
lp | 2693 | drivers/net/de4x5.c | tmp.lval[j>>2] = (s32)lp->rx_ring[i].buf; j+=4; |
lp | 2696 | drivers/net/de4x5.c | tmp.lval[j>>2] = (s32)lp->rx_ring[i].buf; j+=4; |
lp | 2697 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize-1;i++){ |
lp | 2699 | drivers/net/de4x5.c | tmp.lval[j>>2] = (s32)lp->tx_ring[i].buf; j+=4; |
lp | 2702 | drivers/net/de4x5.c | tmp.lval[j>>2] = (s32)lp->tx_ring[i].buf; j+=4; |
lp | 2704 | drivers/net/de4x5.c | for (i=0;i<lp->rxRingSize;i++){ |
lp | 2705 | drivers/net/de4x5.c | tmp.lval[j>>2] = lp->rx_ring[i].status; j+=4; |
lp | 2707 | drivers/net/de4x5.c | for (i=0;i<lp->txRingSize;i++){ |
lp | 2708 | drivers/net/de4x5.c | tmp.lval[j>>2] = lp->tx_ring[i].status; j+=4; |
lp | 2720 | drivers/net/de4x5.c | tmp.addr[j++] = lp->txRingSize; |
lp | 2761 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *) thisDE4X5.priv; |
lp | 2766 | drivers/net/de4x5.c | if (lp) { |
lp | 2767 | drivers/net/de4x5.c | kfree_s(bus_to_virt(lp->rx_ring[0].buf), RX_BUFF_SZ * NUM_RX_DESC + ALIGN); |
lp | 2772 | 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 | 508 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 516 | drivers/net/eepro.c | lp->eepro = 1; /* Yes, an Intel EtherExpress Pro/10 */ |
lp | 517 | drivers/net/eepro.c | else lp->eepro = 0; /* No, it is a generic 82585 lan card */ |
lp | 573 | drivers/net/eepro.c | lp->rx_start = (RCV_LOWER_LIMIT << 8) ; |
lp | 584 | drivers/net/eepro.c | lp->tx_start = lp->tx_end = XMT_LOWER_LIMIT << 8; /* or = RCV_RAM */ |
lp | 585 | drivers/net/eepro.c | lp->tx_last = 0; |
lp | 605 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 620 | drivers/net/eepro.c | lp->stats.tx_errors++; |
lp | 628 | drivers/net/eepro.c | lp->tx_start = lp->tx_end = RCV_RAM; |
lp | 629 | drivers/net/eepro.c | lp->tx_last = 0; |
lp | 725 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 742 | drivers/net/eepro.c | lp->tx_start = lp->tx_end = RCV_RAM ; |
lp | 743 | drivers/net/eepro.c | lp->tx_last = 0; |
lp | 776 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 778 | drivers/net/eepro.c | return &lp->stats; |
lp | 790 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 826 | drivers/net/eepro.c | outw(lp->tx_end, ioaddr + HOST_ADDRESS_REG); |
lp | 840 | drivers/net/eepro.c | outw(lp->tx_end, ioaddr + XMT_BAR); |
lp | 844 | drivers/net/eepro.c | i = lp->tx_end + XMT_HEADER + 6*(num_addrs + 1); |
lp | 845 | drivers/net/eepro.c | if (lp->tx_start != lp->tx_end) { |
lp | 848 | drivers/net/eepro.c | outw(lp->tx_last + XMT_CHAIN, ioaddr + HOST_ADDRESS_REG); |
lp | 850 | drivers/net/eepro.c | outw(lp->tx_last + XMT_COUNT, ioaddr + HOST_ADDRESS_REG); |
lp | 853 | drivers/net/eepro.c | lp->tx_end = i ; |
lp | 854 | drivers/net/eepro.c | } else lp->tx_start = lp->tx_end = i ; |
lp | 932 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 942 | drivers/net/eepro.c | if (lp->tx_end > lp->tx_start) |
lp | 943 | drivers/net/eepro.c | tx_available = XMT_RAM - (lp->tx_end - lp->tx_start); |
lp | 944 | drivers/net/eepro.c | else if (lp->tx_end < lp->tx_start) |
lp | 945 | drivers/net/eepro.c | tx_available = lp->tx_start - lp->tx_end; |
lp | 957 | drivers/net/eepro.c | last = lp->tx_end; |
lp | 977 | drivers/net/eepro.c | if (lp->tx_start != lp->tx_end) { |
lp | 980 | drivers/net/eepro.c | if (lp->tx_end != last) { |
lp | 981 | drivers/net/eepro.c | outw(lp->tx_last + XMT_CHAIN, ioaddr + HOST_ADDRESS_REG); |
lp | 984 | drivers/net/eepro.c | outw(lp->tx_last + XMT_COUNT, ioaddr + HOST_ADDRESS_REG); |
lp | 995 | drivers/net/eepro.c | if (lp->tx_start == lp->tx_end) { |
lp | 998 | drivers/net/eepro.c | lp->tx_start = last; /* I don't like to change tx_start here */ |
lp | 1002 | drivers/net/eepro.c | lp->tx_last = last; |
lp | 1003 | drivers/net/eepro.c | lp->tx_end = end; |
lp | 1022 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 1025 | drivers/net/eepro.c | short rcv_car = lp->rx_start; |
lp | 1048 | drivers/net/eepro.c | lp->stats.rx_dropped++; |
lp | 1058 | drivers/net/eepro.c | lp->stats.rx_packets++; |
lp | 1062 | drivers/net/eepro.c | lp->stats.rx_errors++; |
lp | 1064 | drivers/net/eepro.c | lp->stats.rx_over_errors++; |
lp | 1066 | drivers/net/eepro.c | lp->stats.rx_frame_errors++; |
lp | 1068 | drivers/net/eepro.c | lp->stats.rx_crc_errors++; |
lp | 1073 | drivers/net/eepro.c | lp->stats.rx_length_errors++; |
lp | 1077 | drivers/net/eepro.c | rcv_car = lp->rx_start + RCV_HEADER + rcv_size; |
lp | 1078 | drivers/net/eepro.c | lp->rx_start = rcv_next_frame; |
lp | 1094 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
lp | 1099 | drivers/net/eepro.c | while (lp->tx_start != lp->tx_end) { |
lp | 1101 | drivers/net/eepro.c | outw(lp->tx_start, ioaddr + HOST_ADDRESS_REG); |
lp | 1105 | drivers/net/eepro.c | lp->tx_start = inw(ioaddr+IO_PORT); |
lp | 1113 | drivers/net/eepro.c | lp->stats.tx_packets++; |
lp | 1115 | drivers/net/eepro.c | lp->stats.tx_errors++; |
lp | 1117 | drivers/net/eepro.c | lp->stats.tx_carrier_errors++; |
lp | 1122 | drivers/net/eepro.c | lp->stats.collisions += (xmt_status & 0x000f); |
lp | 1124 | drivers/net/eepro.c | lp->stats.tx_heartbeat_errors++; |
lp | 455 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 468 | drivers/net/eexpress.c | lp->stats.tx_errors++; |
lp | 470 | drivers/net/eexpress.c | if (lp->last_restart == lp->stats.tx_packets) { |
lp | 479 | drivers/net/eexpress.c | lp->last_restart = lp->stats.tx_packets; |
lp | 511 | drivers/net/eexpress.c | lp->stats.tx_aborted_errors++; |
lp | 522 | drivers/net/eexpress.c | struct net_local *lp; |
lp | 533 | drivers/net/eexpress.c | lp = (struct net_local *)dev->priv; |
lp | 545 | drivers/net/eexpress.c | while (lp->tx_reap != lp->tx_head) { /* if (status & 0x8000) */ |
lp | 547 | drivers/net/eexpress.c | outw(lp->tx_reap, ioaddr + READ_PTR); |
lp | 550 | drivers/net/eexpress.c | if (net_debug > 5) printk("Couldn't reap %#x.\n", lp->tx_reap); |
lp | 554 | drivers/net/eexpress.c | lp->stats.tx_packets++; |
lp | 555 | drivers/net/eexpress.c | lp->stats.collisions += tx_status & 0xf; |
lp | 559 | drivers/net/eexpress.c | lp->stats.tx_errors++; |
lp | 560 | drivers/net/eexpress.c | if (tx_status & 0x0600) lp->stats.tx_carrier_errors++; |
lp | 561 | drivers/net/eexpress.c | if (tx_status & 0x0100) lp->stats.tx_fifo_errors++; |
lp | 562 | drivers/net/eexpress.c | if (!(tx_status & 0x0040)) lp->stats.tx_heartbeat_errors++; |
lp | 563 | drivers/net/eexpress.c | if (tx_status & 0x0020) lp->stats.tx_aborted_errors++; |
lp | 566 | drivers/net/eexpress.c | printk("Reaped %x, Tx status %04x.\n" , lp->tx_reap, tx_status); |
lp | 567 | drivers/net/eexpress.c | lp->tx_reap += TX_BUF_SIZE; |
lp | 568 | drivers/net/eexpress.c | if (lp->tx_reap > TX_BUF_END - TX_BUF_SIZE) |
lp | 569 | drivers/net/eexpress.c | lp->tx_reap = TX_BUF_START; |
lp | 576 | drivers/net/eexpress.c | printk("Received packet, rx_head %04x.\n", lp->rx_head); |
lp | 595 | drivers/net/eexpress.c | lp->tx_cmd_link = IDLELOOP + 4; |
lp | 596 | drivers/net/eexpress.c | lp->tx_head = lp->tx_reap = TX_BUF_START; |
lp | 606 | drivers/net/eexpress.c | lp->stats.rx_errors++; |
lp | 610 | drivers/net/eexpress.c | dev->name, status, lp->rx_head, lp->rx_tail); |
lp | 671 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 675 | drivers/net/eexpress.c | return &lp->stats; |
lp | 755 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 775 | drivers/net/eexpress.c | lp->tx_cmd_link = DUMP_DATA + 4; |
lp | 777 | drivers/net/eexpress.c | lp->tx_cmd_link = IDLELOOP + 4; |
lp | 779 | drivers/net/eexpress.c | lp->tx_head = lp->tx_reap = TX_BUF_START; |
lp | 813 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 816 | drivers/net/eexpress.c | int cur_rxbuf = lp->rx_head = RX_BUF_START; |
lp | 840 | drivers/net/eexpress.c | lp->rx_tail = cur_rxbuf; |
lp | 846 | drivers/net/eexpress.c | outw(lp->rx_tail + 2, ioaddr + WRITE_PTR); |
lp | 848 | drivers/net/eexpress.c | outw(lp->rx_head, ioaddr); /* Link */ |
lp | 854 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 856 | drivers/net/eexpress.c | short tx_block = lp->tx_head; |
lp | 881 | drivers/net/eexpress.c | outw(lp->tx_cmd_link, ioaddr + WRITE_PTR); |
lp | 883 | drivers/net/eexpress.c | lp->tx_cmd_link = tx_block + 20; |
lp | 886 | drivers/net/eexpress.c | lp->tx_head = tx_block + TX_BUF_SIZE; |
lp | 887 | drivers/net/eexpress.c | if (lp->tx_head > TX_BUF_END - TX_BUF_SIZE) |
lp | 888 | drivers/net/eexpress.c | lp->tx_head = TX_BUF_START; |
lp | 893 | drivers/net/eexpress.c | tx_block, lp->tx_head, lp->tx_reap, inw(ioaddr + SCB_STATUS)); |
lp | 896 | drivers/net/eexpress.c | if (lp->tx_head != lp->tx_reap) |
lp | 903 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 906 | drivers/net/eexpress.c | short rx_head = lp->rx_head; |
lp | 907 | drivers/net/eexpress.c | short rx_tail = lp->rx_tail; |
lp | 931 | drivers/net/eexpress.c | lp->stats.rx_errors++; |
lp | 932 | drivers/net/eexpress.c | if (frame_status & 0x0800) lp->stats.rx_crc_errors++; |
lp | 933 | drivers/net/eexpress.c | if (frame_status & 0x0400) lp->stats.rx_frame_errors++; |
lp | 934 | drivers/net/eexpress.c | if (frame_status & 0x0200) lp->stats.rx_fifo_errors++; |
lp | 935 | drivers/net/eexpress.c | if (frame_status & 0x0100) lp->stats.rx_over_errors++; |
lp | 936 | drivers/net/eexpress.c | if (frame_status & 0x0080) lp->stats.rx_length_errors++; |
lp | 945 | drivers/net/eexpress.c | lp->stats.rx_dropped++; |
lp | 957 | drivers/net/eexpress.c | lp->stats.rx_packets++; |
lp | 994 | drivers/net/eexpress.c | lp->rx_head = rx_head; |
lp | 995 | 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 | 311 | drivers/net/hp100.c | struct hp100_private *lp; |
lp | 414 | drivers/net/hp100.c | lp = (struct hp100_private *)dev -> priv; |
lp | 415 | drivers/net/hp100.c | lp -> id = eid; |
lp | 416 | drivers/net/hp100.c | lp -> mem_mapped = mem_mapped; |
lp | 417 | drivers/net/hp100.c | lp -> mem_ptr_phys = mem_ptr_phys; |
lp | 418 | drivers/net/hp100.c | lp -> mem_ptr_virt = mem_ptr_virt; |
lp | 420 | drivers/net/hp100.c | lp -> soft_model = hp100_inb( SOFT_MODEL ); |
lp | 421 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE3; |
lp | 422 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE3; |
lp | 428 | drivers/net/hp100.c | lp -> memory_size = 0x200 << ( ( hp100_inb( SRAM ) & 0xe0 ) >> 5 ); |
lp | 429 | drivers/net/hp100.c | lp -> rx_ratio = hp100_rx_ratio; |
lp | 449 | drivers/net/hp100.c | lp -> lan_type = hp100_sense_lan( dev ); |
lp | 452 | drivers/net/hp100.c | dev -> name, lp -> id -> name, ioaddr, dev -> irq ); |
lp | 459 | drivers/net/hp100.c | lp -> memory_size >> ( 10 - 4 ), lp -> rx_ratio ); |
lp | 469 | drivers/net/hp100.c | if ( lp -> lan_type != HP100_LAN_ERR ) |
lp | 471 | drivers/net/hp100.c | switch ( lp -> lan_type ) { |
lp | 495 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 497 | drivers/net/hp100.c | if ( request_irq( dev -> irq, hp100_interrupt, SA_INTERRUPT, lp -> id -> name ) ) |
lp | 513 | drivers/net/hp100.c | lp -> lan_type = hp100_sense_lan( dev ); |
lp | 514 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE3; |
lp | 515 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE3; |
lp | 544 | drivers/net/hp100.c | hp100_outw( ( lp -> memory_size * lp -> rx_ratio ) / 100, RX_MEM_STOP ); |
lp | 545 | drivers/net/hp100.c | hp100_outw( lp -> memory_size - 1, TX_MEM_STOP ); |
lp | 548 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 ) |
lp | 549 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 559 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 566 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 ) /* relogin */ |
lp | 589 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 591 | drivers/net/hp100.c | if ( lp -> lan_type < 0 ) |
lp | 594 | drivers/net/hp100.c | if ( ( lp -> lan_type = hp100_sense_lan( dev ) ) < 0 ) |
lp | 600 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 ) |
lp | 601 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 611 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 && lp -> hub_status < 0 ) |
lp | 616 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 628 | drivers/net/hp100.c | if ( lp -> lan_type != i ) |
lp | 632 | drivers/net/hp100.c | lp -> lan_type = i; |
lp | 634 | drivers/net/hp100.c | if ( lp -> lan_type == HP100_LAN_100 ) |
lp | 635 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 674 | drivers/net/hp100.c | if ( lp -> mem_mapped ) |
lp | 676 | drivers/net/hp100.c | if ( lp -> mem_ptr_virt ) |
lp | 678 | drivers/net/hp100.c | memcpy( lp -> mem_ptr_virt, skb -> data, skb -> len ); |
lp | 680 | drivers/net/hp100.c | memset( lp -> mem_ptr_virt, 0, HP100_MIN_PACKET_SIZE - skb -> len ); |
lp | 684 | drivers/net/hp100.c | memcpy_toio( lp -> mem_ptr_phys, skb -> data, skb -> len ); |
lp | 686 | drivers/net/hp100.c | memset_io( lp -> mem_ptr_phys, 0, HP100_MIN_PACKET_SIZE - skb -> len ); |
lp | 697 | drivers/net/hp100.c | lp -> stats.tx_packets++; |
lp | 718 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 723 | drivers/net/hp100.c | if ( lp -> lan_type < 0 ) |
lp | 725 | drivers/net/hp100.c | if ( ( lp -> lan_type = hp100_sense_lan( dev ) ) == HP100_LAN_100 ) |
lp | 726 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
lp | 744 | drivers/net/hp100.c | if ( lp -> mem_mapped ) |
lp | 746 | drivers/net/hp100.c | if ( lp -> mem_ptr_virt ) |
lp | 747 | drivers/net/hp100.c | header = *(__u32 *)lp -> mem_ptr_virt; |
lp | 749 | drivers/net/hp100.c | header = readl( lp -> mem_ptr_phys ); |
lp | 769 | drivers/net/hp100.c | lp -> stats.rx_dropped++; |
lp | 777 | drivers/net/hp100.c | if ( lp -> mem_mapped ) |
lp | 779 | drivers/net/hp100.c | if ( lp -> mem_ptr_virt ) |
lp | 780 | drivers/net/hp100.c | memcpy( ptr, lp -> mem_ptr_virt, ( pkt_len + 3 ) & ~3 ); |
lp | 782 | drivers/net/hp100.c | memcpy_fromio( ptr, lp -> mem_ptr_phys, ( pkt_len + 3 ) & ~3 ); |
lp | 788 | drivers/net/hp100.c | lp -> stats.rx_packets++; |
lp | 799 | drivers/net/hp100.c | lp -> stats.multicast++; break; |
lp | 825 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 829 | drivers/net/hp100.c | lp -> stats.rx_errors += val; |
lp | 830 | drivers/net/hp100.c | lp -> stats.rx_over_errors += val; |
lp | 832 | drivers/net/hp100.c | lp -> stats.rx_errors += val; |
lp | 833 | drivers/net/hp100.c | lp -> stats.rx_crc_errors += val; |
lp | 835 | drivers/net/hp100.c | lp -> stats.tx_errors += val; |
lp | 836 | drivers/net/hp100.c | lp -> stats.tx_aborted_errors += val; |
lp | 869 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 881 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE6; /* promiscuous mode, all good */ |
lp | 882 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE6; /* packets on the net */ |
lp | 887 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE5; /* multicast mode, packets for me */ |
lp | 888 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE5; /* broadcasts and all multicasts */ |
lp | 892 | drivers/net/hp100.c | lp -> mac2_mode = HP100_MAC2MODE3; /* normal mode, packets for me */ |
lp | 893 | drivers/net/hp100.c | lp -> mac1_mode = HP100_MAC1MODE3; /* and broadcasts */ |
lp | 896 | drivers/net/hp100.c | hp100_outb( lp -> mac2_mode, MAC_CFG_2 ); |
lp | 898 | drivers/net/hp100.c | hp100_orb( lp -> mac1_mode | |
lp | 915 | drivers/net/hp100.c | struct hp100_private *lp; |
lp | 941 | drivers/net/hp100.c | lp = (struct hp100_private *)dev -> priv; |
lp | 959 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 964 | drivers/net/hp100.c | hp100_outb( lp -> mac2_mode, MAC_CFG_2 ); |
lp | 966 | drivers/net/hp100.c | hp100_orb( lp -> mac1_mode | |
lp | 972 | drivers/net/hp100.c | if ( lp -> mem_mapped ) |
lp | 1020 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
lp | 1030 | drivers/net/hp100.c | if ( lp -> id -> id == 0x02019F022 ) /* HP J27248B doesn't have 100Mb/s interface */ |
lp | 335 | drivers/net/lance.c | struct lance_private *lp; |
lp | 413 | drivers/net/lance.c | lp = (struct lance_private *)dev->priv; |
lp | 414 | drivers/net/lance.c | lp->name = chipname; |
lp | 415 | drivers/net/lance.c | lp->rx_buffs = (long)lp + ((sizeof(struct lance_private) + 7) & ~7); |
lp | 416 | drivers/net/lance.c | lp->tx_bounce_buffs = (char (*)[PKT_BUF_SZ]) |
lp | 417 | drivers/net/lance.c | (lp->rx_buffs + PKT_BUF_SZ*RX_RING_SIZE); |
lp | 419 | drivers/net/lance.c | lp->chip_version = lance_version; |
lp | 421 | drivers/net/lance.c | lp->init_block.mode = 0x0003; /* Disable Rx and Tx. */ |
lp | 423 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
lp | 424 | drivers/net/lance.c | lp->init_block.filter[0] = 0x00000000; |
lp | 425 | drivers/net/lance.c | lp->init_block.filter[1] = 0x00000000; |
lp | 426 | drivers/net/lance.c | lp->init_block.rx_ring = (int)lp->rx_ring | RX_RING_LEN_BITS; |
lp | 427 | drivers/net/lance.c | lp->init_block.tx_ring = (int)lp->tx_ring | TX_RING_LEN_BITS; |
lp | 431 | drivers/net/lance.c | outw((short) (int) &lp->init_block, ioaddr+LANCE_DATA); |
lp | 434 | drivers/net/lance.c | outw(((int)&lp->init_block) >> 16, ioaddr+LANCE_DATA); |
lp | 542 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_ENABLE_AUTOSELECT) { |
lp | 566 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 571 | drivers/net/lance.c | request_irq(dev->irq, &lance_interrupt, 0, lp->name)) { |
lp | 590 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_MUST_UNRESET) |
lp | 593 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_ENABLE_AUTOSELECT) { |
lp | 601 | drivers/net/lance.c | dev->name, dev->irq, dev->dma, (int) lp->tx_ring, (int) lp->rx_ring, |
lp | 602 | drivers/net/lance.c | (int) &lp->init_block); |
lp | 607 | drivers/net/lance.c | outw((short) (int) &lp->init_block, ioaddr+LANCE_DATA); |
lp | 609 | drivers/net/lance.c | outw(((int)&lp->init_block) >> 16, ioaddr+LANCE_DATA); |
lp | 632 | drivers/net/lance.c | dev->name, i, (int) &lp->init_block, inw(ioaddr+LANCE_DATA)); |
lp | 652 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 656 | drivers/net/lance.c | if (lp->tx_skbuff[i]) { |
lp | 657 | drivers/net/lance.c | dev_kfree_skb(lp->tx_skbuff[i],FREE_WRITE); |
lp | 658 | drivers/net/lance.c | lp->tx_skbuff[i] = NULL; |
lp | 668 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 671 | drivers/net/lance.c | lp->lock = 0, lp->tx_full = 0; |
lp | 672 | drivers/net/lance.c | lp->cur_rx = lp->cur_tx = 0; |
lp | 673 | drivers/net/lance.c | lp->dirty_rx = lp->dirty_tx = 0; |
lp | 676 | drivers/net/lance.c | lp->rx_ring[i].base = (lp->rx_buffs + i*PKT_BUF_SZ) | 0x80000000; |
lp | 677 | drivers/net/lance.c | lp->rx_ring[i].buf_length = -PKT_BUF_SZ; |
lp | 682 | drivers/net/lance.c | lp->tx_ring[i].base = 0; |
lp | 685 | drivers/net/lance.c | lp->init_block.mode = 0x0000; |
lp | 687 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
lp | 688 | drivers/net/lance.c | lp->init_block.filter[0] = 0x00000000; |
lp | 689 | drivers/net/lance.c | lp->init_block.filter[1] = 0x00000000; |
lp | 690 | drivers/net/lance.c | lp->init_block.rx_ring = (int)lp->rx_ring | RX_RING_LEN_BITS; |
lp | 691 | drivers/net/lance.c | lp->init_block.tx_ring = (int)lp->tx_ring | TX_RING_LEN_BITS; |
lp | 697 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 700 | drivers/net/lance.c | (chip_table[lp->chip_version].flags & LANCE_MUST_REINIT_RING)) { |
lp | 711 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 725 | drivers/net/lance.c | lp->stats.tx_errors++; |
lp | 730 | drivers/net/lance.c | lp->dirty_tx, lp->cur_tx, lp->tx_full ? " (full)" : "", |
lp | 731 | drivers/net/lance.c | lp->cur_rx); |
lp | 734 | drivers/net/lance.c | lp->rx_ring[i].base, -lp->rx_ring[i].buf_length, |
lp | 735 | drivers/net/lance.c | lp->rx_ring[i].msg_length); |
lp | 738 | drivers/net/lance.c | lp->tx_ring[i].base, -lp->tx_ring[i].length, |
lp | 739 | drivers/net/lance.c | lp->tx_ring[i].misc); |
lp | 773 | drivers/net/lance.c | if (set_bit(0, (void*)&lp->lock) != 0) { |
lp | 783 | drivers/net/lance.c | entry = lp->cur_tx & TX_RING_MOD_MASK; |
lp | 789 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_MUST_PAD) { |
lp | 790 | drivers/net/lance.c | lp->tx_ring[entry].length = |
lp | 793 | drivers/net/lance.c | lp->tx_ring[entry].length = -skb->len; |
lp | 795 | drivers/net/lance.c | lp->tx_ring[entry].misc = 0x0000; |
lp | 803 | drivers/net/lance.c | memcpy(&lp->tx_bounce_buffs[entry], skb->data, skb->len); |
lp | 804 | drivers/net/lance.c | lp->tx_ring[entry].base = |
lp | 805 | drivers/net/lance.c | (int)(lp->tx_bounce_buffs + entry) | 0x83000000; |
lp | 808 | drivers/net/lance.c | lp->tx_skbuff[entry] = skb; |
lp | 809 | drivers/net/lance.c | lp->tx_ring[entry].base = (int)(skb->data) | 0x83000000; |
lp | 811 | drivers/net/lance.c | lp->cur_tx++; |
lp | 821 | drivers/net/lance.c | lp->lock = 0; |
lp | 822 | drivers/net/lance.c | if (lp->tx_ring[(entry+1) & TX_RING_MOD_MASK].base == 0) |
lp | 825 | drivers/net/lance.c | lp->tx_full = 1; |
lp | 836 | drivers/net/lance.c | struct lance_private *lp; |
lp | 846 | drivers/net/lance.c | lp = (struct lance_private *)dev->priv; |
lp | 868 | drivers/net/lance.c | int dirty_tx = lp->dirty_tx; |
lp | 870 | drivers/net/lance.c | while (dirty_tx < lp->cur_tx) { |
lp | 872 | drivers/net/lance.c | int status = lp->tx_ring[entry].base; |
lp | 877 | drivers/net/lance.c | lp->tx_ring[entry].base = 0; |
lp | 881 | drivers/net/lance.c | int err_status = lp->tx_ring[entry].misc; |
lp | 882 | drivers/net/lance.c | lp->stats.tx_errors++; |
lp | 883 | drivers/net/lance.c | if (err_status & 0x0400) lp->stats.tx_aborted_errors++; |
lp | 884 | drivers/net/lance.c | if (err_status & 0x0800) lp->stats.tx_carrier_errors++; |
lp | 885 | drivers/net/lance.c | if (err_status & 0x1000) lp->stats.tx_window_errors++; |
lp | 888 | drivers/net/lance.c | lp->stats.tx_fifo_errors++; |
lp | 897 | drivers/net/lance.c | lp->stats.collisions++; |
lp | 898 | drivers/net/lance.c | lp->stats.tx_packets++; |
lp | 903 | drivers/net/lance.c | if (lp->tx_skbuff[entry]) { |
lp | 904 | drivers/net/lance.c | dev_kfree_skb(lp->tx_skbuff[entry],FREE_WRITE); |
lp | 905 | drivers/net/lance.c | lp->tx_skbuff[entry] = 0; |
lp | 911 | drivers/net/lance.c | if (lp->cur_tx - dirty_tx >= TX_RING_SIZE) { |
lp | 913 | drivers/net/lance.c | dirty_tx, lp->cur_tx, lp->tx_full); |
lp | 918 | drivers/net/lance.c | if (lp->tx_full && dev->tbusy |
lp | 919 | drivers/net/lance.c | && dirty_tx > lp->cur_tx - TX_RING_SIZE + 2) { |
lp | 921 | drivers/net/lance.c | lp->tx_full = 0; |
lp | 926 | drivers/net/lance.c | lp->dirty_tx = dirty_tx; |
lp | 930 | drivers/net/lance.c | if (csr0 & 0x4000) lp->stats.tx_errors++; /* Tx babble. */ |
lp | 931 | drivers/net/lance.c | if (csr0 & 0x1000) lp->stats.rx_errors++; /* Missed a Rx frame. */ |
lp | 963 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 964 | drivers/net/lance.c | int entry = lp->cur_rx & RX_RING_MOD_MASK; |
lp | 968 | drivers/net/lance.c | while (lp->rx_ring[entry].base >= 0) { |
lp | 969 | drivers/net/lance.c | int status = lp->rx_ring[entry].base >> 24; |
lp | 977 | drivers/net/lance.c | lp->stats.rx_errors++; /* end of a packet.*/ |
lp | 978 | drivers/net/lance.c | if (status & 0x20) lp->stats.rx_frame_errors++; |
lp | 979 | drivers/net/lance.c | if (status & 0x10) lp->stats.rx_over_errors++; |
lp | 980 | drivers/net/lance.c | if (status & 0x08) lp->stats.rx_crc_errors++; |
lp | 981 | drivers/net/lance.c | if (status & 0x04) lp->stats.rx_fifo_errors++; |
lp | 982 | drivers/net/lance.c | lp->rx_ring[entry].base &= 0x03ffffff; |
lp | 985 | drivers/net/lance.c | short pkt_len = (lp->rx_ring[entry].msg_length & 0xfff)-4; |
lp | 992 | drivers/net/lance.c | if (lp->rx_ring[(entry+i) & RX_RING_MOD_MASK].base < 0) |
lp | 996 | drivers/net/lance.c | lp->stats.rx_dropped++; |
lp | 997 | drivers/net/lance.c | lp->rx_ring[entry].base |= 0x80000000; |
lp | 998 | drivers/net/lance.c | lp->cur_rx++; |
lp | 1006 | drivers/net/lance.c | (unsigned char *)(lp->rx_ring[entry].base & 0x00ffffff), |
lp | 1010 | drivers/net/lance.c | lp->stats.rx_packets++; |
lp | 1015 | drivers/net/lance.c | lp->rx_ring[entry].buf_length = -PKT_BUF_SZ; |
lp | 1016 | drivers/net/lance.c | lp->rx_ring[entry].base |= 0x80000000; |
lp | 1017 | drivers/net/lance.c | entry = (++lp->cur_rx) & RX_RING_MOD_MASK; |
lp | 1030 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 1035 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_HAS_MISSED_FRAME) { |
lp | 1037 | drivers/net/lance.c | lp->stats.rx_missed_errors = inw(ioaddr+LANCE_DATA); |
lp | 1062 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
lp | 1067 | drivers/net/lance.c | if (chip_table[lp->chip_version].flags & LANCE_HAS_MISSED_FRAME) { |
lp | 1072 | drivers/net/lance.c | lp->stats.rx_missed_errors = inw(ioaddr+LANCE_DATA); |
lp | 1077 | drivers/net/lance.c | return &lp->stats; |
lp | 158 | drivers/net/pi2.c | static void rts(struct pi_local *lp, int x); |
lp | 159 | drivers/net/pi2.c | static void b_rxint(struct device *dev, struct pi_local *lp); |
lp | 160 | drivers/net/pi2.c | static void b_txint(struct pi_local *lp); |
lp | 161 | drivers/net/pi2.c | static void b_exint(struct pi_local *lp); |
lp | 162 | drivers/net/pi2.c | static void a_rxint(struct device *dev, struct pi_local *lp); |
lp | 163 | drivers/net/pi2.c | static void a_txint(struct pi_local *lp); |
lp | 164 | drivers/net/pi2.c | static void a_exint(struct pi_local *lp); |
lp | 202 | drivers/net/pi2.c | static void switchbuffers(struct pi_local *lp) |
lp | 204 | drivers/net/pi2.c | if (lp->rcvbuf == lp->rxdmabuf1) |
lp | 205 | drivers/net/pi2.c | lp->rcvbuf = lp->rxdmabuf2; |
lp | 207 | drivers/net/pi2.c | lp->rcvbuf = lp->rxdmabuf1; |
lp | 210 | drivers/net/pi2.c | static void hardware_send_packet(struct pi_local *lp, struct sk_buff *skb) |
lp | 215 | drivers/net/pi2.c | lp->stats.tx_packets++; |
lp | 219 | drivers/net/pi2.c | kickflag = (skb_peek(&lp->sndq) == NULL) && (lp->sndbuf == NULL); |
lp | 222 | drivers/net/pi2.c | skb_queue_tail(&lp->sndq, skb); |
lp | 225 | drivers/net/pi2.c | switch (lp->base & 2) { |
lp | 227 | drivers/net/pi2.c | a_txint(lp); /* process interrupt */ |
lp | 232 | drivers/net/pi2.c | if (lp->tstate == IDLE) |
lp | 233 | drivers/net/pi2.c | b_txint(lp); |
lp | 240 | drivers/net/pi2.c | static void setup_rx_dma(struct pi_local *lp) |
lp | 250 | drivers/net/pi2.c | dma_abs = (unsigned long) (lp->rcvbuf->data); |
lp | 251 | drivers/net/pi2.c | dmachan = lp->dmachan; |
lp | 252 | drivers/net/pi2.c | cmd = lp->base + CTL; |
lp | 258 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, WT_FN_RDYFN | WT_RDY_RT | INT_ERR_Rx | EXT_INT_ENAB); |
lp | 268 | drivers/net/pi2.c | set_dma_count(dmachan, lp->bufsiz); |
lp | 274 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_Rx_CRC); |
lp | 277 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, |
lp | 283 | drivers/net/pi2.c | static void setup_tx_dma(struct pi_local *lp, int length) |
lp | 292 | drivers/net/pi2.c | dmachan = lp->dmachan; |
lp | 293 | drivers/net/pi2.c | dma_abs = (unsigned long) (lp->txdmabuf); |
lp | 311 | drivers/net/pi2.c | static void tdelay(struct pi_local *lp, int time) |
lp | 317 | drivers/net/pi2.c | if (lp->base & 2) { /* If A channel */ |
lp | 320 | drivers/net/pi2.c | port = lp->cardbase + TMR1; |
lp | 324 | drivers/net/pi2.c | port = lp->cardbase + TMR2; |
lp | 325 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R1, INT_ALL_Rx | EXT_INT_ENAB); |
lp | 329 | drivers/net/pi2.c | outb_p(sc | LSB_MSB | MODE0, lp->cardbase + TMRCMD); |
lp | 336 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R15, CTSIE); |
lp | 337 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R0, RES_EXT_INT); |
lp | 345 | drivers/net/pi2.c | static void a_txint(struct pi_local *lp) |
lp | 353 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 355 | drivers/net/pi2.c | switch (lp->tstate) { |
lp | 358 | drivers/net/pi2.c | if ((lp->sndbuf = skb_dequeue(&lp->sndq)) == NULL) { |
lp | 359 | drivers/net/pi2.c | rts(lp, OFF); |
lp | 369 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 370 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 371 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0) & DCD) != 0) { |
lp | 372 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 373 | drivers/net/pi2.c | tdelay(lp, 100); |
lp | 375 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, CTSIE | DCDIE); |
lp | 379 | drivers/net/pi2.c | if (random() > lp->persist) { |
lp | 380 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 381 | drivers/net/pi2.c | tdelay(lp, lp->slotime); |
lp | 386 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R5, TxCRC_ENAB | RTS | Tx8); |
lp | 387 | drivers/net/pi2.c | rts(lp, ON); /* Transmitter on */ |
lp | 388 | drivers/net/pi2.c | lp->tstate = ST_TXDELAY; |
lp | 389 | drivers/net/pi2.c | tdelay(lp, lp->txdelay); |
lp | 399 | drivers/net/pi2.c | static void a_exint(struct pi_local *lp) |
lp | 409 | drivers/net/pi2.c | st = rdscc(lp->cardbase, lp->base + CTL, R0); /* Fetch status */ |
lp | 412 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R0, RES_EXT_INT); |
lp | 413 | drivers/net/pi2.c | cmd = lp->base + CTL; |
lp | 415 | drivers/net/pi2.c | if ((lp->rstate >= ACTIVE) && (st & BRK_ABRT)) { |
lp | 416 | drivers/net/pi2.c | setup_rx_dma(lp); |
lp | 417 | drivers/net/pi2.c | lp->rstate = ACTIVE; |
lp | 419 | drivers/net/pi2.c | switch (lp->tstate) { |
lp | 421 | drivers/net/pi2.c | free_p(lp->sndbuf); |
lp | 422 | drivers/net/pi2.c | lp->sndbuf = NULL; |
lp | 423 | drivers/net/pi2.c | lp->tstate = FLAGOUT; |
lp | 424 | drivers/net/pi2.c | tdelay(lp, lp->squeldelay); |
lp | 427 | drivers/net/pi2.c | if ((lp->sndbuf = skb_dequeue(&lp->sndq)) == NULL) { |
lp | 429 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 430 | drivers/net/pi2.c | rts(lp, OFF); |
lp | 437 | drivers/net/pi2.c | disable_dma(lp->dmachan); |
lp | 440 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, WT_FN_RDYFN | EXT_INT_ENAB); |
lp | 445 | drivers/net/pi2.c | length = lp->sndbuf->len - 1; |
lp | 446 | drivers/net/pi2.c | memcpy(lp->txdmabuf, &lp->sndbuf->data[1], length); |
lp | 450 | drivers/net/pi2.c | setup_tx_dma(lp, length); |
lp | 454 | drivers/net/pi2.c | enable_dma(lp->dmachan); |
lp | 457 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_Tx_CRC | RES_Tx_P); |
lp | 460 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, TxUIE); |
lp | 463 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, WT_RDY_ENAB | WT_FN_RDYFN | EXT_INT_ENAB); |
lp | 466 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EOM_L); |
lp | 470 | drivers/net/pi2.c | lp->tstate = ACTIVE; |
lp | 476 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 477 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 478 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0) & DCD) != 0) { |
lp | 479 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 480 | drivers/net/pi2.c | tdelay(lp, 100); |
lp | 482 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R15, CTSIE | DCDIE); |
lp | 486 | drivers/net/pi2.c | if (random() > lp->persist) { |
lp | 487 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 488 | drivers/net/pi2.c | tdelay(lp, lp->slotime); |
lp | 493 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R5, TxCRC_ENAB | RTS | Tx8); |
lp | 494 | drivers/net/pi2.c | rts(lp, ON); /* Transmitter on */ |
lp | 495 | drivers/net/pi2.c | lp->tstate = ST_TXDELAY; |
lp | 496 | drivers/net/pi2.c | tdelay(lp, lp->txdelay); |
lp | 506 | drivers/net/pi2.c | static void a_rxint(struct device *dev, struct pi_local *lp) |
lp | 519 | drivers/net/pi2.c | cmd = lp->base + CTL; |
lp | 521 | drivers/net/pi2.c | rse = rdscc(lp->cardbase, cmd, R1); /* Get special condition bits from R1 */ |
lp | 523 | drivers/net/pi2.c | lp->rstate = RXERROR; |
lp | 528 | drivers/net/pi2.c | clear_dma_ff(lp->dmachan); |
lp | 529 | drivers/net/pi2.c | bytecount = lp->bufsiz - get_dma_residue(lp->dmachan); |
lp | 531 | drivers/net/pi2.c | if ((rse & CRC_ERR) || (lp->rstate > ACTIVE) || (bytecount < 10)) { |
lp | 533 | drivers/net/pi2.c | lp->stats.rx_crc_errors++; |
lp | 535 | drivers/net/pi2.c | if (lp->rstate == RXERROR) { |
lp | 536 | drivers/net/pi2.c | lp->stats.rx_errors++; |
lp | 537 | drivers/net/pi2.c | lp->stats.rx_over_errors++; |
lp | 540 | drivers/net/pi2.c | lp->rstate = ACTIVE; |
lp | 541 | drivers/net/pi2.c | setup_rx_dma(lp); |
lp | 545 | drivers/net/pi2.c | pkt_len = lp->rcvbuf->cnt = bytecount - 2 + 1; |
lp | 548 | drivers/net/pi2.c | cur_buf = lp->rcvbuf; |
lp | 549 | drivers/net/pi2.c | switchbuffers(lp); |
lp | 550 | drivers/net/pi2.c | setup_rx_dma(lp); |
lp | 559 | drivers/net/pi2.c | lp->stats.rx_dropped++; |
lp | 575 | drivers/net/pi2.c | lp->stats.rx_packets++; |
lp | 578 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R0, ERR_RES); /* error reset */ |
lp | 582 | drivers/net/pi2.c | static void b_rxint(struct device *dev, struct pi_local *lp) |
lp | 594 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 596 | drivers/net/pi2.c | rse = rdscc(lp->cardbase, cmd, R1); /* get status byte from R1 */ |
lp | 598 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0)) & Rx_CH_AV) { |
lp | 605 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 606 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 608 | drivers/net/pi2.c | lp->rstate = RXERROR; /* set error flag */ |
lp | 609 | drivers/net/pi2.c | lp->stats.rx_errors++; |
lp | 610 | drivers/net/pi2.c | lp->stats.rx_over_errors++; |
lp | 611 | drivers/net/pi2.c | } else if (lp->rcvbuf->cnt >= lp->bufsiz) { |
lp | 614 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 615 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 616 | drivers/net/pi2.c | lp->rstate = TOOBIG;/* when set, chars are not stored */ |
lp | 619 | drivers/net/pi2.c | if (lp->rstate == ACTIVE) { /* If no errors... */ |
lp | 620 | drivers/net/pi2.c | *lp->rcp++ = rdscc(lp->cardbase, cmd, R8); /* char to rcv buff */ |
lp | 621 | drivers/net/pi2.c | lp->rcvbuf->cnt++; /* bump count */ |
lp | 624 | drivers/net/pi2.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 625 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, ERR_RES); /* reset err latch */ |
lp | 626 | drivers/net/pi2.c | lp->rstate = ACTIVE; |
lp | 631 | drivers/net/pi2.c | if (lp->rcvbuf->cnt > 0) { |
lp | 632 | drivers/net/pi2.c | if ((rse & CRC_ERR) || (lp->rstate > ACTIVE) || (lp->rcvbuf->cnt < 10)) { |
lp | 633 | drivers/net/pi2.c | if ((lp->rcvbuf->cnt >= 10) && (rse & CRC_ERR)) { |
lp | 634 | drivers/net/pi2.c | lp->stats.rx_crc_errors++; |
lp | 636 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 637 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 640 | drivers/net/pi2.c | pkt_len = lp->rcvbuf->cnt -= 2; /* Toss 2 crc bytes */ |
lp | 648 | drivers/net/pi2.c | lp->stats.rx_dropped++; |
lp | 658 | drivers/net/pi2.c | memcpy(cfix, lp->rcvbuf->data, pkt_len - 1); |
lp | 662 | drivers/net/pi2.c | lp->stats.rx_packets++; |
lp | 664 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 665 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 669 | drivers/net/pi2.c | lp->rstate = ACTIVE; /* and clear error status */ |
lp | 675 | drivers/net/pi2.c | static void b_txint(struct pi_local *lp) |
lp | 683 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 685 | drivers/net/pi2.c | switch (lp->tstate) { |
lp | 687 | drivers/net/pi2.c | lp->tstate = FLAGOUT; |
lp | 688 | drivers/net/pi2.c | tdelay(lp, lp->squeldelay); |
lp | 693 | drivers/net/pi2.c | if ((lp->sndbuf = skb_dequeue(&lp->sndq)) == NULL) { |
lp | 697 | drivers/net/pi2.c | rts(lp, OFF); |
lp | 702 | drivers/net/pi2.c | lp->txptr = lp->sndbuf->data; |
lp | 703 | drivers/net/pi2.c | lp->txptr++; /* Ignore KISS control byte */ |
lp | 704 | drivers/net/pi2.c | lp->txcnt = (int) lp->sndbuf->len - 1; |
lp | 709 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 710 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 711 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0) & DCD) != 0) { |
lp | 712 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 713 | drivers/net/pi2.c | tdelay(lp, 100); |
lp | 715 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, CTSIE | DCDIE); |
lp | 719 | drivers/net/pi2.c | if (random() > lp->persist) { |
lp | 720 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 721 | drivers/net/pi2.c | tdelay(lp, lp->slotime); |
lp | 725 | drivers/net/pi2.c | rts(lp, ON); /* Transmitter on */ |
lp | 726 | drivers/net/pi2.c | lp->tstate = ST_TXDELAY; |
lp | 727 | drivers/net/pi2.c | tdelay(lp, lp->txdelay); |
lp | 733 | drivers/net/pi2.c | if (lp->txcnt--) { |
lp | 734 | drivers/net/pi2.c | c = *lp->txptr++; |
lp | 736 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R8, c); |
lp | 740 | drivers/net/pi2.c | free_p(lp->sndbuf); |
lp | 741 | drivers/net/pi2.c | lp->sndbuf = NULL; |
lp | 742 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0) & 0x40)) { |
lp | 745 | drivers/net/pi2.c | lp->stats.tx_errors++; |
lp | 746 | drivers/net/pi2.c | lp->stats.tx_fifo_errors++; |
lp | 747 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, SEND_ABORT); |
lp | 748 | drivers/net/pi2.c | lp->tstate = FLAGOUT; |
lp | 749 | drivers/net/pi2.c | tdelay(lp, lp->squeldelay); |
lp | 753 | drivers/net/pi2.c | lp->tstate = UNDERRUN; /* Now we expect to underrun */ |
lp | 755 | drivers/net/pi2.c | if (lp->speed) { /* If internally clocked */ |
lp | 756 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZI); |
lp | 758 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS); |
lp | 760 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_Tx_P); /* reset Tx Int Pend */ |
lp | 775 | drivers/net/pi2.c | static void b_exint(struct pi_local *lp) |
lp | 782 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 785 | drivers/net/pi2.c | st = rdscc(lp->cardbase, cmd, R0); /* Fetch status */ |
lp | 787 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 790 | drivers/net/pi2.c | switch (lp->tstate) { |
lp | 792 | drivers/net/pi2.c | free_p(lp->sndbuf); |
lp | 793 | drivers/net/pi2.c | lp->sndbuf = NULL; |
lp | 794 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, SEND_ABORT); |
lp | 795 | drivers/net/pi2.c | lp->tstate = FLAGOUT; |
lp | 796 | drivers/net/pi2.c | lp->stats.tx_errors++; |
lp | 797 | drivers/net/pi2.c | lp->stats.tx_fifo_errors++; |
lp | 798 | drivers/net/pi2.c | tdelay(lp, lp->squeldelay); |
lp | 802 | drivers/net/pi2.c | lp->tstate = CRCOUT; |
lp | 807 | drivers/net/pi2.c | if ((lp->sndbuf = skb_dequeue(&lp->sndq)) == NULL) { |
lp | 811 | drivers/net/pi2.c | rts(lp, OFF); |
lp | 812 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 816 | drivers/net/pi2.c | lp->txptr = lp->sndbuf->data; |
lp | 817 | drivers/net/pi2.c | lp->txptr++; /* Ignore KISS control byte */ |
lp | 818 | drivers/net/pi2.c | lp->txcnt = (int) lp->sndbuf->len - 1; |
lp | 820 | drivers/net/pi2.c | lp->txcnt--; |
lp | 821 | drivers/net/pi2.c | c = *lp->txptr++; |
lp | 822 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_Tx_CRC); /* reset for next frame */ |
lp | 825 | drivers/net/pi2.c | if (lp->speed) { /* If internally clocked */ |
lp | 826 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZI | ABUNDER); |
lp | 828 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | ABUNDER); |
lp | 831 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R8, c); /* First char out now */ |
lp | 832 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EOM_L); /* Reset end of message latch */ |
lp | 836 | drivers/net/pi2.c | if (lp->txcnt) { |
lp | 837 | drivers/net/pi2.c | lp->txcnt--; |
lp | 838 | drivers/net/pi2.c | c = *lp->txptr++; |
lp | 840 | drivers/net/pi2.c | while((rdscc(lp->cardbase, cmd, R0) & 0x04) == 0) |
lp | 842 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R8, c); |
lp | 848 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, TxUIE); /* allow Underrun int only */ |
lp | 849 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 850 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, TxINT_ENAB | EXT_INT_ENAB); /* Tx/Ext ints */ |
lp | 852 | drivers/net/pi2.c | lp->tstate = ACTIVE; /* char going out now */ |
lp | 860 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 861 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 862 | drivers/net/pi2.c | if ((rdscc(lp->cardbase, cmd, R0) & DCD) != 0) { |
lp | 863 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 864 | drivers/net/pi2.c | tdelay(lp, 100); |
lp | 866 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, CTSIE | DCDIE); |
lp | 870 | drivers/net/pi2.c | if (random() > lp->persist) { |
lp | 871 | drivers/net/pi2.c | lp->tstate = DEFER; |
lp | 872 | drivers/net/pi2.c | tdelay(lp, lp->slotime); |
lp | 876 | drivers/net/pi2.c | rts(lp, ON); /* Transmitter on */ |
lp | 877 | drivers/net/pi2.c | lp->tstate = ST_TXDELAY; |
lp | 878 | drivers/net/pi2.c | tdelay(lp, lp->txdelay); |
lp | 885 | drivers/net/pi2.c | lp->txcnt--; |
lp | 886 | drivers/net/pi2.c | c = *lp->txptr++; |
lp | 887 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_Tx_CRC); /* reset for next frame */ |
lp | 890 | drivers/net/pi2.c | if (lp->speed) { /* If internally clocked */ |
lp | 891 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZI | ABUNDER); |
lp | 893 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | ABUNDER); |
lp | 896 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R8, c); /* First char out now */ |
lp | 897 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EOM_L); /* Reset end of message latch */ |
lp | 901 | drivers/net/pi2.c | if (lp->txcnt) { |
lp | 902 | drivers/net/pi2.c | lp->txcnt--; |
lp | 903 | drivers/net/pi2.c | c = *lp->txptr++; |
lp | 905 | drivers/net/pi2.c | while((rdscc(lp->cardbase, cmd, R0) & 0x04) == 0) |
lp | 907 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R8, c); |
lp | 913 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, TxUIE); /* allow Underrun int only */ |
lp | 914 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT); |
lp | 916 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, TxINT_ENAB | EXT_INT_ENAB); |
lp | 918 | drivers/net/pi2.c | lp->tstate = ACTIVE; /* char going out now */ |
lp | 928 | drivers/net/pi2.c | if ((lp->rstate == ACTIVE) && (st & BRK_ABRT)) { |
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 | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 932 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 933 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; /* rewind on DCD transition */ |
lp | 999 | drivers/net/pi2.c | static void rts(struct pi_local *lp, int x) |
lp | 1007 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 1012 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, 0); |
lp | 1013 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R3, Rx8); /* Rx off */ |
lp | 1014 | drivers/net/pi2.c | lp->rstate = IDLE; |
lp | 1017 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, WT_FN_RDYFN | EXT_INT_ENAB); |
lp | 1019 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, 0); /* No interrupts */ |
lp | 1022 | drivers/net/pi2.c | if (!lp->clockmode) { |
lp | 1023 | drivers/net/pi2.c | if (lp->speed) { /* if internally clocked */ |
lp | 1024 | drivers/net/pi2.c | br = lp->speed; /* get desired speed */ |
lp | 1025 | drivers/net/pi2.c | tc = (lp->xtal / br) - 2; /* calc 1X BRG divisor */ |
lp | 1026 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R12, tc & 0xFF); /* lower byte */ |
lp | 1027 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R13, (tc >> 8) & 0xFF); /* upper byte */ |
lp | 1030 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R5, TxCRC_ENAB | RTS | TxENAB | Tx8 | DTR); |
lp | 1033 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 1034 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R5, Tx8 | DTR); /* TX off */ |
lp | 1036 | drivers/net/pi2.c | if (!lp->clockmode) { |
lp | 1037 | drivers/net/pi2.c | if (lp->speed) { /* if internally clocked */ |
lp | 1040 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC); |
lp | 1041 | drivers/net/pi2.c | br = lp->speed; /* get desired speed */ |
lp | 1043 | drivers/net/pi2.c | tc = ((lp->xtal / 32) / br) - 2; |
lp | 1044 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R12, tc & 0xFF); /* lower byte */ |
lp | 1045 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R13, (tc >> 8) & 0xFF); /* upper byte */ |
lp | 1047 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | SEARCH); |
lp | 1049 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | BRENABL); |
lp | 1053 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R3, Rx8); /* Make sure rx is off */ |
lp | 1054 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R0, ERR_RES); /* reset err latch */ |
lp | 1055 | drivers/net/pi2.c | dummy = rdscc(lp->cardbase, cmd, R1); /* get status byte from R1 */ |
lp | 1056 | drivers/net/pi2.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 1057 | drivers/net/pi2.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 1059 | drivers/net/pi2.c | (void) rdscc(lp->cardbase, cmd, R8); |
lp | 1062 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R3, RxENABLE | Rx8); |
lp | 1063 | drivers/net/pi2.c | lp->rstate = ACTIVE; /* Normal state */ |
lp | 1066 | drivers/net/pi2.c | setup_rx_dma(lp); |
lp | 1069 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 1070 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 1071 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, (INT_ALL_Rx | EXT_INT_ENAB)); |
lp | 1073 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, BRKIE); /* allow ABORT int */ |
lp | 1094 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1102 | drivers/net/pi2.c | cmd = CTL + lp->base; |
lp | 1108 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R9, CHRA); /* Reset channel A */ |
lp | 1109 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R2, 0xff); /* Initialize interrupt vector */ |
lp | 1112 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R9, CHRB); /* Reset channel B */ |
lp | 1117 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, 0); |
lp | 1120 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, 0); |
lp | 1123 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R4, SDLC | X1CLK); |
lp | 1126 | drivers/net/pi2.c | if (lp->speed) { /* Use internal clocking */ |
lp | 1127 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS | NRZI); |
lp | 1128 | drivers/net/pi2.c | if (!lp->clockmode) |
lp | 1130 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R11, TCBR | RCDPLL | TRxCDP | TRxCOI); |
lp | 1133 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R11, TCDPLL | RCDPLL | TRxCBR | TRxCOI); |
lp | 1135 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R10, CRCPS); |
lp | 1137 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R11, TCTRxCP); |
lp | 1141 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R6, 0); |
lp | 1144 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R7, FLAG); |
lp | 1149 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R5, Tx8 | DTR); |
lp | 1152 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R3, Rx8); /* 8 bits/char */ |
lp | 1155 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC); /* BRG off, keep Pclk source */ |
lp | 1159 | drivers/net/pi2.c | if (lp->speed) { |
lp | 1160 | drivers/net/pi2.c | br = lp->speed; /* get desired speed */ |
lp | 1161 | drivers/net/pi2.c | tc = ((lp->xtal / 32) / br) - 2; /* calc 32X BRG divisor */ |
lp | 1166 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R12, tc & 0xFF); /* lower byte */ |
lp | 1167 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R13, (tc >> 8) & 0xFF); /* upper byte */ |
lp | 1170 | drivers/net/pi2.c | rts(lp, OFF); /* TX OFF and RX ON */ |
lp | 1172 | drivers/net/pi2.c | if (lp->speed) { |
lp | 1174 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | SSBR); |
lp | 1177 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | SSRTxC); |
lp | 1179 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | SEARCH); /* SEARCH mode, keep BRG src */ |
lp | 1180 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R14, BRSRC | BRENABL); /* Enable the BRG */ |
lp | 1183 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R1, (INT_ALL_Rx | EXT_INT_ENAB)); |
lp | 1185 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R15, BRKIE); /* ABORT int */ |
lp | 1188 | drivers/net/pi2.c | wrtscc(lp->cardbase, cmd, R3, RxENABLE | RxCRC_ENAB | Rx8); |
lp | 1308 | drivers/net/pi2.c | struct pi_local *lp; |
lp | 1319 | drivers/net/pi2.c | lp = (struct pi_local *) dev->priv; |
lp | 1325 | drivers/net/pi2.c | lp->txdmabuf = get_dma_buffer(&mem_ptr); |
lp | 1326 | drivers/net/pi2.c | lp->rxdmabuf1 = (struct mbuf *) get_dma_buffer(&mem_ptr); |
lp | 1327 | drivers/net/pi2.c | lp->rxdmabuf2 = (struct mbuf *) get_dma_buffer(&mem_ptr); |
lp | 1330 | drivers/net/pi2.c | lp->rcvbuf = lp->rxdmabuf1; |
lp | 1331 | drivers/net/pi2.c | lp->rcp = lp->rcvbuf->data; |
lp | 1332 | drivers/net/pi2.c | lp->rcvbuf->cnt = 0; |
lp | 1335 | drivers/net/pi2.c | skb_queue_head_init(&lp->sndq); |
lp | 1339 | drivers/net/pi2.c | lp->xtal = (unsigned long) SINGLE / 2; |
lp | 1341 | drivers/net/pi2.c | lp->xtal = (unsigned long) DOUBLE / 2; |
lp | 1342 | drivers/net/pi2.c | lp->base = dev->base_addr; |
lp | 1343 | drivers/net/pi2.c | lp->cardbase = dev->base_addr & 0x3f0; |
lp | 1345 | drivers/net/pi2.c | lp->speed = DEF_A_SPEED; |
lp | 1347 | drivers/net/pi2.c | lp->txdelay = DEF_A_TXDELAY; |
lp | 1348 | drivers/net/pi2.c | lp->persist = DEF_A_PERSIST; |
lp | 1349 | drivers/net/pi2.c | lp->slotime = DEF_A_SLOTIME; |
lp | 1350 | drivers/net/pi2.c | lp->squeldelay = DEF_A_SQUELDELAY; |
lp | 1351 | drivers/net/pi2.c | lp->clockmode = DEF_A_CLOCKMODE; |
lp | 1354 | drivers/net/pi2.c | lp->speed = DEF_B_SPEED; |
lp | 1356 | drivers/net/pi2.c | lp->txdelay = DEF_B_TXDELAY; |
lp | 1357 | drivers/net/pi2.c | lp->persist = DEF_B_PERSIST; |
lp | 1358 | drivers/net/pi2.c | lp->slotime = DEF_B_SLOTIME; |
lp | 1359 | drivers/net/pi2.c | lp->squeldelay = DEF_B_SQUELDELAY; |
lp | 1360 | drivers/net/pi2.c | lp->clockmode = DEF_B_CLOCKMODE; |
lp | 1362 | drivers/net/pi2.c | lp->bufsiz = DMA_BUFF_SIZE; |
lp | 1363 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 1370 | drivers/net/pi2.c | lp->dmachan = dev->dma; |
lp | 1371 | drivers/net/pi2.c | if (lp->dmachan < 1 || lp->dmachan > 3) |
lp | 1372 | drivers/net/pi2.c | printk("PI: DMA channel %d out of range\n", lp->dmachan); |
lp | 1380 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R1, EXT_INT_ENAB); |
lp | 1382 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R9, MIE | NV); |
lp | 1385 | drivers/net/pi2.c | tdelay(lp, 1); |
lp | 1393 | drivers/net/pi2.c | wrtscc(lp->cardbase, dev->base_addr + CTL, R9, FHWRES); /* Hardware reset */ |
lp | 1395 | drivers/net/pi2.c | wrtscc(lp->cardbase, dev->base_addr + CTL, R9, 0); |
lp | 1464 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1477 | drivers/net/pi2.c | lp->tstate = IDLE; |
lp | 1486 | drivers/net/pi2.c | wrtscc(lp->cardbase, CTL + lp->base, R9, MIE | NV); |
lp | 1489 | drivers/net/pi2.c | lp->open_time = jiffies; |
lp | 1500 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1509 | drivers/net/pi2.c | hardware_send_packet(lp, skb); |
lp | 1520 | drivers/net/pi2.c | struct pi_local *lp; |
lp | 1535 | drivers/net/pi2.c | lp = (struct pi_local *) pi0a.priv; /* Assume channel A */ |
lp | 1536 | drivers/net/pi2.c | while ((st = rdscc(lp->cardbase, pi0a.base_addr | CHANA | CTL, R3)) != 0) { |
lp | 1539 | drivers/net/pi2.c | lp = (struct pi_local *) pi0b.priv; |
lp | 1540 | drivers/net/pi2.c | b_txint(lp); |
lp | 1543 | drivers/net/pi2.c | lp = (struct pi_local *) pi0a.priv; |
lp | 1544 | drivers/net/pi2.c | a_rxint(&pi0a, lp); |
lp | 1547 | drivers/net/pi2.c | lp = (struct pi_local *) pi0a.priv; |
lp | 1548 | drivers/net/pi2.c | a_txint(lp); |
lp | 1551 | drivers/net/pi2.c | lp = (struct pi_local *) pi0a.priv; |
lp | 1552 | drivers/net/pi2.c | a_exint(lp); |
lp | 1555 | drivers/net/pi2.c | lp = (struct pi_local *) pi0b.priv; |
lp | 1556 | drivers/net/pi2.c | b_rxint(&pi0b, lp); |
lp | 1559 | drivers/net/pi2.c | lp = (struct pi_local *) pi0b.priv; |
lp | 1560 | drivers/net/pi2.c | b_exint(lp); |
lp | 1565 | drivers/net/pi2.c | wrtscc(lp->cardbase, lp->base + CTL, R0, RES_H_IUS); |
lp | 1575 | drivers/net/pi2.c | struct pi_local *lp; |
lp | 1581 | drivers/net/pi2.c | lp = (struct pi_local *) dev->priv; |
lp | 1585 | drivers/net/pi2.c | disable_dma(lp->dmachan); |
lp | 1587 | drivers/net/pi2.c | lp->open_time = 0; |
lp | 1593 | drivers/net/pi2.c | while ((ptr = skb_dequeue(&lp->sndq)) != NULL) |
lp | 1604 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1622 | drivers/net/pi2.c | lp->txdelay = rq.txdelay; |
lp | 1623 | drivers/net/pi2.c | lp->persist = rq.persist; |
lp | 1624 | drivers/net/pi2.c | lp->slotime = rq.slotime; |
lp | 1625 | drivers/net/pi2.c | lp->squeldelay = rq.squeldelay; |
lp | 1626 | drivers/net/pi2.c | lp->clockmode = rq.clockmode; |
lp | 1627 | drivers/net/pi2.c | lp->speed = rq.speed; |
lp | 1644 | drivers/net/pi2.c | free_dma(lp->dmachan); |
lp | 1645 | drivers/net/pi2.c | dev->dma = lp->dmachan = rq.dmachan; |
lp | 1646 | drivers/net/pi2.c | if (request_dma(lp->dmachan,"pi2")) |
lp | 1661 | drivers/net/pi2.c | rq.speed = lp->speed; |
lp | 1662 | drivers/net/pi2.c | rq.txdelay = lp->txdelay; |
lp | 1663 | drivers/net/pi2.c | rq.persist = lp->persist; |
lp | 1664 | drivers/net/pi2.c | rq.slotime = lp->slotime; |
lp | 1665 | drivers/net/pi2.c | rq.squeldelay = lp->squeldelay; |
lp | 1666 | drivers/net/pi2.c | rq.clockmode = lp->clockmode; |
lp | 1667 | drivers/net/pi2.c | rq.dmachan = lp->dmachan; |
lp | 1684 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
lp | 1686 | 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 | 304 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 323 | drivers/net/skeleton.c | lp->open_time = jiffies; |
lp | 337 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 377 | drivers/net/skeleton.c | lp->stats.tx_aborted_errors++; |
lp | 388 | drivers/net/skeleton.c | struct net_local *lp; |
lp | 398 | drivers/net/skeleton.c | lp = (struct net_local *)dev->priv; |
lp | 407 | drivers/net/skeleton.c | lp->stats.tx_packets++; |
lp | 413 | drivers/net/skeleton.c | lp->stats.tx_window_errors++; |
lp | 425 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 437 | drivers/net/skeleton.c | lp->stats.rx_errors++; |
lp | 438 | drivers/net/skeleton.c | if (status & 0x20) lp->stats.rx_frame_errors++; |
lp | 439 | drivers/net/skeleton.c | if (status & 0x10) lp->stats.rx_over_errors++; |
lp | 440 | drivers/net/skeleton.c | if (status & 0x08) lp->stats.rx_crc_errors++; |
lp | 441 | drivers/net/skeleton.c | if (status & 0x04) lp->stats.rx_fifo_errors++; |
lp | 450 | drivers/net/skeleton.c | lp->stats.rx_dropped++; |
lp | 462 | drivers/net/skeleton.c | lp->stats.rx_packets++; |
lp | 476 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 479 | drivers/net/skeleton.c | lp->open_time = 0; |
lp | 509 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 514 | drivers/net/skeleton.c | lp->stats.rx_missed_errors = inw(ioaddr+1); |
lp | 517 | drivers/net/skeleton.c | return &lp->stats; |
lp | 463 | drivers/net/tulip.c | struct tulip_private *lp; |
lp | 472 | drivers/net/tulip.c | lp = (struct tulip_private *)dev->priv; |
lp | 494 | drivers/net/tulip.c | int dirty_tx = lp->dirty_tx; |
lp | 496 | drivers/net/tulip.c | while (dirty_tx < lp->cur_tx) { |
lp | 498 | drivers/net/tulip.c | int status = lp->tx_ring[entry].status; |
lp | 505 | drivers/net/tulip.c | lp->stats.tx_errors++; |
lp | 506 | drivers/net/tulip.c | if (status & 0x4104) lp->stats.tx_aborted_errors++; |
lp | 507 | drivers/net/tulip.c | if (status & 0x0C00) lp->stats.tx_carrier_errors++; |
lp | 508 | drivers/net/tulip.c | if (status & 0x0200) lp->stats.tx_window_errors++; |
lp | 509 | drivers/net/tulip.c | if (status & 0x0002) lp->stats.tx_fifo_errors++; |
lp | 510 | drivers/net/tulip.c | if (status & 0x0080) lp->stats.tx_heartbeat_errors++; |
lp | 512 | drivers/net/tulip.c | if (status & 0x0100) lp->stats.collisions16++; |
lp | 516 | drivers/net/tulip.c | if (status & 0x0001) lp->stats.tx_deferred++; |
lp | 518 | drivers/net/tulip.c | lp->stats.collisions += (status >> 3) & 15; |
lp | 519 | drivers/net/tulip.c | lp->stats.tx_packets++; |
lp | 523 | drivers/net/tulip.c | dev_kfree_skb(lp->tx_skbuff[entry], FREE_WRITE); |
lp | 528 | drivers/net/tulip.c | if (lp->cur_tx - dirty_tx >= TX_RING_SIZE) { |
lp | 530 | drivers/net/tulip.c | dirty_tx, lp->cur_tx, lp->tx_full); |
lp | 535 | drivers/net/tulip.c | if (lp->tx_full && dev->tbusy |
lp | 536 | drivers/net/tulip.c | && dirty_tx > lp->cur_tx - TX_RING_SIZE + 2) { |
lp | 538 | drivers/net/tulip.c | lp->tx_full = 0; |
lp | 543 | drivers/net/tulip.c | lp->dirty_tx = dirty_tx; |
lp | 548 | drivers/net/tulip.c | if (csr5 & 0x0008) lp->stats.tx_errors++; /* Tx babble. */ |
lp | 550 | drivers/net/tulip.c | lp->stats.rx_errors++; |
lp | 551 | drivers/net/tulip.c | lp->stats.rx_missed_errors += inl(ioaddr + CSR8) & 0xffff; |
lp | 589 | drivers/net/tulip.c | struct tulip_private *lp = (struct tulip_private *)dev->priv; |
lp | 590 | drivers/net/tulip.c | int entry = lp->cur_rx % RX_RING_SIZE; |
lp | 596 | drivers/net/tulip.c | while (lp->rx_ring[entry].status >= 0) { |
lp | 597 | drivers/net/tulip.c | int status = lp->rx_ring[entry].status; |
lp | 606 | drivers/net/tulip.c | lp->stats.rx_errors++; /* end of a packet.*/ |
lp | 607 | drivers/net/tulip.c | if (status & 0x0890) lp->stats.rx_length_errors++; |
lp | 608 | drivers/net/tulip.c | if (status & 0x0004) lp->stats.rx_frame_errors++; |
lp | 609 | drivers/net/tulip.c | if (status & 0x0002) lp->stats.rx_crc_errors++; |
lp | 610 | drivers/net/tulip.c | if (status & 0x0001) lp->stats.rx_fifo_errors++; |
lp | 613 | drivers/net/tulip.c | short pkt_len = lp->rx_ring[entry].status >> 16; |
lp | 622 | drivers/net/tulip.c | if (lp->rx_ring[(entry+i) % RX_RING_SIZE].status < 0) |
lp | 626 | drivers/net/tulip.c | lp->stats.rx_dropped++; |
lp | 627 | drivers/net/tulip.c | lp->rx_ring[entry].status = 0x80000000; |
lp | 628 | drivers/net/tulip.c | lp->cur_rx++; |
lp | 634 | drivers/net/tulip.c | memcpy(skb_put(skb,pkt_len), lp->rx_ring[entry].buffer1, pkt_len); |
lp | 637 | drivers/net/tulip.c | lp->stats.rx_packets++; |
lp | 640 | drivers/net/tulip.c | lp->rx_ring[entry].status = 0x80000000; |
lp | 641 | drivers/net/tulip.c | entry = (++lp->cur_rx) % RX_RING_SIZE; |
lp | 197 | drivers/net/wavelan.c | net_local *lp; |
lp | 201 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 205 | drivers/net/wavelan.c | lp->hacr &= ~HACR_INTRON; |
lp | 206 | drivers/net/wavelan.c | hacr_write(ioaddr, lp->hacr); |
lp | 216 | drivers/net/wavelan.c | net_local *lp; |
lp | 220 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 224 | drivers/net/wavelan.c | lp->hacr |= HACR_INTRON; |
lp | 225 | drivers/net/wavelan.c | hacr_write(ioaddr, lp->hacr); |
lp | 387 | drivers/net/wavelan.c | net_local *lp; |
lp | 392 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 436 | drivers/net/wavelan.c | if (lp->promiscuous && lp->full_promiscuous) |
lp | 453 | drivers/net/wavelan.c | m.mmw_netw_id_l = lp->nwid[1]; |
lp | 454 | drivers/net/wavelan.c | m.mmw_netw_id_h = lp->nwid[0]; |
lp | 464 | drivers/net/wavelan.c | net_local *lp; |
lp | 469 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 479 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 503 | drivers/net/wavelan.c | net_local *lp; |
lp | 509 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 514 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 543 | drivers/net/wavelan.c | net_local *lp; |
lp | 556 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 558 | drivers/net/wavelan.c | lp->nresets++; |
lp | 561 | drivers/net/wavelan.c | lp->hacr = HACR_DEFAULT; |
lp | 575 | drivers/net/wavelan.c | psa_read(ioaddr, lp->hacr, 0, (unsigned char *)&psa, sizeof(psa)); |
lp | 599 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 702 | drivers/net/wavelan.c | AC_CFG_PRM(lp->promiscuous); |
lp | 866 | drivers/net/wavelan.c | net_local *lp; |
lp | 1019 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1023 | drivers/net/wavelan.c | first_wavelan = lp; |
lp | 1024 | drivers/net/wavelan.c | lp->prev = lp; |
lp | 1025 | drivers/net/wavelan.c | lp->next = lp; |
lp | 1029 | drivers/net/wavelan.c | lp->prev = first_wavelan->prev; |
lp | 1030 | drivers/net/wavelan.c | lp->next = first_wavelan; |
lp | 1031 | drivers/net/wavelan.c | first_wavelan->prev->next = lp; |
lp | 1032 | drivers/net/wavelan.c | first_wavelan->prev = lp; |
lp | 1034 | drivers/net/wavelan.c | lp->dev = dev; |
lp | 1036 | drivers/net/wavelan.c | lp->hacr = HACR_DEFAULT; |
lp | 1038 | drivers/net/wavelan.c | lp->full_promiscuous = enable_full_promiscuous; |
lp | 1039 | drivers/net/wavelan.c | lp->nwid[0] = psa.psa_nwid[0]; |
lp | 1040 | drivers/net/wavelan.c | lp->nwid[1] = psa.psa_nwid[1]; |
lp | 1042 | drivers/net/wavelan.c | lp->watchdog.function = wavelan_watchdog; |
lp | 1043 | drivers/net/wavelan.c | lp->watchdog.data = (unsigned long)dev; |
lp | 1074 | drivers/net/wavelan.c | net_local *lp; |
lp | 1083 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1089 | drivers/net/wavelan.c | lp->rx_head = OFFSET_RU; |
lp | 1091 | drivers/net/wavelan.c | for (i = 0, rx = lp->rx_head; i < NRXBLOCKS; i++, rx = rx_next) |
lp | 1093 | drivers/net/wavelan.c | rx_next = (i == NRXBLOCKS - 1) ? lp->rx_head : rx + RXBLOCKZ; |
lp | 1108 | drivers/net/wavelan.c | lp->rx_last = rx; |
lp | 1111 | drivers/net/wavelan.c | obram_write(ioaddr, scboff(OFFSET_SCB, scb_rfa_offset), (unsigned char *)&lp->rx_head, sizeof(lp->rx_head)); |
lp | 1116 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 1141 | drivers/net/wavelan.c | net_local *lp; |
lp | 1148 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1150 | drivers/net/wavelan.c | lp->tx_first_free = OFFSET_CU; |
lp | 1151 | drivers/net/wavelan.c | lp->tx_first_in_use = I82586NULL; |
lp | 1197 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 1211 | drivers/net/wavelan.c | lp->tx_n_in_use = 0; |
lp | 1220 | drivers/net/wavelan.c | net_local *lp; |
lp | 1228 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1285 | drivers/net/wavelan.c | net_local *lp; |
lp | 1298 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1302 | drivers/net/wavelan.c | txblock = lp->tx_first_free; |
lp | 1306 | drivers/net/wavelan.c | lp->tx_first_free += TXBLOCKZ; |
lp | 1307 | drivers/net/wavelan.c | if (lp->tx_first_free >= OFFSET_CU + NTXBLOCKS * TXBLOCKZ) |
lp | 1308 | drivers/net/wavelan.c | lp->tx_first_free -= NTXBLOCKS * TXBLOCKZ; |
lp | 1315 | drivers/net/wavelan.c | lp->tx_n_in_use++; |
lp | 1360 | drivers/net/wavelan.c | if (lp->tx_first_in_use == I82586NULL) |
lp | 1361 | drivers/net/wavelan.c | lp->tx_first_in_use = txblock; |
lp | 1363 | drivers/net/wavelan.c | if (lp->tx_n_in_use < NTXBLOCKS - 1) |
lp | 1368 | drivers/net/wavelan.c | if (lp->watchdog.next == (timer_list *)0) |
lp | 1487 | drivers/net/wavelan.c | net_local *lp; |
lp | 1491 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1502 | drivers/net/wavelan.c | obram_read(ioaddr, lp->rx_head, (unsigned char *)&fd, sizeof(fd)); |
lp | 1529 | drivers/net/wavelan.c | lp->stats.rx_errors++; |
lp | 1536 | drivers/net/wavelan.c | lp->stats.rx_length_errors++; |
lp | 1542 | drivers/net/wavelan.c | lp->stats.rx_over_errors++; |
lp | 1548 | drivers/net/wavelan.c | lp->stats.rx_fifo_errors++; |
lp | 1554 | drivers/net/wavelan.c | lp->stats.rx_frame_errors++; |
lp | 1560 | drivers/net/wavelan.c | lp->stats.rx_crc_errors++; |
lp | 1646 | drivers/net/wavelan.c | lp->stats.rx_dropped++; |
lp | 1684 | drivers/net/wavelan.c | lp->stats.rx_packets++; |
lp | 1689 | drivers/net/wavelan.c | obram_write(ioaddr, fdoff(lp->rx_head, fd_status), (unsigned char *)&fd.fd_status, sizeof(fd.fd_status)); |
lp | 1692 | drivers/net/wavelan.c | obram_write(ioaddr, fdoff(lp->rx_head, fd_command), (unsigned char *)&fd.fd_command, sizeof(fd.fd_command)); |
lp | 1695 | drivers/net/wavelan.c | obram_write(ioaddr, fdoff(lp->rx_last, fd_command), (unsigned char *)&fd.fd_command, sizeof(fd.fd_command)); |
lp | 1697 | drivers/net/wavelan.c | lp->rx_last = lp->rx_head; |
lp | 1698 | drivers/net/wavelan.c | lp->rx_head = fd.fd_link_offset; |
lp | 1713 | drivers/net/wavelan.c | wavelan_complete(device *dev, unsigned short ioaddr, net_local *lp) |
lp | 1723 | drivers/net/wavelan.c | if (lp->tx_first_in_use == I82586NULL) |
lp | 1726 | drivers/net/wavelan.c | obram_read(ioaddr, acoff(lp->tx_first_in_use, ac_status), (unsigned char *)&tx_status, sizeof(tx_status)); |
lp | 1733 | drivers/net/wavelan.c | --lp->tx_n_in_use; |
lp | 1740 | drivers/net/wavelan.c | if (lp->tx_n_in_use <= 0) |
lp | 1741 | drivers/net/wavelan.c | lp->tx_first_in_use = I82586NULL; |
lp | 1744 | drivers/net/wavelan.c | lp->tx_first_in_use += TXBLOCKZ; |
lp | 1745 | drivers/net/wavelan.c | if (lp->tx_first_in_use >= OFFSET_CU + NTXBLOCKS * TXBLOCKZ) |
lp | 1746 | drivers/net/wavelan.c | lp->tx_first_in_use -= NTXBLOCKS * TXBLOCKZ; |
lp | 1753 | drivers/net/wavelan.c | lp->stats.tx_packets++; |
lp | 1755 | drivers/net/wavelan.c | lp->stats.collisions += ncollisions; |
lp | 1763 | drivers/net/wavelan.c | lp->stats.tx_errors++; |
lp | 1766 | drivers/net/wavelan.c | lp->stats.tx_carrier_errors++; |
lp | 1772 | drivers/net/wavelan.c | lp->stats.tx_carrier_errors++; |
lp | 1777 | drivers/net/wavelan.c | lp->stats.tx_fifo_errors++; |
lp | 1782 | drivers/net/wavelan.c | lp->stats.tx_heartbeat_errors++; |
lp | 1788 | drivers/net/wavelan.c | lp->stats.tx_aborted_errors++; |
lp | 1806 | drivers/net/wavelan.c | if (lp->tx_n_in_use < NTXBLOCKS - 1) |
lp | 1820 | drivers/net/wavelan.c | net_local *lp; |
lp | 1829 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1831 | drivers/net/wavelan.c | if (lp->tx_n_in_use <= 0) |
lp | 1837 | drivers/net/wavelan.c | lp->watchdog.expires = jiffies+WATCHDOG_JIFFIES; |
lp | 1838 | drivers/net/wavelan.c | add_timer(&lp->watchdog); |
lp | 1846 | drivers/net/wavelan.c | nreaped = wavelan_complete(dev, ioaddr, lp); |
lp | 1848 | drivers/net/wavelan.c | printk("%s: warning: wavelan_watchdog(): %d reaped, %d remain.\n", dev->name, nreaped, lp->tx_n_in_use); |
lp | 1866 | drivers/net/wavelan.c | net_local *lp; |
lp | 1878 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1912 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 1924 | drivers/net/wavelan.c | (void)wavelan_complete(dev, ioaddr, lp); |
lp | 1969 | drivers/net/wavelan.c | net_local *lp; |
lp | 1976 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 1986 | drivers/net/wavelan.c | set_chan_attn(ioaddr, lp->hacr); |
lp | 2016 | drivers/net/wavelan.c | net_local *lp; |
lp | 2018 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2020 | drivers/net/wavelan.c | return &lp->stats; |
lp | 2027 | drivers/net/wavelan.c | net_local *lp; |
lp | 2033 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2041 | drivers/net/wavelan.c | lp->promiscuous = 1; |
lp | 2052 | drivers/net/wavelan.c | lp->promiscuous = 0; |
lp | 2078 | drivers/net/wavelan.c | net_local *lp; |
lp | 2082 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2084 | drivers/net/wavelan.c | if (lp == (net_local *)0) |
lp | 2102 | drivers/net/wavelan.c | lp->correct_nwid += (m.mmr_correct_nwid_h << 8) | m.mmr_correct_nwid_l; |
lp | 2103 | drivers/net/wavelan.c | lp->wrong_nwid += (m.mmr_wrong_nwid_h << 8) | m.mmr_wrong_nwid_l; |
lp | 2111 | drivers/net/wavelan.c | lp->correct_nwid, |
lp | 2112 | drivers/net/wavelan.c | lp->wrong_nwid, |
lp | 2116 | drivers/net/wavelan.c | lp->tx_n_in_use, |
lp | 2117 | drivers/net/wavelan.c | lp->nresets |
lp | 2143 | drivers/net/wavelan.c | net_local *lp; |
lp | 2145 | drivers/net/wavelan.c | lp = first_wavelan; |
lp | 2148 | drivers/net/wavelan.c | size = sprintf_stats(buffer + len, lp->dev); |
lp | 2162 | drivers/net/wavelan.c | while ((lp = lp->next) != first_wavelan); |
lp | 2217 | drivers/net/wavelan.c | wavelan_cu_show_one(device *dev, net_local *lp, int i, unsigned short p) |
lp | 2430 | drivers/net/wavelan.c | net_local *lp; |
lp | 2432 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2445 | drivers/net/wavelan.c | net_local *lp; |
lp | 2449 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2454 | drivers/net/wavelan.c | for (i = 0, p = lp->tx_first_in_use; i < NTXBLOCKS; i++) |
lp | 2456 | drivers/net/wavelan.c | wavelan_cu_show_one(dev, lp, i, p); |
lp | 2481 | drivers/net/wavelan.c | net_local *lp; |
lp | 2483 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
lp | 2486 | drivers/net/wavelan.c | printk(" tx_n_in_use=%d,", lp->tx_n_in_use); |
lp | 2487 | drivers/net/wavelan.c | printk(" hacr=0x%x,", lp->hacr); |
lp | 2488 | drivers/net/wavelan.c | printk(" rx_head=0x%x,", lp->rx_head); |
lp | 2489 | drivers/net/wavelan.c | printk(" rx_last=0x%x,", lp->rx_last); |
lp | 2490 | drivers/net/wavelan.c | printk(" tx_first_free=0x%x,", lp->tx_first_free); |
lp | 2491 | drivers/net/wavelan.c | printk(" tx_first_in_use=0x%x,", lp->tx_first_in_use); |
lp | 437 | drivers/net/znet.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 443 | drivers/net/znet.c | lp->stats.tx_packets++; |
lp | 444 | drivers/net/znet.c | lp->stats.collisions += tx_status & 0xf; |
lp | 446 | drivers/net/znet.c | if (tx_status & 0x0600) lp->stats.tx_carrier_errors++; |
lp | 447 | drivers/net/znet.c | if (tx_status & 0x0100) lp->stats.tx_fifo_errors++; |
lp | 448 | drivers/net/znet.c | if (!(tx_status & 0x0040)) lp->stats.tx_heartbeat_errors++; |
lp | 449 | drivers/net/znet.c | if (tx_status & 0x0020) lp->stats.tx_aborted_errors++; |
lp | 452 | drivers/net/znet.c | lp->stats.tx_errors++; |
lp | 472 | drivers/net/znet.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 539 | drivers/net/znet.c | lp->stats.rx_errors++; |
lp | 540 | drivers/net/znet.c | if (status & 0x0800) lp->stats.rx_crc_errors++; |
lp | 541 | drivers/net/znet.c | if (status & 0x0400) lp->stats.rx_frame_errors++; |
lp | 542 | drivers/net/znet.c | if (status & 0x0200) lp->stats.rx_over_errors++; /* Wrong. */ |
lp | 543 | drivers/net/znet.c | if (status & 0x0100) lp->stats.rx_fifo_errors++; |
lp | 544 | drivers/net/znet.c | if (status & 0x0080) lp->stats.rx_length_errors++; |
lp | 546 | drivers/net/znet.c | lp->stats.rx_length_errors++; |
lp | 555 | drivers/net/znet.c | lp->stats.rx_dropped++; |
lp | 575 | drivers/net/znet.c | lp->stats.rx_packets++; |
lp | 621 | drivers/net/znet.c | struct net_local *lp = (struct net_local *)dev->priv; |
lp | 623 | drivers/net/znet.c | return &lp->stats; |
lp | 5 | drivers/scsi/eata_dma_proc.c | u32 *lp, h_lp; |
lp | 9 | drivers/scsi/eata_dma_proc.c | lp = (u32 *)p; |
lp | 10 | drivers/scsi/eata_dma_proc.c | sp = ((short *)lp) + 1; /* Convert Header */ |
lp | 12 | drivers/scsi/eata_dma_proc.c | lp++; |
lp | 15 | drivers/scsi/eata_dma_proc.c | sp = (u16 *)lp; /* Convert SubHeader */ |
lp | 17 | drivers/scsi/eata_dma_proc.c | bp = (u8 *) lp; |
lp | 19 | drivers/scsi/eata_dma_proc.c | lp++; |
lp | 20 | drivers/scsi/eata_dma_proc.c | for (h_lp = (u32)lp; (u32)lp < h_lp + ((u32)*(bp + 3)); lp++) |
lp | 21 | drivers/scsi/eata_dma_proc.c | *lp = ntohl(*lp); |
lp | 22 | drivers/scsi/eata_dma_proc.c | }while ((u32)lp < ((u32)p) + 4 + h_sp); |
lp | 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; |