cam_da too noisy about SYNCHRONIZE CACHE

Poul-Henning Kamp <[email protected]>
Newsgroups gmane.os.freebsd.current
Message-ID <[email protected]>
I have a Rpi3B which runs 15.0 on a Seagate USB-SATA gadget.

Every few hours usually around XX:X0:30 it spits out:

	Jan 27 00:40:30 rpi3b kernel: (da0:umass-sim0:0:0:0): MODE SENSE for CACHE page command failed.
	Jan 27 00:40:30 rpi3b kernel: (da0:umass-sim0:0:0:0): Mode page 8 missing, disabling SYNCHRONIZE CACHE
	Jan 27 00:40:30 rpi3b kernel: (da0:umass-sim0:0:0:0): Devices already quirked for NO_SYNC_CACHE, maybe remove quirk table

The relevant code in cam_da is:

			if (mark_bad) {
	bad:
				xpt_print(done_ccb->ccb_h.path,
				    "Mode page 8 missing, disabling SYNCHRONIZE CACHE\n");
				if (softc->quirks & DA_Q_NO_SYNC_CACHE)
					xpt_print(done_ccb->ccb_h.path,
	    "Devices already quirked for NO_SYNC_CACHE, maybe remove quirk table\n");
				softc->quirks |= DA_Q_NO_SYNC_CACHE;
				softc->disk->d_flags &= ~DISKFLAG_CANFLUSHCACHE;
			}

I can understand emitting the message the first time after a reboot, but
that program logic makes absolutely no sense to me ?

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[email protected]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.