Commit 2bfad21e authored by Martin K. Petersen's avatar Martin K. Petersen Committed by Jens Axboe

scsi: Make sure cmd_flags are 64-bit

cmd_flags in struct request is now 64 bits wide but the scsi_execute
functions truncated arguments passed to int leading to errors. Make sure
the flags parameters are u64.
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Cc: Jens Axboe <axboe@fb.com>
CC: Jan Kara <jack@suse.cz>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent e69f18f0
...@@ -184,7 +184,7 @@ void scsi_queue_insert(struct scsi_cmnd *cmd, int reason) ...@@ -184,7 +184,7 @@ void scsi_queue_insert(struct scsi_cmnd *cmd, int reason)
*/ */
int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
int data_direction, void *buffer, unsigned bufflen, int data_direction, void *buffer, unsigned bufflen,
unsigned char *sense, int timeout, int retries, int flags, unsigned char *sense, int timeout, int retries, u64 flags,
int *resid) int *resid)
{ {
struct request *req; struct request *req;
...@@ -235,7 +235,7 @@ EXPORT_SYMBOL(scsi_execute); ...@@ -235,7 +235,7 @@ EXPORT_SYMBOL(scsi_execute);
int scsi_execute_req_flags(struct scsi_device *sdev, const unsigned char *cmd, int scsi_execute_req_flags(struct scsi_device *sdev, const unsigned char *cmd,
int data_direction, void *buffer, unsigned bufflen, int data_direction, void *buffer, unsigned bufflen,
struct scsi_sense_hdr *sshdr, int timeout, int retries, struct scsi_sense_hdr *sshdr, int timeout, int retries,
int *resid, int flags) int *resid, u64 flags)
{ {
char *sense = NULL; char *sense = NULL;
int result; int result;
......
...@@ -423,11 +423,11 @@ extern int scsi_is_target_device(const struct device *); ...@@ -423,11 +423,11 @@ extern int scsi_is_target_device(const struct device *);
extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
int data_direction, void *buffer, unsigned bufflen, int data_direction, void *buffer, unsigned bufflen,
unsigned char *sense, int timeout, int retries, unsigned char *sense, int timeout, int retries,
int flag, int *resid); u64 flags, int *resid);
extern int scsi_execute_req_flags(struct scsi_device *sdev, extern int scsi_execute_req_flags(struct scsi_device *sdev,
const unsigned char *cmd, int data_direction, void *buffer, const unsigned char *cmd, int data_direction, void *buffer,
unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout,
int retries, int *resid, int flags); int retries, int *resid, u64 flags);
static inline int scsi_execute_req(struct scsi_device *sdev, static inline int scsi_execute_req(struct scsi_device *sdev,
const unsigned char *cmd, int data_direction, void *buffer, const unsigned char *cmd, int data_direction, void *buffer,
unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment