[Bug 204521] [new driver] [request] Port rtsx from OpenBSD to FreeBSD

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Mar 20 10:35:59 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204521

--- Comment #42 from Gary Jennejohn <gljennjohn at gmail.com> ---
(In reply to hlh from comment #38)
The message from dirkx led me to look more closely at the OpenBSD code.
OpenBSD never sets intr_status to 0 before calling rtsx_wait_intr().
That makes sense because, theoretically, the interrupt could be raised before
rtsx_wait_intr() is entered.  In that case, setting intr_status to 0 would
overwrite its setting in the interrupt handler and result in a false timeout
error.
I tested NOT setting intr_status to 0 and the driver works just as well (or
badly) as before.  Actually, setting it to zero is not really necessary due to
this code in rtsx_wait_intr(): sc->rtsx_intr_status &= ~status;
So, I suggest, but do not demand, at least commenting out the lines where
intr_status is set to 0.  I leave it up to you.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list