Re: SBus devices sometimes detected, sometimes not

From: mroos
Date: Wed May 18 2011 - 09:59:52 EST

> It would be good to know the exact failure mode, so we need to know if
> of_driver_match_device() is setting of_match which is subsequently
> getting cleared, or if of_driver_match_device() isn't getting called
> at all. Meelis, can you add something like the following code to
> include/linux/of_device.h in the of_driver_match_device() function
> between the of_match_device() call and the return statement:
> if (dev->of_match)
> printk("found match; node=%s, driver=%s\n",
> dev->of_node->full_name, drv->name);

Tried it with todays 2.6.39-rc7-00211-gc1d10d1. It was harder to
reproduce this time, about 1 time out of 10.

In normal operation:

[ 77.794877] found match; node=/sbus@1f,0/SUNW,hme@0,8c00000, driver=hme
[ 77.872379] sunhme.c:v3.10 August 26, 2008 David S. Miller (davem@xxxxxxxxxxxxx)
[ 77.962865] eth0: HAPPY MEAL (SBUS) 10/100baseT Ethernet 08:00:20:88:6d:6a

In case of error (bpp show only as an example that some things work):

[ 70.312166] found match; node=/sbus@1f,0/SUNW,bpp@e,c800000, driver=bpp
[ 70.389649] parport0: sunbpp at 0x1ffec800000
[ 70.477720] found match; node=/sbus@1f,0/SUNW,hme@0,8c00000, driver=hme
[ 70.578023] found match; node=/sbus@1f,0/QLGC,isp@1,10000, driver=qpti
[ 70.915544] hme: probe of f006be34 failed with error -22
[ 70.978825] qpti: probe of f00798c4 failed with error -22

Meelis Roos (mroos@xxxxxxxx)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at