lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 7 Jan 2019 10:05:58 -0500 (EST)
From:   Alan Stern <stern@...land.harvard.edu>
To:     Kai Heng Feng <kai.heng.feng@...onical.com>
cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux USB List <linux-usb@...r.kernel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Mathias Nyman <mathias.nyman@...ux.intel.com>
Subject: Re: [PATCH v4] USB: Don't enable LPM if it's already enabled

On Mon, 7 Jan 2019, Kai Heng Feng wrote:

> Hi,
> 
> > On Dec 3, 2018, at 18:26, Kai-Heng Feng <kai.heng.feng@...onical.com> wrote:
> > 
> > USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working
> > after S3:
> > [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000302.bin
> > [ 168.432065] Bluetooth: hci0: Failed to send body at 4 of 1953 (-110)
> > 
> > After some experiments, I found that disabling LPM can workaround the
> > issue.
> > 
> > On some platforms, the USB power is cut during S3, so the driver uses
> > reset-resume to resume the device. During port resume, LPM gets enabled
> > twice, by usb_reset_and_verify_device() and usb_port_resume().
> > 
> > So let's enable LPM for just once, as this solves the issue for the
> > device in question.
> > 
> > Also consolidate USB2 LPM functions to usb_enable_usb2_hardware_lpm()
> > and usb_disable_usb2_hardware_lpm().
> 
> Please review my new approach, hopefully this can be included in Linux v5.0. 
> 
> > 
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
> > ---
> > v4:
> > - Use usb_enable_usb2_hardware_lpm() and
> >   usb_disable_usb2_hardware_lpm() to control USB2 LPM.
> > v3:
> > - Consolidate udev->usb2_hw_lpm_capable and udev->usb2_hw_lpm_enabled
> >  check to usb_set_usb2_hardware_lpm().
> > v2:
> >  - Check udev->usb2_hw_lpm_enabled before calling usb_port_resume().
> > 
> > drivers/usb/core/driver.c  | 23 +++++++++++++++++++----
> > drivers/usb/core/hub.c     | 16 ++++++----------
> > drivers/usb/core/message.c |  3 +--
> > drivers/usb/core/sysfs.c   |  5 ++++-
> > drivers/usb/core/usb.h     | 10 ++++++++--
> > 5 files changed, 38 insertions(+), 19 deletions(-)

Reviewed-by: Alan Stern <stern@...land.harvard.edu>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