Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1577354 > unrolled thread

Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

Started byLu Baolu <baolu.lu@linux.intel.com>
First post2017-02-09 08:40 +0100
Last post2017-02-09 08:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability Lu Baolu <baolu.lu@linux.intel.com> - 2017-02-09 08:40 +0100

#1577354 — Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

FromLu Baolu <baolu.lu@linux.intel.com>
Date2017-02-09 08:40 +0100
SubjectRe: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability
Message-ID<t8RuF-3aL-5@gated-at.bofh.it>
Hi Ingo,

On 01/26/2017 03:22 PM, Ingo Molnar wrote:
> * Lu Baolu <baolu.lu@linux.intel.com> wrote:
>
>> Hi,
>>
>> On 01/25/2017 10:38 PM, Peter Zijlstra wrote:
>>> On Wed, Jan 25, 2017 at 08:27:38PM +0800, Lu Baolu wrote:
>>>> In my driver, udelay() is mostly used to handle time out.
>>>>
>>>> Xdbc hides most USB things in its firmware. Early printk driver only needs
>>>> to setup the registers/data structures and wait until link ready or time out.
>>>> Without udelay(), I have no means to convert the polling times into waiting
>>>> time.
>>> What is timeout and why?
>> Put it in simple:
>>
>> The driver sets the RUN bit in control register and polls READY
>> bit in status register for the successful USB device enumeration.
>> As the USB device enumeration might fail and the READY bit will
>> never be set, the driver must have a timeout logic to avoid
>> endless loop.
> Is there any error status available in the host registers anywhere that tells us 
> that enumeration did not succeed?

No, there isn't. The xhci spec requires software to impose a timeout.

Page 425, xhci specification:

"
Software shall impose a timeout between the detection
of the Debug Host connection and the DbC Run transition
to ‘1’.
"

Best regards,
Lu Baolu

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web