Page MenuHomeFreeBSD

cam(scsi): silence "Medium not present" SCSI sense logging for removable media
ClosedPublic

Authored by guest-seuros on Feb 14 2026, 8:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 20, 6:01 PM
Unknown Object (File)
Thu, May 14, 2:31 PM
Unknown Object (File)
Wed, May 13, 9:39 PM
Unknown Object (File)
Wed, May 13, 5:14 PM
Unknown Object (File)
Mon, May 11, 4:34 PM
Unknown Object (File)
Sun, May 10, 6:06 AM
Unknown Object (File)
Sun, May 10, 6:02 AM
Unknown Object (File)
Sun, May 10, 4:20 AM
Subscribers

Details

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.Feb 15 2026, 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.

emaste added a subscriber: emaste.

The first bit of the commit message (subject) should be the general subsystem, I imagine it could be cam: here

I'm happy to land this. Abdelkader Boudih <freebsd@seuros.com> as the Git author info?

guest-seuros retitled this revision from fix: silence "Medium not present" SCSI sense logging for removable media to cam: silence "Medium not present" SCSI sense logging for removable media.Mar 19 2026, 8:33 PM

Yes.

guest-seuros retitled this revision from cam: silence "Medium not present" SCSI sense logging for removable media to cam(scsi): silence "Medium not present" SCSI sense logging for removable media.Mar 19 2026, 8:35 PM

Author: Abdelkader Boudih <freebsd@seuros.com>

Is the author that used last time. Since that matches, it's good.