netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] hp100 -- fixes for new probing.
@ 2004-02-23  8:48 Cacophonix
  2004-02-23 17:49 ` Stephen Hemminger
  0 siblings, 1 reply; 8+ messages in thread
From: Cacophonix @ 2004-02-23  8:48 UTC (permalink / raw)
  To: shemminger, jt; +Cc: netdev

(resending, copying netdev) 

Hi,
Any idea if any of these patches may have broken hp100 when statically built into the 
kernel (i.e, not as a module)?

Upgrading from 2.6.0-test6 to 2.6.3-mm2 (which does include the latest patchsets for
hp100 from Stephen), the kernel locks up at boot at the point where hp100 
detection/initialization normally occurs (the driver is compiled into the kernel). 
However, changing hp100 to a module, and loading it dynamically works.

Any clues about which of the recent patches between 2.6.0-test6 and 2.6.3-mm2 might
be causing the lockup? Thanks for any pointers.

cheers,
karthik

The /proc/pci data for my hp100 nic:
  Bus  0, device  14, function  0:
    Ethernet controller: Hewlett-Packard Comp J2585B HP 10/100VG P (rev 0).
      IRQ 11.
      Master Capable.  Latency=248.  Min Gnt=8.Max Lat=32.
      I/O at 0xec00 [0xecff].
      Non-prefetchable 32 bit memory at 0xfffac000 [0xfffadfff].





__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] hp100 -- fixes for new probing.
  2004-02-23  8:48 [PATCH] hp100 -- fixes for new probing Cacophonix
@ 2004-02-23 17:49 ` Stephen Hemminger
  2004-02-24 23:36   ` Cacophonix
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2004-02-23 17:49 UTC (permalink / raw)
  To: Cacophonix; +Cc: jt, netdev

On Mon, 23 Feb 2004 00:48:14 -0800 (PST)
Cacophonix <cacophonix@yahoo.com> wrote:

> (resending, copying netdev) 
> 
> Hi,
> Any idea if any of these patches may have broken hp100 when statically built into the 
> kernel (i.e, not as a module)?
> 
> Upgrading from 2.6.0-test6 to 2.6.3-mm2 (which does include the latest patchsets for
> hp100 from Stephen), the kernel locks up at boot at the point where hp100 
> detection/initialization normally occurs (the driver is compiled into the kernel). 
> However, changing hp100 to a module, and loading it dynamically works.
> 
> Any clues about which of the recent patches between 2.6.0-test6 and 2.6.3-mm2 might
> be causing the lockup? Thanks for any pointers.
> 
> cheers,
> karthik

There probably is some bug introduced with the recent changes.  The driver tries
to handle isa, eisa, and pci all with the same infrastructure.  There are two different
probe paths, one for the module and one for the non-module ISA case.  Could you add some
printk's and see if the problem in the hp100_isa_probe code (happens first), or the
PCI probe that happens from: 
	hp100_module_init -> pci_module_init -> hp100_pci_probe...

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] hp100 -- fixes for new probing.
  2004-02-23 17:49 ` Stephen Hemminger
@ 2004-02-24 23:36   ` Cacophonix
  2004-02-25  1:07     ` Stephen Hemminger
  0 siblings, 1 reply; 8+ messages in thread
From: Cacophonix @ 2004-02-24 23:36 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

Thanks for the suggestion.

It appears to be locking up at line 309 in hp100.c, i.e,

    hp100_page(ID_MAC_ADDR);
    (called from hp100_isa_probe1() and hp100_read_id() )

thanks,
karthik

--- Stephen Hemminger <shemminger@osdl.org> wrote:

> 
> There probably is some bug introduced with the recent changes.  The driver tries
> to handle isa, eisa, and pci all with the same infrastructure.  There are two different
> probe paths, one for the module and one for the non-module ISA case.  Could you add
> some
> printk's and see if the problem in the hp100_isa_probe code (happens first), or the
> PCI probe that happens from: 
> 	hp100_module_init -> pci_module_init -> hp100_pci_probe...
> 


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] hp100 -- fixes for new probing.
  2004-02-24 23:36   ` Cacophonix
@ 2004-02-25  1:07     ` Stephen Hemminger
  2004-02-25 21:33       ` Cacophonix
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2004-02-25  1:07 UTC (permalink / raw)
  To: Cacophonix; +Cc: netdev

Does fix the problem?  it checks for card before proceeding in hp100_isa_probe

diff -Nru a/drivers/net/hp100.c b/drivers/net/hp100.c
--- a/drivers/net/hp100.c	Tue Feb 24 17:05:54 2004
+++ b/drivers/net/hp100.c	Tue Feb 24 17:05:54 2004
@@ -333,6 +333,11 @@
 
 	if (!request_region(addr, HP100_REGION_SIZE, "hp100"))
 		goto err;
+	
+	if (hp100_inw(HW_ID) != HP100_HW_ID_CASCADE) {
+		release_region(addr, HP100_REGION_SIZE);
+		goto err;
+	}
 
 	sig = hp100_read_id(addr);
 	release_region(addr, HP100_REGION_SIZE);

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] hp100 -- fixes for new probing.
  2004-02-25  1:07     ` Stephen Hemminger
