Messages in this thread | | | From | "Yoshida, Shigeru" <> | Subject | Re: [PATCH] ohci-hcd: Fix race condition caused by ohci_urb_enqueue() and io_watchdog_func() | Date | Fri, 2 Feb 2018 01:46:01 +0000 |
| |
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
| |