Date: Mon, 3 Feb 2025 17:28:52 GMT 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: fdaf7d0fe10c - main - umass: Print quirks with %b Message-ID: <202502031728.513HSqpx009288@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fdaf7d0fe10c1b0017305627f28e6e59149aadaa commit fdaf7d0fe10c1b0017305627f28e6e59149aadaa Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2025-02-03 17:25:27 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2025-02-03 17:25:27 +0000 umass: Print quirks with %b Print the quirks in a more human-readable form. When testing a dozen different removeable devices, the hex numbers quickly blur... Sponsored by: Netflix --- sys/dev/usb/storage/umass.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index ba10a23d2987..9137f3eb895e 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -365,6 +365,26 @@ typedef uint8_t (umass_transform_t)(struct umass_softc *sc, uint8_t *cmd_ptr, /* Device does not support 'PREVENT/ALLOW MEDIUM REMOVAL'. */ #define NO_PREVENT_ALLOW 0x8000 +#define UMASS_QUIRKS_STRING \ + "\020" \ + "\001NO_TEST_UNIT_READY" \ + "\002RS_NO_CLEAR_UA" \ + "\003NO_START_STOP" \ + "\004FORCE_SHORT_INQUIRY" \ + "\005SHUTTLE_INIT" \ + "\006ALT_IFACE_1" \ + "\007FLOPPY_SPEED" \ + "\010IGNORE_RESIDUE" \ + "\011NO_GETMAXLUN" \ + "\012WRONG_CSWSIG" \ + "\013NO_INQUIRY" \ + "\014NO_INQUIRY_EVPD" \ + "\015RBC_PAD_TO_12" \ + "\016READ_CAPACITY_OFFBY1" \ + "\017NO_SYNCHRONIZE_CACHE" \ + "\020NO_PREVENT_ALLOW" \ + + struct umass_softc { struct scsi_sense cam_scsi_sense; struct scsi_test_unit_ready cam_scsi_test_unit_ready; @@ -956,7 +976,7 @@ umass_attach(device_t dev) sc->sc_proto & UMASS_PROTO_WIRE); } - printf("; quirks = 0x%04x\n", sc->sc_quirks); + printf("; quirks = 0x%b\n", sc->sc_quirks, UMASS_QUIRKS_STRING); #endif if (sc->sc_quirks & ALT_IFACE_1) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502031728.513HSqpx009288>