On Mon, Aug 11, 2014 at 11:25:44AM +0530, Pratyush Anand wrote:
> Hi Peter,
> 
> On Thu, Aug 07, 2014 at 02:45:15PM +0800, Peter Chen wrote:
> > According to On-The-Go and Embedded Host Supplement to the USB Revision
> > 2.0 Specification, the targeted hosts (non-PC hosts) include both
> > embedded hosts and otg, and each targeted host product defines the
> > set of supported peripherals on a TPL (Targeted Peripheral List). So,
> > TPL should apply for both OTG and embedded host, and the otg support is
> > not a must for embedded host.
> > 
> > The TPL support feature will only be effect when CONFIG_USB_OTG_WHITELIST
> > has been chosen and hcd->tpl_support flag is set, it can avoid the 
> > enumeration
> > fails problem for the user who chooses CONFIG_USB_OTG_WHITELIST wrongly.
> > 
> > Signed-off-by: Peter Chen <peter.c...@freescale.com>
> > ---
> >  drivers/usb/core/hub.c           |   20 +++-----------------
> >  drivers/usb/core/otg_whitelist.h |   22 ++++++++++------------
> >  2 files changed, 13 insertions(+), 29 deletions(-)
> > 
> > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> > index 8a4dcbc..5e0b8eb 100644
> > --- a/drivers/usb/core/hub.c
> > +++ b/drivers/usb/core/hub.c
> > @@ -2199,9 +2199,7 @@ static void announce_device(struct usb_device *udev)
> >  static inline void announce_device(struct usb_device *udev) { }
> >  #endif
> >  
> > -#ifdef     CONFIG_USB_OTG
> >  #include "otg_whitelist.h"
> > -#endif
> >  
> >  /**
> >   * usb_enumerate_device_otg - FIXME (usbcore-internal)
> > @@ -2261,21 +2259,6 @@ static int usb_enumerate_device_otg(struct 
> > usb_device *udev)
> >                     }
> >             }
> >     }
> > -
> > -   if (!is_targeted(udev)) {
> > -
> > -           /* Maybe it can talk to us, though we can't talk to it.
> > -            * (Includes HNP test device.)
> > -            */
> > -           if (udev->bus->b_hnp_enable || udev->bus->is_b_host) {
> > -                   err = usb_port_suspend(udev, PMSG_SUSPEND);
> > -                   if (err < 0)
> > -                           dev_dbg(&udev->dev, "HNP fail, %d\n", err);
> > -           }
> > -           err = -ENOTSUPP;
> 
> If I did not miss anything then I see an issue if above hunk is removed.
> 
> Suppose, there is an OTG B device which is not supported by host, then
> the above hunk was suspending the bus so that B device can get a
> chance to become host. By removing above hunk, how do we cater this
> scenario?
> 
> ~Pratyush
> 
> PS: All other changes of the series seems fine to me.
> 

Pratyush, if it is no problem for my v3 patchset, would you add your ack
or reviewed-by for it? Thanks.

-- 
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to