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

--- Comment #13 from Warner Losh <[email protected]> ---
(In reply to Gleb Popov from comment #12)
> The main problem in this PR was about about MEDIACHANGE events, not this 
> scsi_sense events spam.

Except under the covers they are really the same thing, or at least super
closely related. We detect media changes, sometimes, by polling the device with
TEST UNIT READY (TUR). Or by asking for a AEN event which I think isn't
reliable. And the detection methods are different on real hardware (or at least
the real hardware the OP uses) and on virtual hardware. But digging a little
further shows I've not asked a key question. The spam is easy to get rid of,
but making this feature work is quite tricky. Plus, I half suspect that CDROMs
do different things on media insert/eject.

Media change detection is very unreliable, and the hardware interfaces to do it
vary quite a bit, it seems and even drives that advertise advanced features
don't send the proper async event which winds up with the driver doing a TUR
which gets the SCSI SENSE that shows the media has changed.

Some SIMs signal better than others as well. AHCI does send the async signal,
while none of the scsi attached do. Since I've not asked, and nobody has
volunteered, I don't know which SIMs are involved to take a look, or to see if
we need a new PIM flag to check along with the AEN flag to see if the SCSI AEN
messages and/or Unit Attention messages are handled correctly.

In addition to SIM driver bugs, I also think we might not be tracking state
quite right in the SCSI side of the cd/da driver, leading to both the insane
spam as well as it not being quite effective.

So what's the connection toplogies for the cd in question? Since it's really
two different drivers with the same name, it's hard to know where to look. And
there's two different mechanisms that govern it, we need to narrow it down a
bit for this bug to go from my "meh, that's weird, but I don't care because I
don't know even where to start" to "meh, maybe I don't care about this feature
that much, but I can look at the code and suggest matches."

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

Reply via email to