From: Bart Van Assche Date: Thu, 17 Aug 2017 20:13:25 +0000 (-0700) Subject: skd: Initialize skd_special_context.req.n_sg to one X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=32494df9a5ae9aaf8bed23068e6ec1aeb3196ebf;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git skd: Initialize skd_special_context.req.n_sg to one The debug code in skd_send_special_fitmsg() assumes that req.n_sg represents the number of S/G descriptors. However, skd_construct() initializes that member variable to zero. Set req.n_sg to one such that the debugging code in skd_send_special_fitmsg() works as expected. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe --- diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index c7f531e99ede..392c898d86e2 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c @@ -1050,6 +1050,7 @@ static int skd_format_internal_skspcl(struct skd_device *skdev) memset(scsi, 0, sizeof(*scsi)); dma_address = skspcl->req.sksg_dma_address; scsi->hdr.sg_list_dma_address = cpu_to_be64(dma_address); + skspcl->req.n_sg = 1; sgd->control = FIT_SGD_CONTROL_LAST; sgd->byte_count = 0; sgd->host_side_addr = skspcl->db_dma_address;