From d8b024673bbfb32259030db7e54f043f3e471abe Mon Sep 17 00:00:00 2001 From: Peter Eriksson Date: Sun, 13 Oct 2024 22:01:33 -0600 Subject: [PATCH] ciss: Report more errors at higher ciss_verbose levels Report more information on errors, including the the opcode. PR: 246279 Reviewed by: imp Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D25155 --- sys/dev/ciss/ciss.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 168d1892e59d..69b3dcb97171 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -2360,10 +2360,13 @@ _ciss_report_request(struct ciss_request *cr, int *command_status, int *scsi_sta *scsi_status = -1; } } - if (bootverbose && ce->command_status != CISS_CMD_STATUS_DATA_UNDERRUN) - ciss_printf(cr->cr_sc, "command status 0x%x (%s) scsi status 0x%x\n", + if ((bootverbose || ciss_verbose > 3 || (ciss_verbose > 2 && ce->scsi_status != 0)) && + (ce->command_status != CISS_CMD_STATUS_DATA_UNDERRUN)) { + ciss_printf(cr->cr_sc, "command status 0x%x (%s) scsi status 0x%x (opcode 0x%02x)\n", ce->command_status, ciss_name_command_status(ce->command_status), - ce->scsi_status); + ce->scsi_status, + cc->cdb.cdb[0]); + } if (ce->command_status == CISS_CMD_STATUS_INVALID_COMMAND) { ciss_printf(cr->cr_sc, "invalid command, offense size %d at %d, value 0x%x, function %s\n", ce->additional_error_info.invalid_command.offense_size,