.. | .. |
---|
83 | 83 | struct net_device *dev); |
---|
84 | 84 | static struct net_device_stats *get_stats(struct net_device *dev); |
---|
85 | 85 | static void set_multicast_list(struct net_device *dev); |
---|
86 | | -static void axnet_tx_timeout(struct net_device *dev); |
---|
| 86 | +static void axnet_tx_timeout(struct net_device *dev, unsigned int txqueue); |
---|
87 | 87 | static irqreturn_t ei_irq_wrapper(int irq, void *dev_id); |
---|
88 | 88 | static void ei_watchdog(struct timer_list *t); |
---|
89 | 89 | static void axnet_reset_8390(struct net_device *dev); |
---|
.. | .. |
---|
610 | 610 | switch (cmd) { |
---|
611 | 611 | case SIOCGMIIPHY: |
---|
612 | 612 | data->phy_id = info->phy_id; |
---|
613 | | - /* Fall through */ |
---|
| 613 | + fallthrough; |
---|
614 | 614 | case SIOCGMIIREG: /* Read MII PHY register. */ |
---|
615 | 615 | data->val_out = mdio_read(mii_addr, data->phy_id, data->reg_num & 0x1f); |
---|
616 | 616 | return 0; |
---|
.. | .. |
---|
657 | 657 | outb_p(E8390_RREAD+E8390_START, nic_base + AXNET_CMD); |
---|
658 | 658 | |
---|
659 | 659 | insw(nic_base + AXNET_DATAPORT,buf,count>>1); |
---|
660 | | - if (count & 0x01) |
---|
661 | | - buf[count-1] = inb(nic_base + AXNET_DATAPORT), xfer_count++; |
---|
| 660 | + if (count & 0x01) { |
---|
| 661 | + buf[count-1] = inb(nic_base + AXNET_DATAPORT); |
---|
| 662 | + xfer_count++; |
---|
| 663 | + } |
---|
662 | 664 | |
---|
663 | 665 | } |
---|
664 | 666 | |
---|
.. | .. |
---|
898 | 900 | /** |
---|
899 | 901 | * axnet_tx_timeout - handle transmit time out condition |
---|
900 | 902 | * @dev: network device which has apparently fallen asleep |
---|
| 903 | + * @txqueue: unused |
---|
901 | 904 | * |
---|
902 | 905 | * Called by kernel when device never acknowledges a transmit has |
---|
903 | 906 | * completed (or failed) - i.e. never posted a Tx related interrupt. |
---|
904 | 907 | */ |
---|
905 | 908 | |
---|
906 | | -static void axnet_tx_timeout(struct net_device *dev) |
---|
| 909 | +static void axnet_tx_timeout(struct net_device *dev, unsigned int txqueue) |
---|
907 | 910 | { |
---|
908 | 911 | long e8390_base = dev->base_addr; |
---|
909 | 912 | struct ei_device *ei_local = netdev_priv(dev); |
---|
.. | .. |
---|
1269 | 1272 | ei_local->txing = 1; |
---|
1270 | 1273 | NS8390_trigger_send(dev, ei_local->tx2, ei_local->tx_start_page + 6); |
---|
1271 | 1274 | netif_trans_update(dev); |
---|
1272 | | - ei_local->tx2 = -1, |
---|
| 1275 | + ei_local->tx2 = -1; |
---|
1273 | 1276 | ei_local->lasttx = 2; |
---|
| 1277 | + } else { |
---|
| 1278 | + ei_local->lasttx = 20; |
---|
| 1279 | + ei_local->txing = 0; |
---|
1274 | 1280 | } |
---|
1275 | | - else ei_local->lasttx = 20, ei_local->txing = 0; |
---|
1276 | 1281 | } |
---|
1277 | 1282 | else if (ei_local->tx2 < 0) |
---|
1278 | 1283 | { |
---|
.. | .. |
---|
1288 | 1293 | netif_trans_update(dev); |
---|
1289 | 1294 | ei_local->tx1 = -1; |
---|
1290 | 1295 | ei_local->lasttx = 1; |
---|
| 1296 | + } else { |
---|
| 1297 | + ei_local->lasttx = 10; |
---|
| 1298 | + ei_local->txing = 0; |
---|
1291 | 1299 | } |
---|
1292 | | - else |
---|
1293 | | - ei_local->lasttx = 10, ei_local->txing = 0; |
---|
1294 | 1300 | } |
---|
1295 | 1301 | // else |
---|
1296 | 1302 | // netdev_warn(dev, "unexpected TX-done interrupt, lasttx=%d\n", |
---|