Skip to contentSkip to conversation

sunhme: SBUS QFE not detected anymore

PATCH Friedrich Oslage 3 participants 4 messages Mar 9, 2009 – Mar 10, 2009 Network drivers

lore
Share & tools
lore
#0 lore raw

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

sunhme: Fix qfe parent detection.

drivers/net/sunhme.c +0 -2
index d4fb4ac..4e9bd38 100644
@@ -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"))
maintainer
#1 lore raw

From: Friedrich Oslage <[email protected]>
Date: Mon, 09 Mar 2009 01:30:37 +0100

Quoted 5 lines

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.

...

Quoted 9 lines

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

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

...

Quoted 1 line

I attached a patch :)

Patch applied, thanks a lot!

#2 lore raw
In reply to Friedrich Oslage
Quoted 2 lines

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!

Signature · 1 line
Meelis Roos ([email protected])
maintainer
#3 lore raw
In reply to Friedrich Oslage

From: Meelis Roos <[email protected]>
Date: Tue, 10 Mar 2009 19:03:38 +0200 (EET)

Quoted 4 lines
Quoted 2 lines

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.