From patchwork Tue Nov 17 18:50:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyrel Datwyler X-Patchwork-Id: 327766 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 309F4C6379F for ; Tue, 17 Nov 2020 18:51:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D0CB52417E for ; Tue, 17 Nov 2020 18:51:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="DVwHKrUa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728060AbgKQSuq (ORCPT ); Tue, 17 Nov 2020 13:50:46 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:11354 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727271AbgKQSup (ORCPT ); Tue, 17 Nov 2020 13:50:45 -0500 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AHIXHfK009838; Tue, 17 Nov 2020 13:50:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=ndODn31eDRK9t+Hx8Buq+37hEqstMLCGPBgZZ2JdZ+w=; b=DVwHKrUaWwhZxQUaDP7Q36OwTygtjemSNl5zEDPLm/4eZSy6Z0EjiTi4V+XqnVEU9vOa Y+ZokXPjrxrlzSW+6gQqXFhMk34ce2VzLcT85ZGs51fQPTxEvRgw77aPTtPvauz2L9rZ iDHFpj52/ZV/24NhMit7AdBi71b70Pw2XS4CRRk3WpdJnugh3yGA4zudg7DjfTRmP7XS 23McBWOlMsWbiGJ4n3T6S9YgCkd0F1CQ2oJ95VMZgSr/PSo9qXFSnH06M4RtiXUvT6Hk GN5v0TBLL2TCf4klGk9zq6G076hhnLqssfMvKNfqwHZkH/+Q5zvUJMW/TSZcs0MiA9VQ JQ== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 34vexssjaw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Nov 2020 13:50:38 -0500 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0AHImRpk011350; Tue, 17 Nov 2020 18:50:37 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma04wdc.us.ibm.com with ESMTP id 34t6v90jvq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Nov 2020 18:50:37 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0AHIoaeW13304464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Nov 2020 18:50:36 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1CD717805F; Tue, 17 Nov 2020 18:50:36 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 86F2678066; Tue, 17 Nov 2020 18:50:35 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 17 Nov 2020 18:50:35 +0000 (GMT) From: Tyrel Datwyler To: james.bottomley@hansenpartnership.com Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, brking@linux.ibm.com, Tyrel Datwyler Subject: [PATCH 3/3] ibmvfc: use correlation token to tag commands Date: Tue, 17 Nov 2020 12:50:31 -0600 Message-Id: <20201117185031.129939-3-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201117185031.129939-1-tyreld@linux.ibm.com> References: <20201117185031.129939-1-tyreld@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-17_07:2020-11-17,2020-11-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 mlxscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011170131 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The vfcFrame correlation field is 64bit handle that is intended to trace I/O operations through both the client stack and VIOS stack when the underlying physical FC adapter supports tagging. Tag vfcFrames with the associated ibmvfc_event pointer handle. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 0cab4b852b48..3922441a117d 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -1693,6 +1693,8 @@ static int ibmvfc_queuecommand_lck(struct scsi_cmnd *cmnd, vfc_cmd->iu.pri_task_attr = IBMVFC_SIMPLE_TASK; } + vfc_cmd->correlation = cpu_to_be64(evt); + if (likely(!(rc = ibmvfc_map_sg_data(cmnd, evt, vfc_cmd, vhost->dev)))) return ibmvfc_send_event(evt, vhost, 0); @@ -2370,6 +2372,8 @@ static int ibmvfc_abort_task_set(struct scsi_device *sdev) tmf->iu.tmf_flags = IBMVFC_ABORT_TASK_SET; evt->sync_iu = &rsp_iu; + tmf->correlation = cpu_to_be64(evt); + init_completion(&evt->comp); rsp_rc = ibmvfc_send_event(evt, vhost, default_timeout); }