Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Oct 2024 05:40:54 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: d8b024673bbf - main - ciss: Report more errors at higher ciss_verbose levels
Message-ID:  <202410140540.49E5eslI089447@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=d8b024673bbfb32259030db7e54f043f3e471abe

commit d8b024673bbfb32259030db7e54f043f3e471abe
Author:     Peter Eriksson <pen@lysator.liu.se>
AuthorDate: 2024-10-14 04:01:33 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-10-14 05:23:25 +0000

    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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410140540.49E5eslI089447>