hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/net/appletalk/cops.c
....@@ -70,6 +70,8 @@
7070 #include <linux/bitops.h>
7171 #include <linux/jiffies.h>
7272
73
+#include <net/Space.h>
74
+
7375 #include <asm/io.h>
7476 #include <asm/dma.h>
7577
....@@ -189,7 +191,7 @@
189191
190192 static irqreturn_t cops_interrupt (int irq, void *dev_id);
191193 static void cops_poll(struct timer_list *t);
192
-static void cops_timeout(struct net_device *dev);
194
+static void cops_timeout(struct net_device *dev, unsigned int txqueue);
193195 static void cops_rx (struct net_device *dev);
194196 static netdev_tx_t cops_send_packet (struct sk_buff *skb,
195197 struct net_device *dev);
....@@ -301,7 +303,7 @@
301303 dev->irq = cops_irq(ioaddr, board);
302304 if (dev->irq)
303305 break;
304
- /* No IRQ found on this port, fallthrough */
306
+ fallthrough; /* Once no IRQ found on this port */
305307 case 1:
306308 retval = -EINVAL;
307309 goto err_out;
....@@ -777,10 +779,7 @@
777779 }
778780
779781 /* Get response length. */
780
- if(lp->board==DAYNA)
781
- pkt_len = inb(ioaddr) & 0xFF;
782
- else
783
- pkt_len = inb(ioaddr) & 0x00FF;
782
+ pkt_len = inb(ioaddr);
784783 pkt_len |= (inb(ioaddr) << 8);
785784 /* Input IO code. */
786785 rsp_type=inb(ioaddr);
....@@ -847,7 +846,7 @@
847846 netif_rx(skb);
848847 }
849848
850
-static void cops_timeout(struct net_device *dev)
849
+static void cops_timeout(struct net_device *dev, unsigned int txqueue)
851850 {
852851 struct cops_local *lp = netdev_priv(dev);
853852 int ioaddr = dev->base_addr;
....@@ -892,10 +891,7 @@
892891
893892 /* Output IO length. */
894893 outb(skb->len, ioaddr);
895
- if(lp->board == DAYNA)
896
- outb(skb->len >> 8, ioaddr);
897
- else
898
- outb((skb->len >> 8)&0x0FF, ioaddr);
894
+ outb(skb->len >> 8, ioaddr);
899895
900896 /* Output IO code. */
901897 outb(LAP_WRITE, ioaddr);