aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/lib8390.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/lib8390.c')
-rw-r--r--drivers/net/lib8390.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index 56f66f485400..316bb70775b1 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -257,7 +257,7 @@ static void __ei_tx_timeout(struct net_device *dev)
257{ 257{
258 unsigned long e8390_base = dev->base_addr; 258 unsigned long e8390_base = dev->base_addr;
259 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); 259 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
260 int txsr, isr, tickssofar = jiffies - dev->trans_start; 260 int txsr, isr, tickssofar = jiffies - dev_trans_start(dev);
261 unsigned long flags; 261 unsigned long flags;
262 262
263 dev->stats.tx_errors++; 263 dev->stats.tx_errors++;
@@ -386,7 +386,6 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
386 { 386 {
387 ei_local->txing = 1; 387 ei_local->txing = 1;
388 NS8390_trigger_send(dev, send_length, output_page); 388 NS8390_trigger_send(dev, send_length, output_page);
389 dev->trans_start = jiffies;
390 if (output_page == ei_local->tx_start_page) 389 if (output_page == ei_local->tx_start_page)
391 { 390 {
392 ei_local->tx1 = -1; 391 ei_local->tx1 = -1;
@@ -445,14 +444,14 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
445 444
446 if (ei_local->irqlock) 445 if (ei_local->irqlock)
447 { 446 {
448#if 1 /* This might just be an interrupt for a PCI device sharing this line */ 447 /*
449 /* The "irqlock" check is only for testing. */ 448 * This might just be an interrupt for a PCI device sharing
450 printk(ei_local->irqlock 449 * this line
451 ? "%s: Interrupted while interrupts are masked! isr=%#2x imr=%#2x.\n" 450 */
452 : "%s: Reentering the interrupt handler! isr=%#2x imr=%#2x.\n", 451 printk("%s: Interrupted while interrupts are masked!"
452 " isr=%#2x imr=%#2x.\n",
453 dev->name, ei_inb_p(e8390_base + EN0_ISR), 453 dev->name, ei_inb_p(e8390_base + EN0_ISR),
454 ei_inb_p(e8390_base + EN0_IMR)); 454 ei_inb_p(e8390_base + EN0_IMR));
455#endif
456 spin_unlock(&ei_local->page_lock); 455 spin_unlock(&ei_local->page_lock);
457 return IRQ_NONE; 456 return IRQ_NONE;
458 } 457 }
@@ -792,7 +791,6 @@ static void ei_receive(struct net_device *dev)
792 /* We used to also ack ENISR_OVER here, but that would sometimes mask 791 /* We used to also ack ENISR_OVER here, but that would sometimes mask
793 a real overrun, leaving the 8390 in a stopped state with rec'vr off. */ 792 a real overrun, leaving the 8390 in a stopped state with rec'vr off. */
794 ei_outb_p(ENISR_RX+ENISR_RX_ERR, e8390_base+EN0_ISR); 793 ei_outb_p(ENISR_RX+ENISR_RX_ERR, e8390_base+EN0_ISR);
795 return;
796} 794}
797 795
798/** 796/**
@@ -905,10 +903,10 @@ static struct net_device_stats *__ei_get_stats(struct net_device *dev)
905 903
906static inline void make_mc_bits(u8 *bits, struct net_device *dev) 904static inline void make_mc_bits(u8 *bits, struct net_device *dev)
907{ 905{
908 struct dev_mc_list *dmi; 906 struct netdev_hw_addr *ha;
909 907
910 netdev_for_each_mc_addr(dmi, dev) { 908 netdev_for_each_mc_addr(ha, dev) {
911 u32 crc = ether_crc(ETH_ALEN, dmi->dmi_addr); 909 u32 crc = ether_crc(ETH_ALEN, ha->addr);
912 /* 910 /*
913 * The 8390 uses the 6 most significant bits of the 911 * The 8390 uses the 6 most significant bits of the
914 * CRC to index the multicast table. 912 * CRC to index the multicast table.