Re: [PATCH] Missing usb_find_device symbol from usb.c

From: Pekka Enberg
Date: Thu Jan 24 2008 - 12:07:40 EST


Hi Greg,

On Jan 24, 2008 6:44 PM, Greg KH <greg@xxxxxxxxx> wrote:
> No, that's not the problem. The code should just be using
> usb_register_driver() and then doing what it needs to do in the probe()
> callback, like any other USB driver.
>
> By calling usb_find_device() it allows more than one driver to talk to
> the device at the same time, setting it up for some very bad things to
> possibly happen to the device.
>
> So a simple code change should be all that is needed to properly fix
> this.
>
> If you want, I can make up a patch, just point me at the version you
> wish me to modify.

As I already mentioned in private, the code is here:

http://www.init0.nl/iriverfs-r0.1.0.1-linux-2.6.23.patch.bz2

It's basically abusing the USB driver stack with a ->probe() function
that returns -ENODEV and doing device discovery at mount time. That,
however, is also broken as it assumes there's only one device plugged
in (we're not passing any device identifier to sys_mount).

So it's not a simple code change at all. Are there any datasheets
available for these things or is the current driver reverse
engineered?

Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/