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)
Sun, Apr 5, 1:07 PM
Unknown Object (File)
Wed, Apr 1, 1:50 PM
Unknown Object (File)
Sun, Mar 29, 12:50 PM
Unknown Object (File)
Sun, Mar 22, 12:17 AM
Unknown Object (File)
Fri, Mar 20, 3:27 PM
Unknown Object (File)
Tue, Mar 17, 9:16 AM
Unknown Object (File)
Sun, Mar 15, 6:31 AM
Unknown Object (File)
Wed, Mar 11, 10:29 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 Not Applicable
Unit
Tests Not Applicable

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.Thu, Mar 19, 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.Thu, Mar 19, 8:35 PM

Author: Abdelkader Boudih <freebsd@seuros.com>

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