@ 2004-02-25 21:33       ` Cacophonix
  2004-02-25 21:40         ` Stephen Hemminger
  2004-02-26 18:33         ` [PATCH] hp100 -- isa probe fix Stephen Hemminger
  0 siblings, 2 replies; 8+ messages in thread
From: Cacophonix @ 2004-02-25 21:33 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev


Yes, this fixes the lockup issue (once I renamed addr to ioaddr in hp100_isa_probe1()
to get it to compile. Thanks for the patch!

Next order of business for me is to figure out why the ordering of device recognition
of e100 and hp100 changed between 2.6.0-test* and 2.6.3-mm2 (in the former, hp100 
started up first, while in the latter kernel e100 get's to load up first). I guess I 
could work around this in other ways, but it's a tad disconcerting when eth0, eth1 
and eth2 decide to trade places every so often ;)

Thanks again for the patch.
cheers,
karthik




--- Stephen Hemminger <shemminger@osdl.org> wrote:
> Does fix the problem?  it checks for card before proceeding in hp100_isa_probe
> 
> diff -Nru a/drivers/net/hp100.c b/drivers/net/hp100.c
> --- a/drivers/net/hp100.c	Tue Feb 24 17:05:54 2004
> +++ b/drivers/net/hp100.c	Tue Feb 24 17:05:54 2004
> @@ -333,6 +333,11 @@
>  
>  	if (!request_region(addr, HP100_REGION_SIZE, "hp100"))
>  		goto err;
> +	
> +	if (hp100_inw(HW_ID) != HP100_HW_ID_CASCADE) {
> +		release_region(addr, HP100_REGION_SIZE);
> +		goto err;
> +	}
>  
>  	sig = hp100_read_id(addr);
>  	release_region(addr, HP100_REGION_SIZE);


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] hp100 -- fixes for new probing.
  2004-02-25 21:33       ` Cacophonix
@ 2004-02-25 21:40         ` Stephen Hemminger
  2004-02-26 18:33         ` [PATCH] hp100 -- isa probe fix Stephen Hemminger
  1 sibling, 0 replies; 8+ messages in thread
From: Stephen Hemminger @ 2004-02-25 21:40 UTC (permalink / raw)
  To: Cacophonix; +Cc: netdev

On Wed, 25 Feb 2004 13:33:47 -0800 (PST)
Cacophonix <cacophonix@yahoo.com> wrote:

> 
> Yes, this fixes the lockup issue (once I renamed addr to ioaddr in hp100_isa_probe1()
> to get it to compile. Thanks for the patch!
> 
> Next order of business for me is to figure out why the ordering of device recognition
> of e100 and hp100 changed between 2.6.0-test* and 2.6.3-mm2 (in the former, hp100 
> started up first, while in the latter kernel e100 get's to load up first). I guess I 
> could work around this in other ways, but it's a tad disconcerting when eth0, eth1 
> and eth2 decide to trade places every so often ;)
> 

The naming is a function of initialization order which used to be fixed by a long list
of legacy devices.  Since the hp100 pci now probes like a proper PCI device, it will
happen in a order defined by the load order (ie not well controlled). 

Learn to use nameif it will make your life simpler.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] hp100 -- isa probe fix
  2004-02-25 21:33       ` Cacophonix
  2004-02-25 21:40         ` Stephen Hemminger
@ 2004-02-26 18:33         ` Stephen Hemminger
  2004-02-27 20:14           ` Jeff Garzik
  1 sibling, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2004-02-26 18:33 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Cacophonix, netdev

Jeff, here is a cleaned up version of the 2.6.3 hp100 isa (non-modular) probing.
It needs to check for the board being present before reading the signature.

--- linux-2.6/drivers/net/hp100.c	2004-02-24 17:08:00.000000000 -0800
+++ test-2.6/drivers/net/hp100.c	2004-02-26 10:32:33.625878016 -0800
@@ -326,16 +326,21 @@ static __init const char *hp100_read_id(
 	return str;
 }
 
-static __init int hp100_isa_probe1(struct net_device *dev, int addr)
+static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr)
 {
 	const char *sig;
 	int i;
 
-	if (!request_region(addr, HP100_REGION_SIZE, "hp100"))
+	if (!request_region(ioaddr, HP100_REGION_SIZE, "hp100"))
 		goto err;
 
-	sig = hp100_read_id(addr);
-	release_region(addr, HP100_REGION_SIZE);
+	if (hp100_inw(HW_ID) != HP100_HW_ID_CASCADE) {
+		release_region(ioaddr, HP100_REGION_SIZE);
+		goto err;
+	}
+
+	sig = hp100_read_id(ioaddr);
+	release_region(ioaddr, HP100_REGION_SIZE);
 
 	if (sig == NULL)
 		goto err;
@@ -347,7 +352,7 @@ static __init int hp100_isa_probe1(struc
 	}
 
 	if (i < ARRAY_SIZE(hp100_isa_tbl))
-		return hp100_probe1(dev, addr, HP100_BUS_ISA, NULL);
+		return hp100_probe1(dev, ioaddr, HP100_BUS_ISA, NULL);
  err:
 	return -ENODEV;
 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] hp100 -- isa probe fix
  2004-02-26 18:33         ` [PATCH] hp100 -- isa probe fix Stephen Hemminger
@ 2004-02-27 20:14           ` Jeff Garzik
  0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2004-02-27 20:14 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Cacophonix, netdev

applied

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-02-27 20:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-23  8:48 [PATCH] hp100 -- fixes for new probing Cacophonix
2004-02-23 17:49 ` Stephen Hemminger
2004-02-24 23:36   ` Cacophonix
2004-02-25  1:07     ` Stephen Hemminger
2004-02-25 21:33       ` Cacophonix
2004-02-25 21:40         ` Stephen Hemminger
2004-02-26 18:33         ` [PATCH] hp100 -- isa probe fix Stephen Hemminger
2004-02-27 20:14           ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).