From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>, David Brownell <david-b@pacbell.net>,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: Handling devices that don't have a bus
Date: Sat, 1 Apr 2006 10:47:36 +0100 [thread overview]
Message-ID: <20060401094736.GB2636@flint.arm.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0603301520330.4652-100000@iolanthe.rowland.org>
On Thu, Mar 30, 2006 at 03:45:50PM -0500, Alan Stern wrote:
> I recently tried running the dummy_hcd driver for the first time in a
> while, and it crashed when the gadget driver was unloaded. It turns out
> this was because the gadget's embedded struct device is registered without
> a bus, which triggers an oops when the device's driver is unbound. The
> oops could be fixed by doing this:
Can you provide the oops itself please?
> Part of the problem here is that most of the USB controllers are platform
> devices and so belong on the platform bus.
You're making a connection where no such connection exists. Devices
are only part of the platform bus if they explicitly want to be (in
much the same way that devices are only part of the PCI bus if they
explicitly set dev->bus to be the PCI bus.)
> But struct usb_gadget contains an embedded struct device, not an embedded
> struct platform_device... so the gadget _can't_ be registered on its
> parent's bus.
>From what I can see, the embedded device does not belong to any bus at
all since dev->bus is NULL. Hence, I don't think it's the embedded
struct device which is causing the problem here.
It would be good to see the entire oops to see what's going on.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
next prev parent reply other threads:[~2006-04-01 9:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-30 20:45 Alan Stern
2006-03-30 21:28 ` David Brownell
2006-03-30 22:26 ` Greg KH
2006-04-01 9:38 ` Russell King
2006-04-01 9:47 ` Russell King [this message]
2006-04-01 16:46 ` Alan Stern
2006-04-01 17:12 ` Russell King
2006-04-01 17:32 ` David Brownell
2006-04-01 20:14 ` Alan Stern
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=20060401094736.GB2636@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=david-b@pacbell.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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
Powered by JetHome