The size of the bsg job reply was set to SCSI_SENSE_BUFFERSIZE back then
while it was part of the bsg_command. However, for the scsi transport
that uses it, it does not carry the scsi sense information.

Rename it to clarify this point, and while at it, make it a little bit
larger, so it'll be able to carry some useful information,
e.g. ufs descriptors, should be needed.

Signed-off-by: Avri Altman <avri.alt...@wdc.com>
---
 block/bsg-lib.c         | 4 ++--
 include/linux/bsg-lib.h | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index f3501cd..5cb2e38 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -271,7 +271,7 @@ static int bsg_init_rq(struct request_queue *q, struct 
request *req, gfp_t gfp)
 {
        struct bsg_job *job = blk_mq_rq_to_pdu(req);
 
-       job->reply = kzalloc(SCSI_SENSE_BUFFERSIZE, gfp);
+       job->reply = kzalloc(BSG_REPLY_BUFFERSIZE, gfp);
        if (!job->reply)
                return -ENOMEM;
        return 0;
@@ -285,7 +285,7 @@ static void bsg_initialize_rq(struct request *req)
 
        memset(job, 0, sizeof(*job));
        job->reply = reply;
-       job->reply_len = SCSI_SENSE_BUFFERSIZE;
+       job->reply_len = BSG_REPLY_BUFFERSIZE;
        job->dd_data = job + 1;
 }
 
diff --git a/include/linux/bsg-lib.h b/include/linux/bsg-lib.h
index 6aeaf64..3cf9d0b 100644
--- a/include/linux/bsg-lib.h
+++ b/include/linux/bsg-lib.h
@@ -26,6 +26,8 @@
 #include <linux/blkdev.h>
 #include <scsi/scsi_request.h>
 
+#define BSG_REPLY_BUFFERSIZE   320
+
 struct request;
 struct device;
 struct scatterlist;
-- 
1.9.1

Reply via email to