All of lore.kernel.org
 help / color / mirror / Atom feed
* sunhme: SBUS QFE not detected anymore
@ 2009-03-09  0:30 Friedrich Oslage
  2009-03-09  3:14 ` David Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Friedrich Oslage @ 2009-03-09  0:30 UTC (permalink / raw)
  To: sparclinux

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

Hi,

my Ultra 2 has a SBUS Happy Meal and a SBUS Quad FastEthernet, both used
to work fine but the qfe is no longer detected since:

0b492fce3d72d982a7981905f85484a1e1ba7fde
sunhme: Don't match PCI devices in SBUS probe.


The parent node, sbus_dp, seems not to be set correctly. And the
sbus_dp->name == "sbus" check fails.

According to prtconf [0] the tree looks like this:

SUNW,Ultra-2
  sbus
    SUNW,hme
    SUNW,qfe
    SUNW,qfe
    SUNW,qfe
    SUNW,qfe

Setting sbus_dp = to_of_device(op->dev.parent->parent)->node will
therefore get "SUNW,Ultra-2" instead of "sbus".

This also makes reading the burst sizes fail and end up with the
default, 0x0.

I attached a patch :)

[0]http://git.kernel.org/?p=linux/kernel/git/davem/prtconfs.git;a=blob_plain;f=ultra2_2

Cheers,
Friedrich

[-- Attachment #2: sunhme-qfe.patch --]
[-- Type: text/x-patch, Size: 591 bytes --]

    sunhme: Fix qfe parent detection.
    
    Signed-off-by: Friedrich Oslage <bluebird@gentoo.org>

diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index d4fb4ac..4e9bd38 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -2649,8 +2649,6 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe)
 	int err = -ENODEV;
 
 	sbus_dp = to_of_device(op->dev.parent)->node;
-	if (is_qfe)
-		sbus_dp = to_of_device(op->dev.parent->parent)->node;
 
 	/* We can match PCI devices too, do not accept those here. */
 	if (strcmp(sbus_dp->name, "sbus"))

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

* Re: sunhme: SBUS QFE not detected anymore
  2009-03-09  0:30 sunhme: SBUS QFE not detected anymore Friedrich Oslage
@ 2009-03-09  3:14 ` David Miller
  2009-03-10 17:03 ` Meelis Roos
  2009-03-10 17:19 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-03-09  3:14 UTC (permalink / raw)
  To: sparclinux

From: Friedrich Oslage <bluebird@gentoo.org>
Date: Mon, 09 Mar 2009 01:30:37 +0100

> my Ultra 2 has a SBUS Happy Meal and a SBUS Quad FastEthernet, both used
> to work fine but the qfe is no longer detected since:
> 
> 0b492fce3d72d982a7981905f85484a1e1ba7fde
> sunhme: Don't match PCI devices in SBUS probe.
 ...
> According to prtconf [0] the tree looks like this:
> 
> SUNW,Ultra-2
>   sbus
>     SUNW,hme
>     SUNW,qfe
>     SUNW,qfe
>     SUNW,qfe
>     SUNW,qfe
 ...
> I attached a patch :)

Patch applied, thanks a lot!

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

* Re: sunhme: SBUS QFE not detected anymore
  2009-03-09  0:30 sunhme: SBUS QFE not detected anymore Friedrich Oslage
  2009-03-09  3:14 ` David Miller
@ 2009-03-10 17:03 ` Meelis Roos
  2009-03-10 17:19 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Meelis Roos @ 2009-03-10 17:03 UTC (permalink / raw)
  To: sparclinux

> Setting sbus_dp = to_of_device(op->dev.parent->parent)->node will
> therefore get "SUNW,Ultra-2" instead of "sbus".

Tested successfully on E3500 too. I inserted a SBus quad hme, it was not 
detected with current git kernel. Applied the patch, booted, not it was 
detected. Nice work!

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: sunhme: SBUS QFE not detected anymore
  2009-03-09  0:30 sunhme: SBUS QFE not detected anymore Friedrich Oslage
  2009-03-09  3:14 ` David Miller
  2009-03-10 17:03 ` Meelis Roos
@ 2009-03-10 17:19 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-03-10 17:19 UTC (permalink / raw)
  To: sparclinux

From: Meelis Roos <mroos@linux.ee>
Date: Tue, 10 Mar 2009 19:03:38 +0200 (EET)

> > Setting sbus_dp = to_of_device(op->dev.parent->parent)->node will
> > therefore get "SUNW,Ultra-2" instead of "sbus".
> 
> Tested successfully on E3500 too. I inserted a SBus quad hme, it was not detected with current git kernel. Applied the patch, booted, not it was detected. Nice work!

Thanks for testing.

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

end of thread, other threads:[~2009-03-10 17:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-09  0:30 sunhme: SBUS QFE not detected anymore Friedrich Oslage
2009-03-09  3:14 ` David Miller
2009-03-10 17:03 ` Meelis Roos
2009-03-10 17:19 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.