aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-02-24 18:55:49 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2022-03-01 22:21:49 -0500
commita9a4ea1166d640d1b397f24afc1cd7e96c46cd03 (patch)
treea0093c22d77f3a86eaf3a0eee6dcfa6c989b622c /include/scsi
parentscsi: core: Remove the sense and sense_len fields from struct scsi_request (diff)
downloadlinux-dev-a9a4ea1166d640d1b397f24afc1cd7e96c46cd03.tar.xz
linux-dev-a9a4ea1166d640d1b397f24afc1cd7e96c46cd03.zip
scsi: core: Move the resid_len field from struct scsi_request to struct scsi_cmnd
Prepare for removing the scsi_request structure by moving the resid_len field to struct scsi_cmnd. Link: https://lore.kernel.org/r/20220224175552.988286-6-hch@lst.de Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: John Garry <john.garry@huawei.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_cmnd.h6
-rw-r--r--include/scsi/scsi_request.h1
2 files changed, 3 insertions, 4 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 47add5b32f46..5ff0a6e8460c 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -111,7 +111,7 @@ struct scsi_cmnd {
(ie, between disconnect /
reconnects. Probably == sector
size */
-
+ unsigned resid_len; /* residual count */
unsigned sense_len;
unsigned char *sense_buffer;
/* obtained by REQUEST SENSE when
@@ -200,12 +200,12 @@ static inline unsigned scsi_bufflen(struct scsi_cmnd *cmd)
static inline void scsi_set_resid(struct scsi_cmnd *cmd, unsigned int resid)
{
- cmd->req.resid_len = resid;
+ cmd->resid_len = resid;
}
static inline unsigned int scsi_get_resid(struct scsi_cmnd *cmd)
{
- return cmd->req.resid_len;
+ return cmd->resid_len;
}
#define scsi_for_each_sg(cmd, sg, nseg, __i) \
diff --git a/include/scsi/scsi_request.h b/include/scsi/scsi_request.h
index bed1cc49132a..74be75336a54 100644
--- a/include/scsi/scsi_request.h
+++ b/include/scsi/scsi_request.h
@@ -6,7 +6,6 @@
struct scsi_request {
int result;
- unsigned int resid_len; /* residual count */
int retries;
};