netdev
[Top] [All Lists]

Re: [PATCH] (1/8) add probe_old_netdevs hook

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: Re: [PATCH] (1/8) add probe_old_netdevs hook
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Thu, 4 Sep 2003 08:31:24 -0700
Cc: Jeff Garzik <jgarzik@xxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <20030903204150.14273da8.davem@redhat.com>
Organization: Open Source Development Lab
References: <20030903164908.14705874.shemminger@osdl.org> <3F568C88.4030303@pobox.com> <20030903204150.14273da8.davem@redhat.com>
Sender: netdev-bounce@xxxxxxxxxxx
On Wed, 3 Sep 2003 20:41:50 -0700
"David S. Miller" <davem@xxxxxxxxxx> wrote:

> On Wed, 03 Sep 2003 20:51:20 -0400
> Jeff Garzik <jgarzik@xxxxxxxxx> wrote:
> 
> > All the patches except for #3 look ok to me.
> > 
> > David?

Here is a patch that restores the original order.
Applies after original #3 patch

diff -Nru a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c
--- a/drivers/net/appletalk/ltpc.c      Thu Sep  4 08:30:59 2003
+++ b/drivers/net/appletalk/ltpc.c      Thu Sep  4 08:30:59 2003
@@ -1046,6 +1046,16 @@
        SET_MODULE_OWNER(dev);
 
        /* probe for the I/O port address */
+       if (io != 0x240 && request_region(0x220,8,"ltpc")) {
+               x = inb_p(0x220+6);
+               if ( (x!=0xff) && (x>=0xf0) ) {
+                       io = 0x220;
+                       goto got_port;
+               }
+               else {
+                       release_region(0x220,8);
+               }
+       }
        
        if (io != 0x220 && request_region(0x240,8,"ltpc")) {
                y = inb_p(0x240+6);
@@ -1053,16 +1063,10 @@
                        io = 0x240;
                        goto got_port;
                }
-               release_region(0x240,8);
-       } 
-       if (io != 0x240 && request_region(0x220,8,"ltpc")) {
-               x = inb_p(0x220+6);
-               if ( (x!=0xff) && (x>=0xf0) ) {
-                       io = 0x220;
-                       goto got_port;
+               else {
+                       release_region(0x240,8);
                }
-               release_region(0x220,8);
-       }
+       } 
 
        /* give up in despair */
        printk(KERN_ERR "LocalTalk card not found; 220 = %02x, 240 = %02x.\n", 
x,y);

<Prev in Thread] Current Thread [Next in Thread>