Re: [RFC PATCH v2 3/4] usb: xhci: add USB2 Link power management BESL support

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

 



On Wed, Aug 21, 2013 at 03:44:35PM +0100, Steve Cotton wrote:
> Hi Mathias,
> 
> Sorry for a very late respose, replying to a 3-month old patch.
> 
> Something looks odd in a558ccdcc71c - AFAICS these two calls to
> xhci_check_usb2_port_capability will always return the same value,
> so usb2_hw_lpm_besl_capable is always the same as usb2_hw_lpm_capable.
> 
> >  /* USB 2.0 xHCI 1.0 hardware LMP capability - section 7.2.2.1.3.2 */
> >  #define XHCI_HLC               (1 << 19)
> > +#define XHCI_BLC               (1 << 19)
> > 
> > @@ -4068,6 +4191,9 @@ int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
> >  		if (xhci->hw_lpm_support == 1 &&
> >  		    xhci_check_usb2_port_capability(xhci, portnum, XHCI_HLC)) {
> >  			udev->usb2_hw_lpm_capable = 1;
> > +			if (xhci_check_usb2_port_capability(xhci, portnum,
> > +							    XHCI_BLC))
> > +				udev->usb2_hw_lpm_besl_capable = 1;
> >  			ret = xhci_set_usb2_hardware_lpm(hcd, udev, 1);
> >  			if (!ret)
> >  				udev->usb2_hw_lpm_enabled = 1;

I'm confused.

The first call to xhci_check_usb2_port_capability() checks XHCI_HLC.
The second call to xhci_check_usb2_port_capability() checks XHCI_BLC.

One letter difference, I know, but they are two separate flags.

Oh, wait, I see what you mean.  xhci-ext-caps.h defines the two flags to
be the same:

/* USB 2.0 xHCI 1.0 hardware LMP capability - section 7.2.2.1.3.2 */
#define XHCI_HLC               (1 << 19)
#define XHCI_BLC               (1 << 19)

Ugh!  Ok, I'll fix this, nice catch.

Sarah Sharp
--
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