diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 6599bac0a78c..ff895022e2d1 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -258,8 +258,10 @@ static int blk_complete_sghdr_rq(struct request *rq, struct sg_io_hdr *hdr, hdr->host_status = host_byte(req->result); hdr->driver_status = driver_byte(req->result); hdr->info = 0; - if (hdr->masked_status || hdr->host_status || hdr->driver_status) + if (hdr->masked_status || hdr->host_status || hdr->driver_status) { hdr->info |= SG_INFO_CHECK; + printk(KERN_INFO "SCSI ioctl error, cmd %02X, prog %s\n", req->cmd[0], current->comm); + } hdr->resid = req->resid_len; hdr->sb_len_wr = 0;