diff mbox

3c509.c: call SET_NETDEV_DEV for all device types (ISA/ISAPnP/EISA)

Message ID 1366921743-6440-1-git-send-email-tedheadster@gmail.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

tedheadster April 25, 2013, 8:29 p.m. UTC
From: Matthew Whitehead <tedheadster@gmail.com>

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.
---
 drivers/net/ethernet/3com/3c509.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Sergei Shtylyov April 25, 2013, 9:03 p.m. UTC | #1
Hello.

On 26-04-2013 0:29, Matthew Whitehead wrote:

> From: Matthew Whitehead <tedheadster@gmail.com>

> 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.

    That's good but you forgot to sign off, so the patch can't be applied.

    BTW, it seems that after almost 7 years I seem to have found a tester for 
my patch which lingered all this time in the Andrew Morton's tree! You've said 
you have EISA boards, how about testing my patch? Now if I could find Andrew 
Morton's tree... Andrew?
    The patch is for 3c59x.c however -- I've just realized the difference.
Just in case, here's the link to 2008 version of it:

http://marc.info/?l=linux-netdev&m=121744737806819

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov April 25, 2013, 9:24 p.m. UTC | #2
Hello.

On 26-04-2013 1:03, Sergei Shtylyov wrote:

>> From: Matthew Whitehead <tedheadster@gmail.com>

>> 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.

>     That's good but you forgot to sign off, so the patch can't be applied.

>     BTW, it seems that after almost 7 years I seem to have found a tester for
> my patch which lingered all this time in the Andrew Morton's tree! You've said
> you have EISA boards, how about testing my patch? Now if I could find Andrew
> Morton's tree... Andrew?

    Found it at last at ozlabs.org but it turned out that Andrew has dropped 
the patch without notifying me. :-(

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andrew Morton April 25, 2013, 9:30 p.m. UTC | #3
On Fri, 26 Apr 2013 01:24:15 +0400 Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> wrote:

> Hello.
> 
> On 26-04-2013 1:03, Sergei Shtylyov wrote:
> 
> >> From: Matthew Whitehead <tedheadster@gmail.com>
> 
> >> 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.
> 
> >     That's good but you forgot to sign off, so the patch can't be applied.
> 
> >     BTW, it seems that after almost 7 years I seem to have found a tester for
> > my patch which lingered all this time in the Andrew Morton's tree! You've said
> > you have EISA boards, how about testing my patch? Now if I could find Andrew
> > Morton's tree... Andrew?
> 
>     Found it at last at ozlabs.org but it turned out that Andrew has dropped 
> the patch without notifying me. :-(
> 

nah, you were asleep ;)

Message-Id: <200906101955.n5AJtMg7008475@imap1.linux-foundation.org>
Subject: [obsolete] 3x59x-fix-pci-resource-management.patch removed from -mm tree
To: sshtylyov@ru.mvista.com, mm-commits@vger.kernel.org
From: akpm@linux-foundation.org
Date:   Wed, 10 Jun 2009 12:55:21 -0700                                         
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov April 25, 2013, 9:37 p.m. UTC | #4
Hello.

On 26-04-2013 1:30, Andrew Morton wrote:

>>>      BTW, it seems that after almost 7 years I seem to have found a tester for
>>> my patch which lingered all this time in the Andrew Morton's tree! You've said
>>> you have EISA boards, how about testing my patch? Now if I could find Andrew
>>> Morton's tree... Andrew?

>>      Found it at last at ozlabs.org but it turned out that Andrew has dropped
>> the patch without notifying me. :-(

> nah, you were asleep ;)

   Nope, I was actively protesting, although I don't have my messages now, 
have only found yours.

> Message-Id: <200906101955.n5AJtMg7008475@imap1.linux-foundation.org>
> Subject: [obsolete] 3x59x-fix-pci-resource-management.patch removed from -mm tree
> To: sshtylyov@ru.mvista.com, mm-commits@vger.kernel.org
> From: akpm@linux-foundation.org
> Date:   Wed, 10 Jun 2009 12:55:21 -0700

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov April 25, 2013, 10:10 p.m. UTC | #5
Hello.

On 26-04-2013 1:37, Sergei Shtylyov wrote:

>>>>      BTW, it seems that after almost 7 years I seem to have found a tester
>>>> for
>>>> my patch which lingered all this time in the Andrew Morton's tree! You've
>>>> said
>>>> you have EISA boards, how about testing my patch? Now if I could find Andrew
>>>> Morton's tree... Andrew?

>>>      Found it at last at ozlabs.org but it turned out that Andrew has dropped
>>> the patch without notifying me. :-(

>> nah, you were asleep ;)

>    Nope, I was actively protesting, although I don't have my messages now,
> have only found yours.

>> Message-Id: <200906101955.n5AJtMg7008475@imap1.linux-foundation.org>
>> Subject: [obsolete] 3x59x-fix-pci-resource-management.patch removed from -mm
>> tree
>> To: sshtylyov@ru.mvista.com, mm-commits@vger.kernel.org
>> From: akpm@linux-foundation.org
>> Date:   Wed, 10 Jun 2009 12:55:21 -0700

    In fact, you've readded the patch top you tree the next day. Then the 
discussion continued in August 2009 until DaveM told you to repost this once 
it had at least CardBus testing...

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c
index f36ff99..adb4bf5 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c509.c
@@ -306,6 +306,7 @@  static int el3_isa_match(struct device *pdev, unsigned int ndev)
 	if (!dev)
 		return -ENOMEM;
 
+	SET_NETDEV_DEV(dev, pdev);
 	netdev_boot_setup_check(dev);
 
 	if (!request_region(ioaddr, EL3_IO_EXTENT, "3c509-isa")) {
@@ -595,6 +596,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);