summaryrefslogtreecommitdiff
path: root/drivers/scsi/sd.h
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2019-11-25 16:05:18 +0900
committerMartin K. Petersen <martin.petersen@oracle.com>2019-11-26 21:43:22 -0500
commita35989a0723c53b0364322e39c7a9495336ff7e6 (patch)
treee1358f48115b8c9e052bada6eac2ba47b094130e /drivers/scsi/sd.h
parent45dc8f2d9c94ed74a5e31e63e9136a19a7e16081 (diff)
scsi: sd_zbc: Improve report zones error printout
In the case of a report zones command failure, instead of simply printing the host_byte and driver_byte values returned, print a message that is more human readable and useful, adding sense codes too. To do so, use the already defined sd_print_sense_hdr() and sd_print_result() functions by moving the declaration of these functions into sd.h. Link: https://lore.kernel.org/r/20191125070518.951717-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sd.h')
-rw-r--r--drivers/scsi/sd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h
index 1eab779f812b..43dc0228f1ce 100644
--- a/drivers/scsi/sd.h
+++ b/drivers/scsi/sd.h
@@ -239,4 +239,7 @@ static inline void sd_zbc_complete(struct scsi_cmnd *cmd,
#endif /* CONFIG_BLK_DEV_ZONED */
+void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr);
+void sd_print_result(const struct scsi_disk *sdkp, const char *msg, int result);
+
#endif /* _SCSI_DISK_H */