[ 3.5.y.z extended stable ] Patch "3c509.c: call SET_NETDEV_DEV for all device types" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Fri May 17 09:15:44 UTC 2013


This is a note to let you know that I have just added a patch titled

    3c509.c: call SET_NETDEV_DEV for all device types

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From adf1a73f491c0fb2ea697e5826ed1d3c517b4073 Mon Sep 17 00:00:00 2001
From: Matthew Whitehead <tedheadster at gmail.com>
Date: Mon, 29 Apr 2013 17:46:53 -0400
Subject: [PATCH] 3c509.c: call SET_NETDEV_DEV for all device types
 (ISA/ISAPnP/EISA)

commit 3b54912f9cd167641b91d4a697bd742f70e534fe upstream.

The venerable 3c509 driver only sets its device parent in one case, the ISAPnP one.
It does this with the SET_NETDEV_DEV function. It should register with the device
hierarchy in two additional cases: standard (non-PnP) ISA and EISA.

- Currently they appear here:
/sys/devices/virtual/net/eth0 (standard ISA)
/sys/devices/virtual/net/eth1 (EISA)

- Rather, they should instead be here:
/sys/devices/isa/3c509.0/net/eth0 (standard ISA)
/sys/devices/pci0000:00/0000:00:07.0/00:04/net/eth1 (EISA)

Tested on ISA and EISA boards.

Signed-off-by: Matthew Whitehead <tedheadster at gmail.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/net/ethernet/3com/3c509.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c
index 1a8eef2..ce8fb21 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c509.c
@@ -308,6 +308,7 @@ static int __devinit el3_isa_match(struct device *pdev,
 	if (!dev)
 		return -ENOMEM;

+	SET_NETDEV_DEV(dev, pdev);
 	netdev_boot_setup_check(dev);

 	if (!request_region(ioaddr, EL3_IO_EXTENT, "3c509-isa")) {
@@ -598,6 +599,7 @@ static int __init el3_eisa_probe (struct device *device)
 		return -ENOMEM;
 	}

+	SET_NETDEV_DEV(dev, device);
 	netdev_boot_setup_check(dev);

 	el3_dev_fill(dev, phys_addr, ioaddr, irq, if_port, EL3_EISA);
--
1.8.1.2





More information about the kernel-team mailing list