Skip to contentSkip to conversation

Fixes, cleanup and modernization for 8390 ethernet drivers

PATCH In review Finn Thain 3 participants 12 messages Feb 19, 2018 – Feb 21, 2018

Subsystems (5)
lore
Share & tools
lore

Finn Thain

author
#0 lore raw

cover Fixes, cleanup and modernization for 8390 ethernet drivers

Changes since v4 of combined patch series:
- Removed redundant and non-portable MACH_IS_MAC tests.
- Added acked-by tags from Geert Uytterhoeven.
- Omitted patches unrelated to 8390 drivers.

Finn Thain (4):
net/8390: Remove redundant make dependencies
net/8390: Fix msg_enable patch snafu
net/mac8390: Convert to nubus_driver
net/mac8390: Fix log messages

 drivers/net/Space.c                   |   3 -
 drivers/net/ethernet/8390/Makefile    |   6 +-
 drivers/net/ethernet/8390/ax88796.c   |   3 -
 drivers/net/ethernet/8390/axnet_cs.c  |   2 -
 drivers/net/ethernet/8390/etherh.c    |  17 ----
 drivers/net/ethernet/8390/hydra.c     |   4 -
 drivers/net/ethernet/8390/lib8390.c   |   2 +
 drivers/net/ethernet/8390/mac8390.c   | 171 ++++++++++++++++------------------
 drivers/net/ethernet/8390/mcf8390.c   |   4 -
 drivers/net/ethernet/8390/ne.c        |   2 +-
 drivers/net/ethernet/8390/pcnet_cs.c  |   4 -
 drivers/net/ethernet/8390/wd.c        |   2 +-
 drivers/net/ethernet/8390/zorro8390.c |   5 -
 include/net/Space.h                   |   1 -
 14 files changed, 85 insertions(+), 141 deletions(-)
Signature · 1 line
2.16.1
author
#1 lore raw

PATCH 1/4 net/8390: Remove redundant make dependencies

The hydra, zorro8390 and mcf8390 drivers all #include "lib8390.c" and have no need for 8390.o. modinfo confirms no dependency on 8390.ko. Drop the redundant dependency from the Makefile. objdump confirms that this patch has no effect on the module binaries.

The superfluous additions of 8390.o were introduced in commit 644570b83026 ("8390: Move the 8390 related drivers").

---
 drivers/net/ethernet/8390/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/8390/Makefile +3 -3
index f975c2fc88a3..1d650e66cc6e 100644
@@ -7,8 +7,8 @@ obj-$(CONFIG_MAC8390) += mac8390.o
 obj-$(CONFIG_APNE) += apne.o 8390.o
 obj-$(CONFIG_ARM_ETHERH) += etherh.o
 obj-$(CONFIG_AX88796) += ax88796.o
-obj-$(CONFIG_HYDRA) += hydra.o 8390.o
-obj-$(CONFIG_MCF8390) += mcf8390.o 8390.o
+obj-$(CONFIG_HYDRA) += hydra.o
+obj-$(CONFIG_MCF8390) += mcf8390.o
 obj-$(CONFIG_NE2000) += ne.o 8390p.o
 obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o
 obj-$(CONFIG_PCMCIA_AXNET) += axnet_cs.o 8390.o
@@ -16,4 +16,4 @@ obj-$(CONFIG_PCMCIA_PCNET) += pcnet_cs.o 8390.o
 obj-$(CONFIG_STNIC) += stnic.o 8390.o
 obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o
 obj-$(CONFIG_WD80x3) += wd.o 8390.o
-obj-$(CONFIG_ZORRO8390) += zorro8390.o 8390.o
+obj-$(CONFIG_ZORRO8390) += zorro8390.o
Signature · 1 line
2.16.1
author
#3 lore raw

PATCH 2/4 net/8390: Fix msg_enable patch snafu

In reply to Finn Thain

The lib8390 module parameter 'msg_enable' doesn't do anything useful:
it causes an ancient version string to be logged.

Remove redundant code that logs the same string.

In ne.c and wd.c, the value of ei_local->msg_enable is used before being assigned. Use ne_msg_enable and wd_msg_enable, respectively.

