From patchwork Tue Nov 22 03:39:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 628194 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40E55C43217 for ; Tue, 22 Nov 2022 03:45:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232196AbiKVDpD (ORCPT ); Mon, 21 Nov 2022 22:45:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232282AbiKVDo4 (ORCPT ); Mon, 21 Nov 2022 22:44:56 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18CF82A942 for ; Mon, 21 Nov 2022 19:44:47 -0800 (PST) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM3ibSJ003442; Tue, 22 Nov 2022 03:44:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=mf/7M0eB1ApcjMXwUxy9b2os+x7h31oAnxUf0Gcb1lk=; b=NMfQouC0tujlKqe1gfD/4HbHyWplKUA2dsfdAHrqkKDEijPOcVOmc8YyhlM2+7sJytjx YjEqpJmJj6hT0XDotQD8lh65h6XyRxPsnx2cvNNkgikbwHYVzhbUeYMQ2AYG4Vg/WGaH 78ErW5eW85V3Hrr2YSK8FYMJqqu0ZlEp1OqhvzpzDiVqWS/mK/R4urcg1MR7a2FYx4wI s93njwwVWnz282naTU+JiQSS0lv/mwJOlIch6cJeM0XYuYsuswyxRvFLKv5zLt6CiDRM pmy2Exh8VNI87PQwKkwwkzUg8CX6BoRCn1MwlBooWmYZGwYsQgOHdsm7mKdS0nSGSb1z Rg== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m0pf2r1e5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:44:37 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM3Hio6008283; Tue, 22 Nov 2022 03:40:30 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2170.outbound.protection.outlook.com [104.47.59.170]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnk4735t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=alXzfXsnbLG5JNi1O+QuzqHuTOpSRbP3mbbhPJAFBL5hzFUxPKD5xTSur0DpVrjiaGl9KNVwj2lAjKagNyAqzRvmf3bZFSvbRa0z7RP52N1ZtKPWIIep88raBzVFsIvLcK1qkdehM5nGhC6kN239/FQVxHr4Vp91vuXGqDier6kn2gAE/VRfBwOGQGqZpkLBEMJR3gVvgfvOO3LuRi0kxdwe6O26C9bz8jv/4fUmsqIn2eq6X5VVTE8hLGBwWIG61Gh564nfLcYZP2uR5VcqZBXIDp9RzbcC8vKZgZXcgDHId291TkSqKlzG0ATisSLOJnyMHgNp5nsbziXDal7S3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mf/7M0eB1ApcjMXwUxy9b2os+x7h31oAnxUf0Gcb1lk=; b=E6ieFkcqVt7lejIGnifcVQCuVX1gTqnIdzW+VLLqTMfzdu4OWWovQIHN6k3OfBYC+lwN0eiPmmlqdco/SIF465q4Dx+pALIsrA19L9BfTw47NATU/71GCmLInv5M97S11HcroltJCe9KKZolss3znVbWXUMK+Nf/97R9hiK5Ix7ZcVWtKHhQxKDQpcHTK05iUXgBrZW6/saLVm9HwROhi4fk2btqgFCkyaxsEulx9FXXV4LbStxx64PjK632qfB4Foynz6L8hiQKt9iIIZ1PB1+fDZqMSjQGFD4ZcSiEjfYQPBBn2/l6Sa9VVjtQO7iGLvJ7ph6SHyat6P7DxzgB7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mf/7M0eB1ApcjMXwUxy9b2os+x7h31oAnxUf0Gcb1lk=; b=KJnNOd0m0NF3lmBl/z72BSwEESDoNqHDle6g0w1nhW0cVDanb1kvgApEPxvHCbdAJdIHLOPJCS0OwhcEBYf+KluDieimA6pSJvZh4U5fwfURJ/cRaPIrzwQzYt0E1g8FXnMdsJoKiwi9+7NEsR6gA1xj3NH+0XOr1/6/r2jlXNw= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:27 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:27 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 01/15] scsi: Add struct for args to execution functions Date: Mon, 21 Nov 2022 21:39:20 -0600 Message-Id: <20221122033934.33797-2-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH0PR03CA0247.namprd03.prod.outlook.com (2603:10b6:610:e5::12) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: 48d6dbac-ae14-4726-0518-08dacc3b4b97 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fvk+vu/jtkhS0jLNwFq9vwb3fsuXhtXmux+uTMhoK+85fiG+GCDL+5+FsVbTSaDv7wdf8219j/9CDEgoqyyyst4AhQ4EyOEtyAK8l5ZGByHkjROoSXUU78VZihMGftQJW/JxVS2gKg43FtgQdiTmtdce+JNAK7WLkVjNh7hobRAkmvhs+oRFV3yk3WBQtM2iUCHEjvYeiEjjDXNNsPpWs8tqldYBxGqBJazr0ov3WQAMWi59HupdY9HATdZSyroWUrIAQa4wF91FZ/s5+M7fFDQ8mO92NSI7osyo60fLdf/Uy+NiIJAq5Y2inEsGP4L5El+JI7tZX/doBWWueionLW6SgGUGIuHxCvoJSwTRXL40iz8ZApfHZL3bZUnzPPrVhaacv9AdbJRuZyfcd/Po1QprCcsuk2UyQkPy14TNf4BP5los4BIz58V47AaW5mNwQ5YuCuKWsfJIL4TOUdHj6qojweyihRwQVRlqz0iVZ6VVqFcNiwPQolhNVtAAGfYkBrAM5hFd3endvmb5O1ryeXEFSbHJOfBznJZVlGT0b6l8K2/a8Xzvv4oqO6AjWO9qyblVvRGm9Uj9osVWfuOqXU7ECNTHJNRMHhEs4e+IcTzecqpJCy+39IjNMHLZTckTyIk+bjJdMMKwjlbVLhVYwA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PmdpfXfR/mi2SYU7M8IXg0J5vz/1DyqCNlHXIe+E896dCyuPUG4UdqgYnJatfd+W80UgW+u11alYRf7DUjoxz1f9INt0jNJDiO+PbSHfQ08sNeEM9ZMwljBTW9C8wB1wJmFzFMGMjwzJHIwQMzpsZjdFikiRPUJHrHfAZvHq269isgas+xV49luEgWQHjkyBhZE+bmVGGckAAX8fvHcqIQ2Sg9V1WPbNh/l6Wif/edLi6cNppk//tCdEfNSLbpfEvNQ+eYFiVM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2nNoC22+VAaRsLKSq/QMOEKzG9iDE/7nCo7GueTBVKh5v79Z206uJb+nA4dURlMMZ5yMACXGM9qEAo8ALDg325fpzSMuW1PYAQZ6cbx28vvuf9tOGA1CbswJ154I/bqQ1SjkwNO3grIjCcbpB2J9byBTBuDSnEIOvWkZ5Vis6In X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48d6dbac-ae14-4726-0518-08dacc3b4b97 X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:27.0452 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BSfPmq1bT9rQrwDeo2TmT2ldZfHFPAzzrKyO+zQJKQdrK8SbOGMh8dnkEvFGSixxo8Z8EhKGGoOpnj61sfzlslVznTMePkohj4G9J3JtLz0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 suspectscore=0 bulkscore=0 mlxscore=0 spamscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-ORIG-GUID: J6xaP-rnLNeoI8LO_t1tCCN9CWSukyKI X-Proofpoint-GUID: J6xaP-rnLNeoI8LO_t1tCCN9CWSukyKI Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This begins to move the SCSI execution functions to use a struct for passing in optional args. This patch adds the new struct, temporarily converts scsi_execute and scsi_execute_req and adds a new helper scsi_execute_cmd. The next patches will convert scsi_execute and scsi_execute_req users to scsi_execute_cmd then remove scsi_execute and scsi_execute_req. Signed-off-by: Mike Christie --- drivers/scsi/scsi_lib.c | 50 ++++++++++++++----------------- include/scsi/scsi_device.h | 61 +++++++++++++++++++++++++++++--------- 2 files changed, 69 insertions(+), 42 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index ec890865abae..327eb2df5583 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -185,39 +185,31 @@ void scsi_queue_insert(struct scsi_cmnd *cmd, int reason) __scsi_queue_insert(cmd, reason, true); } - /** - * __scsi_execute - insert request and wait for the result - * @sdev: scsi device + * __scsi_execute_cmd - insert request and wait for the result + * @sdev: scsi_device * @cmd: scsi command - * @data_direction: data direction + * @opf: block layer request cmd_flags * @buffer: data buffer * @bufflen: len of buffer - * @sense: optional sense buffer - * @sshdr: optional decoded sense header * @timeout: request timeout in HZ * @retries: number of times to retry request - * @flags: flags for ->cmd_flags - * @rq_flags: flags for ->rq_flags - * @resid: optional residual length + * @args: Optional args. See struct definition for field descriptions * * Returns the scsi_cmnd result field if a command was executed, or a negative * Linux error code if we didn't get that far. */ -int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, - int data_direction, void *buffer, unsigned bufflen, - unsigned char *sense, struct scsi_sense_hdr *sshdr, - int timeout, int retries, blk_opf_t flags, - req_flags_t rq_flags, int *resid) +int __scsi_execute_cmd(struct scsi_device *sdev, const unsigned char *cmd, + blk_opf_t opf, void *buffer, unsigned int bufflen, + int timeout, int retries, + const struct scsi_exec_args *args) { struct request *req; struct scsi_cmnd *scmd; int ret; - req = scsi_alloc_request(sdev->request_queue, - data_direction == DMA_TO_DEVICE ? - REQ_OP_DRV_OUT : REQ_OP_DRV_IN, - rq_flags & RQF_PM ? BLK_MQ_REQ_PM : 0); + req = scsi_alloc_request(sdev->request_queue, opf, + args ? args->req_flags : 0); if (IS_ERR(req)) return PTR_ERR(req); @@ -232,8 +224,6 @@ int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, memcpy(scmd->cmnd, cmd, scmd->cmd_len); scmd->allowed = retries; req->timeout = timeout; - req->cmd_flags |= flags; - req->rq_flags |= rq_flags | RQF_QUIET; /* * head injection *required* here otherwise quiesce won't work @@ -249,20 +239,24 @@ int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, if (unlikely(scmd->resid_len > 0 && scmd->resid_len <= bufflen)) memset(buffer + bufflen - scmd->resid_len, 0, scmd->resid_len); - if (resid) - *resid = scmd->resid_len; - if (sense && scmd->sense_len) - memcpy(sense, scmd->sense_buffer, SCSI_SENSE_BUFFERSIZE); - if (sshdr) - scsi_normalize_sense(scmd->sense_buffer, scmd->sense_len, - sshdr); + if (args) { + if (args->resid) + *args->resid = scmd->resid_len; + if (args->sense && scmd->sense_len) + memcpy(args->sense, scmd->sense_buffer, + SCSI_SENSE_BUFFERSIZE); + if (args->sshdr) + scsi_normalize_sense(scmd->sense_buffer, + scmd->sense_len, args->sshdr); + } + ret = scmd->result; out: blk_mq_free_request(req); return ret; } -EXPORT_SYMBOL(__scsi_execute); +EXPORT_SYMBOL(__scsi_execute_cmd); /* * Wake up the error handler if necessary. Avoid as follows that the error diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 24bdbf7999ab..578f344e330d 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -454,28 +454,61 @@ extern const char *scsi_device_state_name(enum scsi_device_state); extern int scsi_is_sdev_device(const struct device *); extern int scsi_is_target_device(const struct device *); extern void scsi_sanitize_inquiry_string(unsigned char *s, int len); -extern int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, - int data_direction, void *buffer, unsigned bufflen, - unsigned char *sense, struct scsi_sense_hdr *sshdr, - int timeout, int retries, blk_opf_t flags, - req_flags_t rq_flags, int *resid); + +/* Optional arguments to __scsi_execute_cmd */ +struct scsi_exec_args { + unsigned char *sense; /* sense buffer */ + unsigned int sense_len; /* sense buffer len */ + struct scsi_sense_hdr *sshdr; /* decoded sense header */ + blk_mq_req_flags_t req_flags; /* BLK_MQ_REQ flags */ + int *resid; /* residual length */ +}; + +int __scsi_execute_cmd(struct scsi_device *sdev, const unsigned char *cmd, + blk_opf_t opf, void *buffer, unsigned int bufflen, + int timeout, int retries, + const struct scsi_exec_args *args); + /* Make sure any sense buffer is the correct size. */ -#define scsi_execute(sdev, cmd, data_direction, buffer, bufflen, sense, \ - sshdr, timeout, retries, flags, rq_flags, resid) \ +#define scsi_execute_cmd(sdev, cmd, opf, buffer, bufflen, timeout, \ + retries, args) \ ({ \ - BUILD_BUG_ON((sense) != NULL && \ - sizeof(sense) != SCSI_SENSE_BUFFERSIZE); \ - __scsi_execute(sdev, cmd, data_direction, buffer, bufflen, \ - sense, sshdr, timeout, retries, flags, rq_flags, \ - resid); \ + BUILD_BUG_ON(args.sense && \ + args.sense_len != SCSI_SENSE_BUFFERSIZE); \ + __scsi_execute_cmd(sdev, cmd, opf, buffer, bufflen, timeout, \ + retries, &args); \ }) + +/* Make sure any sense buffer is the correct size. */ +#define scsi_execute(_sdev, _cmd, _data_dir, _buffer, _bufflen, _sense, \ + _sshdr, _timeout, _retries, _flags, _rq_flags, \ + _resid) \ +({ \ + BUILD_BUG_ON((_sense) != NULL && \ + sizeof(_sense) != SCSI_SENSE_BUFFERSIZE); \ + __scsi_execute_cmd(_sdev, _cmd, (_data_dir == DMA_TO_DEVICE ? \ + REQ_OP_DRV_OUT : REQ_OP_DRV_IN) | _flags, \ + _buffer, _bufflen, _timeout, _retries, \ + &((struct scsi_exec_args) { \ + .sense = _sense, \ + .sshdr = _sshdr, \ + .req_flags = _rq_flags & RQF_PM ? \ + BLK_MQ_REQ_PM : 0, \ + .resid = _resid, })); \ +}) + 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, int retries, int *resid) { - return scsi_execute(sdev, cmd, data_direction, buffer, - bufflen, NULL, sshdr, timeout, retries, 0, 0, resid); + return __scsi_execute_cmd(sdev, cmd, + data_direction == DMA_TO_DEVICE ? + REQ_OP_DRV_OUT : REQ_OP_DRV_IN, buffer, + bufflen, timeout, retries, + &(struct scsi_exec_args) { + .sshdr = sshdr, + .resid = resid }); } extern void sdev_disable_disk_events(struct scsi_device *sdev); extern void sdev_enable_disk_events(struct scsi_device *sdev); From patchwork Tue Nov 22 03:39:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 627858 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB986C433FE for ; Tue, 22 Nov 2022 03:45:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232224AbiKVDpN (ORCPT ); Mon, 21 Nov 2022 22:45:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232249AbiKVDo5 (ORCPT ); Mon, 21 Nov 2022 22:44:57 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9DE229379 for ; Mon, 21 Nov 2022 19:44:55 -0800 (PST) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM3ibSQ003442; Tue, 22 Nov 2022 03:44:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=324ORTN/8GrOjvXpqveCu0OkztnWCzd3KlMAkt/HlBw=; b=bWVNW2zGdAAtPhR4bc+JzHrHEjkHReDPFmrLr56bFaL+eLV1IXUwhTtqHtXyawRwrxMI eyuVNC+8fiLElQcErvq3hitEoCJp9HcnceKn6AXvfyLijNiKMEMH8GGOCk7QxMvDm/o3 BKLsa+YYNnj3Utxd5aERuBXHsOjrjZ26EN04o5+1QqLBPmnr5z6nBcSdV25yMqgWOQhw LCuZm1umpMR3Gi0EmHoduy89e7esEipcLERnkuuzXuuXErxJI+x6rxi0+beiQdAQ49s+ svWwq3T0FLYsbhd1uIEPFDs4hvlHu+3EJnP6GJCQTYfnhqQkgAHzJxIQxa8h97eiZoLz aQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m0pf2r1e6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:44:44 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM3ZkVC039550; Tue, 22 Nov 2022 03:40:32 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2177.outbound.protection.outlook.com [104.47.59.177]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnkb0yd9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ThWMM2Zw94oDlPpAVnNqSbC2NrOzPiFnZjYf1iMK2LR3DQ98eu82quoUDUGmfJSrWxMXlLRehlKTkNwLsqnFhOXrtDpspzOzZ02kckxScRqpUk0fVaODZsEjgi9H/cg+uNdrOkMJrgb2OXclbdzmOu+ODwlCiWc3gyDmlEsSKFKFCad+/wQLFB3K0Mk4LQULNe5H9LH8hPoqMS0R2hE1Iuujx3VUqsCTDQdy0oYSbBCzs0JRbNSezzx5NrrGmYIbKq2CE2Fe+jyd7glCkTIPqNPtQYvGjpzteqr/W00wGlrD1FE//8x+WgQ+DMqnRcBVtOV2pzKMcuyuFUsZ8G4BEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=324ORTN/8GrOjvXpqveCu0OkztnWCzd3KlMAkt/HlBw=; b=XpfCIoA+Ir0lMzwcIFRmce8plZPhoars5S0YlIM/DHmipAVf1x87gMf46EFk/ykWeIzMgqeJFB8ha81QfDNqnhYPgMsTBBzN9d20WlxUS26ZZx+Ww9kTcruLPyP32QQN4E8oprzDjBIsofLKd/o+wNMIKa+J5h/C7gReAwR81OTFmlKAynXhmypYq3OVFYp6FpbP7JSKlkaKM4UK1Dvi4uYmnrwmVvGjs3apJZvvTrZvx+U5UVONbhi+mVgd0fGzGSSrThwPZb1ck88bQu1vtlN1OaUAQmCswxhONZy37yxodR8KAiG2IxX1wUn+OULHF0KE59u0oQu5KgFYhBn/qw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=324ORTN/8GrOjvXpqveCu0OkztnWCzd3KlMAkt/HlBw=; b=ISdmzqk/i69DF0y+m4iyoYUrnWTXW1OlS4AUoaGH56AtJg7lZRHEHbc4VRElrqW2OLwW0D18ew9PD6Z4hKSa7yiIZSEanKCEq7pdIrDUTT27gqmP3CLMPYphvFlktLEsvTlc7FgsfoSYP8uCzcwRs3WWrVbeBo60/ACcdH7xZGc= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:30 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:28 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 02/15] scsi: libata: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:21 -0600 Message-Id: <20221122033934.33797-3-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH0PR04CA0108.namprd04.prod.outlook.com (2603:10b6:610:75::23) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: 767b97cd-88d9-4c27-914d-08dacc3b4c8c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bKAQMNIR9oPCQcjTUPFIBIOY9Gw37P/WNg5aXss1fPkY45xahigqADI7OaCO49Z7He3Iw7ggRFSSQ3eGnbNLeKe1CNS3fgPYdevvvrpsEiEdrEmIyXY6nCWgxr4eC0UFzQu0Zi5VFgBPZMNf4TRXhZ4HxOXPNaONOgf4B9TDZwhmDoomwhwwzGTr8aAWB3rcoOYjE3XAdZKT6NMFqD/TzZZdPJBlvPZvvKvzqpEH5LZBRGFPHgXKTnpLo49uaIsvJZbF9xCGbaR+Ex7FnF91fP0hVLNp42CnWbzSk+p++SUnDihQfUd7dtPC9JR82wG77aMO5UvEnLxbSIkfEfSgoKS+J4qBwN5aNTwwjPHA/Daym0r5s3dg8HUCGo3paDOl464Mg3DhtnvIGStCR6WnMWo0Ir1nqZzM4Dj4Q4GbtqKkk5UNgbn5dQYBAGnuCRA9K4lIF91vmR1gXh4F65WXs01A7Dmvonh2cwuIFuGvqUVvppFNy6WQYV/kElCf7x49s+NCMYn83+1KnhKKLQK7fZzsK9pSr1lF4hBRZ0N2PVfrex4iNEfgB4VC19MnB5E5R74EmFzTGzIxeqXSsJkkbarxt2nMaWJZtMVxvJxRK2GeSH7zigaPx/VJ9FhqC58nHMPPEaknP8BXkIV7vRGIxA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-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He70Amg0xMroOFo+1B3wZBHra48tNbjWUPjvs2dSX6Z/305BYe43SaAnLXPj09kdLpPAZ5AVv67VdZpGWVmkr9Ihb+Or1dvs7DKF0lpOQOyG+IwUhS3lH1A5SSnn6GD4Hon4nMTU8YEVyVJG7ohd4ak+Etaug6jCrfkUdotO5Ms+oKWQXoejRiCyx/MU1UYURZ399nat7BXlPIsOxFHnlIaiFXbe5yhFAHeyepIPTZqHMrlmEMhO/QM67WXmGUpcg3dUBf0jwf1FnCU6tKkT511Y7LmhnnKjXmTfDZQ57dw7JZ5Z640cH7asaAKV+KVg7pGPq3rruR/Solc9RIaILOTGskETCN60h2tAVCK+z/kVI/WeHH36SsXm8/hNZvOQCVDwkkm1LWx+1nZMliS+37IVyFk+cE8t4phk3OamoI0uH4LG06rUYv5uzgejMnm/OatkPrN0/xaQ/itR2ANhwFKhdkX5g8N+QRYOiOhApWnSGh/356nNqcK51tGv+QgANNNUoOMP+OUrKAaj3t7pu6lRZGvGcGOGWBnSgbKeQjCNPy86HllKUSf2MkQJ1EZfktdQiIPf1tPqsa/3OA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: TXVB/2xV0BsBp74aRK4iEmlWWAcAymJmkae8ygPq6JSg+cldykLhsbY0Fpos73xe/YK5Y4AUEZ0lGMLBRWYBbC0jtprCizE1cSiirWi7h/KXjb8p7e+zES9x+qB2dkJTDm3F6FaoMV5m0oLDIVKtKR/EZHW6EkLbuZD1f9PiiDd/ja8IdPB8euSzdjJCjFh8CLdE72DTQdDz8ePWpeWQKWCxnAreePMO/WBEwe4h7nW5DI4tQsk6CC/8DXrSXr/12Ry/O/UkIADJIBDmryp9GUOvT8VPtwlZQx27zUBseqZBcXe8XCnFXScBNcx+Ptj9SKizeTWEvdhDCXSsJ3a+K5ttVQy7kqoIBoJHP5/CuQnu9pR45RNXX69wjSMPZl40WjfQzGjAToT8rR0EJ4k433SslTJCArooTeYspuiPgsDpEek76ZyYcjLT+hqRNkuttZCV/z9tnOV/gpRsaZc8nOD1NYrY7yRLa9xy9vHQDT8tY7m9n5wamAjtejTcdQUZidsE/LKy3Gl6Zjlil/7rw6nMPk3zv3DgCVPTILcVgS84hkx52IS7S5rCLwXtyI+sBAWuuQJ1nB3Jkmys3tczwl2uLO5pl5MwLikyTGDtnWjwHitEhrNmj5c+tHrf8AOeXdRlLb/ejjJa3lT8/xRq5w47BhQhAHoRZyspksVh5pm55FJAiEsDaKYsNP1pu6Jv4kn8x8ly6J2qDbMzCW+KT8SZe+M9q2JqAIbInHZzZlpLD56DkcZaGlAl6aKBjN5FsNMj7rgsjPbnrOm22yT9xaC4TcFY15BQaNuTu+LPPHj3YFr1BgHUjisWaBJyeeq/OVYi0EUrLNXWaxJonzzY5M6D63t3VOUnobgpzoeSHHMknZ9ubGD2HVInNLBSp77D X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 767b97cd-88d9-4c27-914d-08dacc3b4c8c X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:28.6701 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: phJwKtJLX9nfI7EGt0FxgJVvp+yCMlvuUOQ5F0vwhfJZ3BNk2sQ6b9ch9sjnvm79odpN+IefCqgXe7Sv0Bmg43P/+bBQx++VpWEDMZ1qezI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-ORIG-GUID: FH7bp6yHj5H10Irp4v5KZC3_4361h9ag X-Proofpoint-GUID: FH7bp6yHj5H10Irp4v5KZC3_4361h9ag Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute_req is going to be removed. Convert libata to scsi_execute_cmd. Signed-off-by: Mike Christie --- drivers/ata/libata-scsi.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 06a3d95ed8f9..b4f3a2ce9d0f 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -367,7 +367,6 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg) u8 scsi_cmd[MAX_COMMAND_SIZE]; u8 args[4], *argbuf = NULL; int argsize = 0; - enum dma_data_direction data_dir; struct scsi_sense_hdr sshdr; int cmd_result; @@ -391,11 +390,9 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg) scsi_cmd[1] = (4 << 1); /* PIO Data-in */ scsi_cmd[2] = 0x0e; /* no off.line or cc, read from dev, block count in sector count field */ - data_dir = DMA_FROM_DEVICE; } else { scsi_cmd[1] = (3 << 1); /* Non-data */ scsi_cmd[2] = 0x20; /* cc but no off.line or data xfer */ - data_dir = DMA_NONE; } scsi_cmd[0] = ATA_16; @@ -413,9 +410,12 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg) /* Good values for timeout and retries? Values below from scsi_ioctl_send_command() for default case... */ - cmd_result = scsi_execute(scsidev, scsi_cmd, data_dir, argbuf, argsize, - sensebuf, &sshdr, (10*HZ), 5, 0, 0, NULL); - + cmd_result = scsi_execute_cmd(scsidev, scsi_cmd, REQ_OP_DRV_IN, + argbuf, argsize, 10 * HZ, 5, + ((struct scsi_exec_args) { + .sense = sensebuf, + .sense_len = sizeof(sensebuf), + .sshdr = &sshdr, })); if (cmd_result < 0) { rc = cmd_result; goto error; @@ -497,9 +497,12 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg) /* Good values for timeout and retries? Values below from scsi_ioctl_send_command() for default case... */ - cmd_result = scsi_execute(scsidev, scsi_cmd, DMA_NONE, NULL, 0, - sensebuf, &sshdr, (10*HZ), 5, 0, 0, NULL); - + cmd_result = scsi_execute_cmd(scsidev, scsi_cmd, REQ_OP_DRV_IN, + NULL, 0, 10 * HZ, 5, + ((struct scsi_exec_args) { + .sense = sensebuf, + .sense_len = sizeof(sensebuf), + .sshdr = &sshdr })); if (cmd_result < 0) { rc = cmd_result; goto error; From patchwork Tue Nov 22 03:39:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 628200 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9CFFC433FE for ; Tue, 22 Nov 2022 03:40:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232154AbiKVDkr (ORCPT ); Mon, 21 Nov 2022 22:40:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232157AbiKVDkp (ORCPT ); Mon, 21 Nov 2022 22:40:45 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38F6F27DCB for ; Mon, 21 Nov 2022 19:40:44 -0800 (PST) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM2LTfh003182; Tue, 22 Nov 2022 03:40:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=o96c9B1ORIi5xeS+vGH5gIYW7/shNAE7U5CfPs7wBDE=; b=poQlJ6UJ/kKLwDYaWASbzOYRt+BIrx5UffkRs1joLHZvbSr9mGyOH5WkxhRxtmlwJj4D 2ZfBuJWJEWeOyk0YPvZuM308lj/fHHAh65YcKgjt0s6TnO/PgLZ4No/NavnhM2VaKir+ IDs0nBkBGeiAsG1bFGIx2qAaCxUa+I1mv0Lc1BPvoUwUu9FWjxsyQ0RzyEK1ndVi24r+ 1ABbkVEqzgtcqpK9g+iAdHRJaNIYptepdwvOE8MFwXahBw1j3Ls6D8sEzbyE1sHqmv6g yHBREObtoBKI5ra9aLHz6LugOrwsAZmR7upvez4tj9yHzrNIVHqB6LYGcnkNIR0apNoX Tw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m0gas0xya-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:33 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM3ZkVD039550; Tue, 22 Nov 2022 03:40:32 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2177.outbound.protection.outlook.com [104.47.59.177]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnkb0yd9-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zh7HEFNna+6OdpjxTOrXvyCYpkNgwv0iauEzdIBmBJN4OYIap33rEpFXDyo6pTfaosr225kxLw+r7w9K5yg77sapx8x85ZHkxvl6IhRb3GNEo0+ogE9cdhuoi09dyvy2KtNV1NHAnkZnrh5kVq+DccE5p4ZH8uDNSMrqsyu0LoZKyhB8ctwhGOT3EcYiypTpydcGOLauM3PT/5RlaSLlw3LOFm/a/KrN8QlFbSTqysUMs5CpiuGO3CZa4NPYZoeqvbH5G3oALiBnf2gZXR/jioTAM6WZ5VuuK/y58LEk2/Lm4Gpdiw6rcAARH6CMv4XbcPruee6vF8hjXaXI1HEelA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=o96c9B1ORIi5xeS+vGH5gIYW7/shNAE7U5CfPs7wBDE=; b=ThQKVjPrhThRKEq02YPQaIh3b5nwrKJRaEEfNWDAsbesXBjs9ZBhcMQQg5kmx1vbkmwI4/ZfARhhYlGn4zd5ViPCZDvOMjfvTomTdPEIv5AV81Q4M+5J/3bpvtDw34YDvz+GiAf5Adpn142XL+/ILqKn3WQNos0r/+ZFifPHCMNnebkptcAUJK5vfeoAWjAhsFc2uj2JDAnv3VAcXOSPvTwrIZ87U3coziIlk8Zk/a5+UJSVROpKDvPEdiW/xa+DYqJcZsDlLGn83Mk4iCm4sIf4PtmchcB6qVaoM/RaL5vu31jxQDbV0zIthke2STWvhmvHVMfPv0I7RDoQCM6lhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=o96c9B1ORIi5xeS+vGH5gIYW7/shNAE7U5CfPs7wBDE=; b=bmFe4NreaCFLYXBfy0sKPTH8vohdrZn9myWbEPXUuzrlIn/r9jefXdY/biFqW+m1sGpyMqViVzcfOrlg6nGyD27KrFPFrKOF+ZF0U7VgDucx8ncwW/08NkrrpMeeTDvsGu8rCvstEBgB9CGhYbi5j+abAcmF0NjNy01GfOZRIzc= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:30 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:30 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 03/15] hwmon: drivetemp: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:22 -0600 Message-Id: <20221122033934.33797-4-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH0PR03CA0415.namprd03.prod.outlook.com (2603:10b6:610:11b::26) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: 5ed68c79-ac60-47e4-5b24-08dacc3b4d5e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e/fQavs06H415GNEwMeBRNMNkFhNBsjbiczDW1ijchMeROONZMl4BktCyIZp1DCFZIzwIWcFNb1Eb0TNOTYYeQvvSHM5bdd3t4IXFP9U2R1D21ocubkXOEzV6ENgpF60UPbXdhSilUB+Y7aY2c8Vb7tKp2C9Vvahbcj4nYe6ZvjMEPRScClU0Cs1FZESkbbUNEiHBVmm8jT8XUilCieb61KgXazhURsV5zUzHdwJZs8oUjkYxsuNF/lTty4Hrn3aR3V15Ygp6CyQ/cXWvt9matxWJV3En0cmd6joHj7wLqzb+EU7LvTbj9f20xtNH6M2znaui0lq4XCvEwfU5X9vmsEd8wwPZ0JT6gqZpeoYdlKV15q0Jo2m8TEmHyR6JyEIHI0TSWS0qzm4DceZuKcTq+jvVif3nqxNtlBQYnSQQrhKHzhD/UDXdY1fQunLNbX3GC4fcWPaH2xaeUtHXhOeQaOI3H9DZNdH3Fimb85FlMIVPNPgNpCUVNb5x8TYPcz7NO7/PZvNxHyQUdNLSLZ/DgE13ccdL1uFQprI8xJUYtHnMNa/a2Hz/hemUMO6WgQ6nzVj7M20bYkYNrF50UM7Ka+Eqw6aX4qjNiS2vcQ+Ah5cnJ1Ml0L+ryzdjG2qFjcDEE75uYdhrAxVkqzx7YgJ/A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: swfLKfaPB1lp8H2ssAVE9hMnqaaBoGL2hOs1zKx1sRKVEQ6SP6KudKGPKyB1EwZZTC5tcqseuJnPEVkKNpeGlKJ6+EgfKbTswpLpQSYTzN/SZ1NR3rsx8UL29i6NkUn6dluvEF0JqRp99hGL1BpYYjG1wHEtgZYqu0R4H44X30KWsGLaykNhnDA/Bm4kFHYYJeQlUNI1idYO6bgLWrK96E74YQcuC585jozFbnM9SjzOshy5BNeZQm119qbk7WyBbm/NoCoycX+boU56JyVGbCrtw9x2nzooft1mPhcwdjZxB3tMd6CMrgDjgmQV7StyjC5UZXfJJ50Dm0y7ENrfWjEzzXQD5BZByMgpwLK6Z9dewtmNHYANG/Sewnf5CtE5PJnfy2L5sw0+jmLP+/C3wOeuyJQpAGH01hHvGZIf0OdVpH6Ag/4deX3sMbbVfaMwRZHZE18+vBJoN5kE/zqazj7xs+/a3Cgvk2UvxspbrWVichNkVKKMSp5Qy4n//eK/Y4Z4S/oH/oI4l3rXqnUDnyUOC7Xpp0sfXsbGmpWffcGINGhho7hiZeZ/kZRAgMkwlqk9n3HKH3O3jgYn9GpP/hWsu4Lxd16TBp2cuGdC5ojnZBJ+L31G1eqBXAIb5ez7/q58kf8lH9KuOagHU6PNCWF3gGIpNyITWqnimam6DSs6jbANUyXdJCZG6EF4sWLbRxmpLhcQCpGJw/gGRiRKsuwO439f6Z3QEt0FFTCiqeXaDHOR8FRlE0i4g00rGjBsRg/LaVq0Vcoj/rXzlyOcZGqRmDuTsuhLNgZK8pGHwWHB7LeSW2b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/E0ayIzRE2nTnbMVdCUNSOLfwwR3NjXYpB/9J/1TWyKdH4Y/ZBwsK+eZghzH/BL5kgYAodu8hsYSqAf/jklSkLlqzJ/nhUq6/ZZnnUkhzYtQWK0zLuWZRcNAhngcizZKgwC7fOxFluIEIHPltUSk7mWuTxEurkUXURFUaqStLUhk5a9gQVh0jts6tMbZZa4QrY+7S4171CXp/LAi2vlf1c+dbmE/N2pqOnb39BSaOsfTPRw4qfw5HShj9WuY5eAZ3E89US2z/B9dKTPiTT4YBNyDpQ9oOBqSB0riV8cvq/mzcZRizovPmjCtilYvfTlFjcEyaTA0aCPI0mDsxDq2BBd0hSVjcIcCXnCCXfoA+s+MtneC7t1orD5xuiZI3R+pj79z+iB1j+4ilOKF0JQjzyNj7afi1cltjn/hcbI6AFkq/uNoCHIew+kKQOvEaaWlzXAnjoNYhfS+qpSvaa4QP1HCTvFMv9RkaaMpsOiifEoQnCA8d10346+z4OzCOVRbFqH7DxrRXcezOWS3C5hJiv8/wI7LDXtPJ8/Mn35BAq+dG4Xbo1kTAiI9wN/SSBPwyAPDJCALaGqNnuzoAobVoY2uXBlFpVDSjhl+bxnLWTSGKDx0YVwz9t/4cuZrcimqt9Gnv5AQYB7EJrSRPUBfOx5h27J/xtBYN7MvsAvdrZuuN6qwkZdqVNTuxn0diTyJDu X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ed68c79-ac60-47e4-5b24-08dacc3b4d5e X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:30.0450 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vqN33OC/iYZrz7kor417fDghwEKweylrmnBnF+tV0Scf61H11oTGCaD3slNaFeliGq0nV45SKtbRZwcmqgBhnKxSOeMgFxvbeoN9Rlidaa0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-GUID: ublkMOss7RqlGK33P12PWr32TBXMhbql X-Proofpoint-ORIG-GUID: ublkMOss7RqlGK33P12PWr32TBXMhbql Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute_req is going to be removed. Convert drivetemp to scsi_execute_cmd. Signed-off-by: Mike Christie --- drivers/hwmon/drivetemp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/hwmon/drivetemp.c b/drivers/hwmon/drivetemp.c index 5bac2b0fc7bb..015a16d6b007 100644 --- a/drivers/hwmon/drivetemp.c +++ b/drivers/hwmon/drivetemp.c @@ -164,7 +164,7 @@ static int drivetemp_scsi_command(struct drivetemp_data *st, u8 lba_low, u8 lba_mid, u8 lba_high) { u8 scsi_cmd[MAX_COMMAND_SIZE]; - int data_dir; + enum req_op op; memset(scsi_cmd, 0, sizeof(scsi_cmd)); scsi_cmd[0] = ATA_16; @@ -175,7 +175,7 @@ static int drivetemp_scsi_command(struct drivetemp_data *st, * field. */ scsi_cmd[2] = 0x06; - data_dir = DMA_TO_DEVICE; + op = REQ_OP_DRV_OUT; } else { scsi_cmd[1] = (4 << 1); /* PIO Data-in */ /* @@ -183,7 +183,7 @@ static int drivetemp_scsi_command(struct drivetemp_data *st, * field. */ scsi_cmd[2] = 0x0e; - data_dir = DMA_FROM_DEVICE; + op = REQ_OP_DRV_IN; } scsi_cmd[4] = feature; scsi_cmd[6] = 1; /* 1 sector */ @@ -192,9 +192,8 @@ static int drivetemp_scsi_command(struct drivetemp_data *st, scsi_cmd[12] = lba_high; scsi_cmd[14] = ata_command; - return scsi_execute_req(st->sdev, scsi_cmd, data_dir, - st->smartdata, ATA_SECT_SIZE, NULL, HZ, 5, - NULL); + return __scsi_execute_cmd(st->sdev, scsi_cmd, op, st->smartdata, + ATA_SECT_SIZE, HZ, 5, NULL); } static int drivetemp_ata_command(struct drivetemp_data *st, u8 feature, From patchwork Tue Nov 22 03:39:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 628193 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F75CC433FE for ; Tue, 22 Nov 2022 03:47:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232241AbiKVDrD (ORCPT ); Mon, 21 Nov 2022 22:47:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbiKVDrC (ORCPT ); Mon, 21 Nov 2022 22:47:02 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DD3B27FF5 for ; Mon, 21 Nov 2022 19:47:01 -0800 (PST) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM3ibST003442; Tue, 22 Nov 2022 03:44:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=6aL55xrb3H0h1ElkbYyB/ze25mqKHKH49HREymFfPWE=; b=hUCbYtEBJx5wX2Zv7tDTIdKlIv3PHCAxPXbrluhXDHFApUQgZbcbMrDXPQNoZOA6uAdV pKCr6DfPtlf1RPbQ3+ysGWABXOf3C7z4J9KoM57CxPwTLBl+UwQ+ryNC/fVPUkXHEk9o PqVc6IhzOk37Q3s0PChrFtblGT7ZvNcyOobNdFCq78GhckV0AiuDNszzZOEMEMDIaBll C+ng6X/BCN9sdRIDefSTw3E5YA6+WUugVSeDqef4RgZWE1xiU9WJUORJ8jh/aZxunjny Ht5hFvKQ4ecRt1VjYvlUkpIamveK6Ph/BjiNKhb7yCYI9SvL2coQw/HBDt6Li2Km+HJZ dA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m0pf2r1e7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:44:45 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM3ZkVE039550; Tue, 22 Nov 2022 03:40:32 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2177.outbound.protection.outlook.com [104.47.59.177]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnkb0yd9-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CUIYHFnkzDhNFCIUhQmgzXlT7ZQ9vcyBDZLWqswGAcHPBkupyME9vP159grC9V4TMy3kWy2iWxYkRuQii+XIzWn8LtYM2awrgTtVMtK+TnHdmTQ4qGGLIJujXwydsoH1sSTsMXH9Ew4u6Emj9pDC2qG8Mjih5ArtWwNOz5kRWlieW0afB3s1QRHmDklMb2hjYAuXOeB/fhwAB26eFYWh1Oe91ODIV84HUSLqZ98sOlfJ69QBUncU85fMFKnPNrpUN/Lj5X0i8N4Vb6kHzLflyKzeumTOkuowy+D3bU2SxltiX7PSZ60LGeOLVQRtNc/RPtny2qyQYIicy6Kbqw/+vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6aL55xrb3H0h1ElkbYyB/ze25mqKHKH49HREymFfPWE=; b=Sdkn8+RZFzgkMB/Xk4akjo+uFxipBCsnCn9s7BVv5DnZS+0JLMIcg74oI9/BKemc6zle0oVCnDTx+Oq1C7iNy+PvCVZ/wIXARfOgLEAmIuogt2mBwA/UDqpoyNZpvthdtEI3d2nAB6MRV0cqE2hJx+JWqVwF5w3/eevVxBqAZxzBbnwu69OAf49sSjHVoW1fW0I8Pod89AINj7kKSIBx2hFQSgudNn5YpKElM37QMn94oBF/bkSNwzHQvpqQ+4fGVNKbJHPJOnKx5tL4+MiAfhQkbc3v7Z0FIYBizI3Vv5QRmFcdDm2TGsMX0mts06u5dFc/5FqZQeoBdFau/593lQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6aL55xrb3H0h1ElkbYyB/ze25mqKHKH49HREymFfPWE=; b=GWteF0xtbx3ldno5xnQOV63K8NKBy6cl3+bau8AJvNHcpnQ/tQ9tk/aYxH6JsrnfVYcM+eUz76HZccdiu1ECvu5pu+uQJDhwa/vRC3knGABF9y8bCduHNfNiK4sE/9LrLgcRJqqGsEnjG6JO01fJNVcfUHlGdqqy/BUmUpYDfwQ= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:31 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:31 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 04/15] scsi: ch: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:23 -0600 Message-Id: <20221122033934.33797-5-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH2PR10CA0019.namprd10.prod.outlook.com (2603:10b6:610:4c::29) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: 3c60a8d8-f18b-434b-8978-08dacc3b4e13 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sehBbDR0rKUSziGPW7b7kNfhKemf9HNpFbmGNFR5zABbggAHA489QZL7K42a+CQgU+8w6w4K3UeJRf+7UMqISdXQkuOfaxP1G0IlaTBuw8XAowW038MjAn/YMqem2X6m5yHtze3RRsZIS5tTCloTiixghUsj054btW9F65tqg6AgYIT1pc+xAVtEc+JIwc+QB9XpSe+Yiq06WIzq2bF14LilVhUKOK0waaKqy0/fVTurBz7p6pA+ORRo87B9ggaTpu5Lo0Pjc1Dj+Yh8XVUx/zOGdRG1nmozJFCm7+j420M44o5OnSpBhrMdypx3vtz14rUWcUHdxhKq1nr/6Ij5TlpMhJC+VX6Plwz4ohqU5wTibP/SZVC0G+R9iiK0WhiYrM0ew73tgIut91NGdd2Bss8dPJyPtWVTpPKNuGSpkQ71N5JXK75fOaXbZW81W3iSdQj7LTkfEskZ+kpYFm3IS8T0XLhKojhMeuhIo1tDOnga5gBi06mMBHl5t7sjfINCz/uqRJUW+pphQ/LaL4wCZxGnCFj+4e4J3KThL3Yk8aJkmyy2ugy7krTXKXfKakns7wgTH+t6GHW6Psiw9R3pWPaJhQY9AuXLj401ANCjvRYQNrtsmyFUop8Wl/+lqExja+gHYiqa5I7tdcv40AyKcQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eVBRIdpQWBlhdNjVnXDtC6IZyrpAlWSxCfUxPtpextJdzITwl0pXKNLOvKCY6kekSVDUs6gnn8vF9bYDNonxfc87WQrcsZINo448nc33gmg3pAG4j3h8IAMTZ0GGgt2renlqOmWbr3Q2fN/bCxx6c9lqEZ4BP4D7lAmeFttDGwS6owjxqT+E1W0muMSgleXCYF4GVZ++AUi8XI8udjsh2OZpaEe+5MaHyZCAKJlvyZC5j6iFEqXXo/AfhdJkbA8SA+2tah23jXYl8B/ecvFTaGmYg6S18rvv+oQIxb9wYDdiCIaDiHVzmPEYz8zsrOdDEaXMQ6AzMnKDeLMfPFcj61xFyuE1hjuQJKxjft8xtFN4pGO3eYo9td3cbL2R0YaNFUuu3l/ZEJSm9BVJadDm4mRKm/XoPNCid/9JIShgcLbAYBodWt0F5cQnz1UtzVf842g2OlqZd9AY64RIDABjDsM0+p+sBS0SPXqEWfLqPj2mTGEzxx6n+r4o61Z+yG56lFnR8yN8aCXSclnegED5qC8+GuiI5pUipeLlX83f4fZ8VdUowvbZW2+zFmp045+W1U/qxTQIWBa/99J/17CgO/sy6A59DChNFCjoJK6iB+vus3smgWYk95SvAJsYkqVr9g40gm4OJF4FD0lFQdszFXQUJLnW7C8ReyB2a0KAnRNA0NB4TJgouSd0AbdmVz9zItP/xHFmSmjOnK1czfFeUCdDN6oI8zPXqZMimukM4ddz5w2HIVc0ZPInjH6nPLbg11S+LSmu9js+iF5ow+VBSrTmy1ODON+Yx5yNRhKG1M5JTrsCInoekWaJ15ZAk7dW5gS66gCeFdYUCpdq8dKVUgLAcesMmYHQ60bwjDPBfcjlDxveX3OSNci3GZ3lENudQd6c1oqBgRrQvZnx95O/X3dSTLSZCi8LO3yA/LCRuyIYTayp107Udjdat7vpLgY7oBVS/bCxPskQR8KVfVDV+yvO65XG+DNQgJ74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ISU8NV7G9tQARw2+DBnTfsbRVaaGEcV89NYNFTstk42EHJQP2RJXS3ax7ppwWXoVdvV49SX7NEvc8yicjaU6QazXKIgQvoSQ7vjwFqLIx53YyshjTOvH+hZgBsTdYSPAroAaBsfQ5h9Ci1A7OWxXZA8zdNaW+fjDLYOrXMVGxrcb6ki5FOSdL70WYcbYN7dp5Yz4qK+ia41Rtgx9BjqA37NskGqa5/VQiF5CkbYE3j8HuJld24fGKUGsYXfsWMpEu60ZI3DfxYgpJzR/cdv4tpEL1r5fvtgtLHi+NvNV1hXcG4rV53P97B7RPtdnnrti5jlgyS/2/DlY4HmB+4zIrXg/zrcxzgpPJXNfdjZXkA3CZ7YGjfedxCjvr6FZmvSzectUQ2rIo//kkri1Nnu+NbaLATMbdv5ieliIqeEMeNmtf+42sFSqwFcVL7nEzu0UPqreVdOm4YFC+tY9/N1mnjJSPDTIztQT0tQW+F0Wz3XMAAxeM+Nj1Itb4hmYo8Y1g1W2NczzYh6WLn5UOQ+pr X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c60a8d8-f18b-434b-8978-08dacc3b4e13 X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:31.2323 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fj6EKL+DTWu9zF3L5ZKmwCd022cCtoNHdVQGJKQTE0PfLEnwVZc740ALa/umRfoTxMpTGcTZEh0CagMVOrk0JtK1Y7PE458hDcsfhTT+wuA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-ORIG-GUID: cq2JFVgU_UOr990KOlToUkbd9LN1be9K X-Proofpoint-GUID: cq2JFVgU_UOr990KOlToUkbd9LN1be9K Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute_req is going to be removed. Convert ch to scsi_execute_cmd. Signed-off-by: Mike Christie --- drivers/scsi/ch.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c index 7ab29eaec6f3..dedfa84476cd 100644 --- a/drivers/scsi/ch.c +++ b/drivers/scsi/ch.c @@ -184,8 +184,7 @@ static int ch_find_errno(struct scsi_sense_hdr *sshdr) static int ch_do_scsi(scsi_changer *ch, unsigned char *cmd, int cmd_len, - void *buffer, unsigned buflength, - enum dma_data_direction direction) + void *buffer, unsigned int buflength, enum req_op op) { int errno, retries = 0, timeout, result; struct scsi_sense_hdr sshdr; @@ -195,9 +194,9 @@ ch_do_scsi(scsi_changer *ch, unsigned char *cmd, int cmd_len, retry: errno = 0; - result = scsi_execute_req(ch->device, cmd, direction, buffer, - buflength, &sshdr, timeout * HZ, - MAX_RETRIES, NULL); + result = scsi_execute_cmd(ch->device, cmd, op, buffer, buflength, + timeout * HZ, MAX_RETRIES, + ((struct scsi_exec_args) { .sshdr = &sshdr })); if (result < 0) return result; if (scsi_sense_valid(&sshdr)) { @@ -254,7 +253,7 @@ ch_read_element_status(scsi_changer *ch, u_int elem, char *data) cmd[5] = 1; cmd[9] = 255; if (0 == (result = ch_do_scsi(ch, cmd, 12, - buffer, 256, DMA_FROM_DEVICE))) { + buffer, 256, REQ_OP_DRV_IN))) { if (((buffer[16] << 8) | buffer[17]) != elem) { DPRINTK("asked for element 0x%02x, got 0x%02x\n", elem,(buffer[16] << 8) | buffer[17]); @@ -284,7 +283,7 @@ ch_init_elem(scsi_changer *ch) memset(cmd,0,sizeof(cmd)); cmd[0] = INITIALIZE_ELEMENT_STATUS; cmd[1] = (ch->device->lun & 0x7) << 5; - err = ch_do_scsi(ch, cmd, 6, NULL, 0, DMA_NONE); + err = ch_do_scsi(ch, cmd, 6, NULL, 0, REQ_OP_DRV_IN); VPRINTK(KERN_INFO, "... finished\n"); return err; } @@ -306,10 +305,10 @@ ch_readconfig(scsi_changer *ch) cmd[1] = (ch->device->lun & 0x7) << 5; cmd[2] = 0x1d; cmd[4] = 255; - result = ch_do_scsi(ch, cmd, 10, buffer, 255, DMA_FROM_DEVICE); + result = ch_do_scsi(ch, cmd, 10, buffer, 255, REQ_OP_DRV_IN); if (0 != result) { cmd[1] |= (1<<3); - result = ch_do_scsi(ch, cmd, 10, buffer, 255, DMA_FROM_DEVICE); + result = ch_do_scsi(ch, cmd, 10, buffer, 255, REQ_OP_DRV_IN); } if (0 == result) { ch->firsts[CHET_MT] = @@ -434,7 +433,7 @@ ch_position(scsi_changer *ch, u_int trans, u_int elem, int rotate) cmd[4] = (elem >> 8) & 0xff; cmd[5] = elem & 0xff; cmd[8] = rotate ? 1 : 0; - return ch_do_scsi(ch, cmd, 10, NULL, 0, DMA_NONE); + return ch_do_scsi(ch, cmd, 10, NULL, 0, REQ_OP_DRV_IN); } static int @@ -455,7 +454,7 @@ ch_move(scsi_changer *ch, u_int trans, u_int src, u_int dest, int rotate) cmd[6] = (dest >> 8) & 0xff; cmd[7] = dest & 0xff; cmd[10] = rotate ? 1 : 0; - return ch_do_scsi(ch, cmd, 12, NULL,0, DMA_NONE); + return ch_do_scsi(ch, cmd, 12, NULL, 0, REQ_OP_DRV_IN); } static int @@ -481,7 +480,7 @@ ch_exchange(scsi_changer *ch, u_int trans, u_int src, cmd[9] = dest2 & 0xff; cmd[10] = (rotate1 ? 1 : 0) | (rotate2 ? 2 : 0); - return ch_do_scsi(ch, cmd, 12, NULL, 0, DMA_NONE); + return ch_do_scsi(ch, cmd, 12, NULL, 0, REQ_OP_DRV_IN); } static void @@ -531,7 +530,7 @@ ch_set_voltag(scsi_changer *ch, u_int elem, memcpy(buffer,tag,32); ch_check_voltag(buffer); - result = ch_do_scsi(ch, cmd, 12, buffer, 256, DMA_TO_DEVICE); + result = ch_do_scsi(ch, cmd, 12, buffer, 256, REQ_OP_DRV_OUT); kfree(buffer); return result; } @@ -799,8 +798,7 @@ static long ch_ioctl(struct file *file, ch_cmd[5] = 1; ch_cmd[9] = 255; - result = ch_do_scsi(ch, ch_cmd, 12, - buffer, 256, DMA_FROM_DEVICE); + result = ch_do_scsi(ch, ch_cmd, 12, buffer, 256, REQ_OP_DRV_IN); if (!result) { cge.cge_status = buffer[18]; cge.cge_flags = 0; From patchwork Tue Nov 22 03:39:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 627859 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E0ACC4332F for ; Tue, 22 Nov 2022 03:45:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232056AbiKVDpC (ORCPT ); Mon, 21 Nov 2022 22:45:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232341AbiKVDoz (ORCPT ); Mon, 21 Nov 2022 22:44:55 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 079F62A978 for ; Mon, 21 Nov 2022 19:44:45 -0800 (PST) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM3ibFW003436; Tue, 22 Nov 2022 03:44:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=iZxU36IhY3Q6/2e4NznL5mmB9lNdSO8dV2yigOhy95g=; b=T+Jur9WXgIe85NSOaHqaHRJl1em74UzqrLSyz9qE+cs+fpoJaI/NzUUX01h2JXwW8/BK UhKnkwl5v+/guraHaGQRmRLdCT0cmuiAWhVGyL5q+nTJyfQ9BBQ2f+Q9YCypAW0aFBvq HWwqXjMNHov0sbTJDjOta3+7sR1tLnisCEcxuHOhbusZg+xKiw0EgyM/o/Rz0FPIPhkF LxLJIu84RfR47/bTpwofj4yb4OzmSnP3khWoba/XoCbFBkKlAC0vYztSfYZ+n/qhDJDc VFKNM+cerAOrlXvnS7UFjP/xcKefrNw7YcMRfSl89dAnBUtI6zMRgo09oPN5tbaF22bw gQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m0pf2r1e8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:44:37 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM16U6f008302; Tue, 22 Nov 2022 03:40:35 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2173.outbound.protection.outlook.com [104.47.57.173]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnk47378-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MaWKphCy/7hKS66GupYX6ueAdGFfAz7Ft392PzStdU7UU7tC1202E4r1sAXASJ2XMe47H/OjCuyuDA7JYjbJR3sRksVgc0OGcPYuuvcvbskH0SymkmUYQTfPsaMEh91SE3hY/Q1XzXJAPwILDVAbVqGzM08NnI3WJOq0DpTw+Xg/YneTZD5pv1B9jVE69hnyFVPtdxJasOynrWHlx41wJPVMn5/NQSEoDzpWZzWH9tbmv/gLPPBmiIvH2j1GbE2argaDI4RSLD/1tDHX3bzxgxq+MhM2Z1gR7CWdkRG3WhBZzADO0idUeEmx0mDYtoyXSIdvk8pNuBiL2VC69SXeqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iZxU36IhY3Q6/2e4NznL5mmB9lNdSO8dV2yigOhy95g=; b=fuDuoF5d9xlLGoLzCMA514V/pwoQFRYwVhzr3zyIE4u2bpGwWrU48hZMzD+pq+dQN7bGEuiqAyDc/idhWvnvrtRxG7doDApp3iyFtyw1pAp40A2o+lon6SKCGnOIbGhRSAbBxaAroUHsAd60uqs2r/8QRdPsL7dRStqmyLMnVaQyYKnAOjW5tOo91jcbMuQj5zZFazPf+DQCFUg5hMBU/3VAWzfzd7NCRZ5E6PVTEOBY0ZEVUo1FW5nE3RgdN9FoHVfisEuLcpzjIScETNlw2SjFW4q+1PsemlggqMbHX4iFAyOQ1qzp7pJPbc5tKmR11nVfQ4Vp3c7lE4BDqzqqFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iZxU36IhY3Q6/2e4NznL5mmB9lNdSO8dV2yigOhy95g=; b=Y0Xnt5vjcTsm4djFH8XTXbvBKhz6Fm/iRrVlXChcFpBpKIiRXjMaYzFY29bpTapEWY4PFFvZjTkjio30IWv5ZpyuAFzNoNeIKTR/T4gwr+3To70ZFLw7Vw5x5H7t8Z/cuQda4OZPfPV88PSsxy93oSh0rs6Jo9CU6iGuTR+nrQY= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:33 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:32 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 05/15] scsi: scsi_dh: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:24 -0600 Message-Id: <20221122033934.33797-6-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH2PR14CA0028.namprd14.prod.outlook.com (2603:10b6:610:60::38) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: c17d2904-7c46-47fa-9ee7-08dacc3b4f12 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DGZwdnYmZGIX0uc5RisjpIhMoIBVWlZA2dd+DPrw97g+2tJBTinC7UfDgdwlK1zQz/rGDNf6uEfe6/3QwtOJ26EGcUPP+UgfHLrYGpybTmNJbe/t55ZNX7y/i9W/VPnaFt61RpSRi26EG75nmg20QFQrqSY1t4Z3w0LFUTvbeTDeUt6QiG41uCpdRCwhKxzYBZCZ+8KyiI0sApNYa5pIFs5PpxbrmhqhyEXUQqdvwXZ6S5Vpb5KiodgqOdXX7do2M63RJZnh73vPMLrysg42u90wzHlrZtfEF5Otli121wq6ivFCWiNcvZ6qDtOuiY3g9kwL+p1Ds0omuxNxXQjIxmBtb1zdPsrTKg47d9sSrffVh2eboORXFKbRdjHs8wZLNacnwdAx/Xv5FLmDixneRrwr9LDqQcorAr9u20W5I6jqizefxMG46l7TtGAbTNT0pPyQ2WEOzCTduVpj2MkOnH4jl8IeaG6u4dtc2Wm0bRi/h3q+G31bwgwKSMbVadDMoVYLntGKhuO1oKbK8ndEJfi8V/hX1/2djkt9c94ewnZdWUi3yEmncyy/9rOGjxicwU9dSS7Capmw+bTYR3Ui5dTgtXERV8b8gN15Ab19W07kqy1S9egEnoEZdvIUpRecL1Fy2oitfPFLwHRdnIvWrg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OOSLD1WCN235OQlzO1WURjH61whlG7kcF7iKeiRwqODZkwsrgRq8PDVVvuIfh1TA4A7/FI6z72dk3uDrB7HTzx61DXJuma9DevIlEDcH+6ZhTpF9I1k+rrwCrO25jbgNHUXCr2f8pz9FBknsHpii6VofwiuNCF5gRC0B/Q0nQtfjDJmfQmD3KlsccgkIccq9yDx4VFwt0rzQ6bavjYzTvddHYozQMa5jdksucNifavtvTgx4Im1w2+NNg8MeKkGIjkOPxOh/y8Z2xdd6KKjwXtL2a5YOsslwtxUZJvyg76xg2+Tfb7DbmXQlsvmW/Qy9I/JHUSmcuPjr6kiAnvbhnKNo774Z7h82QpnAr7G5QkNL6Tm4CsF8Zls/SiPI4nb/Oa0QL7QEp5pxTAxMF0MU3OfTYww/ejUA7YvfMPk/Fl6+kYeNWGTd9K28Y9Qc9nVpk3NyeGVQ6Z6L2qnVmdslhpLGfR5Tncjd55MzqyEcWfMSj5AQ5EEkQISzCJZzoH5DiCTcCF9QPQvBMfsgas61+YVd052jBpeVqFRHlLNUUtHsPXovPh/MarnO73/FPPBG9lvrNPP9kzK9b76GPC5HRHkItqQ1vywaqYotbL17pSzmYa7T8y1qRd+pRfOolX7DNU1QLES7OpplawwtCzTkPpilbLare6Aidu9W3pb188niU+VC+zYjdWzO/8m0aWnw7Wy8zOw8WyPQnJ9BMsELG+0+aT1OhLeLY2zMG0E9yTTiftFB7XacHyOYLPsEfzam3hsZZDDAnFNSmGVJF8z9f0NdS37u9gcK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wrlLZz+ZondUHoVWd6bjoY4V51scT+KDctuCK105feYg26cVtHarf07+qpjAxk2VpXX4qhxsXbng63i7JwgL1vsggWKjNsl4Q0ncbFUHNB5vTHaogkl8oP0JISIPYrut+EalFvRUIN4xJpGw11JTpGitIb/ZsjQZJBI7JmsELQYjO8JQArk2OKsa73AiVIaKGU1Aysnrg8VWO92zFg490+LVGItXqufCwJAR62aq9Hp4a1tf/F1jXRLPI0i5T8xlmyn/Njjvukyb4SWr7sbv20bDMSR9jhtgpKoxi1rAhLtPd9QgTBq1rKrOSgJTUcQBEWIfsK3VW01FrfLs7oDt5wygbN887ZRpio4RgpLs5TbMzXPUXnHDV4Ve3Jyj2X5kpZ8HGNtdxBa9VtoO/NkiTq5qCArAF/NSaqEKBRTJeQ0BvMah3o7Ji1QQt5ImDxQ1gPssB/uQcRDttygFr7fB2u4n3q0dDl34+7OUnNpo9DStENhmLAZpIzmf6lDnewRNtxeTaiGi7he9GfcXdWBk7y6GTZda9z/mKQd9Ri3O2sW2RtYVlDFWQUFHx7i5d9f3jcjY730brfyPHnCWxAqI0pyfYjayCcwVg4mcXw7y/iaMA8NyGuDGlZN1ffmWp0g/SVYyxCfBB0Ziz4vGnxUcAKog+B5l8mfTpUgLriUpc80cKuS0HKrUhZ82LahHuhJYeJ8eKmJZ4l X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c17d2904-7c46-47fa-9ee7-08dacc3b4f12 X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:32.8728 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iYNbnZ18nfJA2MdnIg7o33QjZVa2Es2BK4UQq9XHHnGTJP0OUCtjSXmntwbELJmBXbHImz+RGhklNaIjLvprB0QG6nkIBR4nrPtasfZOAYM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 suspectscore=0 bulkscore=0 mlxscore=0 spamscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-ORIG-GUID: gVQN23Ae6Tey0PEdIcMg89zpfvf83djr X-Proofpoint-GUID: gVQN23Ae6Tey0PEdIcMg89zpfvf83djr Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute is going to be removed. Convert the scsi_dh users to scsi_execute_cmd. Signed-off-by: Mike Christie --- drivers/scsi/device_handler/scsi_dh_alua.c | 22 +++++++++++---------- drivers/scsi/device_handler/scsi_dh_emc.c | 10 +++++----- drivers/scsi/device_handler/scsi_dh_hp_sw.c | 18 +++++++++-------- drivers/scsi/device_handler/scsi_dh_rdac.c | 12 ++++++----- 4 files changed, 34 insertions(+), 28 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 693cd827e138..0a595275eea4 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -127,8 +127,8 @@ static int submit_rtpg(struct scsi_device *sdev, unsigned char *buff, int bufflen, struct scsi_sense_hdr *sshdr, int flags) { u8 cdb[MAX_COMMAND_SIZE]; - blk_opf_t req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | - REQ_FAILFAST_DRIVER; + blk_opf_t opf = REQ_OP_DRV_IN | REQ_FAILFAST_DEV | + REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER; /* Prepare the command. */ memset(cdb, 0x0, MAX_COMMAND_SIZE); @@ -139,9 +139,10 @@ static int submit_rtpg(struct scsi_device *sdev, unsigned char *buff, cdb[1] = MI_REPORT_TARGET_PGS; put_unaligned_be32(bufflen, &cdb[6]); - return scsi_execute(sdev, cdb, DMA_FROM_DEVICE, buff, bufflen, NULL, - sshdr, ALUA_FAILOVER_TIMEOUT * HZ, - ALUA_FAILOVER_RETRIES, req_flags, 0, NULL); + return scsi_execute_cmd(sdev, cdb, opf, buff, bufflen, + ALUA_FAILOVER_TIMEOUT * HZ, + ALUA_FAILOVER_RETRIES, + ((struct scsi_exec_args) { .sshdr = sshdr })); } /* @@ -157,8 +158,8 @@ static int submit_stpg(struct scsi_device *sdev, int group_id, u8 cdb[MAX_COMMAND_SIZE]; unsigned char stpg_data[8]; int stpg_len = 8; - blk_opf_t req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | - REQ_FAILFAST_DRIVER; + blk_opf_t opf = REQ_OP_DRV_OUT | REQ_FAILFAST_DEV | + REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER; /* Prepare the data buffer */ memset(stpg_data, 0, stpg_len); @@ -171,9 +172,10 @@ static int submit_stpg(struct scsi_device *sdev, int group_id, cdb[1] = MO_SET_TARGET_PGS; put_unaligned_be32(stpg_len, &cdb[6]); - return scsi_execute(sdev, cdb, DMA_TO_DEVICE, stpg_data, stpg_len, NULL, - sshdr, ALUA_FAILOVER_TIMEOUT * HZ, - ALUA_FAILOVER_RETRIES, req_flags, 0, NULL); + return scsi_execute_cmd(sdev, cdb, opf, stpg_data, + stpg_len, ALUA_FAILOVER_TIMEOUT * HZ, + ALUA_FAILOVER_RETRIES, + ((struct scsi_exec_args) { .sshdr = sshdr })); } static struct alua_port_group *alua_find_get_pg(char *id_str, size_t id_size, diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c index 2e21ab447873..7da4c5ceab89 100644 --- a/drivers/scsi/device_handler/scsi_dh_emc.c +++ b/drivers/scsi/device_handler/scsi_dh_emc.c @@ -239,8 +239,8 @@ static int send_trespass_cmd(struct scsi_device *sdev, unsigned char cdb[MAX_COMMAND_SIZE]; int err, res = SCSI_DH_OK, len; struct scsi_sense_hdr sshdr; - blk_opf_t req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | - REQ_FAILFAST_DRIVER; + blk_opf_t opf = REQ_OP_DRV_OUT | REQ_FAILFAST_DEV | + REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER; if (csdev->flags & CLARIION_SHORT_TRESPASS) { page22 = short_trespass; @@ -263,9 +263,9 @@ static int send_trespass_cmd(struct scsi_device *sdev, BUG_ON((len > CLARIION_BUFFER_SIZE)); memcpy(csdev->buffer, page22, len); - err = scsi_execute(sdev, cdb, DMA_TO_DEVICE, csdev->buffer, len, NULL, - &sshdr, CLARIION_TIMEOUT * HZ, CLARIION_RETRIES, - req_flags, 0, NULL); + err = scsi_execute_cmd(sdev, cdb, opf, csdev->buffer, len, + CLARIION_TIMEOUT * HZ, CLARIION_RETRIES, + ((struct scsi_exec_args) { .sshdr = &sshdr })); if (err) { if (scsi_sense_valid(&sshdr)) res = trespass_endio(sdev, &sshdr); diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c index 0d2cfa60aa06..cb2f01b600c2 100644 --- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c @@ -83,12 +83,13 @@ static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h) unsigned char cmd[6] = { TEST_UNIT_READY }; struct scsi_sense_hdr sshdr; int ret = SCSI_DH_OK, res; - blk_opf_t req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | - REQ_FAILFAST_DRIVER; + blk_opf_t opf = REQ_OP_DRV_IN | REQ_FAILFAST_DEV | + REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER; retry: - res = scsi_execute(sdev, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, - HP_SW_TIMEOUT, HP_SW_RETRIES, req_flags, 0, NULL); + res = scsi_execute_cmd(sdev, cmd, opf, NULL, 0, HP_SW_TIMEOUT, + HP_SW_RETRIES, + ((struct scsi_exec_args) { .sshdr = &sshdr })); if (res) { if (scsi_sense_valid(&sshdr)) ret = tur_done(sdev, h, &sshdr); @@ -121,12 +122,13 @@ static int hp_sw_start_stop(struct hp_sw_dh_data *h) struct scsi_device *sdev = h->sdev; int res, rc = SCSI_DH_OK; int retry_cnt = HP_SW_RETRIES; - blk_opf_t req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | - REQ_FAILFAST_DRIVER; + blk_opf_t opf = REQ_OP_DRV_IN | REQ_FAILFAST_DEV | + REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER; retry: - res = scsi_execute(sdev, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, - HP_SW_TIMEOUT, HP_SW_RETRIES, req_flags, 0, NULL); + res = scsi_execute_cmd(sdev, cmd, opf, NULL, 0, HP_SW_TIMEOUT, + HP_SW_RETRIES, + ((struct scsi_exec_args) { .sshdr = &sshdr })); if (res) { if (!scsi_sense_valid(&sshdr)) { sdev_printk(KERN_WARNING, sdev, diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index bf8754741f85..08ad6a2282ba 100644 --- a/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c @@ -536,8 +536,9 @@ static void send_mode_select(struct work_struct *work) unsigned char cdb[MAX_COMMAND_SIZE]; struct scsi_sense_hdr sshdr; unsigned int data_size; - blk_opf_t req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | - REQ_FAILFAST_DRIVER; + blk_opf_t opf = REQ_OP_DRV_OUT | REQ_FAILFAST_DEV | + REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER; + int result; spin_lock(&ctlr->ms_lock); list_splice_init(&ctlr->ms_head, &list); @@ -555,9 +556,10 @@ static void send_mode_select(struct work_struct *work) (char *) h->ctlr->array_name, h->ctlr->index, (retry_cnt == RDAC_RETRY_COUNT) ? "queueing" : "retrying"); - if (scsi_execute(sdev, cdb, DMA_TO_DEVICE, &h->ctlr->mode_select, - data_size, NULL, &sshdr, RDAC_TIMEOUT * HZ, - RDAC_RETRIES, req_flags, 0, NULL)) { + result = scsi_execute_cmd(sdev, cdb, opf, &h->ctlr->mode_select, + data_size, RDAC_TIMEOUT * HZ, RDAC_RETRIES, + ((struct scsi_exec_args) { .sshdr = &sshdr })); + if (result) { err = mode_select_handle_sense(sdev, &sshdr); if (err == SCSI_DH_RETRY && retry_cnt--) goto retry; From patchwork Tue Nov 22 03:39:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 628199 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 459A5C4332F for ; Tue, 22 Nov 2022 03:40:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232057AbiKVDkv (ORCPT ); Mon, 21 Nov 2022 22:40:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232128AbiKVDks (ORCPT ); Mon, 21 Nov 2022 22:40:48 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1837D27CE6 for ; Mon, 21 Nov 2022 19:40:47 -0800 (PST) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM2aZKO032413; Tue, 22 Nov 2022 03:40:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=roUGKk2gor9foqRszzEFczxf5DqXee2mBc6sRVbi4TI=; b=NaJZ8zQUFsBhXhiLXRGhPBMH6ZNgmdqJCJDeaLPvXL04aYQCAoWp+VzNgkTb0sx3Twq7 u77SWjT7/jaogGHYbZ23vNSWB2zmu4NilIxCZadD0miLpt40ZrLtRKgJbgGLfJM01uKr KuP77z/et75nbWWshi3wJ4X2nju644Vv9h9VBcvB69rX3uzhTygruX4CdmnrODJ3zp74 z/M00t7D6thMESj/PeGivJlu5CK5rraTmBso4G75Bvp8T7DkXjV/4Cb7PgWpmED3hzTJ H6XGj2PYXt8qGrY9466wwjBMzC3gGpjF9vxEv4vcGCfhRTg/EH5tptwfFmc/7Id1znw6 PA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m0gas0xye-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:37 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM1DseI002220; Tue, 22 Nov 2022 03:40:36 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2174.outbound.protection.outlook.com [104.47.57.174]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnkbgdp8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BesNK+FCG6SL5I6M7Mn2hGDOuBoCBJmBJ7tKyETWFIMWAyk0TawdqZNdFGE/hnLjcXlXg5rnmB0YugDkfcIqCca7Z7MEgZkU7+oP/taOmMU/E4ZvdydwqpNeSB9lxZ7Lh6WOzi/5PcT4NaP3nV1c+I8QazNhdL6WJQw2qR6n6geEZy6M9hfDjPmnOyz+CNLrn357gtJvPiWDq1bCQKacSipQfAAxzyA2vc5cx7KV3GIUniEIu1FDHSezNPcSCBNi2LNrHH0HZtW6SsOoAy+nkFHzK0liTjwgzIKxNyfFA3U01EW8X/V65NEpNvLIryVxFaKcXvo3uew2w1TX+AT3vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=roUGKk2gor9foqRszzEFczxf5DqXee2mBc6sRVbi4TI=; b=nojThiVYr1ohZ5eSeaAJ7dgO3kNENXTKAMAzDc4PtzeU7Uz9c1jcFafvbRYOtiwKYaZfqHNe2n6WcPhoW4/kaXq7SMQn7zUOr71f777cZzeJhJCwMUrNP9BCZFuCWRJ9+REDiIppiHg5yT5XfPeB0ZUbYhv0KiRyISWD/2n0NGTgO6EPeT3f42K4uk9cGzxvwrz70iTdVyBzKig6YwtwkrfhF3fdCOQSGuWRR8ylhDSBR+5wK9AhMxmaQufvFUTSmF3avkrqGhW0pqnXDIL51XBGt4njOWEHSmPAYfVEfsVA1Ek4lulKea217bu/Dfexz0zNmaPWS6Nwuah9Ono0oQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=roUGKk2gor9foqRszzEFczxf5DqXee2mBc6sRVbi4TI=; b=SVpmPd007hGA9hJsjkkFwDSTWnn/+trAQJ+bmScIpxwc4Od/g4UaprwYsSaGD5sDOBwdTbugONeWepcbrZWIoQV2lNf9CxmFlqQSz3q1FJtq2s39aBx6yE6CM4QLUhVCEINa1ut8n2oUWbS00B9o66TGfhPaADwqL4f0nytYVyQ= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:34 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:34 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 06/15] scsi: core: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:25 -0600 Message-Id: <20221122033934.33797-7-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH2PR14CA0010.namprd14.prod.outlook.com (2603:10b6:610:60::20) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: 58dd4874-6091-436f-043a-08dacc3b5001 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Lepao+MEeUv7PNWS/LfiXsbEYQcy4vxlpXpSKfyIwCKOcHygQEkDzpQ43vN5LP1tKz4iM569oHYNYlIKYRVrIXHik4IBTxtdmTQTslOn4/Mfz1eNMOaqaKxEwvTjSKOL9rwT1n8z1sXvkuXUJhLOqctmraQ2vhyHj3GcgPD2yYvm0cvc2bhyDsEPrG4907IgaPwRrRYepSTf3qE81HY5wMIzb7vsFYuIWwVDWUM/XYq/abXTS0TMQzeIoRA9lp7/AY3RNw1DSRUrbBjYCiS6cBDCNty3kRSREi6P/48qqILeyLrcvVGNXKuEQRfizNaW+hVJZFaBgGqvKbkBSqTm7DGqs7vfWBG3cDFKQAQZJnKJJOyHa2ze4lru0UOxCIGYIWbAxvvl2jnhUee/tpozqzHRcDTola9o5HigQANmoEGd1x2HtEAfVr1IDdq9vrGekVz1kvoBO2paSc7oa7f5zH6aXPq9XpG6e1qU1Zy32iRsrtsP207SuR7J4vGglJrm3Ue3m7YcsbWNXGIWXx8+Na8oB0iHFS3CSelpa3BVFF46Mjn2hXW3AgCw5IsFVNisYQcX0bPzmZmmFcJfWjmmoHw0ugf31hMtveIC48locR/KppANkL8oReQC3Ajdmf7Tza9W3wGVWli3tUJK9btHKg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cBqWZZOGQF69MN31X0Jrmu45+j+SgbzYcR3C+ANqqsMaM1TaOO+USC8PCwoiQaCkX/G/dL9vU3Gx5xsjWrCpPCbt90rG0wb1JrSitYG2CBaHM17CAeKEh++UgV2Pv8qrggUIobmh0oRgJU+kxtuMadfu6PyqrQn5A8WSVUTgeio8P7Gy11ki4isv6uwX+MG7f2VNd1LgjI4GxJ7XZoclRvZgVOVqtIxLCxwXDRVDn3h56FKgQvGZ9tcltdY+dS1EbY7K1QQTdKVY23AG8SsdHAB+g1BMxg6yDvrol+wCP8BBgMapTaoI1q87mHtLQJRBDrkliicxKlD6I3hegK+Aq1toT1yP5VfMIYUG6ko2o8vv/iPA4H/fccTK07pmYvJm3LuqtB4l8Va7TjWalNuN9RnyJPtBwMucW/O6X1qC07VlDNezKDCv2tyUz7vzPliuQqNSjJs6wucY+IVujA7wGZAAXeZYiTXe169dI91VpxUblX3m5jZnIHAzuS45DF8emUn54WMVOao2LtPQ04rKtA7ZRAyNiCH+Ug8ofOYzHZij3/76X53669/m2qVAfgwbDkucTJzDJcg7Xg5lsQjB1w33tbEVPNtZgfYCuIDjkH6zMZwEz+rs//T0nWECWqyIX+Z2uXDWgh2u/DFrAkdo+s80avAf9Ocu51FrlcKgkv8Xbkco79Vb1RdFBQLbA0taKOpShbhQIIGWzsLIWVG/kShO5VgvVz84gyc9peB032AgkTIR2cgYXHc9uQUARD2WTDArITneKi/3f9SxaOIH6ahdLvyVNfrk6OSHiZF5d/Kh5MHONYLGhsHe1H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uveoAfdnyewfNtAcBP4jjvo1kgrlgfY56jLPGOpoTo4J/MurdKN7kz4PlCooQJJFztv1AzA4smMymXSHTvKo0TfGQaRQjSxXC7BDTdq7AJ9FNPR4Bi9pM34yGbNafcEMhPUrk2cqHjRj897TkQ+SD8ADDWYsDZxbuukVardleCSI/XJ9+CiWGm+xj+E9MIwsENWJ1QIw0AIwVIHM+75PcdvDO/o+lY2zyXK4z7G9kksTgMVvxnDhw6z88nwYrb3HXKgxWl1DdpHNjDN+8y6nyTdklYDPSJ3nt/uh8zHuzYwmGGnBFG7dlL/3g6i/Z7Fg0VI12DedQ9JnGEE7XXSBZO35Y92/prhv43aKJFEt1x/DjUo8aw8oI5kmFzcvbSKnyZkQUdXIsQXOdd8YYWl8Yw+JfrrWmHuETqMnQUGzdKdqr+WOJKnbCpeY6XL3h2jBd1uMOF3VrqCoNRqmg2Fc9+0/MmZCyuUaCJeBglcC+gJDuGkpJg57skTjYgFLctCQwWOa7/J3B9XgtLTTFufrPkkyxTSjUXWjBH2TL0QLBxgz2v7msVOtN82DdDgGUtZlU+y6EHbBy3HdV+S928sJAu1NuzTeBaDpxk+wm1zQ2BjZR3ruVqpbsUaUJNSSMo8dmzj70KDNuXNubTqa8MqhaPuAwbc8YsSh200yclmvKZbOoxiBxDrD0uxlU4iD5bC6E7US9 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58dd4874-6091-436f-043a-08dacc3b5001 X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:34.4508 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: p/IK8Guz0UTIbu6PFNzm35gjg1URiInPho0LDY8/81UWZfLoO/IKzFONmWx5NOZ/Bu6gC1VTmB/3K5f/22IpbTIvVNBNRtiEKyyFT35DbMs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 mlxscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-GUID: 69g2Ku7i703Zfpk0-7R25403OD_3Ou7x X-Proofpoint-ORIG-GUID: 69g2Ku7i703Zfpk0-7R25403OD_3Ou7x Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute_req is going to be removed. Convert scsi-ml to scsi_execute_cmd. Signed-off-by: Mike Christie --- drivers/scsi/scsi.c | 9 +++++---- drivers/scsi/scsi_ioctl.c | 5 +++-- drivers/scsi/scsi_lib.c | 17 +++++++++++------ drivers/scsi/scsi_scan.c | 22 ++++++++++++++-------- 4 files changed, 33 insertions(+), 20 deletions(-) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 1426b9b03612..fc65d64b7299 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -309,8 +309,8 @@ static int scsi_vpd_inquiry(struct scsi_device *sdev, unsigned char *buffer, * I'm not convinced we need to try quite this hard to get VPD, but * all the existing users tried this hard. */ - result = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buffer, - len, NULL, 30 * HZ, 3, NULL); + result = __scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_IN, buffer, + len, 30 * HZ, 3, NULL); if (result) return -EIO; @@ -531,8 +531,9 @@ int scsi_report_opcode(struct scsi_device *sdev, unsigned char *buffer, put_unaligned_be32(request_len, &cmd[6]); memset(buffer, 0, len); - result = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buffer, - request_len, &sshdr, 30 * HZ, 3, NULL); + result = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_IN, buffer, + request_len, 30 * HZ, 3, + ((struct scsi_exec_args) { .sshdr = &sshdr })); if (result < 0) return result; diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c index 8baff7edf7c3..6956849bd1f1 100644 --- a/drivers/scsi/scsi_ioctl.c +++ b/drivers/scsi/scsi_ioctl.c @@ -73,8 +73,9 @@ static int ioctl_internal_command(struct scsi_device *sdev, char *cmd, SCSI_LOG_IOCTL(1, sdev_printk(KERN_INFO, sdev, "Trying ioctl with scsi command %d\n", *cmd)); - result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL, 0, - &sshdr, timeout, retries, NULL); + result = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_IN, NULL, 0, timeout, + retries, + ((struct scsi_exec_args) { .sshdr = &sshdr })); SCSI_LOG_IOCTL(2, sdev_printk(KERN_INFO, sdev, "Ioctl returned 0x%x\n", result)); diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 327eb2df5583..403bcda8ef09 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2130,8 +2130,9 @@ int scsi_mode_select(struct scsi_device *sdev, int pf, int sp, cmd[4] = len; } - ret = scsi_execute_req(sdev, cmd, DMA_TO_DEVICE, real_buffer, len, - sshdr, timeout, retries, NULL); + ret = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_OUT, real_buffer, len, + timeout, retries, + ((struct scsi_exec_args) { .sshdr = sshdr })); kfree(real_buffer); return ret; } @@ -2195,8 +2196,9 @@ scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, memset(buffer, 0, len); - result = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buffer, len, - sshdr, timeout, retries, NULL); + result = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_IN, buffer, len, + timeout, retries, + ((struct scsi_exec_args) { .sshdr = sshdr })); if (result < 0) return result; @@ -2280,8 +2282,11 @@ scsi_test_unit_ready(struct scsi_device *sdev, int timeout, int retries, /* try to eat the UNIT_ATTENTION if there are enough retries */ do { - result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL, 0, sshdr, - timeout, 1, NULL); + result = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_IN, NULL, 0, + timeout, 1, + ((struct scsi_exec_args) { + .sshdr = sshdr + })); if (sdev->removable && scsi_sense_valid(sshdr) && sshdr->sense_key == UNIT_ATTENTION) sdev->changed = 1; diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 5d27f5196de6..1af75cff9489 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -210,8 +210,8 @@ static void scsi_unlock_floptical(struct scsi_device *sdev, scsi_cmd[3] = 0; scsi_cmd[4] = 0x2a; /* size */ scsi_cmd[5] = 0; - scsi_execute_req(sdev, scsi_cmd, DMA_FROM_DEVICE, result, 0x2a, NULL, - SCSI_TIMEOUT, 3, NULL); + __scsi_execute_cmd(sdev, scsi_cmd, REQ_OP_DRV_IN, result, 0x2a, + SCSI_TIMEOUT, 3, NULL); } static int scsi_realloc_sdev_budget_map(struct scsi_device *sdev, @@ -674,10 +674,13 @@ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result, memset(inq_result, 0, try_inquiry_len); - result = scsi_execute_req(sdev, scsi_cmd, DMA_FROM_DEVICE, - inq_result, try_inquiry_len, &sshdr, + result = scsi_execute_cmd(sdev, scsi_cmd, REQ_OP_DRV_IN, + inq_result, try_inquiry_len, HZ / 2 + HZ * scsi_inq_timeout, 3, - &resid); + ((struct scsi_exec_args) { + .sshdr = &sshdr, + .resid = &resid + })); SCSI_LOG_SCAN_BUS(3, sdev_printk(KERN_INFO, sdev, "scsi scan: INQUIRY %s with code 0x%x\n", @@ -1477,9 +1480,12 @@ static int scsi_report_lun_scan(struct scsi_target *starget, blist_flags_t bflag "scsi scan: Sending REPORT LUNS to (try %d)\n", retries)); - result = scsi_execute_req(sdev, scsi_cmd, DMA_FROM_DEVICE, - lun_data, length, &sshdr, - SCSI_REPORT_LUNS_TIMEOUT, 3, NULL); + result = scsi_execute_cmd(sdev, scsi_cmd, REQ_OP_DRV_IN, + lun_data, length, + SCSI_REPORT_LUNS_TIMEOUT, 3, + ((struct scsi_exec_args) { + .sshdr = &sshdr + })); SCSI_LOG_SCAN_BUS(3, sdev_printk (KERN_INFO, sdev, "scsi scan: REPORT LUNS" From patchwork Tue Nov 22 03:39:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 627864 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A190C4332F for ; Tue, 22 Nov 2022 03:40:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229499AbiKVDks (ORCPT ); Mon, 21 Nov 2022 22:40:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231325AbiKVDkr (ORCPT ); Mon, 21 Nov 2022 22:40:47 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4F4927CE8 for ; Mon, 21 Nov 2022 19:40:45 -0800 (PST) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM3ZVT0003638; Tue, 22 Nov 2022 03:40:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=PfqjuiwrWH9eKMd9ciy2KIfVpQShtSTvkJ4hXCfG8Rw=; b=TvJb1321jLFLsFYT92yTYwxw7C8S42iVYi4OrDzf+3bunYEbOJYfiDNRNUngB3wx1zGH eAHgJf9YT81M6nT6R+yrqhqLgctKjBGdl9HYKqUMdnNuzgImMy+JejylKCHWPx/Sar1z QQ2vN5OH+d6ynayeZrD7Ske2kXV80tKsGf7PDoDtVe9pGGbm+ckVDknwZfjncXlnOX0q eYvNRKDhhw58/nM85Np1M8jiKIUQN3+9k5qluYb7Fx0yWR5aUXtJO89ZBClQtlCpg/o/ Lsvf1LIdPzjFGlDTUrDTCapYNE3jU80zkzwpBv0ePilF4iacyb1mLwTjWj6CBmgFaJ1a 5A== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m0edq1ccn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:39 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM2ovGQ039516; Tue, 22 Nov 2022 03:40:37 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2170.outbound.protection.outlook.com [104.47.57.170]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnkb0yex-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mzfJxG+O+yumIZyKVZdsN0h7KF0Vu2HiBW0di8GYfIODI1N3dqBrTyaGLNRbH3RL2F3gUSSUH77uXOnrpYKi5haF3gzqP/Ybsyxf+Vb5Vf9P4lm/2eoX1c4B5oUSWwdwspRZQQRKu7K6hm9yTTF5zCQtfD2eg1J0OdDf2MVRFQzPTkWvLWanVRMdkMCRQXOqtXQGrJhxd01invOa4XejSUxQ2xNdQoYStIXjiNnsgnvbnziWhf070aX+UyT1irP5gUC5/Zlq4cGUHimX4oMt6rpkGsCgLF2a1yjYm3PX/eScy/tmkJ6liQxTNjV5OlFzjvT8F5hdNIdrWkudaGei6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PfqjuiwrWH9eKMd9ciy2KIfVpQShtSTvkJ4hXCfG8Rw=; b=iKm6aS1ITmjTFuOK5WgLpGWQFIaS7ei4VI0G3G30GtkOZ1JaphzinCi6PeOzqSOL9zYZ0ED69yMTSVp0/koK/UpaVZfSgm6oAVShovF8VGjx/ir5KZLupdtrmZlKqu8aM0PCTNEbL5cLvybEfoTR4lMJW5mKO0iHc1ufJUbeFJCO7tWbrXgr6ZN2Z8HMG+jbPpp7hsRYmnXqRXdd8dphHes39dzHybr1lceOMYfigwQ2qEiOoF3DZHGBKzlK+wcNFfEt5w5iPFoSJV1GsfIUJtwLHmhqgKur5x/RqYJKyMlurgdCFO3K6eygd4zZZUDKBIusOMVAZ+LrxzKWwvVwOA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PfqjuiwrWH9eKMd9ciy2KIfVpQShtSTvkJ4hXCfG8Rw=; b=v5eQPWjDAefq9kTczUfx+2HQ13dVTlLfXPf6ZOhwu8H9/7//grdLn0Q6KwTqVFRBl2pts/iWCQpq667ZH8PQisZf8+vMOqK9vigncYa+Z382Se6eOuJWqCM26dtTwAlIavNutZHrqGYaTeub1WAlDMDn/6uTUoIChNEnGLfQjmM= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:36 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:35 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 07/15] scsi: spi: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:26 -0600 Message-Id: <20221122033934.33797-8-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH2PR14CA0018.namprd14.prod.outlook.com (2603:10b6:610:60::28) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: 93a4916b-cf16-4f1e-44ec-08dacc3b50c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UZ2kwvzZFC574X9VVkOvJl6mUxXqWr9rm80sYqT5CBwcRn88sgl3HfmSHWhGz0heOkg8LY8JnjyQmJpCqP+7DV8QfFpu//Cqgv59WGEBVM9FBqnpZ4Linix2Y680spre8czmSarMm0sz80YR5/+smCrpunUuln/ptYZSpej+zKZYhhzHcT46btXRMz6Q+OE62ZoEpponNhVXfW132F7L5w2ygKT1RQ1RkubZTDLPe6um4qu2mb6Rptyrk0MvLTuXf5Hu5Q+e6Alu9AlRDHXI8cYauZrWQR03FyVMYMWbYpzTgCfi1YaGUZkQO+l+FjkNBul82U7eelO1GqRUhBzovY2yzvpcHg4ZDC6SBZ/BKGXgbVW6K8jsS4tl+UuBJygBUt7EHSWN9xsy/Au9RId89OBl5u1XEP2FYG8Ui5Kz6940skfa2zZ/dxZGHimp7fuQOub1Qj5qwNhU5ywU2gxDMlrj/GkBg1ix5KsA3DK3/Xj55dZv8qEhreggsUrg6x67Qg2RNfH3wskWbeH9FQ14BHsthGXEsAaz1X2zcoo+Zh3Nu3Bbjf8vFZdzsy+FuMekoAe0+SYbYyb2TRr8T1f+Db1f0hhzEgUfSqwAFLGgoYVKNWkruxPcgDCo8pE8rLn7 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YZeJi8pep+0HeXersUJIz0+jX8g2Gi+XoDcZYxgcIFIglALLEODV4S5B+igMgoqrLpdBqInoxy+SzOiO+//SmgxFRU09a5OVmqa45Deq50A0wfksEKfGH77XDLup48qkxbIK0YWJj6hLSS9vuiyHIW1gidkb/quUjp4ltcKQOhtXHmddPGFtGQSe7+D2BveEImV/MaN7Xy8ewPY2j8xJ1CDE0wZP6uI8w33q3ZIneEflDhZpkGmtrM0MT9kiqD4PY+oAoHVVbLGAKngZ5WOCEj0OPoo1CpMLYYUDqn5UY1AdJdRk97EayBjObHn5XxkvpUzIowaMM1oDbNHTbSNxVM1P3SnGmueT4ruwovF4J4Ln3hkxFBWEtT3P8OwrG5NoDPFugooRdWfAV6ruU2zwDdbF/vmNjjnQvZ4u2kXxqCTn/1pBqQyNw8/CEJWSZlayRrENLcwzNOsS4mWvS0Xo9ramRCdQS/W3/Und81IAbeIkgdU68YQNcRw7BNGIDKvTE8vUSDLfvCdMuN5BYHxkjQmiqZJXrpkwzWCVXogq+ztVjvHrO4rBOQtT69QmJw9qjvzwlIJCrt1I3unxguK2NvCJyZEdBzdHOlFZyM6wn5flbQKKSVTbesvAzt5H+15hQ7C7YRYgaJdKPZgGdWtueYw5LP7FfhslI67XRgj5GMtx12FwCZ8RD+EJam/B7JBOpaWtI3yTBd/jp8JtNccXhuGbzMxjjTf7ph7hrRdwTGLvJ/E7/FhlosApyMvcvQbJ8WjnNxeNiU8m6Ag74gf10kBnXo9fr0ayuVticjYxAh8UxJVtbCXfsa/QErRPc18cAuDL6p3uvTg4rmBiQ60J31JXHfK+nrjSyxKmSMqn9mqCfEW0iBsrR5eVTyvkgeAOGSq9G+YVphxAr6XxF0FEVTxufLH9Lk9TF+LgAhl6NG7W824JuHooDQyA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NJFCl6K9ICMa2Qq0ke5Nq1gmF+CwETv2N5jWzaaR/S1OqkNOOhMPjCVnhFQLmyWh+7RrbmibSA0/CaD989002e/IAdejFsVSAAaO6SN/cOWzy1jy3LEbk7KN81AWemH0nnc7gufKPBWE+em2aM2VaJeDxUTV1gAnpWXXE7sUl49r1nCEiISXC3971x8d2FZX4QKrTJ8gtCSEMRLIa7kYHecioL1I2dpvffrVDYcG89Msl/D5FeY/wsjzawQ01zMAk+h/i+54mJ2/4v13e9bqEiiO+4fEvvzr67OGW//0sYEOPhSQICjrXAzJyu9U2h2udONlqh0CCo9AtNI9eLyYKy5zATcsV/CF7TCihG02PwVKnH1An/CGFpR/G/NFL+RknSXkN0cU2a72ZBlZtutFIckiHIsDzOKWnPOPP0m5VbcxCQJUKccIiOMN8rOPNuoBHRvbv8JoMw640EfPZRHXnP7+CVZBflU6of6N80WF93bpWAjU8VPOcaz/VMkEZ2Mpnk/OUwSytap25oUFM/wsXV3NrqryYV+p4gAlo7LQ8kv6OxN X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93a4916b-cf16-4f1e-44ec-08dacc3b50c9 X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:35.8100 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Ayen8vwQwkJ8gVKED/epmwseALcsrTUP0y6mJU0RR/4Nvru9a9iYhWEGNDYzPvut1l2OImFIv1KtntDdTxfVqoOfZWrHYQV3vwAlXJ2lKNk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-GUID: whfSExDTfsoIF8EmghmVnuoC9Z6QfayG X-Proofpoint-ORIG-GUID: whfSExDTfsoIF8EmghmVnuoC9Z6QfayG Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute is going to be removed. Convert to the SPI class to scsi_execute_cmd. Signed-off-by: Mike Christie --- drivers/scsi/scsi_transport_spi.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index f569cf0095c2..ea71135ab3b1 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c @@ -105,13 +105,13 @@ static int sprint_frac(char *dest, int value, int denom) } static int spi_execute(struct scsi_device *sdev, const void *cmd, - enum dma_data_direction dir, - void *buffer, unsigned bufflen, + enum req_op op, void *buffer, unsigned int bufflen, struct scsi_sense_hdr *sshdr) { int i, result; - unsigned char sense[SCSI_SENSE_BUFFERSIZE]; struct scsi_sense_hdr sshdr_tmp; + blk_opf_t opf = op | REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | + REQ_FAILFAST_DRIVER; if (!sshdr) sshdr = &sshdr_tmp; @@ -121,12 +121,12 @@ static int spi_execute(struct scsi_device *sdev, const void *cmd, * The purpose of the RQF_PM flag below is to bypass the * SDEV_QUIESCE state. */ - result = scsi_execute(sdev, cmd, dir, buffer, bufflen, sense, - sshdr, DV_TIMEOUT, /* retries */ 1, - REQ_FAILFAST_DEV | - REQ_FAILFAST_TRANSPORT | - REQ_FAILFAST_DRIVER, - RQF_PM, NULL); + result = scsi_execute_cmd(sdev, cmd, opf, buffer, bufflen, + DV_TIMEOUT, 1, + ((struct scsi_exec_args) { + .sshdr = sshdr, + .req_flags = BLK_MQ_REQ_PM, + })); if (result < 0 || !scsi_sense_valid(sshdr) || sshdr->sense_key != UNIT_ATTENTION) break; @@ -675,7 +675,7 @@ spi_dv_device_echo_buffer(struct scsi_device *sdev, u8 *buffer, } for (r = 0; r < retries; r++) { - result = spi_execute(sdev, spi_write_buffer, DMA_TO_DEVICE, + result = spi_execute(sdev, spi_write_buffer, REQ_OP_DRV_OUT, buffer, len, &sshdr); if(result || !scsi_device_online(sdev)) { @@ -697,7 +697,7 @@ spi_dv_device_echo_buffer(struct scsi_device *sdev, u8 *buffer, } memset(ptr, 0, len); - spi_execute(sdev, spi_read_buffer, DMA_FROM_DEVICE, + spi_execute(sdev, spi_read_buffer, REQ_OP_DRV_IN, ptr, len, NULL); scsi_device_set_state(sdev, SDEV_QUIESCE); @@ -722,7 +722,7 @@ spi_dv_device_compare_inquiry(struct scsi_device *sdev, u8 *buffer, for (r = 0; r < retries; r++) { memset(ptr, 0, len); - result = spi_execute(sdev, spi_inquiry, DMA_FROM_DEVICE, + result = spi_execute(sdev, spi_inquiry, REQ_OP_DRV_IN, ptr, len, NULL); if(result || !scsi_device_online(sdev)) { @@ -828,7 +828,7 @@ spi_dv_device_get_echo_buffer(struct scsi_device *sdev, u8 *buffer) * (reservation conflict, device not ready, etc) just * skip the write tests */ for (l = 0; ; l++) { - result = spi_execute(sdev, spi_test_unit_ready, DMA_NONE, + result = spi_execute(sdev, spi_test_unit_ready, REQ_OP_DRV_IN, NULL, 0, NULL); if(result) { @@ -841,7 +841,7 @@ spi_dv_device_get_echo_buffer(struct scsi_device *sdev, u8 *buffer) } result = spi_execute(sdev, spi_read_buffer_descriptor, - DMA_FROM_DEVICE, buffer, 4, NULL); + REQ_OP_DRV_IN, buffer, 4, NULL); if (result) /* Device has no echo buffer */ From patchwork Tue Nov 22 03:39:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 628198 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F6E4C433FE for ; Tue, 22 Nov 2022 03:40:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232181AbiKVDk5 (ORCPT ); Mon, 21 Nov 2022 22:40:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232126AbiKVDkt (ORCPT ); Mon, 21 Nov 2022 22:40:49 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CDA627DC1 for ; Mon, 21 Nov 2022 19:40:48 -0800 (PST) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM31emL008117; Tue, 22 Nov 2022 03:40:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=t8ZeonuP2WP+4WwG9P1lFqzYChkkjKPadiBDwJm/Vmw=; b=3CKLBtt1640XwUlxM2s8nkEha/GXZFBxvOhNrmhUvJxA/1d51Yt9kT+GqCFvtTaLjDPT WYq6h2el6+Actp2ZbRpsp6RfkUa2u2V2D+1XQ4DMZvH3Dtb1xKkhpwP2HiHAcRSISG59 oQhR0W+SFGPyAy3wHkNGJgl/E9tD4x9J42uH/Euvof/rdriiXGARUDDrMpuVHBsth5Tm r7RR/4vVFs70lk3NWN6pDErWKkoY2/OiN2TemO/5mUZYV9CrxVF+KjjGx2Mp0aEp8fYX B27BZ+kt9Schpgn9wErKgjtyQKftq9tyUD7ZF5agOY84ghgEOKM5DNHH0rd3tkMXU0Hu nw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kxrfaxt8q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:40 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM3J9Ln038796; Tue, 22 Nov 2022 03:40:39 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2175.outbound.protection.outlook.com [104.47.57.175]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnk4q0hp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MVpNPOi8PTQrUbY5j3CeZhHs1QGMRoJpPwuSM1ccwgpSDy9wGlx9fkCZdyI9OoF6RsxS5Ug4GrdwGnqSxgW4wBs1NhTdoN9yQYu7A+qszfAL4T0H8WCBzuwqhLrk1mtM7HN5tTlUVuheeTbSc/caPzpnEiuz7ZUlhNjiNeTmWXWlzFGdfy0pjFrFDBeJXIhOMjeTLfNT4ylrb2A/B1tkm9BKJyOgDx9fv7UQ25gbpA1CuzURXmOu3P+5NvcVdqZZvEV8yymka6WhO5ufBldc+l3zFqpPDR3RCryFq7tJ8JDM1s13thID50J/e+ht0mfLLEYRTnaHR714QMaNjKMS/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=t8ZeonuP2WP+4WwG9P1lFqzYChkkjKPadiBDwJm/Vmw=; b=dsWHz+F4NMC5HVW3UPJJTpOIq1lbdi1CCik21yJuXi4KJAmKqekbu4UC7BRzn3/fmgQeZlMto/EddCkTmYlBTMN+iqrTDaq2mHClukAd/vaBRYp3auW818QqEbCoEBqCOHGRM9tp2sLMu/YxUhvMxaB2VmJfmc03r4yxLcRuJgE16UDfmvQH9EJXwypzXGUd3kGD7PkpCKSGMm+4Do6R28WD7GNmofQ5VxlzTzAaaySQ8h40k/diurOVQbNpKDd3IxN8MLqreq72iYA7fwFYMhgTHc7+GYzQuPQM6Mrdu6hrgJG2/rtQMtHWBgvWcg3dyoEtYgIl3KGkgBseVVh3XQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t8ZeonuP2WP+4WwG9P1lFqzYChkkjKPadiBDwJm/Vmw=; b=KTZvuJZnni3Y6QraTh/zVL1/NCl8+1EQW2vcUOB6xrXUSWJ2QGIfuQ75UCymewTZewJh11YPjHhHNzNSHTKMwkDSX1QgtjsdMpHHH5uSwwcdBQx6BOl4D5F0JjInbPfjIQhjCmhEHEn6Vn9/Kni3LSHlWrvUn6OhPYtozxdvbaE= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:37 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:37 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 08/15] scsi: sd: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:27 -0600 Message-Id: <20221122033934.33797-9-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH2PR14CA0030.namprd14.prod.outlook.com (2603:10b6:610:60::40) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d9bf53c-29e2-4abb-211b-08dacc3b51ae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bo1YFXiy7J51FAJg4G4WA0CKu9mKYJbIUW0YHZVuQmJ+d5zVKTa28aHPDZPse6uv0cJhl28hgtznUg9wmex9C1po126CBZjCdvQ9H4J66ius24RZgCdr7Swz0yqS0pp4e3pf8hr07tI+qXsnb0X+vI6UTnec4HkoVzIbpu3zSSFiG3tBIFUOJLPbZ3C8eaaDRqZtAoW9MQ8o7Rt8/OQS1sGUeedOe+yUh7ryRpqCW52z7/mZ49LAxxBZjax2yJYfbRL8ILl3URcqxNJVOgGBEJnayjY1Gimr6cx3Gtbxc5onEVnZPboBce6O0Vx2w7+txMsoJYclXIaA/0ziC1j4BmDiH5tsaz+kLNC85iG3RfTIBCTa4AGjfHxYWEurKdO2M54PEeucWZw/m/R02ZeraSakb6LIyybGKmHWRK040oqEbbiSOyzu5WCqvrf1ASnr3PmCY+Nfc6oRDRbebEawxjxjlFWm2rY4YBCpEQsCITR3dwySCGdEtTE9l9YDw3H/CXZox8/bTX8Ud2H3QYmMarBFDcCUw9nqHMfDR1SxzBh0EZpbYp1VWmkGSU8Yd607NN1uNa4xgAYAPSpcj9uI/0Y2RTODa7XSMPlLk3XW3j20+MSun4QDFowZF0EmqSKLQscXGE1biuqB2pJDynqMgQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: i51CTzAVpg4PoDzeahsszgPwAskDRazWoo0N1yfkJ/p4lC9rT+RgAjZis/jjPAMf+rZ2Psyik4cao2uQN16o5fhmUqsTCNdSILlU5hIK3mL61iKWbvfJZY8CQQ5Yz8Sky1i7cXTJl3v2O/hSAUNdN7rCE1gTet1HLK7Crc0ha0xrKtvkO5EUUJNg6HcGnJ08TK23F3rjdB9RUTCdWAm+uhyLqY+K4Q5w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K/CPX0tFzhDOiuAgX8lbJndIDt7tYqys1GPOy2/SLHn0ZFKen33NEJeBbJ2BTgPEFqkfs8ulYtgtpira0aRbrTvmKalDdwg4kT8AmhWr/u8UC4JivmI3L/VoCs3W8LwJlT6T8jXLJ5PzADNkFxcDG4N9g06F2wnq2JJKEST3MhreAdmLT/5Wvaig1RiKVHzlWDmRAz3MPTQyDdGbg4XClxOz X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d9bf53c-29e2-4abb-211b-08dacc3b51ae X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:37.3099 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tNi3HF1u1zgsbE++KatTcf/v8oRfgpyxPJ1iUwPgu7AfN9ZEQAvueL8gvEMrgvbS9dP4TVeapBe6cOpv6nuhlzecFm5cZN6jNHrsfmAroUw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 suspectscore=0 malwarescore=0 spamscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-GUID: DKjM2OPfkZWlNHd8L4pkEK2oBofOovtX X-Proofpoint-ORIG-GUID: DKjM2OPfkZWlNHd8L4pkEK2oBofOovtX Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute* is going to be removed. Convert sd_mod to use scsi_execute_cmd. Signed-off-by: Mike Christie --- drivers/scsi/sd.c | 77 +++++++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 26 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index bc60ec91dc8f..678f2f5e7813 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -671,9 +671,11 @@ static int sd_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, put_unaligned_be16(spsp, &cdb[2]); put_unaligned_be32(len, &cdb[6]); - ret = scsi_execute(sdev, cdb, send ? DMA_TO_DEVICE : DMA_FROM_DEVICE, - buffer, len, NULL, NULL, SD_TIMEOUT, sdkp->max_retries, 0, - RQF_PM, NULL); + ret = scsi_execute_cmd(sdev, cdb, send ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, + buffer, len, SD_TIMEOUT, sdkp->max_retries, + ((struct scsi_exec_args) { + .req_flags = BLK_MQ_REQ_PM + })); return ret <= 0 ? ret : -EIO; } #endif /* CONFIG_BLK_SED_OPAL */ @@ -1594,8 +1596,12 @@ static int sd_sync_cache(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) * Leave the rest of the command zero to indicate * flush everything. */ - res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, sshdr, - timeout, sdkp->max_retries, 0, RQF_PM, NULL); + res = scsi_execute_cmd(sdp, cmd, REQ_OP_DRV_IN, NULL, 0, + timeout, sdkp->max_retries, + ((struct scsi_exec_args) { + .sshdr = sshdr, + .req_flags = BLK_MQ_REQ_PM + })); if (res == 0) break; } @@ -1750,8 +1756,9 @@ static int sd_pr_command(struct block_device *bdev, u8 sa, put_unaligned_be64(sa_key, &data[8]); data[20] = flags; - result = scsi_execute_req(sdev, cmd, DMA_TO_DEVICE, &data, sizeof(data), - &sshdr, SD_TIMEOUT, sdkp->max_retries, NULL); + result = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_OUT, &data, + sizeof(data), SD_TIMEOUT, sdkp->max_retries, + ((struct scsi_exec_args) { .sshdr = &sshdr })); if (scsi_status_is_check_condition(result) && scsi_sense_valid(&sshdr)) { @@ -2095,10 +2102,13 @@ sd_spinup_disk(struct scsi_disk *sdkp) cmd[0] = TEST_UNIT_READY; memset((void *) &cmd[1], 0, 9); - the_result = scsi_execute_req(sdkp->device, cmd, - DMA_NONE, NULL, 0, - &sshdr, SD_TIMEOUT, - sdkp->max_retries, NULL); + the_result = scsi_execute_cmd(sdkp->device, cmd, + REQ_OP_DRV_IN, NULL, 0, + SD_TIMEOUT, + sdkp->max_retries, + ((struct scsi_exec_args) { + .sshdr = &sshdr + })); /* * If the drive has indicated to us that it @@ -2155,10 +2165,12 @@ sd_spinup_disk(struct scsi_disk *sdkp) cmd[4] = 1; /* Start spin cycle */ if (sdkp->device->start_stop_pwr_cond) cmd[4] |= 1 << 4; - scsi_execute_req(sdkp->device, cmd, DMA_NONE, - NULL, 0, &sshdr, + scsi_execute_cmd(sdkp->device, cmd, + REQ_OP_DRV_IN, NULL, 0, SD_TIMEOUT, sdkp->max_retries, - NULL); + ((struct scsi_exec_args) { + .sshdr = &sshdr + })); spintime_expire = jiffies + 100 * HZ; spintime = 1; } @@ -2305,9 +2317,12 @@ static int read_capacity_16(struct scsi_disk *sdkp, struct scsi_device *sdp, cmd[13] = RC16_LEN; memset(buffer, 0, RC16_LEN); - the_result = scsi_execute_req(sdp, cmd, DMA_FROM_DEVICE, - buffer, RC16_LEN, &sshdr, - SD_TIMEOUT, sdkp->max_retries, NULL); + the_result = scsi_execute_cmd(sdp, cmd, REQ_OP_DRV_IN, + buffer, RC16_LEN, SD_TIMEOUT, + sdkp->max_retries, + ((struct scsi_exec_args) { + .sshdr = &sshdr + })); if (media_not_present(sdkp, &sshdr)) return -ENODEV; @@ -2390,9 +2405,11 @@ static int read_capacity_10(struct scsi_disk *sdkp, struct scsi_device *sdp, memset(&cmd[1], 0, 9); memset(buffer, 0, 8); - the_result = scsi_execute_req(sdp, cmd, DMA_FROM_DEVICE, - buffer, 8, &sshdr, - SD_TIMEOUT, sdkp->max_retries, NULL); + the_result = scsi_execute_cmd(sdp, cmd, REQ_OP_DRV_IN, buffer, + 8, SD_TIMEOUT, sdkp->max_retries, + ((struct scsi_exec_args) { + .sshdr = &sshdr + })); if (media_not_present(sdkp, &sshdr)) return -ENODEV; @@ -3641,8 +3658,12 @@ static int sd_start_stop_device(struct scsi_disk *sdkp, int start) if (!scsi_device_online(sdp)) return -ENODEV; - res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, - SD_TIMEOUT, sdkp->max_retries, 0, RQF_PM, NULL); + res = scsi_execute_cmd(sdp, cmd, REQ_OP_DRV_IN, NULL, 0, SD_TIMEOUT, + sdkp->max_retries, + ((struct scsi_exec_args) { + .sshdr = &sshdr, + .req_flags = BLK_MQ_REQ_PM + })); if (res) { sd_print_result(sdkp, "Start/Stop Unit failed", res); if (res > 0 && scsi_sense_valid(&sshdr)) { @@ -3782,10 +3803,14 @@ static int sd_resume_runtime(struct device *dev) if (sdp->ignore_media_change) { /* clear the device's sense data */ static const u8 cmd[10] = { REQUEST_SENSE }; - - if (scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, - NULL, sdp->request_queue->rq_timeout, 1, 0, - RQF_PM, NULL)) + int result; + + result = scsi_execute_cmd(sdp, cmd, REQ_OP_DRV_IN, NULL, 0, + sdp->request_queue->rq_timeout, 1, + ((struct scsi_exec_args) { + .req_flags = BLK_MQ_REQ_PM + })); + if (result) sd_printk(KERN_NOTICE, sdkp, "Failed to clear sense data\n"); } From patchwork Tue Nov 22 03:39:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 627863 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FACBC433FE for ; Tue, 22 Nov 2022 03:40:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232157AbiKVDky (ORCPT ); Mon, 21 Nov 2022 22:40:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232160AbiKVDkt (ORCPT ); Mon, 21 Nov 2022 22:40:49 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C680627DC3 for ; Mon, 21 Nov 2022 19:40:48 -0800 (PST) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM38TnM014539; Tue, 22 Nov 2022 03:40:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=pEjH4UtKN5ldCSJRRs8gm2F8Sz2Vf3U8CsNBV9piQtY=; b=PDux0DcPKqqpJFuoT3YWNOTH4oBHvMTBVJThWLGF7/lcpbEuDC/O+cW14mOK2Wjj5Acu jv/fEG9T4V+vMqDyFrDDP5W8SvSGi72e1gS6+ROd0MIbx1/3uVzIhPBS9m5LQsLeGLzf zwCZBXSiHc+JDsDg7X50hcKCnKfHPM4G1dvAqpFUmET2KDBvC8N0qePV3IRC5HtgE4GI pSUZxTWUj+FksSYH/GqgBFB8Xauva7Wr+hF+/S5LZ3sdnfTzPdLO/RpQ8WPZfP3wQfu0 47RYOx8kjEeTcpPNnkAOwrGkVRg2rvqIm5g+DWfWP/FExg9N1uYvpK6EGRwxOMou+JoQ GQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m0afr2c4y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:40 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM3J9Lo038796; Tue, 22 Nov 2022 03:40:39 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2175.outbound.protection.outlook.com [104.47.57.175]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnk4q0hp-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jmiEd+hPqqf7QNYL1LK8k5nsQ5kaL2UFRwbPuV9RvlbQaaJ3+G+1Vlim3ZYKd7Y54gakziKZgC9m1BhmXaJ1d9NJEX48la0XcTWbZWgfv2Is6mSG2uKwih7946tt7R3JmGuPe1t2f6MPGtVm//v9h5hs0f8w2ZD4L4Wyg9mLFSIeLn2ciyjtpnPgZyDCfp2VlPxQHSyAgAuFyahp6fQHP/qLfoTchu+VCy31+3LAFzl+hxkUaIDxqdkS75+O/CMKtyY2+lUo5Vy4QcX6PNgem/jDUuNOZH8s9Zq75oxMgh7B8gYISqG/sWCfFEOD73fnAbVcb8B6Fr9IKVLMSxkL7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pEjH4UtKN5ldCSJRRs8gm2F8Sz2Vf3U8CsNBV9piQtY=; b=kHTAtjxJIsgOmCuZNENVzKoXbOvKec0zaJySienx5N0Sk+ZqAx6jfNfbnqvlwdtbWtdrkFOw/ZX+ms1/nnSmNGxITFnRmP+Dh3kzVZSJiXbobdTI38vkeSyqx4ad4ke2BeuqvJBog06De0y1MHWQfKKh1rExN3oP4dh8Q2Ul8+F6ahl8008kA8XDckc+fpcPpDXNnE2e/V0YMUpcIfV9m8J6j3JIYXSUyyKgNiVu4Y5ecUNoHryyYP4852JIqJ5PAnBOpapRWWDXUWqO4PlS7WyMyC7osKs3hwT1CQKFONCNL8sWR73mxBVECxCeq6+x7LjRbKQm7jomuY5ILBCZUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pEjH4UtKN5ldCSJRRs8gm2F8Sz2Vf3U8CsNBV9piQtY=; b=BPCm7JUTIRTibJhn5tnj4lnNzV7CV168IyCFew+w2WlXzzKOZ7tReTOLR4uRZDWxVeAJWqng9Te+l3idHKdaCmI+CjsKtgfGHHRGjOdcWcQmLMF5AqD9A4+L4ADYK52msN/28Ix94v4nkAN755kBagTvQa1LIC99BZpKIXtiRCI= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:38 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:38 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 09/15] scsi: zbc: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:28 -0600 Message-Id: <20221122033934.33797-10-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH2PR14CA0028.namprd14.prod.outlook.com (2603:10b6:610:60::38) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: 50b8dc4f-6d26-4ac8-9d3b-08dacc3b5271 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5IgovelwQmlLNknV/jMLJHn4FwGlHE4ZsDFkCAdkqN/8z+G+5mQspOXOIPUBGUdNwQptjvx6stAqujOubebQFWzkcleD99Sa/MFo1nU3iMdFI/vwpXzH5IGCzFEwqs9yjzWlqGptUuzOa0R+yByOsETL7elbNn3xOtT+c6iArpl5w0bfRDz/jI7rAxhVKXczzFy3sZS4sXe5usVpDo67OErExzF6Ro4iWOidTIktL5IKmfmfp269NxemxqlnMKNnt1bVWi8Fqs6ga0HcN5wxOyzMNLN2Ok3VwuSxUn0SVlB+kWU9uIOVJsawEKD2LSmbwKUr+89pxvrmmqwispfpuAdRH/gekD+nQ9iTGhRSScSF6UAtOno/gwE7AMYOS+7ZDVTyeJs0kfziOFn7QHA4qBy2S3A4BQ1UI18eaom/vWF/p9XgiBbCAFlm9Yr1gpALu5SmS7ffb0Ku+KjKddeAZDoZ5152ONRecq6Mgv3EHO2OBOBNngzeKKKrpZMIG22GTN66Xf1yWvSgaPvtBRHnNOwJDebD4OGvefNGLGXiwt3YoT2z57SrLvHOebeQPhAY5+0rnu4cA8y+M1HMhyw7Xvi09V+N3X3b2EwnHgUKRAEVFLm6zVXeez8ch9yy6ZSU X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(4744005)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vpxGWNUZCu0hdJj/e+Fb4Lk8rqpc4z60BfW1NrFV80wStjLLpt/o7xM0ptBqbdBaRht+J+4TJhX0ChTc1jLlGeoA3o7dRfgEh+OqKf19Axhi2yeZFLoA63BJ6QnEjhyLiODZAHHqrqt8uA12dFZeYL1SpI6Up3ZZcGHLbwpnH1oSW0LqYWenqS1egemzg1GowIUHFm6OWalOb1ZLGQFZ/nICdBykNM+4IKS7VeiDx9l3HzvkuG7fcd6xd8eJP3QpC3VgUnbSypTXXuWFG8wCyXbaRK6pOsqKdX3FlFucfu/LTaxEsQvxYyB3kEwt4wT4voqmR2yu/pxMAVaLNTfm+ohdS727Q1vCa/Cljy2XRSnO4Vqe6YQbfXQWpQjdOvtopnBzK7O+oWYSApaDfgWE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ZxpA8iAEjsh5aEzhloQ7E025o0YF8 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50b8dc4f-6d26-4ac8-9d3b-08dacc3b5271 X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:38.5910 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5+zhdjgixEYlsOLKAQWERjeR1/9iuj4PwxRPJ9XF1CRKgnyvfhX9o4Q8VywbP1PJF9tWtYs9A/hf6aLhjdvJncjlwbCsqsGzinY6l88ikGQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 suspectscore=0 malwarescore=0 spamscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-GUID: sloRHysK68MoysQ0yij-fyNddw4BS9mk X-Proofpoint-ORIG-GUID: sloRHysK68MoysQ0yij-fyNddw4BS9mk Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute_req is going to be removed. Conver zbc to scsi_execute_cmd. Signed-off-by: Mike Christie --- drivers/scsi/sd_zbc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c index bd15624c6322..e6bfb3a7cb94 100644 --- a/drivers/scsi/sd_zbc.c +++ b/drivers/scsi/sd_zbc.c @@ -157,9 +157,9 @@ static int sd_zbc_do_report_zones(struct scsi_disk *sdkp, unsigned char *buf, if (partial) cmd[14] = ZBC_REPORT_ZONE_PARTIAL; - result = scsi_execute_req(sdp, cmd, DMA_FROM_DEVICE, - buf, buflen, &sshdr, - timeout, SD_MAX_RETRIES, NULL); + result = scsi_execute_cmd(sdp, cmd, REQ_OP_DRV_IN, buf, buflen, timeout, + SD_MAX_RETRIES, + ((struct scsi_exec_args) { .sshdr = &sshdr })); if (result) { sd_printk(KERN_ERR, sdkp, "REPORT ZONES start lba %llu failed\n", lba); From patchwork Tue Nov 22 03:39:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 628197 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01F4CC4332F for ; Tue, 22 Nov 2022 03:42:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232243AbiKVDm5 (ORCPT ); Mon, 21 Nov 2022 22:42:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232187AbiKVDmx (ORCPT ); Mon, 21 Nov 2022 22:42:53 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15F6728720 for ; Mon, 21 Nov 2022 19:42:51 -0800 (PST) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM38jX9014952; Tue, 22 Nov 2022 03:40:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=0oTSuGBL9ZxzufwokOoOZu1xoYKWn43fHHshoZcS4+k=; b=nt2EakGthyXo8cT/WQN5tSy7qvopU2zwUHXLC5zudVBFjiELX/9JIkKnqZIBwpF3yyQ2 DtCMbKb/u/tBZZBQ3Y1ukdSpjxHf7RdN7PzxiFOimpcNqsv3N9+o+gAE3FqdnwOju6nA QaIgzMBQ0SAmOs9XgZwsxEaAPWhRh15HHIjkIdQtipLwyQd4Ykm9GSqGACBSYzbX1dBu vaOrFtle1SNo25yQPtHrtBwOuyQdsRIDZnT2xEMNDcrdAGjYw9ZA8oiT2Q12ASdW3Feu SZZGsv/jYuYB5zr5vISFLVzbRNuqgqUzy7qy6//tYAmtVTr7t+hYUIHSPmkqN2UcOf8U Zg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m0afr2c50-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:42 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM1Krpg007462; Tue, 22 Nov 2022 03:40:42 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2174.outbound.protection.outlook.com [104.47.57.174]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnk4y8hm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QeLWMdDUVdaFNJQpV3tq+6/TDAIvmwQ0DPV3bIkN5yk8n3AeRpCDkMoxjsgfURMBI+NIcH0MLg7SWOBavvvl3Qi4snLVcgwq+tx34b5vlxFDwbx1kBoyAKR/7UBkuDAFjoIrSlZZeb+ubySqAwBBecWNI3fuBmkS2M6BzEt21joeBafZ9EgtIZSklHXzWVkb32+xmZPpXFpIXZKc3Qi30+u+xcviR/LvSJKVCiSmCxEKuxF3Gl1IuqZqHCX9PbChRp7KBWBjw5pGWOGlyzZEEiP7zn/vYODaK6TcuYw9HRgWAYC3cKH0xq/AIpug35pP7RPRHly/hTEuf9QWNlghxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0oTSuGBL9ZxzufwokOoOZu1xoYKWn43fHHshoZcS4+k=; b=BZcJPx1B15IpbcRtAXVOeMOPyy/UdWogL5neuRUJHEWOY0GKE10adKaivxhf04a/xxo8X2P2X1498Abn7juReB1m8gdL9L5d2G6OwulJlGTddaOTKVWGZKL+pMCqiP5F2EbyhpZdGDvbi35NkunNvbFCfwYXsTJcODTav18ZAZjYstvIy3eJijhUkPZJQ+iXrf3wuKiM8yhyt1SeFP4Ku3I/an2u90EWqz7O7or3eQXqPj8gH3Wh3cpnoKKZgnY86+90LoKQQ965btAwfiNb7ExG3476R20YVxr1djz8Pbuai7Gq0I8/HBmQThQ2+7/z37WXMtZHHry+sIcoeb1DOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0oTSuGBL9ZxzufwokOoOZu1xoYKWn43fHHshoZcS4+k=; b=evvOJGUVJXftVloCFabsEk76+OLeRt5uF/RXAMMnxkmbBXxLgZHw+CfqDLOLM1/ykzTRaPR8Dhl2qgjQWOWYUUukeSVGS9XvEWiSgiZScfUYEFi6ETOKIKHwVKQf13t/Vl71EgHisIK2+h9s2pV5uXzPsNeaVoFZwshabmWZqOI= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:40 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:40 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 10/15] scsi: ses: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:29 -0600 Message-Id: <20221122033934.33797-11-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH2PR15CA0003.namprd15.prod.outlook.com (2603:10b6:610:51::13) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: cd924b1b-80ce-4e38-c95f-08dacc3b5345 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TZSea4+uSUSLLz+HZemGlC7izYuIu0+2X7fjqeCYP/PP5oJl2QlVnLEQD8hQZATr6eY0HMfefl9Fyr+itBTvIypSwuaxHHNzykAgiPv0Gs34ALdMviksGt4NsViD/VYQMhFsng5MN+bpmlKd1AYHz9yxcmhELWMa1k8g2VV9/ZhEIsvPiUk1LXB5NAq5KAO8RRezy5xxuxPxZs6yqwqRPQyd+b1/WsGjQFbbofP04ZyhpkHg2CVT/Fsvxf84BI+890DlQvAeLo9/ZEvbWKvchxG2V4afIELF5jOZXzVkg2zvg7oh0MQfIswrxC8UfUt2zKS8M6wGP8GBoiBZEY/po/gO1ZOAwwW1Ttlqo83k26sgWTweazJxCmZkq3/GJ04KrLgGVPOMCx667yMcn6Bf/qWKGQ/Xw0pvfhIWC9PcDCzSTQDdgNNwdZcne8rI+0O/z5P4xB0Ol3e+N+cKhcnUlINI/z96haBKlvpvzzxXx+rvzM4cOELT9L6r5ZU3Kuquns8nXPy9aJ/vhWe6lUnvxQ1ZFiBvjGKSfkQWY7uQ4ZeDr43MsL8vX3aiay+Tq7N/NzufmuCMvMyhBnBiAbi1GjZJANwEP7uOpe1J11M2cByhNsjLj2IzWDczjl7oqgN/ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TC+ywx83qa+kPXlaRuvCTk+5HXyXfKUV+fFVIkCh+y+6d+6OjfvgKFlKqPx47EoznfRxB0ZsUkjCibWwT11XzDBVDzFLtDSqgI1vm/unCi8C2hWtxR6SfbNUGryyM5QK10ax4heS9RtHjlYfrWU48rY4m6uh4SYCLVhMXEr4qAn8uSXtDCT7hGGU3qL86inrywBactfvVMOZCNhruEtdypVSKSJZ27cKAv+4itiWEnl6JmmI1URiPlyO/2ZqKFkdoR+jajqgV9CpllkUz/yI6PEHEZ5SgHy7XUsfnC4jXVcf1U85sZ3AxMdjwMCWk7vtuAltqh/q3TlNPcmzqbg2fIlykBqoj9XXicQ6O5ALSsvXE1gWl5pQz/2ZypIakrHLoLiSZ/Ryetjk8PhC+1jTudqB43A9YmmSlP/MM4QcVQmkgqeE00A0MBhhOOIKHI5klIqKFNtqlJMWBIrXt5EghZCIra5jY8pxeJTQyc/09UPNwcZm/YAi7UexjKeLehOy1ZZSZHlr5C251P8gbXwU8Z3mAf/Vj1rKDKnnk/AlP47duzcGfxS6s3KUQ5FObjJ8HGzMCcEwlNqoDZBMgSPyt2oCDN/KgeRzjkr+y939tSCz7kUyfUvKyu+VSovLrd+gh7J+EgO4pSDhfpE75/SP09MdO/2pnG4wm8B/+SPeBYKxojkeIdX+hel601cmJQzSZxBa295ZTRJx4+BzoEEtXWG1B5iK+9gGJAlO8hmWKGvMsvyCRK5+mNNCWw1ZJdhqC+sdh685XeKa31/Wkhxc1yN3ADG7gTsTb7wH+tcAgkniye7Qhgu/YwrI2+NYn0L6e92iH0q1wQbeNEXuqot9/bFVKvyFknk+oDGbS8Sy7x7Q6oRcr5hWCrSYd2MsFR/xp1vXeKwbJqL9jbjjBdeK6BxMfs+i+yWU8ytwwJVfYaqv1M/IxYW/1LpnxWOcJOQJlic2DlTx29wHaus27tRF43UUNMKbepnPjwpZJ8DyePkyhjk4fveIT4i1A0P5lBadYq023vM9brLcKXEUpD5SNYmYXGUD5aeCJODbe2nvxp+fB6cpdEgaklRXG14jUneeIWNU2hARCSmwdczV/e3vn0owlIWF6dbahOlJJQyZq9Ud0t6WAUgpKSOjdclxZw9MGWtaIPdZ5SCt39nvmj6lI+2l22niZLbdPv2EIynISxI9pSI2a24tqv6Z9GeUOGjrnXpLiBd8G3h6ThO0uUJR0l0Iwmxut6fJEfUchd/7A62wOtLGGZadXvJgmb/ZEl2FtGPH6F2NoFXRUce2n7Oyf1O3nmXXSdbXjaKxJLzdHAx0dioF+XkPgzRauSwR9ob8G1FzGJ7Wmk9kJ4LEuyW2LVYEHrvsGyLMHYojyUfDmB/yq8JD9HjgdDFUneECanyzbixPB92ossK3dUojHW90wHdex/fvnrly0nlMPhJ52T9t31c4ks2IPydTr91lqPUgye7RAgOQh0DjFnzZTcChRpSNu5VngWyUtGMU36BEoVy/pMDx1iZzzdXHYBU41muFlqbnwOnbhKo9smwgUqV6lEMdRA4Vw5ailrDcRhulSiKFdR49SjLO9E8mcsG6oYTfTSSYpW1aJvddm16TgnuMJA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: v21xmnOSvdpbKWPPEPrpMuMIjfHq4js3oBt1sfPhtlgn8UKkFJZAp4sLRMYCWrOTOtLHyWhkElYgGqgxZUp/qjYcG3X5FNEUQS0uJf4Knx63SkgPJBOJp54xgGSjZQ1urSrhyYDN9zR4om7X6HMLc1VnRfk1gSGvx77F81g5/JrVToBV48tBWYYfqVoFu51PLyyzRGZH+fPOM3pPX+Kiac6sz9V6ZFQNDvhcFogV4geZXj0tFOAwMhJWDdzB5Q3y7AR3kjF9sy7I0SAo874UX8AOK58wozEgfIn8hDTw0fZS7gi01ErqvpEOjpNTh1OeRgE8bo7Y6pEmYY8dwiq5cjYXGNwzxqLi6Exu5mgPwfI0tvmqJ7TDi1/5NARDofwTKdecIW3sP3RkssT0+X358jykJgSNiyhA4tjJkV2jalOqgzB1E1PWp+eajqJHwbvK8OeiJp346ReudJDdDlIR1TUU/ZGb2h+FcJI1xjXsZjgbwYMUY+UELqU91QpPbodAxRo2AWrPSYIqRFKSkDbVdnBMNH/lzZwbABc6ATWEWPlpB+1E8iLvm7Ltf14E8G1uJP/Kxsrww0gCwOKZ+UdpfP65+5Q3u5FJEyVmFwXZRFtxdr0HyoXpBKAzYoqapgx08PbO1uPeQWSN01ZYYkOJ5gDZ1cRp4RGL90zEht+x3/5MOloHPRacu5nP+ZnQ1MaGimhdyNDS37sv9YwwLree1eH7SySsyWOzGBnKQMhk+MKNqsaWKVpeaUdC04yIrtbsup/ontKAe7fwuLBLkz1QbuZReljXviSJl+D7VTIfS2o3rs0K+IXJYf6it5hEzFsCdvd6OSmxfvaiqn0fYwjrHZuQPzxOHe8Jmu+Ea/be4dWprFTzQjFWTms6hArGHV66 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd924b1b-80ce-4e38-c95f-08dacc3b5345 X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:40.0284 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3T+MJdPUCWp+a4CdnplGUvQAjft7tkoWtJ6E9swgH0X/npJ67W6qAq5tI+MydrHXlwy4mzY8DUUaFyU+eZ2jmD3jRes/Uy/fJWCfsTQraY8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-GUID: rHgmJtWe-L17T9go6BMwlhbg_ginrN-G X-Proofpoint-ORIG-GUID: rHgmJtWe-L17T9go6BMwlhbg_ginrN-G Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute_req is going to be removed. Convert ses to scsi_execute_cmd. Signed-off-by: Mike Christie --- drivers/scsi/ses.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index 0a1734f34587..fa9966331670 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c @@ -91,8 +91,11 @@ static int ses_recv_diag(struct scsi_device *sdev, int page_code, struct scsi_sense_hdr sshdr; do { - ret = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, bufflen, - &sshdr, SES_TIMEOUT, 1, NULL); + ret = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_IN, buf, bufflen, + SES_TIMEOUT, 1, + ((struct scsi_exec_args) { + .sshdr = &sshdr + })); } while (ret > 0 && --retries && scsi_sense_valid(&sshdr) && (sshdr.sense_key == NOT_READY || (sshdr.sense_key == UNIT_ATTENTION && sshdr.asc == 0x29))); @@ -132,8 +135,11 @@ static int ses_send_diag(struct scsi_device *sdev, int page_code, unsigned int retries = SES_RETRIES; do { - result = scsi_execute_req(sdev, cmd, DMA_TO_DEVICE, buf, bufflen, - &sshdr, SES_TIMEOUT, 1, NULL); + result = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_OUT, buf, + bufflen, SES_TIMEOUT, 1, + ((struct scsi_exec_args) { + .sshdr = &sshdr + })); } while (result > 0 && --retries && scsi_sense_valid(&sshdr) && (sshdr.sense_key == NOT_READY || (sshdr.sense_key == UNIT_ATTENTION && sshdr.asc == 0x29))); From patchwork Tue Nov 22 03:39:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 627862 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB15AC433FE for ; Tue, 22 Nov 2022 03:42:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232240AbiKVDm4 (ORCPT ); Mon, 21 Nov 2022 22:42:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232075AbiKVDmx (ORCPT ); Mon, 21 Nov 2022 22:42:53 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98DA227DD4 for ; Mon, 21 Nov 2022 19:42:52 -0800 (PST) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM0maVS008057; Tue, 22 Nov 2022 03:40:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=QvX/COtHBCqsajW22UDLZbUZ179+3+Hgg+aYthHTgPY=; b=egN9CZZkpYhb4RZpfp/GccqdI9IK27r97NDWOGdlxr5dvp0NhdKpu8Zjy7N0bnPqAZ+x ktOcLXMJrxMwuBqjReCteYX5Rz+I2OjI3jrLr7eHPX7BSR0ij6ui3O2nTKzvODoYAa+y NSnnL3ILrypDgsBB6RH2RYn9MnOjNuFsMRriIJMA0GgOj+MNd3XkZP50TuM0Ck3q3NFP OJIrqVoY+KuQ6eEjJA6hH2kvfyY8LNxTrknXRMav+FYlYnNsbaG7fu4TEgImPTv/LkvL 3jbCXXa/0lqaQAIwF2bSqmBEME6eILdBs64tpUGDjLfgLwGCZQsqSeCC9XTQ/elfY+Yz lw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kxrfaxt8t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:44 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM33drS028960; Tue, 22 Nov 2022 03:40:43 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2174.outbound.protection.outlook.com [104.47.57.174]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnkagjxd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SS11EmYjrNUJGDuuG2cRghmTTYaCfo6txtdIr1kWZjiLKXt+H07Em9I7sZMZVZGxt7dYkg731M+i0OFnWpmZFdO2i9hOR4yS1jNvPoJIdOxzMbhS5X0ktg/EccvvRgUvd//+plmiQJDuSc7KBtZoadlBMQUig42X80xT0mEME+9RupQe1IWI1UsHRCak9NA/oXcOduKVfH78MqdV1gbj8Kr6vjeccPr4OXIe9djlHqS5dJI3xAeN/cMF5HyMHwAPeLktCWf+jIBvtxfvvYupXD8jWvoOGe1rcLQftrkoDMOslhZbc3QcQRUBoZl3x2coa3xTtvqp0p6IUfGgdyKIpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QvX/COtHBCqsajW22UDLZbUZ179+3+Hgg+aYthHTgPY=; b=NPGjBBXmaVddZnP8YEM8VOANf5ry5y+h4j7Ix1zF6uzp0FsXHHiCKnd5nnSIDzRJQb/M2HlCI+Ux4gBZCUeFw/UEEOPirkbku7yyQgIaX1GOIC67DAcdRp/mhHS4vYofDq9s5UqZ1R3zc5KMUEhTHfjYx1HHtgriDffGZ3bauj4edC1hGxyvOcppbqUkEOtMduv4eGXvoo5NurPgP3XnP85lwBHyjhBmS3lgspbMpQP8sICgg+SKvU/EHVvLhBcEzYRwjk72svBcIbMEUbLhqpBT6U8b8lF+HKocZUVQWIyR2Tao8Svln2nY7hZhtDlPmHoG/nRhetRywIyz2GMwrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QvX/COtHBCqsajW22UDLZbUZ179+3+Hgg+aYthHTgPY=; b=UPgKGYeX7QDLDgbQVtZJE4n4ktySpq5MX7gPddQ3fCS27DASHIHZZzMzwfinjy9EkgCrbiAjjzUqkxxdM0gyZC+VEoQfW6xxXBgL8lotYbiGoy9KRG5c8ZKgqSuaExBMQn6CIJ+VH0VGEtRIWzjhxPmfCoNpkuMO3nLl3VEzEM0= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:41 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:41 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 11/15] scsi: sr: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:30 -0600 Message-Id: <20221122033934.33797-12-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH0PR03CA0065.namprd03.prod.outlook.com (2603:10b6:610:cc::10) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: acb15c22-1c56-441b-a59c-08dacc3b542a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 62gbbUnJeWaw4O8RFbdX/krANictR4LwRSHEJyhG1zf7Egwl7zUY1YaHP7djdyzD0yIrC8yowkgy50asbDWgHOKKmU8FS78P2v97Tz0Ax6HuhKEdUEldz9K7TwlS3sb5TXdOgC5VeRXpssDIjnjSA5g4z3co3JxvR4uEN3KaJGioTmAE01Mw2MXRWVgrOWLAl1+V928NlCYZJFuRTwsihuAYZDHoiSQxBiryUPPyvIXsF387WzBB92nlNHQ2WO4LpWmVkabpG4zwkhOn7tgZKKIgiBv9VHfWQz3oSf9DpXEk/EELIAolz036/WzmhBwEF0dV+54FCJoQg58gtqqiv5e/5GqCTFRDs62P80Yue1uqMdvEpjOBiG9AlWIfa5kE5Q7YhHpM2EfzFRVw2+Sj0kl/IjEmf0mrg9W2ehrl2QloolM8S5kILOQLmkGV1touAZwkeMDck/IhROCgnK9S3yN4IACcobHP0fHLnNLqRFiPYmNICRQS8IQ/jyay/ZGX0cT+QeIbCyxq5D3YDlZXM5R7OPLUgqrioyk3+HAKoDt5KC60ciSSnzfvqMl53K4Eq4qBQ289MLHSLHgcEhGuZ8nv5rRyTYOnpFI4ApTl7VdT+aXbWMEwZQA4MLmXf+9T X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NsIbSX3oUCgBY8D2jIzAlKnxv2Pi2ViBE56ltZz6LngXn/z97g9sPZM+A8vxncF7fZLvbTWkoa7Uf/yCVVuvlzDs1CFaZSIAv6egrNCdI/BCEbbtZwoaQSSTVTyl5Cr9kEZOmgtilFAZUnuhf+zQmEvPrYwojdFeqZlt6Y/6FiLXGPKFKJ5pusM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TUHDsx4uwDmOeedQGjqC5OONUAmR0rzAoSXLgVUbmxyV7yKPsLSFTPxkv7fp2rtXADzmCv15vE2DlHbZV7L0CjbFBcOZUbguP8QsNamq2vJjOd8iC7vw86XvDtVoqRp75KxvFbmm8nr7zfkJlaqOx9TwxCIOMDd/zm0NA1EiffVRvzkq3w7XIoByh+l9+uqFOofe227Bvqm6degt05tGPmvpsH1fVS12bS8lo7TSdSBmNrgb53tB76Bgm3NfZ/LcZf2NAqUeQ7A6N6oW/Wp428d5Z4NcJPbNMLCo945mi3gKX462kThW6cA56uqiEa8L+hElCKbvXvMTm/vt8bBPU7zLPADwxc+A== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: ctzALXEd6a3IgxbY56p1Er8ruyCLY5zYx0u+0iAC/uuAzmoiadkl3vubVvpHbU2TpI+THFICCcC+lku8aIXmkazh3YNj7If0vZwJU0U5TCEpfZJyzTKUPXkqcT5/Om9FA4tBP2C0RNF+hXq4aASBmEMwjYhcpLmKnpFAqF6u8FjtuMkl6ahjUtF3unpwDqf1KdJ7v0WP09w6l7SFkDxtcudkHnL/jrZTimseh9XP73I16ZqyYC4EeGCg/p/dWP/LelmcH5frg1QmKmiKjpffXCq6qVinRMLGTNY6mE0v71lcydjEpHN839/FOZFBLg/uXsBk/UAXBT77FpjGmShVF2v2uL/CQfj3HyJ0Fy9DCM6W1yWzX/6KPe0eTVzsZaurUovRSc1as0KfLU92Mo5Wj4JNlO4v8v1auns4sLHiRf8i83/q+HkQasOE9tFaG1B+wc3/LbgQUHFeUE2u8+VK/JOthMKH0fZJOAoel22z3N6ew7Syb/+9E3/8HAYjuwIIgyw/NM8su13BhSyg6/thY2r2Po6/PfSt+rHvJ9zI9SwfrNqVOkwR8tB8i/sDjqBiiyULgKDTAhBBgylFfNxyRw92efXz6gkKYU9IRRNid9Y15SXddcI/tgdCmQjrOSxX7Wz+VptbNOdt2JPQFWuvmtdlknwFfTBMiUOOVjgbQdF8cJPlrpG+Qe40HPKk1g+N+TbTZVx9SJo9Z7ONEsmaZKsshXtFTga/rurXsN1GD4tG3b96/nGi8MkEjLjDEDe9fi7/34tBYyj2b9L+b8exYWmnS89S2VqiRbBGyi6h7xkU+dzhpJqSebl5xue2VQizN7jrZEtcxmbZ6t/e3V/DQaSbijzx+rmy9+Q3yyJMvDfSgjb6CJwkpY5s6ZotZkTD X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: acb15c22-1c56-441b-a59c-08dacc3b542a X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:41.6376 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Yq08kn9Ec8tk84eSUvxRlL4dpj5gl+d2lGxyfJqgaGps1oA5pl3mLL0WxDC2SYnWTOWkTOyyr4KrEas+TSbyWvGXS7hRllCJgQoMCd0sOzU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 phishscore=0 adultscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-GUID: OtnRrG5PpsK97RYcn8ifEeNjMQToDDEf X-Proofpoint-ORIG-GUID: OtnRrG5PpsK97RYcn8ifEeNjMQToDDEf Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute* is going to be removed. Convert sr to scsi_execute_cmd. Signed-off-by: Mike Christie --- drivers/scsi/sr.c | 11 ++++++----- drivers/scsi/sr_ioctl.c | 9 +++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index a278b739d0c5..093ff071bb3f 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -172,8 +172,9 @@ static unsigned int sr_get_events(struct scsi_device *sdev) struct scsi_sense_hdr sshdr; int result; - result = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, sizeof(buf), - &sshdr, SR_TIMEOUT, MAX_RETRIES, NULL); + result = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_IN, buf, sizeof(buf), + SR_TIMEOUT, MAX_RETRIES, + ((struct scsi_exec_args) { .sshdr = &sshdr })); if (scsi_sense_valid(&sshdr) && sshdr.sense_key == UNIT_ATTENTION) return DISK_EVENT_MEDIA_CHANGE; @@ -730,9 +731,9 @@ static void get_sectorsize(struct scsi_cd *cd) memset(buffer, 0, sizeof(buffer)); /* Do the command and wait.. */ - the_result = scsi_execute_req(cd->device, cmd, DMA_FROM_DEVICE, - buffer, sizeof(buffer), NULL, - SR_TIMEOUT, MAX_RETRIES, NULL); + the_result = __scsi_execute_cmd(cd->device, cmd, REQ_OP_DRV_IN, + buffer, sizeof(buffer), + SR_TIMEOUT, MAX_RETRIES, NULL); retries--; diff --git a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c index fbdb5124d7f7..4a2342888a4f 100644 --- a/drivers/scsi/sr_ioctl.c +++ b/drivers/scsi/sr_ioctl.c @@ -202,10 +202,11 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc) goto out; } - result = scsi_execute(SDev, cgc->cmd, cgc->data_direction, - cgc->buffer, cgc->buflen, NULL, sshdr, - cgc->timeout, IOCTL_RETRIES, 0, 0, NULL); - + result = scsi_execute_cmd(SDev, cgc->cmd, + cgc->data_direction == DMA_TO_DEVICE ? + REQ_OP_DRV_OUT : REQ_OP_DRV_IN, cgc->buffer, + cgc->buflen, cgc->timeout, IOCTL_RETRIES, + ((struct scsi_exec_args) { .sshdr = sshdr })); /* Minimal error checking. Ignore cases we know about, and report the rest. */ if (result < 0) { err = result; From patchwork Tue Nov 22 03:39:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 627861 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C56AC4332F for ; Tue, 22 Nov 2022 03:43:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232242AbiKVDnG (ORCPT ); Mon, 21 Nov 2022 22:43:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232229AbiKVDm5 (ORCPT ); Mon, 21 Nov 2022 22:42:57 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37D7E29376 for ; Mon, 21 Nov 2022 19:42:54 -0800 (PST) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM2x7wV027289; Tue, 22 Nov 2022 03:40:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=e4/vqbZpBcy1QdnRG1cuObCABYNrd0+t6/j6bN1Zx7A=; b=J4s6Lh9o5fOLlsPjq5lHUt6OpgtiBEQyJVzGbWEsjhN2jFQhggYj+QPlXn4uuQMX5IKy +dKYI5P3InqJz8gwHjUoL2Kgg3Qo0hQigoHbI8hOecO7u+gfYhNCQGYWhXlCTQMtLdeK 28wly9j4bc7jbtMe4NGZGif3Nd8jffmWJHBJN0yj60MpM8/HLRNhho7zD0ujS4X2Hzu0 a5dHC6MyeMXxVDDDVVyIc7Ky85mwD/rWs2Cdrd73RbpfT3/LvHNusSjxJt0GIFBxUfZp 0+ammw5CztqqVFLk3pUWH4ZKDb96nv2nTCtFbjttS5Pj64MPwpwCyhyjZ7wmfdjVKekL lQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kxrd7xjbs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:45 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM3RJeW028973; Tue, 22 Nov 2022 03:40:45 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2172.outbound.protection.outlook.com [104.47.57.172]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnkagjyb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SLoAViyePN0c0PuSdXq+eVyujUrKtc+rblkOga6H1bpGK98vrPVO/QpiOrgDU3462bKMgUohqvaA0hW7TCXfLWvQIesN83noQDDmU1yABcZP9o9HatN1pzh27TYSR28ZR/rN2ihr7ajcBB2Cr3VXX2FPiz8QmCrNUfOWMI1MVMkz82D/F6QmRS74+wOt+NUXeKTqgpmBlQ5HVJk/hCsh6qimy4qNh4DK2olNdXSmslW+8f+6PCIWvu208RsCU5EHgQxWqslPI2gqhykM5STQaTu2zfGJeEkC5X7fTVu/cPEEtkfElXzIqvbI8OPJXqQ2h+RYoH2TDclf4/8hNA8ThQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=e4/vqbZpBcy1QdnRG1cuObCABYNrd0+t6/j6bN1Zx7A=; b=h9MPKdu876JU8NdPVyft7bOpi4rlO3MYe1TR8xHhUvp9msNQvsHGND2KL25nrHa5VzEU8rTB/N90VGYjzguD5rMbK0lFZEwupGOnSKfthC3ys3WaB8dHOOukkfU28rP4iOWFN7mLHprNBIdHqkYwkR79qTj+hY2VdbC4ubIVJeZqRMqn4qeR6nt4OsKu6Yfdo5IiLi+axxd0+5SIyppaKhGQxJvawpmgF2g2L4ipccmsxEUDA46+A66+XIjfhJzMYjhW29pixI/HheDVxgy00qYY39dxrGNVygs+SFTsfHGOWqE8I3mZe42zXCdLaptCHsRqWF40xq12DiaVzSj6ag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e4/vqbZpBcy1QdnRG1cuObCABYNrd0+t6/j6bN1Zx7A=; b=ct5EjqL9hwJfVa3O812VpUCYXLpg2JIa1MAfqH0EIaW/Sad8qHj7Av0PxYIiZnBu9QcuIms2xBOHra334donYlLlqg3ZLY60/DT/jnMSCyEyb9P+rS+tHZbAULzEON0AntJD6iRr/19nlTlf2P3mAjrLIZ+xkooE4gb7/OPEuss= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:43 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:43 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 12/15] scsi: virtio_scsi: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:31 -0600 Message-Id: <20221122033934.33797-13-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH0PR03CA0067.namprd03.prod.outlook.com (2603:10b6:610:cc::12) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: ac0f0756-2256-446f-1d5a-08dacc3b552c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wAQfF9bKv5ZMhcuPOvLac4zLTYYFGaqtaOM32oE4uu7klvrb75W/JlQbj79rIlLaiYf2zdQ3nLZpZQcrOSQji67svKmTZsav/ymElx6Bd5UfRL1FCvoA6wtk6+tV8pX7EQduv9JBe6DSEGlmekGXt7UYr6PQ9+YSBtB9KQKfydstY3sXbhhiTAYFoBZk57p3DrDNb20/JgiFwolQddr+SVfhPyJpza9py9TjtiQihO0R/GIQG6bZZnuOP2BmudKgj9QpzTP0PqE7pPmG4KvMzsax3ixsQAt774IaXfKpUtfEHFPPPmEPkpw5dMjiDrUemUoTEdf8iUhx2T1RVwai1aCE8raHV59/AxdVLwmOLoD2O8gC729lVzYRGKO/u7D0GhbTTvRwN9bGoF5m6wMl82g7ug/KIzLgm5dk5r/kMsTKNOJ9f+63SDUsWobOMAcLtzEHdf3eAuWrzxfFXs+dluH/WshrtsFd5ucoUT/npxEjFnAOtHyyXoTvJShJ6HSSTiEShhOSDdEVh9fo7bysV4DmvmqegWzBmR0MtNPQOECQSr72S/P9dRTXR58h4LpyLIRsf67T+xDsvDvQo80Mv8FtE9DTlv77qBKH0G+AeZ8/74cUjDuKWK91WPL09iWY6us6whgi7D/zomW87dS1fw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(4744005)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wsD1KMmSVa0k9mz5F1hizaMG3A/8M0Nc6b7D0gJBTJlg+AfBvviq+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eOQk4xU7V+mO2evfi/IRPy44g8mWew7wMwRj/JFF0gQIoc9l7HDXBgxHmbEeLeJuQ3CAFSFiNwQRAndact3HMouDvGAfIjF2vADfIa+Zu9HN9+neXR/IDcIDcULUGcUuQngUmoWeefWuihn1KU0tdZir2l1w56PNDUTeju5oomaEKiCe6dc239omtW+cPIQKlB6OtZGKWoiTw2juBLpkLWZDYUB1BO/6+9s+Re89ncAs5rrqFj/z2UIAZDkAs9BeqZk1zJ0pQJm0f42qXqoiY9fQKhpTpTOHILdv1dLqF7zxgFZv+bIKkYts7whaxGs+GfxySH73QlVgVjGtt0iotM8fqbaDwo5cBMdYgpUFus9O/sqxoQRBqwgteHi X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac0f0756-2256-446f-1d5a-08dacc3b552c X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:43.1062 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qy+qs3vJCjClG7MwWJExKjLyodjK+UOfeNVcVLYkGtj4gmCwL9ZejxzVZyS8/xNOtsD/WxGw6EMeS1v2NgaRQKaWwZ1/qmn0Wcw84rahkjM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 phishscore=0 adultscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-GUID: moN1mb39dCxxXW78FYyHbvQ6-qz5Rirp X-Proofpoint-ORIG-GUID: moN1mb39dCxxXW78FYyHbvQ6-qz5Rirp Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute_req is going to be removed. Convert virtio_scsi to scsi_execute_cmd. Signed-off-by: Mike Christie --- drivers/scsi/virtio_scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index d07d24c06b54..87751287d506 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -347,9 +347,9 @@ static void virtscsi_rescan_hotunplug(struct virtio_scsi *vscsi) memset(inq_result, 0, inq_result_len); - result = scsi_execute_req(sdev, scsi_cmd, DMA_FROM_DEVICE, - inq_result, inquiry_len, NULL, - SD_TIMEOUT, SD_MAX_RETRIES, NULL); + result = __scsi_execute_cmd(sdev, scsi_cmd, REQ_OP_DRV_IN, + inq_result, inquiry_len, + SD_TIMEOUT, SD_MAX_RETRIES, NULL); if (result == 0 && inq_result[0] >> 5) { /* PQ indicates the LUN is not attached */ From patchwork Tue Nov 22 03:39:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 628196 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69B8CC4332F for ; Tue, 22 Nov 2022 03:43:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232154AbiKVDnU (ORCPT ); Mon, 21 Nov 2022 22:43:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232241AbiKVDnH (ORCPT ); Mon, 21 Nov 2022 22:43:07 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED0B92A721 for ; Mon, 21 Nov 2022 19:43:03 -0800 (PST) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM3ZVTA003638; Tue, 22 Nov 2022 03:40:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=5nofshYxqzXBhNqAIG/J/gVWIRoWH3JQAkPTm5/r5A4=; b=QfUYs98R5qNvhSkT45z8Kk/FlSLwzVM7+cg3iDrut0seE+/mAiKw/ySYNzsnQB1O8LaE fhkMdJlDfqGLhnnk75Z23W6vvt42ElxfM+jdnW4CqlkTJDF4tmuVqJEBF6rJi4e+Nlps QISZbaS2BPrTRlfMOs8WWiU8ihsTj7Q42cgh8mKkIE1ZHv6dZldTVBskBgRxKTlouywN Ky5I4YdTsYrRJZ6PC6+jVgEThH1aTH6n/ojt7J1aETCNvb6f3SqMM/bEXVPdahe2Oh+w qHzU393fOraVROspIpJho4eeYGKJol9BF0Ry6hfIIaMcata8WlP9nM1Jy7EDgL+1o8Ce GQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m0edq1cdd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:48 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM1HtW4039501; Tue, 22 Nov 2022 03:40:46 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnkb0yjt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DE1Qlc2JFFrvb0MpLzqrdzXkaC/5gLNHklUUGuTEfUtw3+CVA2v05uYuQ5pBgmx69dmFrJW68eN8ecLgHWC/Z9BGWFx8PCr+xVGmS6AzcKugXxCP8UENC4UfHLafT0CB/j2NnwiyiSr2L6Scw1Qdoez/WpL84ss0SPY9nGxOeOyplycuU5ZjWoxC1g0R6aEk0qryNbzRdTEQp17Wu1EnBGaEdHb6Ac4n7SegvSmR8BLOZ0BHw1u4mjirg+WNs67p7Q/UVfqsPJFbPNx1ReT3iXkaOIBin72RtZx37tyXuNNdbt7Fh+0w+RV7qVgk0EAaMtRpvh7gxrl8yITfF0NtWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5nofshYxqzXBhNqAIG/J/gVWIRoWH3JQAkPTm5/r5A4=; b=C90+Hq2AzYmh6xtv9I1JMCedOAiMVsAH94YdEda+FNUqtVYyXZcp/kkqChymcmUxK+MbKT+yeW+yYiAGUSqd259brzXI5GJomqw710YFSfBXqFvA7p1H1YpMVTKOBUDSpaStF/KD9hB4rfCKMug6zhO5VcemWDhfdmv/aqtHmt3UVe05nCPSBH0Xq53j2YpjgINQ5fq88kQldZ4puZo2YxsLFk+H4PlUDeL3Y9GsuexnEoGr3kkmhzeJaLO6SGFgjOMb9XenXL0uabAqBefqkBsKnZpUsPHHgwNz7BaKadMElaDO3CtzaQx42+6eRf8j1IGVAzuHm8705IShbEKT4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5nofshYxqzXBhNqAIG/J/gVWIRoWH3JQAkPTm5/r5A4=; b=l6YGkhMlUB6wmsbmzc38ImAMn8g/5hQ1GJXzLKZNkRjtmLsMe2K2h20PNzdLLZm3QB/MSKRDtIXngAGnvgfhuD151LtTPzsAHOdRqUGbahHa4IBr4/Ha+bwKGoVu8kKYCb/I4VtxVv7rtxIb4sndblwGeaCmmcLT70gtQS/6AY8= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:45 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:44 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 13/15] scsi: target_core_pscsi: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:32 -0600 Message-Id: <20221122033934.33797-14-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH0PR03CA0084.namprd03.prod.outlook.com (2603:10b6:610:cc::29) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH0PR10MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: 70868683-161f-4495-32d0-08dacc3b562b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IvYVkGFQFFvrHSXTt7rzKxeodsFerCxnUNlOs+v1OxSUqrIQ7ZPh/jMJJhFYMpWnnPAOmnhYIy0rwNDeK+eSPWi5x+IFZfHWRr6DHYZcjNyw9DJSiZYxMk7EjEppNsatYkIJtUkreLZjY39dRPnHYQwItY9+Znw/4R/EJs1N4XpSU1RuQD0XS8HLBVcwyaR//znt1aPkidt3CZj2h798pNYaMhdTexPg4w/hEsngv9MjaEpxEQqETommHQalu8noPNExkGAxxNclv5r4lIACgNjU3DL0Y2LShN3LeDqqXG4sX2L4l01IppZDviQKOiKxINiLqR8sNjP2n9o/tfXijS2hjAcEiklr55dl/JcTgml1YGQajppCfDAz+xcdN/wtafaoGzwqrkQ/yzMm3/jB8J250nFPHI+i3e/Bvs7PEwR/5vUdRhEIL4Mn0UKhNgTnWjqic2m7oZiJYdSZvWPiN+Lffpb2iY3Ak0m2Az1kOGh0M2efTsEbsXSgDgsMmRq08N9sMO0PMJ/YCwzNkl/wzoXBoXEHwGhMMiEbcrGCzuCJn1P+pPYbDxuMEDCGt9FWWv3CAJDuAGxhhpb5sArYeCCEv2J5uo12+SNvszzkklZkSQI/qhVsY3f7qTkoUoTi X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36756003)(38100700002)(41300700001)(2906002)(83380400001)(86362001)(66476007)(6486002)(66556008)(8676002)(316002)(66946007)(4326008)(6512007)(186003)(26005)(1076003)(8936002)(478600001)(5660300002)(2616005)(6506007)(107886003)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GsTq49jPFnAWSagxsH6SYU9NkwnN1PdovSi1tQ3sp+UJrj4TuFMH6y+igNeEKtduaPHorfiF6oCpwglFmbXrlQFWRaHfWCreWyHfepBH4xTGhWe0ifGfjHUdykgUiGQ1yRwL7W/fp/HJpsiOmkGWV70p8Uc4JjirDvhx3CZFWT0xPohHSgmpL3XRmVlN2CAdtzUU9Jt9ECfD5FnUS7zW0Ct3Mo0mXFHTe9JvG1kglVPLxeM048YC415dxdxdneV4j7R6lKZ43Ic05m4uKT5ms9EnEpnldvowxe+Ay6k486DLRePAypKYlQM6WX+vxM6XsjzuuE9OY/d17jjpnPk65sCs6FndgAaRpECBI8ggfslIdyDbAKBikn679s6U/rd8fJvUF1oYqXhtiIb2n0XM6PxVob6WSAvUMKE5yqyE8OFl9peYkaRwCf7UXZukNUKnnhyE62/Nid2ZqksU9KpYve+ENB+ySyyvmt108RsAtD+OUTanqQ3uvCaZznRcm7BHNR3FZgmEiPuQphWv1MlJN8Vnq7EEVZfGPP+LVs4o1mJqLsFofwS96ZrSzaLYxjyTOJlef8q4Nl2fruYsGv7dUD13wcdvNZwN9bYZHXanMumobMLPMfXlZRS07sG0dqtOarSOJRdSuycmIx8CYAtDy8Nj9L1QveXM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MoLijjrsE/pZ2NQP4UpRKc3+gbTXcnit8ADJyiTG8aXitXkvh+P6Lkc5NhgCBZlldKbMnAS0iLJ4J6AuMhGbau/4cT69fkdnTbAQnyOdFbUsOKyNxoLiTFFXUYW5lHSZf9J2SKnt8BnWuPiSEAt8Q0DsoIG/+tM6ARM1nUDLtaegxe0vA7HsDJLfRvHVxMQE6fwCjZmdtooDzD5V53RFID0hkJXMsHAc1PDtC20N9RE9xf306To8RZUEB5DvCRaxghWbDVlbEAqQD3YLS+sA/U9vkK/XK1ggeyf+HGmiD8UksYO1FUmD1SCJ8vnpEXzO8BzlDctrO6vB8tMWhLd8gDEfI1PprMSx/3Kyr3G74TLs3ERp/RrxiK/SpARRG+hI8makKmUnYX26vCIVtQ4cyQTd8nr4iRw3/y83yy3XrhYOuHrzx4z4Y21G/hm3sUqCkL2qTPJ59OkuaODX1T4B8xBI42YfGDOEqY22YGxHuFRI6zxSA3+Kh+AHGtlm+FRjt50pxegdqH1CmBBBk+fAjR/4+Aca9R2/1eCmDnX+fWyW1DMFzRW8Zvhl6iJjRJx+kcV4KPVVGuCwRNchuE3PBrDW7Bt+eLajKswG6owKM15PPcRrRInR7WDz8ddaj1Fk/Z6jtYgPGlQoPnJT4Ths1eX4IkBS3iJhpRkgyBUfmOrsDQDX2z9f8Yf08jbAK4TMPnTZpHsWMVXM2nC+Jw1+rFLf/xHYoluuP1P+S8p10PvG+cLSJ+RwfzhjOYc3wjXEBqk6TJY8sdxq4pGisvk+N5bsdXbKZKUWC2WCKiU3QLeljRTdApRzBQQPEiExTyONfncqO X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70868683-161f-4495-32d0-08dacc3b562b X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:44.8248 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mWLBozWbQT17SoynUKWY97eYgzlHTNXH+ZWGZT4CiHBn11yvz4xKxDcnXWfarWrprmB4yelRtLn6aQYG5ajf6X8gWzEL71HNgEKVZEz3zJk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-GUID: kQTYXKwusdBjfhclzri_9g5ZWjLRxClf X-Proofpoint-ORIG-GUID: kQTYXKwusdBjfhclzri_9g5ZWjLRxClf Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute_req is going to be removed. Convert pscsi to scsi_execute_cmd. Signed-off-by: Mike Christie --- drivers/target/target_core_pscsi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 69a4c9581e80..f0e4813627f5 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -144,8 +144,8 @@ static void pscsi_tape_read_blocksize(struct se_device *dev, cdb[0] = MODE_SENSE; cdb[4] = 0x0c; /* 12 bytes */ - ret = scsi_execute_req(sdev, cdb, DMA_FROM_DEVICE, buf, 12, NULL, - HZ, 1, NULL); + ret = __scsi_execute_cmd(sdev, cdb, REQ_OP_DRV_IN, buf, 12, HZ, 1, + NULL); if (ret) goto out_free; @@ -195,8 +195,8 @@ pscsi_get_inquiry_vpd_serial(struct scsi_device *sdev, struct t10_wwn *wwn) cdb[2] = 0x80; /* Unit Serial Number */ put_unaligned_be16(INQUIRY_VPD_SERIAL_LEN, &cdb[3]); - ret = scsi_execute_req(sdev, cdb, DMA_FROM_DEVICE, buf, - INQUIRY_VPD_SERIAL_LEN, NULL, HZ, 1, NULL); + ret = __scsi_execute_cmd(sdev, cdb, REQ_OP_DRV_IN, buf, + INQUIRY_VPD_SERIAL_LEN, HZ, 1, NULL); if (ret) goto out_free; @@ -230,9 +230,9 @@ pscsi_get_inquiry_vpd_device_ident(struct scsi_device *sdev, cdb[2] = 0x83; /* Device Identifier */ put_unaligned_be16(INQUIRY_VPD_DEVICE_IDENTIFIER_LEN, &cdb[3]); - ret = scsi_execute_req(sdev, cdb, DMA_FROM_DEVICE, buf, - INQUIRY_VPD_DEVICE_IDENTIFIER_LEN, - NULL, HZ, 1, NULL); + ret = __scsi_execute_cmd(sdev, cdb, REQ_OP_DRV_IN, buf, + INQUIRY_VPD_DEVICE_IDENTIFIER_LEN, HZ, 1, + NULL); if (ret) goto out; From patchwork Tue Nov 22 03:39:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 628195 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5DC5C4332F for ; Tue, 22 Nov 2022 03:43:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232296AbiKVDnX (ORCPT ); Mon, 21 Nov 2022 22:43:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbiKVDnH (ORCPT ); Mon, 21 Nov 2022 22:43:07 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1EC22873D for ; Mon, 21 Nov 2022 19:43:05 -0800 (PST) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM2aZKR032413; Tue, 22 Nov 2022 03:40:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=rJg1z58ievsiinjbVXviLJHVBoa0DK9vJdxMe152pXg=; b=qBg1ZZHTKYtEt209cpHs20Ycov9hSo8FmAWoDKgBJnHxHhpqtVdHalIy84fzTcS/sVVq F6oppjHXT09IKxCopQPG39gW3huT9mMOoCw+HNTw61Ab2tSt/sr/BSCHEovQxaBSxIkS C77pe9zGbt5CqxVia6w8rzHzYb+5NfdFvf0cd40oXFV7V9ma1c7TCk7p34jAwsECURRH aQcrtUIDIPZ2IjGwpaIkZ81yb1o2iHevKqoAvvAGxsNkt5jW+jSGUVtncJWqwRRl44mt 97n7iXeEUegBHyCCJfJ3ay4CW7CheduPHhzKxVHc5QzeJGjNmjT/8PEHaCr61AOVqqAN vA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m0gas0xys-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:56 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM30hLn002244; Tue, 22 Nov 2022 03:40:54 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnkbgdu6-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YZDBXPg7BM1nfqixE3WJ1gPiaxoAXxM8D8RA65is7uCgDiUn+yCrLeapQ+6ExNWej3Mrgcfa5fH5dy4hrSU7fPRncMwdYeZb00YxCJYeIB6Q8uhU/UrL6UpTVRxghIX9j2SJ3rucn+0f7im/phRlyfC/3eC8hp62CJZFIf889a2Nx5AdFehoKa5gvVVGlB4aCS8CD3ay9y2HudLcWFNSy/5QXP17BuE0lARq7I2KcXG2xmJWFKMdGkea7KxP9bP5Kh7UdgctCYQrrPp094S7E4HmedUCdTxj5d8P314Ww99e/uuOjdHEdqW/4xdk+PlcC2yRLgu7U9lJiDMBD3j+Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rJg1z58ievsiinjbVXviLJHVBoa0DK9vJdxMe152pXg=; b=XCaDwWGWhpeBSLHWi0JJvt+JDO2Z/Z34DElnDSIiyYPf817Bi0RaR7gvec9zK1lO+FV1HhKdGPHmtlPqReI6Yc6unHBRZUGZukTLl2FFK9m8h0QxB26VZUZHNcoS2Nzchc36HCixARJjBhkODFxcxI8tuItEENPSkv4VjrEu42jvHSQFkNqpH3R0CDur4xABlobYdok0JeN89z8CLahq7b/GQ+J0UrzroUNF34tY0oYIjhmMx4uRLEeUvUDAJC8cFJb89Uihl4LExHz836Q2kDPtcrgDMzl6UFHOL2o1Dw3gIX1vJKEx8jXAIcJd8RdzPDmun1SVuDLEtFI3VKWzxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rJg1z58ievsiinjbVXviLJHVBoa0DK9vJdxMe152pXg=; b=zjt+f7tFNXv9EB3tA3ipkCSAsO/T8CI1XVtvJrgu8FRuCheQD2KJqCZ0hEKaTFZztdOMRit8fcaqMXxfgnjPyDxt/yBTeZqSzzs+TkNuR2owQHJkGHotJLxrk3UF2hcFRfz7U41H1xKWpPpQO2+PTvwUuXg+EJwI6JoVCCaXMKs= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH7PR10MB7055.namprd10.prod.outlook.com (2603:10b6:510:278::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:46 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:46 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 14/15] scsi: cxlflash: Convert to scsi_execute_cmd Date: Mon, 21 Nov 2022 21:39:33 -0600 Message-Id: <20221122033934.33797-15-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH0PR03CA0080.namprd03.prod.outlook.com (2603:10b6:610:cc::25) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH7PR10MB7055:EE_ X-MS-Office365-Filtering-Correlation-Id: fe7c09e2-78a1-443c-5efd-08dacc3b56ff X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9B9nieUTuV7z/glK1Gy15adNZZqXeMbfdVDX1dM8Y10VnnDd3MmZgzZkHGidfPMhX2Aj+OavWmxeJvSAlar9p8TUdQUiR7ypjPHKt5z7jKfPz1Sk6ccI6YGpcsmoZUHVF83fc2tUH4dagcjNJpUSAmF9DWV1HYEzpryDVAwmdTWfeMm22nz2oya2I2UobAvzQbnZa/2ccU7XeZElUt6HbkErPe9Y/Cvq5rTh/36D0byTYKsls8DesLyVnJDp4XNOb6dMwgkmxXx5yQmvMV4lUm42hrwqfe9Dv8v1mSrHonBYcd/biqbqB5F53Aw3VlCzIQgfdp1uwpJNETY2n1Qhz8TQ7MAeBj6b/d/XphLmFhl2uF3c2J+LFJgxkAGOX7Rg39Kgq9BXSLpFoiKyw37r0S+2snqSeyqcXo+21L5W/WFUU6a059nFrxPtj2hnlvpsazi4lqzKuBoTcs3B3NNytYZzpe2gVa11M2O2AKPbLIQ5u8IvwNphAhW1TTAs9WUgTNQECEH9UpmuAm8FPIQcIz0LmhlGjBpK6+6lmhM7IcpDz1vl4sm4GAIDR1nxzWEdOmQX3LmdFiEPo/fsfr3Mzx/V98cf1uNlSli83kTzfanwLySnJpm2nHXXrFPFXOf4zuhjf2tIFytWodNkbZUz1Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(39860400002)(376002)(136003)(366004)(346002)(451199015)(86362001)(5660300002)(478600001)(8936002)(2616005)(2906002)(1076003)(186003)(316002)(6666004)(4326008)(107886003)(6506007)(66946007)(66476007)(8676002)(66556008)(26005)(6512007)(38100700002)(41300700001)(36756003)(83380400001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OXNHOs68ukrGjlNKH3eY0eHTAN63aoVFpbVlQjG5dur+BJI5BAvBdKIaVpB0hixPW/s4YB4RyZuyiec5hqlAxoQrduHQU0lPnY5MOEPG96W3pDE4PTl2uhldU3FuS2Tap76/k0eps44a3bzCuJgHoGKOpHgrTO/R2unQuVadt1OaBf2Ut0YI7ehDcwfzl+ztNN3h/OO8Pheapm0Bcxfkj0mKVjktHZgpHcZ559VDFQkA2McgZm3QeTlY10flm9ucq9/KJVpllGfgzvdkwlKnAhVnjCdPbfp9otiMBrXuqo7R8azw8JADt1+caGye6NyWS2XF8gbzK895YoOatYlbYGMRYlr//jEdNNyBFCu/29UT7V/5U04awBwtcTDMI0C7dtzwdl1EP5qGwNrAYH0zmVvHWeLGqPIepsLpvhUOO1yVrSMMfrfylautjXA9SZAI1nx7uiyD3DiuTOQtvze0F+y37BVdZutazgG4TUkHG0zZtrJ0LRva340BHAptSfgO/Wnr6xMi9sjR7Otmo7G7f77O4lj7lig0azw8+eNRiO5CDHZcmow6Td06gs+L5PUlq8XSMbZr1Mp6+lnRMypT09kbZp4nSsRj7cTeJMPPh/NantH+VhvPe7Cq3c74yFOHmCTy0lC3OnctTtUHChX3m+Pt0utQjsHIDudYKv+p2h04ONJykvsxKAYUhgGjp6oEVdpJxAGI1Vhrv3/flNFC25dCqwycd+9hSICboE1A2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4hxuOeNZPV9PpERXzxdp8etAn1yklx8z25JKoYUmXh6IP16I0HRtRQGlkXvcWRe5MWXeK/d9AoN3ZEVl/u8JMQT+Zs12n4T7+Fqwvqo75Y/ObP1WlhgZsCmH2O7og7fe1kEBD7ugz4UYei+K9HyWytzS45IJAM21KcTDithJBFRgdYoXUrIAMqunIni3YVbAyuYXH/goD9w0JuN4IW/8Ens6h59TXfDw/F6zB8C+pAsNkfHg/QVHCw46tWeYaCe9glcgPdM6t2Z2Hge7xqHrTVk8ixu3t8OASnayk4y6dl3aiHuqJQbqrvLnSwP9EGfukKz2jW3Up51KxfS9+Grw01zOoucWOUNFUOMV1uucxjKT9/zyk1fydUB3H1sfWVAUMlYnrUFu+ayiIddeRXptzrsCyQdcRDikxPxxhyt03Z7VL8NirynHJQfIMh+fLlBIDj+iCqUbUGlR3rRdfnTE+ZWlknXCNigq/X1NHCzR2QVOmOFkUC1a17uwlizYgN7Y2d+orhcy/amc1TZcKGeJsy8jhlYAsapM86z5CoEjigfaB0KaT9RpeRN9aTC6ApxFywFZxQaVEoBAyB0b9Vzs0CQhNjcElsjcqEcaHKzl/eUVtSXEH8j4EAoRuME8RTzcp48PGdpT4PRhXhgpPEApDrwxn5opypgmuyg72sWJIMGd49KCSiTouJcYCDN4k8b99W5+rMIyFi+QPriV0YNEDwbNV+knKbv5uCIjNuJdc0lKL7jaKlsWRH/0+D+oo3zlnGyXesrTwra/ijhp X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe7c09e2-78a1-443c-5efd-08dacc3b56ff X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:46.1997 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PMh1qq8BtAFA6g3uydX4zeqQ230lzvID8zom+pDEUM7ALmVm8iNOYULyngCC1ZB62s5Yr28DGSfqA2wihVhN3fNXvj4czAmDCJ6sogF36wI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7055 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 mlxscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-GUID: sV9snk88yewAO7BvHR2JUwNO4nXZVrJX X-Proofpoint-ORIG-GUID: sV9snk88yewAO7BvHR2JUwNO4nXZVrJX Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_execute is going to be removed. Convert cxlflash to use scsi_execute_cmd. Signed-off-by: Mike Christie --- Note that I updated the comments to reflect the new function being used. Because the new function name is longer it caused me to have to adjust the entire chunk of comments. There should be no other changes in the comments changes. drivers/scsi/cxlflash/superpipe.c | 32 +++++++++++++++---------------- drivers/scsi/cxlflash/vlun.c | 32 +++++++++++++++---------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superpipe.c index df0ebabbf387..49f23f3517cb 100644 --- a/drivers/scsi/cxlflash/superpipe.c +++ b/drivers/scsi/cxlflash/superpipe.c @@ -308,19 +308,19 @@ static int afu_attach(struct cxlflash_cfg *cfg, struct ctx_info *ctxi) * @lli: LUN destined for capacity request. * * The READ_CAP16 can take quite a while to complete. Should an EEH occur while - * in scsi_execute(), the EEH handler will attempt to recover. As part of the - * recovery, the handler drains all currently running ioctls, waiting until they - * have completed before proceeding with a reset. As this routine is used on the - * ioctl path, this can create a condition where the EEH handler becomes stuck, - * infinitely waiting for this ioctl thread. To avoid this behavior, temporarily - * unmark this thread as an ioctl thread by releasing the ioctl read semaphore. - * This will allow the EEH handler to proceed with a recovery while this thread - * is still running. Once the scsi_execute() returns, reacquire the ioctl read - * semaphore and check the adapter state in case it changed while inside of - * scsi_execute(). The state check will wait if the adapter is still being - * recovered or return a failure if the recovery failed. In the event that the - * adapter reset failed, simply return the failure as the ioctl would be unable - * to continue. + * in scsi_execute_cmd(), the EEH handler will attempt to recover. As part of + * the recovery, the handler drains all currently running ioctls, waiting until + * they have completed before proceeding with a reset. As this routine is used + * on the ioctl path, this can create a condition where the EEH handler becomes + * stuck, infinitely waiting for this ioctl thread. To avoid this behavior, + * temporarily unmark this thread as an ioctl thread by releasing the ioctl + * read semaphore. This will allow the EEH handler to proceed with a recovery + * while this thread is still running. Once the scsi_execute_cmd() returns, + * reacquire the ioctl read semaphore and check the adapter state in case it + * changed while inside of scsi_execute_cmd(). The state check will wait if the + * adapter is still being recovered or return a failure if the recovery failed. + * In the event that the adapter reset failed, simply return the failure as the + * ioctl would be unable to continue. * * Note that the above puts a requirement on this routine to only be called on * an ioctl thread. @@ -357,9 +357,9 @@ static int read_cap16(struct scsi_device *sdev, struct llun_info *lli) /* Drop the ioctl read semahpore across lengthy call */ up_read(&cfg->ioctl_rwsem); - result = scsi_execute(sdev, scsi_cmd, DMA_FROM_DEVICE, cmd_buf, - CMD_BUFSIZE, NULL, &sshdr, to, CMD_RETRIES, - 0, 0, NULL); + result = scsi_execute_cmd(sdev, scsi_cmd, REQ_OP_DRV_IN, cmd_buf, + CMD_BUFSIZE, to, CMD_RETRIES, + ((struct scsi_exec_args) { .sshdr = &sshdr })); down_read(&cfg->ioctl_rwsem); rc = check_state(cfg); if (rc) { diff --git a/drivers/scsi/cxlflash/vlun.c b/drivers/scsi/cxlflash/vlun.c index 5c74dc7c2288..262763810570 100644 --- a/drivers/scsi/cxlflash/vlun.c +++ b/drivers/scsi/cxlflash/vlun.c @@ -397,19 +397,19 @@ static int init_vlun(struct llun_info *lli) * @nblks: Number of logical blocks to write same. * * The SCSI WRITE_SAME16 can take quite a while to complete. Should an EEH occur - * while in scsi_execute(), the EEH handler will attempt to recover. As part of - * the recovery, the handler drains all currently running ioctls, waiting until - * they have completed before proceeding with a reset. As this routine is used - * on the ioctl path, this can create a condition where the EEH handler becomes - * stuck, infinitely waiting for this ioctl thread. To avoid this behavior, - * temporarily unmark this thread as an ioctl thread by releasing the ioctl read - * semaphore. This will allow the EEH handler to proceed with a recovery while - * this thread is still running. Once the scsi_execute() returns, reacquire the - * ioctl read semaphore and check the adapter state in case it changed while - * inside of scsi_execute(). The state check will wait if the adapter is still - * being recovered or return a failure if the recovery failed. In the event that - * the adapter reset failed, simply return the failure as the ioctl would be - * unable to continue. + * while in scsi_execute_cmd(), the EEH handler will attempt to recover. As + * part of the recovery, the handler drains all currently running ioctls, + * waiting until they have completed before proceeding with a reset. As this + * routine is used on the ioctl path, this can create a condition where the + * EEH handler becomes stuck, infinitely waiting for this ioctl thread. To + * avoid this behavior, temporarily unmark this thread as an ioctl thread by + * releasing the ioctl read semaphore. This will allow the EEH handler to + * proceed with a recovery while this thread is still running. Once the + * scsi_execute_cmd() returns, reacquire the ioctl read semaphore and check the + * adapter state in case it changed while inside of scsi_execute_cmd(). The + * state check will wait if the adapter is still being recovered or return a + * failure if the recovery failed. In the event that the adapter reset failed, + * simply return the failure as the ioctl would be unable to continue. * * Note that the above puts a requirement on this routine to only be called on * an ioctl thread. @@ -450,9 +450,9 @@ static int write_same16(struct scsi_device *sdev, /* Drop the ioctl read semahpore across lengthy call */ up_read(&cfg->ioctl_rwsem); - result = scsi_execute(sdev, scsi_cmd, DMA_TO_DEVICE, cmd_buf, - CMD_BUFSIZE, NULL, NULL, to, - CMD_RETRIES, 0, 0, NULL); + result = __scsi_execute_cmd(sdev, scsi_cmd, REQ_OP_DRV_OUT, + cmd_buf, CMD_BUFSIZE, to, + CMD_RETRIES, NULL); down_read(&cfg->ioctl_rwsem); rc = check_state(cfg); if (rc) { From patchwork Tue Nov 22 03:39:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Christie X-Patchwork-Id: 627860 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C83AC43219 for ; Tue, 22 Nov 2022 03:43:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232241AbiKVDnW (ORCPT ); Mon, 21 Nov 2022 22:43:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbiKVDnH (ORCPT ); Mon, 21 Nov 2022 22:43:07 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DC892A71E for ; Mon, 21 Nov 2022 19:43:03 -0800 (PST) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM38jXC014952; Tue, 22 Nov 2022 03:40:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=05/a/ayaxdAesBD7mFQpxiGajrcmO9ecH5etfcHtJ7U=; b=snrmXwXCz7qb58bdnF8pr14q28sGG55QB72m8HMxPs5R8L1UUKU9TTocC92kq614iKSR fCRcvEvQM8C+0aHVBT4subIwrxFBfGeYz28TU/o+dKjRjOvwS37EwNwgHs14FupElLnV v0w+7DFPHY0iyGeghUiiWBW2DvscOSkwaC6+7zhOMyc41HS6QiGkM/D7J7O5H1IUO0K4 YlQTMEPKbU7rP3UdaJBaimjLZW2SN1BCTkXQ9DXy1Vx61xvNf2dPa+iz8eDMc1ifphSO qgB8kXCB9GCrv1vChL1zhZUAXBlx7MM9bOgLusUk4ri5M/IxIAvc0yPzq1wWJ2bUr0yH Aw== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m0afr2c58-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:55 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AM30hLm002244; Tue, 22 Nov 2022 03:40:54 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3kxnkbgdu6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:40:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fIq8TEA8s406AFxYZfDsMkD/F5CPJcIafGiyjZ6DhxH8p2ra4pBVUrQMASM8YrTEDKxH14P4iNnauY4nSdIwhEadnQKAg401YvVdepink16QJYLQZd8codFL1/wyspiWxvZKGG31AsBAecv4TUYQMBWIvxRw3mHWPvCyVO4XqDO7Jw7YfR045SyLr6XF8vEbVdz3g23MvIQjDCtxJkAC73b9olWUnL0AXvwzWmyRPnzcBKmpud80L5kS1sIEfmyAaaOktli6Kn8X9UvZ43Q5gtwKkVBU/Oa4u2fbxbxXl61CNdcX3bWCOVlS+F5BKxOhrWVwS0+Yq8m4fUh/yE+dbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=05/a/ayaxdAesBD7mFQpxiGajrcmO9ecH5etfcHtJ7U=; b=k/PC3CLXpzheGC6fiRVfpR6nyiJQ1SyCA1R8nFenln4hUrFHQ6rYCpODIRimC/psPyIReDlXfc0o0a3hC3sS/zGZcJ2rtcrz/qS2UaQ0dG551Z61nZOOTD+xINhrmH7E9Wzne+HlsXJHNyV74EaQ0QLzjH32tE9MAO5GfNKyMpLnTAdAfihvr+qYKJB6kX0yZV6kvsM9gGSDvaLoELDRNi8gHMlE2lCuEqIzxLsHdzZP0I/YP3AdzWev0zE9+2/TaEai5v8GNLSSeS55SzGf60716TNOiMukG257EINix7HZFkNA3hQesdCF0KtEZ92O5qZObNnjA+ODxBhzaerwfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=05/a/ayaxdAesBD7mFQpxiGajrcmO9ecH5etfcHtJ7U=; b=t1USQsU/F+gcoBuPTOChQMj6y41GnSeHGEU2eS6RUGVdZdxGZofUoJU/S573KUgR1wHq9Hk75nQwyQQnUE8l4t6POziAtt9v3T+4I2Fy2H6gHhiAKXFIlsSXKP68q0+1X4Y66rfd3BESvJQc/CI2gJ+o8Sy2dMf/P5plPl9DxRU= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH7PR10MB7055.namprd10.prod.outlook.com (2603:10b6:510:278::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 03:40:47 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::19f7:e081:85b4:c5df%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 03:40:47 +0000 From: Mike Christie To: bvanassche@acm.org, mwilck@suse.com, hch@lst.de, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com Cc: Mike Christie Subject: [PATCH 15/15] scsi: Remove scsi_execute functions Date: Mon, 21 Nov 2022 21:39:34 -0600 Message-Id: <20221122033934.33797-16-michael.christie@oracle.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122033934.33797-1-michael.christie@oracle.com> References: <20221122033934.33797-1-michael.christie@oracle.com> X-ClientProxiedBy: CH0PR03CA0070.namprd03.prod.outlook.com (2603:10b6:610:cc::15) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH7PR10MB7055:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e47c6a4-5df5-43aa-01fa-08dacc3b57ca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uynVaQlHb3LuuDBkpNGt5QWcrdnbiSPnutT69+ipYmtn06y308P1XcqP6K8Ks4ola6cKJJ37vBEa47lTKIzQ4yzioYU/nazSdw51+hzV1fYf8fcZoLBWaiT0bhSL9GcCzWgRp6C+jTiLWDSdn4K/xPUHYJ6sR7aCsk8jW6ZGN1/ONmFFFPMEcbRBjLrX8Yp69oOtfX2+r2OMmx2jQn8MlEhYXiiJMbEE2tT/yDMpy7pxtGLPtpjtQv4yUkFeHJabHjx2B0ooOTLM4MPy3PH+7nTquDaXuexJ0HG1sS4RIevPutO9eDhrhBisPQ8t/xj9Ws5VgoNOIUd577GVHU2XRBaAca5MJWkX6q6UtHGC2WDjl5BCCsJ2ltUG3FOXEEXmNJnNEMEE/94IsN4z8AZBeAufhlf/Id3ghDIrA1bH9UmvzAbPPRu+C155vu7cwt+YUBrQQLpyZCaBQT5kvxO8Ne1h8acmeNQFw8CqlZSy/GSKlIdYHvEFdvi1Bj296CsqqnIiwj9rZW3bGr3HgNUic+3cHrBhpaiCUgCwX2FU76nf+aSS2dhReTD8yf4Np7wb/JynJsLeVbd6tvRnttApQ7hTumKUyDJ9S4jHfQKsOFMNEt23SD6/WiOiT0PaUc4F X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR10MB1466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(39860400002)(376002)(136003)(366004)(346002)(451199015)(86362001)(5660300002)(478600001)(8936002)(2616005)(2906002)(1076003)(186003)(316002)(6666004)(4326008)(107886003)(6506007)(66946007)(66476007)(8676002)(66556008)(26005)(6512007)(38100700002)(41300700001)(36756003)(83380400001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hHCPR8KrQ7ZAiRHtTlqH35RTrZ7OjIF+cI+m1CvEouZm/6avpPXQ7IB1+zzLPGZJkmr732N64tmJTGGp7D+yR/YKrke/z6oTW7bqV7nDcjZJeNPtVE+vf3QxxqMLwBWXmq3f9Y17Ef6bHHwox5L6eb0sgJZeVG8wslhNSxrOHAuXQ8shA3+rAINK+ZANzMBw5aYynldukquCwvaaIYG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STc0CuZs2+mLLNI6ySHU/vRPvUmfTYMX8M20Dkgi3gmhhOXG2ObcESFRfe+OO2UO6fOkblN5gI5K76D5ilOLkXT7gl1IR45rBwLRN8bttjv3D6rOkNxTbMANHZvzJ7RzAbT20K37844IgF1SS3b6o/CtPvBd6TEEJpodEzbaMrCX1wZzycKgB+AEckB2KPNRVfzXMQaOMCJfEaVEHJX1q242goIB2RE5blK0neDL5IHIhChr3DzlbENhUJsSYMi2MJeOTu+qADdkCx5SEWNlMiNtbSA+Oa0COlzX5LNxOCU1rFY3JLXwpfL+UWZc7/86feAHFyTKI95cyJA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 0Mp9ekXwrQInf+U2zqp3QRzpqqsq6IPw4L0dt3TAvfbjpGDY5qsYlyCUI61tCQKaw4hHnKFwPjI24UexFw8DKGkETx7zfdOLwFB24DCionSTW1oZXEtsBH0ZWvORsIAGhL8TSEtAPi3ZCvDXaOCkscPFTNwSXnxK5yJqMwSFjwSdjL9CKepMC8OwitzBB++u3p3NBGMsMQ+EWToDzzvK6BoqyUimtdhjYXzJ8rJ7AKYWFaacIq1fRtiC0XyvtRom7XwjSUYCzyppZqNCohMa5s2OVSF+sZMPW61o0ns2C+1BhLPH415pxepgp3wPs7jOVq0STMgvV6XdUUvyabTdsj3U558VhMQZk1gg0k1zyp0gk5jreZLA4nKD4LKGV/va9a30Ec9ZY8YMcxTgFAU6dsnvgwy8jEqXXr3lsyBiR32nCViyCdwyGzJH+Jy7REHBdWDXB7U5kkHqNaBvHZfseeQshnuJZirOVax1n16m2hVEKOePY/fj71/EElfeMt/Q8vlPCoNiOInlL03srzsuSO+iBBExySxJ9yKRsultr1+O2HgtqhFOeAJOz8YG4NzempTxRMOnAqHmaje84o1y63mnsFZteFu//biKKY7C01MgCTL+5PBmE6hNQduJAzROnPl8MGN5GDVIRXE3GZNS/AnfehRcpHfn/HLoFpL9EU54wXI8AayOpkueu/eWwlLh9HSmH/u2lleDBpl76dGkAkOBu+ijrVEf3QzYZResYdRs9G/QvA4BKLEpUjkedUXeXZs9cITdJUY/0zVZYVX9kMdIoCfPfelNch9yVJjGkei9N2tyRapxKQsfWKbms+1+/3Wfs9dcpP0VhIRz1ssAgARCASC7gKm5HVhSGDinrd2poJ8GboAuThLOzVwvRB1P X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e47c6a4-5df5-43aa-01fa-08dacc3b57ca X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 03:40:47.5433 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cQQBT3RF7AoTk3bTiEJcYFInWm8vq+mXHlhmXSc5lu5MXT0UQntiO7K94eCrzsEuMP2XEImFkzussjBiylR4WxHgZn9QCaefk1iE9YqcvBo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7055 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 mlxscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220024 X-Proofpoint-GUID: mWWPiDc4ER0N0CRpD8SNBGvKEFOUckpZ X-Proofpoint-ORIG-GUID: mWWPiDc4ER0N0CRpD8SNBGvKEFOUckpZ Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The scsi_execute* functions are no longer used so remove them. Signed-off-by: Mike Christie --- include/scsi/scsi_device.h | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 578f344e330d..3de7cbe95bdc 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -479,37 +479,6 @@ int __scsi_execute_cmd(struct scsi_device *sdev, const unsigned char *cmd, retries, &args); \ }) -/* Make sure any sense buffer is the correct size. */ -#define scsi_execute(_sdev, _cmd, _data_dir, _buffer, _bufflen, _sense, \ - _sshdr, _timeout, _retries, _flags, _rq_flags, \ - _resid) \ -({ \ - BUILD_BUG_ON((_sense) != NULL && \ - sizeof(_sense) != SCSI_SENSE_BUFFERSIZE); \ - __scsi_execute_cmd(_sdev, _cmd, (_data_dir == DMA_TO_DEVICE ? \ - REQ_OP_DRV_OUT : REQ_OP_DRV_IN) | _flags, \ - _buffer, _bufflen, _timeout, _retries, \ - &((struct scsi_exec_args) { \ - .sense = _sense, \ - .sshdr = _sshdr, \ - .req_flags = _rq_flags & RQF_PM ? \ - BLK_MQ_REQ_PM : 0, \ - .resid = _resid, })); \ -}) - -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, - int retries, int *resid) -{ - return __scsi_execute_cmd(sdev, cmd, - data_direction == DMA_TO_DEVICE ? - REQ_OP_DRV_OUT : REQ_OP_DRV_IN, buffer, - bufflen, timeout, retries, - &(struct scsi_exec_args) { - .sshdr = sshdr, - .resid = resid }); -} extern void sdev_disable_disk_events(struct scsi_device *sdev); extern void sdev_enable_disk_events(struct scsi_device *sdev); extern int scsi_vpd_lun_id(struct scsi_device *, char *, size_t);