All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Roger Quadros <rogerq@ti.com>
Cc: gregkh@linuxfoundation.org, <linux-usb@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] USB: host: Use usb_hcd_platform_shutdown() wherever possible
Date: Wed, 10 Jul 2013 10:57:42 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1307101051330.1215-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <51DD1663.60006@ti.com>

On Wed, 10 Jul 2013, Roger Quadros wrote:

> On 07/09/2013 05:16 PM, Alan Stern wrote:
> > On Tue, 9 Jul 2013, Roger Quadros wrote:
> > 
> >> Most HCD drivers are doing the same thing in their ".shutdown" callback
> >> so it makes sense to use the generic usb_hcd_platform_shutdown()
> >> handler there.
> >>
> >> Signed-off-by: Roger Quadros <rogerq@ti.com>
> >> ---
> >>  drivers/usb/host/ehci-grlib.c     |   11 +----------
> >>  drivers/usb/host/ehci-mxc.c       |   10 +---------
> >>  drivers/usb/host/ehci-omap.c      |   10 +---------
> >>  drivers/usb/host/ehci-ppc-of.c    |   11 +----------
> >>  drivers/usb/host/ehci-s5p.c       |   10 +---------
> >>  drivers/usb/host/ehci-tegra.c     |   10 +---------
> >>  drivers/usb/host/ehci-xilinx-of.c |   17 +----------------
> >>  drivers/usb/host/ohci-omap3.c     |   10 +---------
> >>  8 files changed, 8 insertions(+), 81 deletions(-)
> > 
> > This all looks fine.  But unless my kernel tree is out of date, you 
> > missed ohci-ppc-of.c.
> 
> You are right. I missed it and will send a revision.
> 
> I've also noticed some drivers doing non-standard stuff.
> e.g.
> - ehci-ps3.c and ohci-pst set .shutdown as well as .remove to to ps3_ehci_remove

I don't know why they do that.  There not be any good reason.  You 
could try asking the PS3 platform maintainer.

> - ehci-tilegx.c and ohci-tilegx call .remove in the .shutdown path

Again, I don't know why.  The TILE architecture maintainer might know.

> - ehci-mv.c checks for (!hcd->rh_registered) in the shudown & remove patch.
> Is this necessary?

I suspect this is because the driver is trying to cope with switching
between host mode and device (peripheral) mode.  This doesn't seem like
a good way to implement OTG, but until it gets changed we'll have to
live with the driver the way it is.

Alan Stern


  reply	other threads:[~2013-07-10 14:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-09 10:58 [PATCH] USB: host: Use usb_hcd_platform_shutdown() wherever possible Roger Quadros
2013-07-09 12:01 ` Felipe Balbi
2013-07-09 14:16 ` Alan Stern
2013-07-10  8:08   ` Roger Quadros
2013-07-10 14:57     ` Alan Stern [this message]
2013-07-22 12:04 ` [PATCH v2] " Roger Quadros
2013-07-22 15:11   ` 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=Pine.LNX.4.44L0.1307101051330.1215-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rogerq@ti.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.