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] [day] [month] [year] [list]
Date:   Wed, 06 Nov 2019 12:23:24 +0100
From:   Bjørn Mork <bjorn@...k.no>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     Kai-Heng Feng <kai.heng.feng@...onical.com>,
        gregkh@...uxfoundation.org, <mathias.nyman@...el.com>,
        <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: Allow USB device to be warm reset in suspended state

Alan Stern <stern@...land.harvard.edu> writes:

> I was sure I remembered reading somewhere that suspended devices were
> not allowed to be reset, but now I can't find that requirement anywhere
> in the USB spec.

I don't know anything about this, but "Reset From Suspended State" is
part of Appendix C in the USB 2.0 spec. Looks valid to me..

Quoting the relevant section for those who don't have that spec at hand:


  C.2.1 Reset From Suspended State

  As can be seen from Figure C-2, the device wakes up from the Suspended
  state as soon as it sees a K or an SE0 on the bus. A J would be
  indistinguishable from idle on the bus that a suspended device sees
  normally. On seeing a K, the device will initiate a resume
  process. For the details of this process, see Section 7.1.7.7. On
  seeing an SE0, the device could enter the reset handshake procedure,
  so it starts timer T0.

  The actual reset handshake is only started after seeing a continuous
  assertion of SE0 for at least 2.5 μs (T FILTSE0 ).  The loop between
  the blocks with “Clear timer T1” and “Run timer T1” represents this
  filtering. If the device has not detected a continuous SE0 before
  timer T0 exceeds the value of T UCHEND - T UCH , the device goes back
  into the Suspended state.

  A device coming from suspend most probably had its high-speed clock
  stopped to meet the power requirements for a suspended device (see
  Section 7.2.3). Therefore, it may take some time to let the clock
  settle to a level of operation where it is able to perform the reset
  detection and handshake with enough precision. In the state diagram, a
  time symbol T WTCLK is used to have the device wait for a stable
  clock. This symbol is not part of the USB 2.0 specification and does
  not appear in Chapter 7. It is an implementation specific detail of
  the reset detection state diagram for the upstream facing port, where
  it is marked with a asterisk (*). T WTCLK should have a value
  somewhere between 0 and 5.0 ms. This allows at least 1.0 ms time to
  detect the continuous SE0.

  If the device has seen an SE0 signal on the bus for at least T FILTSE0
  , then it can safely assume to have detected a reset and can start the
  reset handshake.




Bjørn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