Most of the other 8390 drivers never assign ei_local->msg_enable. Use the 'msg_enable' module parameter from lib8390 as the default value.

Eliminate the pointless static and local variables.

Clean up an indentation mistake.

All of these issues originated from the same patch.

Cc Russell King <[email protected]>
Fixes c45f812f0280 ("8390 : Replace ei_debug with msg_enable/NETIF_MSG_* feature")

---
Only the mac8390.c and lib8390.c changes have been tested. The other changes are similar but untested.

---
 drivers/net/ethernet/8390/ax88796.c   |  3 ---
 drivers/net/ethernet/8390/axnet_cs.c  |  2 --
 drivers/net/ethernet/8390/etherh.c    | 17 -----------------
 drivers/net/ethernet/8390/hydra.c     |  4 ----
 drivers/net/ethernet/8390/lib8390.c   |  2 ++
 drivers/net/ethernet/8390/mac8390.c   |  8 --------
 drivers/net/ethernet/8390/mcf8390.c   |  4 ----
 drivers/net/ethernet/8390/ne.c        |  2 +-
 drivers/net/ethernet/8390/pcnet_cs.c  |  4 ----
 drivers/net/ethernet/8390/wd.c        |  2 +-
 drivers/net/ethernet/8390/zorro8390.c |  5 -----
 11 files changed, 4 insertions(+), 49 deletions(-)
drivers/net/ethernet/8390/ax88796.c +0 -3
index 245554707163..da61cf3cb3a9 100644
@@ -77,8 +77,6 @@ static unsigned char version[] = "ax88796.c: Copyright 2005,2007 Simtec Electron
 
 #define AX_GPOC_PPDSET	BIT(6)
 
