Received: from mx0a-00082601.pphosted.com (192.168.57.29) by PRN-CHUB10.TheFacebook.com (192.168.16.20) with Microsoft SMTP Server id 14.3.174.1; Wed, 9 Apr 2014 19:21:04 -0700 Received: from pps.filterd (m0044010 [127.0.0.1]) by mx0a-00082601.pphosted.com (8.14.5/8.14.5) with SMTP id s3A2Jc5c012431 for ; Wed, 9 Apr 2014 19:21:04 -0700 Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) by mx0a-00082601.pphosted.com with ESMTP id 1k5bk5s73q-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK) for ; Wed, 09 Apr 2014 19:21:03 -0700 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s3A2L16N026501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Apr 2014 02:21:02 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s3A2L07X021509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 10 Apr 2014 02:21:01 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s3A2KxkX007968; Thu, 10 Apr 2014 02:21:00 GMT Received: from mojo.mkp.net (/141.144.6.237) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 09 Apr 2014 19:20:59 -0700 From: "Martin K. Petersen" To: CC: "Martin K. Petersen" , Jens Axboe , Jan Kara , Frederic Weisbecker Subject: [PATCH] scsi: Make sure cmd_flags are 64-bit Date: Wed, 9 Apr 2014 22:20:48 -0400 Message-ID: <1397096448-22073-1-git-send-email-martin.petersen@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.96,1.0.14,0.0.0000 definitions=2014-04-09_05:2014-04-09,2014-04-09,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 kscore.is_bulkscore=1.4432899320127e-15 kscore.compositescore=0 circleOfTrustscore=216.016 compositescore=0.0999826334628526 urlsuspect_oldscore=0.999826334628526 suspectscore=1 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=27002 rbsscore=0.0999826334628526 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1404100031 X-FB-Internal: deliver Content-Type: text/plain Return-Path: martin.petersen@oracle.com X-MS-Exchange-Organization-AuthSource: PRN-CHUB10.TheFacebook.com X-MS-Exchange-Organization-AuthAs: Anonymous MIME-Version: 1.0 From: "Martin K. Petersen" 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: Martin K. Petersen Cc: Jens Axboe CC: Jan Kara Cc: Frederic Weisbecker --- drivers/scsi/scsi_lib.c | 4 ++-- include/scsi/scsi_device.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 5681c05ac506..65a123d9c676 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -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 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) { struct request *req; @@ -235,7 +235,7 @@ EXPORT_SYMBOL(scsi_execute); int scsi_execute_req_flags(struct scsi_device *sdev, const unsigned char *cmd, int data_direction, void *buffer, unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, int retries, - int *resid, int flags) + int *resid, u64 flags) { char *sense = NULL; int result; diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 4e845b80efd3..5853c913d2b0 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -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, int data_direction, void *buffer, unsigned bufflen, 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, const unsigned char *cmd, int data_direction, void *buffer, 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, const unsigned char *cmd, int data_direction, void *buffer, unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, -- 1.8.3.1