mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Pekka Enberg" <penberg@cs.helsinki.fi>
To: "Greg KH" <greg@kroah.com>
Cc: "Wilco Beekhuizen" <wilcobeekhuizen@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Missing usb_find_device symbol from usb.c
Date: Thu, 24 Jan 2008 19:06:39 +0200	[thread overview]
Message-ID: <84144f020801240906l7e018a95wfd4ad7736851dd63@mail.gmail.com> (raw)
In-Reply-To: <20080124164418.GA8226@kroah.com>

Hi Greg,

On Jan 24, 2008 6:44 PM, Greg KH <greg@kroah.com> 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

  reply	other threads:[~2008-01-24 17:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-22 19:18 Wilco Beekhuizen
2008-01-22 22:08 ` Adrian Bunk
2008-01-24  1:37 ` Greg KH
2008-01-24 10:05   ` Wilco Beekhuizen
2008-01-24 11:19     ` Pekka Enberg
2008-01-24 11:49       ` Oliver Neukum
2008-01-24 11:52         ` Pekka Enberg
2008-01-24 12:24           ` Oliver Neukum
2008-01-24 12:34             ` Pekka Enberg
2008-01-24 12:58               ` Oliver Neukum
2008-01-24 13:14                 ` Pekka Enberg
2008-01-24 16:44       ` Greg KH
2008-01-24 17:06         ` Pekka Enberg [this message]
2008-01-24 17:20           ` Greg KH
2008-01-24 17:42             ` Pekka Enberg
2008-01-24 18:03               ` Greg KH
2008-01-24 19:25                 ` Pekka J Enberg
2008-01-24 19:57                   ` Oliver Neukum
2008-01-24 20:10                     ` Pekka Enberg
2008-01-24 20:00                 ` Oliver Neukum
2008-01-24 20:26                   ` Pekka Enberg
2008-01-24 20:28                   ` Greg KH
2008-01-25  8:58                     ` Oliver Neukum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84144f020801240906l7e018a95wfd4ad7736851dd63@mail.gmail.com \
    --to=penberg@cs.helsinki.fi \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wilcobeekhuizen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®