aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_cmnd.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-04-11 14:36:30 +0200
committerTakashi Iwai <tiwai@suse.de>2019-04-11 14:36:30 +0200
commit9b0dcd0e5a27958b57e3e390f63c098d63a055da (patch)
treede778d683f121d3062df316994e9c4cf195eb12c /include/scsi/scsi_cmnd.h
parentALSA: hda: Fix racy display power access (diff)
parentASoC: wcd9335: Fix missing regmap requirement (diff)
downloadlinux-dev-9b0dcd0e5a27958b57e3e390f63c098d63a055da.tar.xz
linux-dev-9b0dcd0e5a27958b57e3e390f63c098d63a055da.zip
Merge tag 'asoc-fix-v5.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.1 A few core fixes along with the driver specific ones, mainly fixing small issues that only affect x86 platforms for various reasons (their unusual machine enumeration mechanisms mainly, plus a fix for error handling in topology). There's some of the driver fixes that look larger than they are, like the hdmi-codec changes which resulted in an indentation change, and most of the other large changes are for new drivers like the STM32 changes.
Diffstat (limited to 'include/scsi/scsi_cmnd.h')
-rw-r--r--include/scsi/scsi_cmnd.h34
1 files changed, 3 insertions, 31 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index d85e6befa26b..76ed5e4acd38 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -35,7 +35,6 @@ struct scsi_driver;
struct scsi_data_buffer {
struct sg_table table;
unsigned length;
- int resid;
};
/* embedded in scsi_cmnd */
@@ -76,16 +75,6 @@ struct scsi_cmnd {
int eh_eflags; /* Used by error handlr */
/*
- * A SCSI Command is assigned a nonzero serial_number before passed
- * to the driver's queue command function. The serial_number is
- * cleared when scsi_done is entered indicating that the command
- * has been completed. It is a bug for LLDDs to use this number
- * for purposes other than printk (and even that is only useful
- * for debugging).
- */
- unsigned long serial_number;
-
- /*
* This is set to jiffies as it was when the command was first
* allocated. It is used to time how long the command has
* been outstanding
@@ -202,34 +191,17 @@ static inline unsigned scsi_bufflen(struct scsi_cmnd *cmd)
static inline void scsi_set_resid(struct scsi_cmnd *cmd, int resid)
{
- cmd->sdb.resid = resid;
+ cmd->req.resid_len = resid;
}
static inline int scsi_get_resid(struct scsi_cmnd *cmd)
{
- return cmd->sdb.resid;
+ return cmd->req.resid_len;
}
#define scsi_for_each_sg(cmd, sg, nseg, __i) \
for_each_sg(scsi_sglist(cmd), sg, nseg, __i)
-static inline int scsi_bidi_cmnd(struct scsi_cmnd *cmd)
-{
- return blk_bidi_rq(cmd->request) &&
- (cmd->request->next_rq->special != NULL);
-}
-
-static inline struct scsi_data_buffer *scsi_in(struct scsi_cmnd *cmd)
-{
- return scsi_bidi_cmnd(cmd) ?
- cmd->request->next_rq->special : &cmd->sdb;
-}
-
-static inline struct scsi_data_buffer *scsi_out(struct scsi_cmnd *cmd)
-{
- return &cmd->sdb;
-}
-
static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd,
void *buf, int buflen)
{
@@ -351,7 +323,7 @@ static inline void set_driver_byte(struct scsi_cmnd *cmd, char status)
static inline unsigned scsi_transfer_length(struct scsi_cmnd *scmd)
{
- unsigned int xfer_len = scsi_out(scmd)->length;
+ unsigned int xfer_len = scmd->sdb.length;
unsigned int prot_interval = scsi_prot_interval(scmd);
if (scmd->prot_flags & SCSI_PROT_TRANSFER_PI)