Date: Sat, 20 Jun 2026 20:58:58 +0000 From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: eafa181d51f7 - main - da: Put the SYNC CACHE probing behind bootverbose Message-ID: <6a36ff12.3d44d.4c850abb@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=eafa181d51f712f189ae4558014d8d00de7c5624 commit eafa181d51f712f189ae4558014d8d00de7c5624 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2026-06-20 20:53:32 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2026-06-20 20:57:24 +0000 da: Put the SYNC CACHE probing behind bootverbose These have turned out to be too noisy, so put them behind bootverbose Event: BSDCan 2026 (noticed during UFS demo) Sponsored by: Netflix MFC After: 2 weeks --- sys/cam/scsi/scsi_da.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 3f18817030c1..7b47beeeccdd 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -5461,24 +5461,27 @@ dadone_probecache(struct cam_periph *periph, union ccb *done_ccb) */ if (sense_hdr->data_length + 1 < sense_hdr->blk_desc_len + sizeof(*cache_page)) { - xpt_print(done_ccb->ccb_h.path, - "CACHE PAGE TOO SHORT data len %d desc len %d\n", - sense_hdr->data_length, - sense_hdr->blk_desc_len); + if (bootverbose) + xpt_print(done_ccb->ccb_h.path, + "CACHE PAGE TOO SHORT data len %d desc len %d\n", + sense_hdr->data_length, + sense_hdr->blk_desc_len); goto bad; } if ((cache_page->page_code & ~SMS_PAGE_CTRL_MASK) != SMS_CACHE_PAGE) { - xpt_print(done_ccb->ccb_h.path, - "Bad cache page %#x\n", - cache_page->page_code); + if (bootverbose) + xpt_print(done_ccb->ccb_h.path, + "Bad cache page %#x\n", + cache_page->page_code); goto bad; } if (cache_page->page_length != sizeof(*cache_page) - offsetof(struct scsi_caching_page, flags1)) { - xpt_print(done_ccb->ccb_h.path, - "CACHE PAGE length bogus %#x\n", - cache_page->page_length); + if (bootverbose) + xpt_print(done_ccb->ccb_h.path, + "CACHE PAGE length bogus %#x\n", + cache_page->page_length); goto bad; } /* @@ -5495,7 +5498,8 @@ dadone_probecache(struct cam_periph *periph, union ccb *done_ccb) */ if (softc->quirks & DA_Q_NO_SYNC_CACHE && cache_page->flags1 & SCP_WCE) - xpt_print(done_ccb->ccb_h.path, + if (bootverbose) + xpt_print(done_ccb->ccb_h.path, "Devices quirked NO_SYNC_CACHE, but WCE=1 enabling write cache.\n"); } else { int error, error_code, sense_key, asc, ascq; @@ -5536,8 +5540,9 @@ dadone_probecache(struct cam_periph *periph, union ccb *done_ccb) /*getcount_only*/0); } } - xpt_print(done_ccb->ccb_h.path, - "MODE SENSE for CACHE page command failed.\n"); + if (bootverbose) + xpt_print(done_ccb->ccb_h.path, + "MODE SENSE for CACHE page command failed.\n"); /* * There's no cache page, the command wasn't @@ -5549,10 +5554,12 @@ dadone_probecache(struct cam_periph *periph, union ccb *done_ccb) */ if (mark_bad) { bad: - xpt_print(done_ccb->ccb_h.path, + if (bootverbose) + 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, + if (bootverbose) + 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;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a36ff12.3d44d.4c850abb>
