lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 17 Mar 2013 17:29:11 +0900
From:	Namjae Jeon <linkinjeon@...il.com>
To:	JBottomley@...allels.com
Cc:	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	Namjae Jeon <linkinjeon@...il.com>,
	Namjae Jeon <namjae.jeon@...sung.com>,
	Amit Sahrawat <a.sahrawat@...sung.com>
Subject: [PATCH] [SCSI]: print the msgbytes and statusbyte from scsi result

From: Namjae Jeon <namjae.jeon@...sung.com>

Introduce msgbyte and statusbyte in the prints as part of the
result which is returned by the lower layer driver in response to
SCSI command issued, in case of any error conditions.

Purpose of adding these prints is to convey, during any I/O
error case, which condition exactly has happened in lower device and
from the prints we can directly deduce, what is the status of command
issued. This will help to quickly debug the scenario and also making
a test case to create new scenarios.

Also change the printk to more appropriate pr_* macro.

Signed-off-by: Namjae Jeon <namjae.jeon@...sung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@...sung.com>
---
 drivers/scsi/constants.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
index 76e4c03..77bb1dc 100644
--- a/drivers/scsi/constants.c
+++ b/drivers/scsi/constants.c
@@ -1445,8 +1445,10 @@ void scsi_show_result(int result)
 
 void scsi_show_result(int result)
 {
-	printk("Result: hostbyte=0x%02x driverbyte=0x%02x\n",
-	       host_byte(result), driver_byte(result));
+	pr_info("Result: hostbyte=0x%02x driverbyte=0x%02x"
+			"msgbyte=0x%02x statusbyte=0x%02x\n",
+	       host_byte(result), driver_byte(result), msg_byte(result),
+							status_byte(result));
 }
 
 #endif
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