All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
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 08:44:18 -0800	[thread overview]
Message-ID: <20080124164418.GA8226@kroah.com> (raw)
In-Reply-To: <84144f020801240319o1f51613fx6e823120f74a9cf9@mail.gmail.com>

On Thu, Jan 24, 2008 at 01:19:25PM +0200, Pekka Enberg wrote:
> Hi Wilco,
> 
> On Jan 24, 2008 12:05 PM, Wilco Beekhuizen <wilcobeekhuizen@gmail.com> wrote:
> > Most code is pretty ancient, I just manage it so it compiles with
> > recent kernels. Is there somehting exported that is similar to
> > usb_find_device?
> 
> The problem is that iriverfs shouldn't be calling usb_find_device() at
> all. What happens when you plug in two players to the same computer?
> AFAICT the whole thing should be a proper USB driver in drivers/usb/
> and not a "filesystem" in fs/.

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.

thanks,

greg k-h

  parent reply	other threads:[~2008-01-24 16:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-22 19:18 [PATCH] Missing usb_find_device symbol from usb.c 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 [this message]
2008-01-24 17:06         ` Pekka Enberg
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=20080124164418.GA8226@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --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 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.