lkml.org 
[lkml]   [2018]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] ohci-hcd: Fix race condition caused by ohci_urb_enqueue() and io_watchdog_func()
Date
Hi Alan,

On Thu, 1 Feb 2018 10:33:33 -0500, Alan Stern wrote:
>> I think we must choose an invalid frame number for the special
>> sentinel value, but I'm not sure which value is adequate for it.
>> Is 0xffffff00 an invalid frame number, otherwise how about simply
>> -1(0xffffffff)?
>
> Well, the frame_no register is 32 bits wide, but only the 16 low-order
> bits are meaningful. ohci_frame_no() strips off the high-order 16
> bits, so any value with one of those bits set would be acceptable.
> (Besides, valid frame numbers only go up to 2047.)
>
> I chose 0xffffff00 because PCI reads from a non-working device
> generally get a value with all the bits set. But since the upper 16
> bits are masked away anyhow, it doesn't matter. -1u would be fine.

Thanks, I choose 0xffffff00 as you suggested, and will prepare v2 patch.

Thanks,
Shigeru

\
 
 \ /
  Last update: 2018-02-02 02:47    [W:0.047 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site