Page MenuHomeFreeBSD

fix: silence "Medium not present" SCSI sense logging for removable media
AcceptedPublic

Authored by guest-seuros on Sat, Feb 14, 8:07 PM.
Tags
None
Referenced Files
F145574124: D55287.diff
Sat, Feb 21, 4:46 PM
Unknown Object (File)
Thu, Feb 19, 10:41 PM
Unknown Object (File)
Thu, Feb 19, 5:38 AM
Unknown Object (File)
Sun, Feb 15, 6:09 PM
Unknown Object (File)
Sun, Feb 15, 5:40 PM
Unknown Object (File)
Sun, Feb 15, 3:06 AM
Subscribers

Details

Reviewers
imp
Group Reviewers
cam
Summary

Change SS_FATAL to SS_FAIL for SCSI sense code 0x3A (Medium not present) to suppress console spam when card readers or other removable media devices
have no media inserted.

The error is still returned to callers (ENXIO), but no longer prints to dmesg during boot/probe.

Verified with Apple SD Card Reader - reduced boot messages from 4 to 2.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 70674
Build 67557: arc lint + arc unit

Event Timeline

guest-seuros held this revision as a draft.
guest-seuros edited the summary of this revision. (Show Details)
guest-seuros added a reviewer: imp.

This is likely a good change. 3a/0 is definitely right, not sure about the other two.

This revision is now accepted and ready to land.Sun, Feb 15, 4:47 AM
In D55287#1264434, @imp wrote:

not sure about the other two.

This change is about semantics. An ejected CD, empty tray, or missing tape is a transient media state, not a fatal device condition. Marking it as SS_FAIL better reflects that distinction.

Only 3A/00 was tested with an SD reader. i can follow up with additional testing on optical media and can amend or reopen a diff if needed.