From a35989a0723c53b0364322e39c7a9495336ff7e6 Mon Sep 17 00:00:00 2001 From: Damien Le Moal Date: Mon, 25 Nov 2019 16:05:18 +0900 Subject: 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 Signed-off-by: Martin K. Petersen --- drivers/scsi/sd.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/scsi/sd.h') 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 */ -- cgit v1.2.3