HomeFreeBSD

scsi/da: Only send SYNC CACHE for devices with mode page 8

Description

scsi/da: Only send SYNC CACHE for devices with mode page 8

Mode page 8 is the 'cache' mode page. It's used to control the cache,
if one is present, on a device. When it is absent, that's a very
strong hint that SYNCHRONIZED CACHE willl not be necessary. Set the
NO_SYNC_CACHE quirk for this situation.

SBC defines the 2010 Profile which specifies that both SYNCRHONIZE CACHE
and Cache Mode Page must be supported. There are additional vague
statements tieing these two together, but nothing that explicitly
requires Cache Mode Page support when SYNCHRONIZE CACHE is needed for
cache coherency. However, when the Cace Mode Page is present, that's a
very strong hint SYNCHRONIZE CACHE is supported (or at the very least
won't hang the firmware). Given the diversity of implementations, it's
hard to say this is 100% safe. However, many devices known to hang or
worse on a SYNCHRONIZE CACHE tolerate querying an unsupported mode page
well. If there's any devices that have a valid Cache page, but where
SYNCHRONIZE CACHE actually hangs can be dealt with by specific quirks.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D49476

Details

Provenance
impAuthored on May 7 2025, 4:07 PM
Differential Revision
D49476: scsi/da: Only send SYNC CACHE for devices with mode page 8
Parents
rGec3cc37bd938: umass: Bring in small fix from NetBSD's umass
Branches
Unknown
Tags
Unknown