Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1204345

RE: [PATCH 3/8][v2]usb:fsl:otg: Add support to add/remove usb host driver

From Alan Stern <stern@rowland.harvard.edu>
Newsgroups linux.kernel
Subject RE: [PATCH 3/8][v2]usb:fsl:otg: Add support to add/remove usb host driver
Date 2015-08-10 16:50 +0200
Message-ID <pVWyK-RP-21@gated-at.bofh.it> (permalink)
References <pVRIK-25h-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 10 Aug 2015, Ramneek Mehresh wrote:

> > Also, what is the reason for calling usb_hcd_resume_root_hub()?  It won't
> > do anything, because it will run before the scheduled work, so there won't
> > be a root hub for it to resume.
> > 
> Well, you're right...it's not a surety that usb_hcd_resume_root_hub() will run after
> scheduled work...i'll move it inside do_change_hcd() after usb_add_hcd(). Thanks.

You're missing the point.  There's no reason ever to call 
usb_hcd_resume_root_hub() immediately after usb_add_hcd().  The hub 
driver does everything necessary when the root hub is registered.  
Resuming it (if it is suspended at that point) won't accomplish 
anything because all the important work has just been done.

Now, if you _weren't_ calling usb_add_hcd() (for example if host.is_otg
were 0) then it might make sense to call usb_hcd_resume_root_hub() --
although I don't see why you would need to.

Alan Stern

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 3/8][v2]usb:fsl:otg: Add support to add/remove usb host  driver Alan Stern <stern@rowland.harvard.edu> - 2015-08-07 22:40 +0200
  RE: [PATCH 3/8][v2]usb:fsl:otg: Add support to add/remove usb host  driver Ramneek Mehresh <ramneek.mehresh@freescale.com> - 2015-08-10 11:40 +0200
    RE: [PATCH 3/8][v2]usb:fsl:otg: Add support to add/remove usb host  driver Alan Stern <stern@rowland.harvard.edu> - 2015-08-10 16:50 +0200
      RE: [PATCH 3/8][v2]usb:fsl:otg: Add support to add/remove usb host  driver Ramneek Mehresh <ramneek.mehresh@freescale.com> - 2015-08-10 17:40 +0200
        Re: [PATCH 3/8][v2]usb:fsl:otg: Add support to add/remove usb host driver Fabio Estevam <festevam@gmail.com> - 2015-08-10 17:50 +0200
  Re: [PATCH 3/8][v2]usb:fsl:otg: Add support to add/remove usb host  driver Felipe Balbi <balbi@ti.com> - 2015-08-10 16:40 +0200

csiph-web