-static u32 ax_msg_enable;
-
 /* device private data */
 
 struct ax_device {
@@ -747,7 +745,6 @@ static int ax_init_dev(struct net_device *dev)
 	ei_local->block_output = &ax_block_output;
 	ei_local->get_8390_hdr = &ax_get_8390_hdr;
 	ei_local->priv = 0;
-	ei_local->msg_enable = ax_msg_enable;
 
 	dev->netdev_ops = &ax_netdev_ops;
 	dev->ethtool_ops = &ax_ethtool_ops;
drivers/net/ethernet/8390/axnet_cs.c +0 -2
index 7bddb8efb6d5..d422a124cd7c 100644
@@ -104,7 +104,6 @@ static void AX88190_init(struct net_device *dev, int startp);
 static int ax_open(struct net_device *dev);
 static int ax_close(struct net_device *dev);
 static irqreturn_t ax_interrupt(int irq, void *dev_id);
-static u32 axnet_msg_enable;
 
 /*====================================================================*/
 
@@ -151,7 +150,6 @@ static int axnet_probe(struct pcmcia_device *link)
 	return -ENOMEM;
 
     ei_local = netdev_priv(dev);
-    ei_local->msg_enable = axnet_msg_enable;
     spin_lock_init(&ei_local->page_lock);
 
     info = PRIV(dev);
drivers/net/ethernet/8390/etherh.c +0 -17
index 11cbf22ad201..32e9627e3880 100644
@@ -64,8 +64,6 @@ static char version[] =
 
 #include "lib8390.c"
 
-static u32 etherh_msg_enable;
-
 struct etherh_priv {
 	void __iomem	*ioc_fast;
 	void __iomem	*memc;
@@ -501,18 +499,6 @@ etherh_close(struct net_device *dev)
 	return 0;
 }
 
-/*
- * Initialisation
- */
-
-static void __init etherh_banner(void)
-{
-	static int version_printed;
-
-	if ((etherh_msg_enable & NETIF_MSG_DRV) && (version_printed++ == 0))
-		pr_info("%s", version);
-}
-
 /*
  * Read the ethernet address string from the on board rom.
  * This is an ascii string...
@@ -671,8 +657,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
 	struct etherh_priv *eh;
 	int ret;
 
-	etherh_banner();
-
 	ret = ecard_request_resources(ec);
 	if (ret)
 		goto out;
@@ -757,7 +741,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
 	ei_local->block_output  = etherh_block_output;
 	ei_local->get_8390_hdr  = etherh_get_header;
 	ei_local->interface_num = 0;
-	ei_local->msg_enable = etherh_msg_enable;
 
 	etherh_reset(dev);
 	__NS8390_init(dev, 0);
drivers/net/ethernet/8390/hydra.c +0 -4
index 8ae249195301..941754ea78ec 100644
@@ -66,7 +66,6 @@ static void hydra_block_input(struct net_device *dev, int count,
 static void hydra_block_output(struct net_device *dev, int count,
 			       const unsigned char *buf, int start_page);
 static void hydra_remove_one(struct zorro_dev *z);
-static u32 hydra_msg_enable;
 
 static struct zorro_device_id hydra_zorro_tbl[] = {
     { ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET },
@@ -119,7 +118,6 @@ static int hydra_init(struct zorro_dev *z)
     int start_page, stop_page;
     int j;
     int err;
-    struct ei_device *ei_local;
 
     static u32 hydra_offsets[16] = {
 	0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e,
@@ -138,8 +136,6 @@ static int hydra_init(struct zorro_dev *z)
     start_page = NESM_START_PG;
     stop_page = NESM_STOP_PG;
 
-    ei_local = netdev_priv(dev);
-    ei_local->msg_enable = hydra_msg_enable;
     dev->base_addr = ioaddr;
     dev->irq = IRQ_AMIGA_PORTS;
 
drivers/net/ethernet/8390/lib8390.c +2 -0
index 60f8e2c8e726..5d9bbde9fe68 100644
@@ -975,6 +975,8 @@ static void ethdev_setup(struct net_device *dev)
 	ether_setup(dev);
 
 	spin_lock_init(&ei_local->page_lock);
+
+	ei_local->msg_enable = msg_enable;
 }
 
 /**
drivers/net/ethernet/8390/mac8390.c +0 -8
index 2f91ce8dc614..abe50338b9f7 100644
@@ -168,7 +168,6 @@ static void slow_sane_block_output(struct net_device *dev, int count,
 				   const unsigned char *buf, int start_page);
 static void word_memcpy_tocard(unsigned long tp, const void *fp, int count);
 static void word_memcpy_fromcard(void *tp, unsigned long fp, int count);
-static u32 mac8390_msg_enable;
 
 static enum mac8390_type __init mac8390_ident(struct nubus_rsrc *fres)
 {
@@ -299,8 +298,6 @@ static bool __init mac8390_init(struct net_device *dev,
 	int offset;
 	volatile unsigned short *i;
 
-	printk_once(KERN_INFO pr_fmt("%s"), version);
-
 	dev->irq = SLOT2IRQ(ndev->board->slot);
 	/* This is getting to be a habit */
 	dev->base_addr = (ndev->board->slot_addr |
@@ -398,8 +395,6 @@ struct net_device * __init mac8390_probe(int unit)
 	struct net_device *dev;
 	struct nubus_rsrc *ndev = NULL;
 	int err = -ENODEV;
-	struct ei_device *ei_local;
-
 	static unsigned int slots;
 
 	enum mac8390_type cardtype;
@@ -441,9 +436,6 @@ struct net_device * __init mac8390_probe(int unit)
 	if (!ndev)
 		goto out;
 
-	 ei_local = netdev_priv(dev);
-	 ei_local->msg_enable = mac8390_msg_enable;
-
 	err = register_netdev(dev);
 	if (err)
 		goto out;
drivers/net/ethernet/8390/mcf8390.c +0 -4
index 4bb967bc879e..4ad8031ab669 100644
@@ -38,7 +38,6 @@ static const char version[] =
 
 #define NESM_START_PG	0x40	/* First page of TX buffer */
 #define NESM_STOP_PG	0x80	/* Last page +1 of RX ring */
-static u32 mcf8390_msg_enable;
 
 #ifdef NE2000_ODDOFFSET
 /*
@@ -407,7 +406,6 @@ static int mcf8390_init(struct net_device *dev)
 static int mcf8390_probe(struct platform_device *pdev)
 {
 	struct net_device *dev;
-	struct ei_device *ei_local;
 	struct resource *mem, *irq;
 	resource_size_t msize;
 	int ret;
@@ -435,8 +433,6 @@ static int mcf8390_probe(struct platform_device *pdev)
 
 	SET_NETDEV_DEV(dev, &pdev->dev);
 	platform_set_drvdata(pdev, dev);
-	ei_local = netdev_priv(dev);
-	ei_local->msg_enable = mcf8390_msg_enable;
 
 	dev->irq = irq->start;
 	dev->base_addr = mem->start;
drivers/net/ethernet/8390/ne.c +1 -1
index 66f47987e2a2..4cdff6e6af89 100644
@@ -485,7 +485,7 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr)
 		mdelay(10);		/* wait 10ms for interrupt to propagate */
 		outb_p(0x00, ioaddr + EN0_IMR); 		/* Mask it again. */
 		dev->irq = probe_irq_off(cookie);
-		if (netif_msg_probe(ei_local))
+		if (ne_msg_enable & NETIF_MSG_PROBE)
 			pr_cont(" autoirq is %d", dev->irq);
 	} else if (dev->irq == 2)
 		/* Fixup for users that don't know that IRQ 2 is really IRQ 9,
drivers/net/ethernet/8390/pcnet_cs.c +0 -4
index bcad4a7fac9f..61e43802b9a5 100644
@@ -66,7 +66,6 @@
 #define PCNET_RDC_TIMEOUT (2*HZ/100)	/* Max wait in jiffies for Tx RDC */
 
 static const char *if_names[] = { "auto", "10baseT", "10base2"};
-static u32 pcnet_msg_enable;
 
 /*====================================================================*/
 
@@ -556,7 +555,6 @@ static int pcnet_config(struct pcmcia_device *link)
     int start_pg, stop_pg, cm_offset;
     int has_shmem = 0;
     struct hw_info *local_hw_info;
-    struct ei_device *ei_local;
 
     dev_dbg(&link->dev, "pcnet_config\n");
 
@@ -606,8 +604,6 @@ static int pcnet_config(struct pcmcia_device *link)
 	mii_phy_probe(dev);
 
     SET_NETDEV_DEV(dev, &link->dev);
-    ei_local = netdev_priv(dev);
-    ei_local->msg_enable = pcnet_msg_enable;
 
     if (register_netdev(dev) != 0) {
 	pr_notice("register_netdev() failed\n");
drivers/net/ethernet/8390/wd.c +1 -1
index 6efa2722f850..fb17c2c7e1dd 100644
@@ -299,7 +299,7 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
 
 			outb_p(0x00, nic_addr+EN0_IMR);	/* Mask all intrs. again. */
 
-			if (netif_msg_drv(ei_local))
+			if (wd_msg_enable & NETIF_MSG_PROBE)
 				pr_cont(" autoirq is %d", dev->irq);
 			if (dev->irq < 2)
 				dev->irq = word16 ? 10 : 5;
drivers/net/ethernet/8390/zorro8390.c +0 -5
index 6d93956b293b..35a500a21521 100644
@@ -44,8 +44,6 @@
 static const char version[] =
 	"8390.c:v1.10cvs 9/23/94 Donald Becker (becker at cesdis.gsfc.nasa.gov)\n";
 
-static u32 zorro8390_msg_enable;
-
 #include "lib8390.c"
 
 #define DRV_NAME	"zorro8390"
@@ -296,7 +294,6 @@ static int zorro8390_init(struct net_device *dev, unsigned long board,
 	int err;
 	unsigned char SA_prom[32];
 	int start_page, stop_page;
-	struct ei_device *ei_local = netdev_priv(dev);
 	static u32 zorro8390_offsets[16] = {
 		0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e,
 		0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
@@ -388,8 +385,6 @@ static int zorro8390_init(struct net_device *dev, unsigned long board,
 	dev->netdev_ops = &zorro8390_netdev_ops;
 	__NS8390_init(dev, 0);
 
-	ei_local->msg_enable = zorro8390_msg_enable;
-
 	err = register_netdev(dev);
 	if (err) {
 		free_irq(IRQ_AMIGA_PORTS, dev);
Signature · 1 line
2.16.1
author
#10 lore raw

PATCH 3/4 net/mac8390: Convert to nubus_driver

In reply to Finn Thain

This resolves an old bug that constrained this driver to no more than one card.

---
 drivers/net/Space.c                 |   3 -
 drivers/net/ethernet/8390/mac8390.c | 139 +++++++++++++++++-------------------
 include/net/Space.h                 |   1 -
 3 files changed, 67 insertions(+), 76 deletions(-)
drivers/net/Space.c +0 -3
index 11fe71278f40..64333ec999ac 100644
@@ -114,9 +114,6 @@ static struct devprobe2 m68k_probes[] __initdata = {
 #ifdef CONFIG_MVME147_NET	/* MVME147 internal Ethernet */
 	{mvme147lance_probe, 0},
 #endif
-#ifdef CONFIG_MAC8390           /* NuBus NS8390-based cards */
-	{mac8390_probe, 0},
-#endif
 #ifdef CONFIG_MAC89x0
 	{mac89x0_probe, 0},
 #endif
drivers/net/ethernet/8390/mac8390.c +67 -72

279 lines not on this page · raw message

include/net/Space.h +0 -1
index 27fb5c937c4f..336da258885a 100644
@@ -20,7 +20,6 @@ struct net_device *cs89x0_probe(int unit);
 struct net_device *mvme147lance_probe(int unit);
 struct net_device *tc515_probe(int unit);
 struct net_device *lance_probe(int unit);
-struct net_device *mac8390_probe(int unit);
 struct net_device *mac89x0_probe(int unit);
 struct net_device *cops_probe(int unit);
 struct net_device *ltpc_probe(void);
Signature · 1 line
2.16.1
author
#11 lore raw

PATCH 4/4 net/mac8390: Fix log messages

In reply to Finn Thain

Use dev_foo() to log the slot number instead of the unexpanded "eth%d" format string.
Disambiguate the two identical "Card type %s is unsupported" messages.

---
 drivers/net/ethernet/8390/mac8390.c | 36 +++++++++++++++++-------------------
 1 file changed, 17 insertions(+), 19 deletions(-)
drivers/net/ethernet/8390/mac8390.c +17 -19
index 8042dd73eb6a..b6d735bf8011 100644
@@ -308,14 +308,14 @@ static bool mac8390_rsrc_init(struct net_device *dev,
 	 */
 
 	if (nubus_get_func_dir(fres, &dir) == -1) {
-		pr_err("%s: Unable to get Nubus functional directory for slot %X!\n",
-		       dev->name, board->slot);
+		dev_err(&board->dev,
+			"Unable to get Nubus functional directory\n");
 		return false;
 	}
 
 	/* Get the MAC address */
 	if (nubus_find_rsrc(&dir, NUBUS_RESID_MAC_ADDRESS, &ent) == -1) {
-		pr_info("%s: Couldn't get MAC address!\n", dev->name);
+		dev_info(&board->dev, "MAC address resource not found\n");
 		return false;
 	}
 
@@ -325,8 +325,8 @@ static bool mac8390_rsrc_init(struct net_device *dev,
 		nubus_rewinddir(&dir);
 		if (nubus_find_rsrc(&dir, NUBUS_RESID_MINOR_BASEOS,
 				    &ent) == -1) {
-			pr_err("%s: Memory offset resource for slot %X not found!\n",
-			       dev->name, board->slot);
+			dev_err(&board->dev,
+				"Memory offset resource not found\n");
 			return false;
 		}
 		nubus_get_rsrc_mem(&offset, &ent, 4);
@@ -336,8 +336,8 @@ static bool mac8390_rsrc_init(struct net_device *dev,
 		nubus_rewinddir(&dir);
 		if (nubus_find_rsrc(&dir, NUBUS_RESID_MINOR_LENGTH,
 				    &ent) == -1) {
-			pr_info("%s: Memory length resource for slot %X not found, probing\n",
-				dev->name, board->slot);
+			dev_info(&board->dev,
+				 "Memory length resource not found, probing\n");
 			offset = mac8390_memsize(dev->mem_start);
 		} else {
 			nubus_get_rsrc_mem(&offset, &ent, 4);
@@ -380,8 +380,8 @@ static bool mac8390_rsrc_init(struct net_device *dev,
 			break;
 
 		default:
-			pr_err("Card type %s is unsupported, sorry\n",
-			       board->name);
+			dev_err(&board->dev,
+				"No known base address for card type\n");
 			return false;
 		}
 	}
@@ -533,7 +533,8 @@ static int mac8390_initdev(struct net_device *dev, struct nubus_board *board,
 	case MAC8390_APPLE:
 		switch (mac8390_testio(dev->mem_start)) {
 		case ACCESS_UNKNOWN:
-			pr_err("Don't know how to access card memory!\n");
+			dev_err(&board->dev,
+				"Don't know how to access card memory\n");
 			return -ENODEV;
 
 		case ACCESS_16:
@@ -599,21 +600,18 @@ static int mac8390_initdev(struct net_device *dev, struct nubus_board *board,
 		break;
 
 	default:
-		pr_err("Card type %s is unsupported, sorry\n",
-		       board->name);
+		dev_err(&board->dev, "Unsupported card type\n");
 		return -ENODEV;
 	}
 
 	__NS8390_init(dev, 0);
 
 	/* Good, done, now spit out some messages */
-	pr_info("%s: %s in slot %X (type %s)\n",
-		dev->name, board->name, board->slot,
-		cardname[type]);
-	pr_info("MAC %pM IRQ %d, %d KB shared memory at %#lx, %d-bit access.\n",
-		dev->dev_addr, dev->irq,
-		(unsigned int)(dev->mem_end - dev->mem_start) >> 10,
-		dev->mem_start, access_bitmode ? 32 : 16);
+	dev_info(&board->dev, "%s (type %s)\n", board->name, cardname[type]);
+	dev_info(&board->dev, "MAC %pM, IRQ %d, %d KB shared memory at %#lx, %d-bit access.\n",
+		 dev->dev_addr, dev->irq,
+		 (unsigned int)(dev->mem_end - dev->mem_start) >> 10,
+		 dev->mem_start, access_bitmode ? 32 : 16);
 	return 0;
 }
 
Signature · 1 line
2.16.1
Acked-by on v1 1/4
#2 lore raw

Re: [PATCH net 1/4] net/8390: Remove redundant make dependencies

In reply to Finn Thain

Hi Finn,

Quoted 9 lines · Finn Thain

The hydra, zorro8390 and mcf8390 drivers all #include "lib8390.c" and have no need for 8390.o. modinfo confirms no dependency on 8390.ko. Drop the redundant dependency from the Makefile. objdump confirms that this patch has no effect on the module binaries.

The superfluous additions of 8390.o were introduced in commit 644570b83026 ("8390: Move the 8390 related drivers").

Cc Greg Ungerer <[email protected]>

Looks right for mcf8390.c.

Regards
Greg

Quoted 29 lines
---
 drivers/net/ethernet/8390/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/8390/Makefile +3 -3
index f975c2fc88a3..1d650e66cc6e 100644
@@ -7,8 +7,8 @@ obj-$(CONFIG_MAC8390) += mac8390.o
 obj-$(CONFIG_APNE) += apne.o 8390.o
 obj-$(CONFIG_ARM_ETHERH) += etherh.o
 obj-$(CONFIG_AX88796) += ax88796.o
-obj-$(CONFIG_HYDRA) += hydra.o 8390.o
-obj-$(CONFIG_MCF8390) += mcf8390.o 8390.o
+obj-$(CONFIG_HYDRA) += hydra.o
+obj-$(CONFIG_MCF8390) += mcf8390.o
 obj-$(CONFIG_NE2000) += ne.o 8390p.o
 obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o
 obj-$(CONFIG_PCMCIA_AXNET) += axnet_cs.o 8390.o
@@ -16,4 +16,4 @@ obj-$(CONFIG_PCMCIA_PCNET) += pcnet_cs.o 8390.o
 obj-$(CONFIG_STNIC) += stnic.o 8390.o
 obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o
 obj-$(CONFIG_WD80x3) += wd.o 8390.o
-obj-$(CONFIG_ZORRO8390) += zorro8390.o 8390.o
+obj-$(CONFIG_ZORRO8390) += zorro8390.o
maintainer
#4 lore raw

Re: [PATCH net 2/4] net/8390: Fix msg_enable patch snafu

In reply to Finn Thain

From: Finn Thain <[email protected]>
Date: Sun, 18 Feb 2018 21:39:17 -0500 (EST)

Quoted 2 lines

The lib8390 module parameter 'msg_enable' doesn't do anything useful:
it causes an ancient version string to be logged.

Since you are removing the last reference to this 'version' string you should remove it as well.

I'm surprised the compiler doesn't warn about this.

author
#5 lore raw

Re: [PATCH net 2/4] net/8390: Fix msg_enable patch snafu

Quoted 11 lines · David Miller

From: Finn Thain <[email protected]>
Date: Sun, 18 Feb 2018 21:39:17 -0500 (EST)

Quoted 2 lines

The lib8390 module parameter 'msg_enable' doesn't do anything useful:
it causes an ancient version string to be logged.

Since you are removing the last reference to this 'version' string you should remove it as well.

I'm surprised the compiler doesn't warn about this.

I compile-tested every 8390 module and I didn't come across any compiler bugs.

Please take another look. I think you'll find that lib8390.c is always #included by a module which does define that symbol.

Thanks.

maintainer
#6 lore raw

Re: [PATCH net 2/4] net/8390: Fix msg_enable patch snafu

From: Finn Thain <[email protected]>
Date: Tue, 20 Feb 2018 09:01:11 +1100 (AEDT)

Quoted 11 lines · David Miller
Quoted 10 lines

From: Finn Thain <[email protected]>
Date: Sun, 18 Feb 2018 21:39:17 -0500 (EST)

Quoted 2 lines

The lib8390 module parameter 'msg_enable' doesn't do anything useful:
it causes an ancient version string to be logged.

Since you are removing the last reference to this 'version' string you should remove it as well.

Quoted 8 lines
Quoted 2 lines

I'm surprised the compiler doesn't warn about this.

I compile-tested every 8390 module and I didn't come across any compiler bugs.

Please take another look. I think you'll find that lib8390.c is always #included by a module which does define that symbol.

But nothing references 'version' after you remove the log message.

You can therefore delete it.

And I'm politely asking you to.

Thank you.

author
#7 lore raw

Re: [PATCH net 2/4] net/8390: Fix msg_enable patch snafu

Quoted 17 lines · David Miller
Quoted 8 lines · David Miller
Quoted 7 lines
Quoted 3 lines

The lib8390 module parameter 'msg_enable' doesn't do anything
useful: it causes an ancient version string to be logged.

Since you are removing the last reference to this 'version' string you should remove it as well.

Quoted 8 lines
Quoted 2 lines

I'm surprised the compiler doesn't warn about this.

I compile-tested every 8390 module and I didn't come across any compiler bugs.

Please take another look. I think you'll find that lib8390.c is always #included by a module which does define that symbol.

Quoted 8 lines

But nothing references 'version' after you remove the log message.

You can therefore delete it.

And I'm politely asking you to.

Thank you.

If there was an unused variables I would happily remove that too but the 'version' string is not unused. The etherh.c and mac8390.c files both include "lib8390.c" and in there you'll find the 'version' string used in ethdev_setup().

If you want to remove the reference to the 'version' string from the core driver, it would seem to imply the loss of this functionality from 8 modules or else the duplication of this code in the same modules, neither of which seems desirable... What am I missing?

maintainer
#8 lore raw

Re: [PATCH net 2/4] net/8390: Fix msg_enable patch snafu

From: Finn Thain <[email protected]>
Date: Tue, 20 Feb 2018 11:42:26 +1100 (AEDT)

Quoted 4 lines

If there was an unused variables I would happily remove that too but the 'version' string is not unused. The etherh.c and mac8390.c files both include "lib8390.c" and in there you'll find the 'version' string used in ethdev_setup().

My bad, thanks for being so patient with me :)