forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/net/ethernet/amd/nmclan_cs.c
....@@ -114,8 +114,6 @@
114114 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
115115
116116 #define DRV_NAME "nmclan_cs"
117
-#define DRV_VERSION "0.16"
118
-
119117
120118 /* ----------------------------------------------------------------------------
121119 Conditional Compilation Options
....@@ -367,7 +365,7 @@
367365
368366 char tx_free_frames; /* Number of free transmit frame buffers */
369367 char tx_irq_disabled; /* MACE TX interrupt disabled */
370
-
368
+
371369 spinlock_t bank_lock; /* Must be held if you step off bank 0 */
372370 } mace_private;
373371
....@@ -407,7 +405,7 @@
407405 static int mace_close(struct net_device *dev);
408406 static netdev_tx_t mace_start_xmit(struct sk_buff *skb,
409407 struct net_device *dev);
410
-static void mace_tx_timeout(struct net_device *dev);
408
+static void mace_tx_timeout(struct net_device *dev, unsigned int txqueue);
411409 static irqreturn_t mace_interrupt(int irq, void *dev_id);
412410 static struct net_device_stats *mace_get_stats(struct net_device *dev);
413411 static int mace_rx(struct net_device *dev, unsigned char RxCnt);
....@@ -444,7 +442,7 @@
444442 lp = netdev_priv(dev);
445443 lp->p_dev = link;
446444 link->priv = dev;
447
-
445
+
448446 spin_lock_init(&lp->bank_lock);
449447 link->resource[0]->end = 32;
450448 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
....@@ -652,7 +650,7 @@
652650 } else {
653651 pr_notice("mace id not found: %x %x should be 0x40 0x?9\n",
654652 sig[0], sig[1]);
655
- return -ENODEV;
653
+ goto failed;
656654 }
657655 }
658656
....@@ -817,7 +815,6 @@
817815 struct ethtool_drvinfo *info)
818816 {
819817 strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
820
- strlcpy(info->version, DRV_VERSION, sizeof(info->version));
821818 snprintf(info->bus_info, sizeof(info->bus_info),
822819 "PCMCIA 0x%lx", dev->base_addr);
823820 }
....@@ -837,7 +834,7 @@
837834 failed, put skb back into a list."
838835 ---------------------------------------------------------------------------- */
839836
840
-static void mace_tx_timeout(struct net_device *dev)
837
+static void mace_tx_timeout(struct net_device *dev, unsigned int txqueue)
841838 {
842839 mace_private *lp = netdev_priv(dev);
843840 struct pcmcia_device *link = lp->p_dev;
....@@ -1110,7 +1107,7 @@
11101107 if (pkt_len & 1)
11111108 *(skb_tail_pointer(skb) - 1) = inb(ioaddr + AM2150_RCV);
11121109 skb->protocol = eth_type_trans(skb, dev);
1113
-
1110
+
11141111 netif_rx(skb); /* Send the packet to the upper (protocol) layers. */
11151112
11161113 dev->stats.rx_packets++;