| .. | .. |
|---|
| 204 | 204 | static void read_block(long ioaddr, int length, unsigned char *buffer, int data_mode); |
|---|
| 205 | 205 | static int net_close(struct net_device *dev); |
|---|
| 206 | 206 | static void set_rx_mode(struct net_device *dev); |
|---|
| 207 | | -static void tx_timeout(struct net_device *dev); |
|---|
| 207 | +static void tx_timeout(struct net_device *dev, unsigned int txqueue); |
|---|
| 208 | 208 | |
|---|
| 209 | 209 | |
|---|
| 210 | 210 | /* A list of all installed ATP devices, for removing the driver module. */ |
|---|
| .. | .. |
|---|
| 454 | 454 | { |
|---|
| 455 | 455 | struct net_local *lp = netdev_priv(dev); |
|---|
| 456 | 456 | long ioaddr = dev->base_addr; |
|---|
| 457 | | - int i; |
|---|
| 457 | + int i; |
|---|
| 458 | 458 | |
|---|
| 459 | 459 | /* Turn off the printer multiplexer on the 8012. */ |
|---|
| 460 | 460 | for (i = 0; i < 8; i++) |
|---|
| 461 | 461 | outb(mux_8012[i], ioaddr + PAR_DATA); |
|---|
| 462 | 462 | write_reg_high(ioaddr, CMR1, CMR1h_RESET); |
|---|
| 463 | 463 | |
|---|
| 464 | | - for (i = 0; i < 6; i++) |
|---|
| 464 | + for (i = 0; i < 6; i++) |
|---|
| 465 | 465 | write_reg_byte(ioaddr, PAR0 + i, dev->dev_addr[i]); |
|---|
| 466 | 466 | |
|---|
| 467 | 467 | write_reg_high(ioaddr, CMR2, lp->addr_mode); |
|---|
| .. | .. |
|---|
| 471 | 471 | (read_nibble(ioaddr, CMR2_h) >> 3) & 0x0f); |
|---|
| 472 | 472 | } |
|---|
| 473 | 473 | |
|---|
| 474 | | - write_reg(ioaddr, CMR2, CMR2_IRQOUT); |
|---|
| 475 | | - write_reg_high(ioaddr, CMR1, CMR1h_RxENABLE | CMR1h_TxENABLE); |
|---|
| 474 | + write_reg(ioaddr, CMR2, CMR2_IRQOUT); |
|---|
| 475 | + write_reg_high(ioaddr, CMR1, CMR1h_RxENABLE | CMR1h_TxENABLE); |
|---|
| 476 | 476 | |
|---|
| 477 | 477 | /* Enable the interrupt line from the serial port. */ |
|---|
| 478 | 478 | outb(Ctrl_SelData + Ctrl_IRQEN, ioaddr + PAR_CONTROL); |
|---|
| 479 | 479 | |
|---|
| 480 | 480 | /* Unmask the interesting interrupts. */ |
|---|
| 481 | | - write_reg(ioaddr, IMR, ISR_RxOK | ISR_TxErr | ISR_TxOK); |
|---|
| 482 | | - write_reg_high(ioaddr, IMR, ISRh_RxErr); |
|---|
| 481 | + write_reg(ioaddr, IMR, ISR_RxOK | ISR_TxErr | ISR_TxOK); |
|---|
| 482 | + write_reg_high(ioaddr, IMR, ISRh_RxErr); |
|---|
| 483 | 483 | |
|---|
| 484 | 484 | lp->tx_unit_busy = 0; |
|---|
| 485 | | - lp->pac_cnt_in_tx_buf = 0; |
|---|
| 485 | + lp->pac_cnt_in_tx_buf = 0; |
|---|
| 486 | 486 | lp->saved_tx_size = 0; |
|---|
| 487 | 487 | } |
|---|
| 488 | 488 | |
|---|
| .. | .. |
|---|
| 533 | 533 | outb(Ctrl_HNibWrite | Ctrl_SelData | Ctrl_IRQEN, ioaddr + PAR_CONTROL); |
|---|
| 534 | 534 | } |
|---|
| 535 | 535 | |
|---|
| 536 | | -static void tx_timeout(struct net_device *dev) |
|---|
| 536 | +static void tx_timeout(struct net_device *dev, unsigned int txqueue) |
|---|
| 537 | 537 | { |
|---|
| 538 | 538 | long ioaddr = dev->base_addr; |
|---|
| 539 | 539 | |
|---|
| .. | .. |
|---|
| 610 | 610 | write_reg(ioaddr, CMR2, CMR2_NULL); |
|---|
| 611 | 611 | write_reg(ioaddr, IMR, 0); |
|---|
| 612 | 612 | |
|---|
| 613 | | - if (net_debug > 5) printk(KERN_DEBUG "%s: In interrupt ", dev->name); |
|---|
| 614 | | - while (--boguscount > 0) { |
|---|
| 613 | + if (net_debug > 5) |
|---|
| 614 | + printk(KERN_DEBUG "%s: In interrupt ", dev->name); |
|---|
| 615 | + while (--boguscount > 0) { |
|---|
| 615 | 616 | int status = read_nibble(ioaddr, ISR); |
|---|
| 616 | | - if (net_debug > 5) printk("loop status %02x..", status); |
|---|
| 617 | + if (net_debug > 5) |
|---|
| 618 | + printk("loop status %02x..", status); |
|---|
| 617 | 619 | |
|---|
| 618 | 620 | if (status & (ISR_RxOK<<3)) { |
|---|
| 619 | 621 | handled = 1; |
|---|
| .. | .. |
|---|
| 640 | 642 | } while (--boguscount > 0); |
|---|
| 641 | 643 | } else if (status & ((ISR_TxErr + ISR_TxOK)<<3)) { |
|---|
| 642 | 644 | handled = 1; |
|---|
| 643 | | - if (net_debug > 6) printk("handling Tx done.."); |
|---|
| 645 | + if (net_debug > 6) |
|---|
| 646 | + printk("handling Tx done.."); |
|---|
| 644 | 647 | /* Clear the Tx interrupt. We should check for too many failures |
|---|
| 645 | 648 | and reinitialize the adapter. */ |
|---|
| 646 | 649 | write_reg(ioaddr, ISR, ISR_TxErr + ISR_TxOK); |
|---|
| .. | .. |
|---|
| 680 | 683 | break; |
|---|
| 681 | 684 | } else |
|---|
| 682 | 685 | break; |
|---|
| 683 | | - } |
|---|
| 686 | + } |
|---|
| 684 | 687 | |
|---|
| 685 | 688 | /* This following code fixes a rare (and very difficult to track down) |
|---|
| 686 | 689 | problem where the adapter forgets its ethernet address. */ |
|---|
| .. | .. |
|---|
| 694 | 697 | } |
|---|
| 695 | 698 | |
|---|
| 696 | 699 | /* Tell the adapter that it can go back to using the output line as IRQ. */ |
|---|
| 697 | | - write_reg(ioaddr, CMR2, CMR2_IRQOUT); |
|---|
| 700 | + write_reg(ioaddr, CMR2, CMR2_IRQOUT); |
|---|
| 698 | 701 | /* Enable the physical interrupt line, which is sure to be low until.. */ |
|---|
| 699 | 702 | outb(Ctrl_SelData + Ctrl_IRQEN, ioaddr + PAR_CONTROL); |
|---|
| 700 | 703 | /* .. we enable the interrupt sources. */ |
|---|