Re: [RFC] Usbcore: Do not disable USB3 protocol ports in hub_activate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2010-04-28 at 16:04 +0400, Sergei Shtylyov wrote:
> Hello.
> 
> Andiry Xu wrote:
> 
> > >From 7fab4880295b3af163342570d3c33ac0b51d29b5 Mon Sep 17 00:00:00 2001
> > From: Andiry Xu <andiry.xu@xxxxxxx>
> > Date: Thu, 29 Apr 2010 00:21:38 +0800
> > Subject: [PATCH] usbcore: Do not disable USB3 protocol ports in hub_activate
> >
> > When USB3 protocol port detects an USB3.0 device attach, the port will
> > automatically transition to the Enabled state upon the completion
> > of successful link training.
> >
> > Do not disable USB3 protocol ports in hub_activate(), or USB3.0 device
> > will fail to be recognized if xHCI bus power management is implemented.
> >
> > Signed-off-by: Andiry Xu <andiry.xu@xxxxxxx>
> > ---
> >  drivers/usb/core/hub.c |   16 ++++++++++++++--
> >  1 files changed, 14 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> > index 5c483fa..96bad49 100644
> > --- a/drivers/usb/core/hub.c
> > +++ b/drivers/usb/core/hub.c
> > @@ -745,8 +745,20 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
> >  				!(portstatus & USB_PORT_STAT_CONNECTION) ||
> >  				!udev ||
> >  				udev->state == USB_STATE_NOTATTACHED)) {
> > -			clear_port_feature(hdev, port1, USB_PORT_FEAT_ENABLE);
> > -			portstatus &= ~USB_PORT_STAT_ENABLE;
> > +			/*
> > +			 * USB3 protocol ports will automatically transition
> > +			 * to Enabled state when detect an USB3.0 device attach.
> > +			 * Do not disable USB3 protocol ports.
> > +			 * FIXME: USB3 root hub and external hubs are treated
> > +			 * differently here.
> > +			 */
> > +			if ((hdev->descriptor.bDeviceProtocol != 3) ||
> > +			    ((!hdev->parent) &&
> >   
> 
>    Parens around !x not needed.

Thanks for the comment. I will remove redundant parentheses.

Andiry Xu

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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux