Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp486531pxu; Tue, 1 Dec 2020 16:58:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxB/2UmGSmmHyLFKatLHXrPU9BVnZLouLZmB5v9jOVTRcBTwFMF2U77iBr04Z9ERRjJ+MF+ X-Received: by 2002:a17:906:d1c3:: with SMTP id bs3mr20033ejb.306.1606870733855; Tue, 01 Dec 2020 16:58:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606870733; cv=none; d=google.com; s=arc-20160816; b=joRVn0ij9AxsHh/W/HqTxcF+7sP5bougRnlTcmDIkXGbkZ4+kRU8oDWGM30bmVOH1B Mp3eBJ7BhkDMDP6RrAZG7qj8J+QnrA4Md6ZEwJgUmQdfC7eHyxV6veKgOEIRhOjPRg2f UzY89FL5erxWhivXiS578O9nolAFT0JTDIRJ12hNKZ4X76DDk3eMzRBaPi6MGu30rJgq X+8aHuOaXe+jqnpUsUO7Y4Wx9fzWatwsnWHfdMVozMVWtPXg9X6+vv/VVbHs4bgkU14B NLNR3+jWvs/1TrF/v14M9bRaTHqnAPHQnUvieW25GhdA22IGDzU7IABp20dVsbdMXuXV 1cBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FikaVMSWv9fzh3+QqH1htxIk/scNAtSYHyhJCHaSiXA=; b=efJ8gZNI9ihJZytoB3wbWKxK1TDjMLrXfLf6B8qHoONfEtWv+OKpa6BsR8kIGa+dVn 0KQSKm2QPdoVX0rjuKnNhhTxqjnOOgwH+A9CFujKgCVMtJy1MynPD3mj5enDKJHK4UF0 S/VYigZ4v+BaEvZBuqu6BzJ8HDrJ+sidmUAiMcZAUnIDb14Fwb0zv48n7VecHE4g9fGI g5i3nexph8XqPBSoau5CzFWsLkXzEVjj1AprJabVCqwFBR3KxQITyjI/TQ07CbQSIl7o q+2k9A7Nf5/t2XN/FSb8Pb+Vyb70e3yJQO3hhwYLZnz0Ea4tjCIvYPN6BHKD2SNT5hjm 7wrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=FVhh6q2s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id wn12si1093074ejb.43.2020.12.01.16.58.31; Tue, 01 Dec 2020 16:58:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=FVhh6q2s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727605AbgLBAzl (ORCPT + 99 others); Tue, 1 Dec 2020 19:55:41 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44424 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726771AbgLBAzj (ORCPT ); Tue, 1 Dec 2020 19:55:39 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B20XA1b191204; Tue, 1 Dec 2020 19:54:51 -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=FikaVMSWv9fzh3+QqH1htxIk/scNAtSYHyhJCHaSiXA=; b=FVhh6q2sKb+pH2DArnOoIOHYx3+r2n8UGXvOBmW81ja4m8uY6YID/7lnWbYwh1OCgplB 1gmiWuUbsfyBy4jB1YNUMNc3w93iFft6voqNyL5JkScPxN8Vwqqczh4AXw+zLYdl5jHa yI0ITSkDLFwgDZHM0D3Cgz/Rsrusvh2gnlAne6brVvsAtdalhD/qxxBwTeBQfq/teEg+ hqvo2rN5UIblE0GCAOYtsKKwlgG2m7v9M7uVR/QAe34iOxexMUX0NReYmFs16/stMXRg 1l3DsPNIqi55+/t9sR+XfeB0Xg4opDqRt25AFg9EdRFH7FMP8SdRS2F+2qCZR2K/6pj8 Rw== Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 355y6cjaf2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Dec 2020 19:54:49 -0500 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0B20f6wH016212; Wed, 2 Dec 2020 00:54:48 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma01wdc.us.ibm.com with ESMTP id 355vrfhrjd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 00:54:48 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0B20rWJx12255504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Dec 2020 00:53:32 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 72AC37805E; Wed, 2 Dec 2020 00:53:32 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0264A78060; Wed, 2 Dec 2020 00:53:32 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 2 Dec 2020 00:53:31 +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 , Brian King Subject: [PATCH v2 02/17] ibmvfc: define hcall wrapper for registering a Sub-CRQ Date: Tue, 1 Dec 2020 18:53:14 -0600 Message-Id: <20201202005329.4538-3-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201202005329.4538-1-tyreld@linux.ibm.com> References: <20201202005329.4538-1-tyreld@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-12-01_12:2020-11-30,2020-12-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=1 priorityscore=1501 clxscore=1015 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012020000 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sub-CRQs are registred with firmware via a hypercall. Abstract that interface into a simpler helper function. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index f1d677a7423d..64674054dbae 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -138,6 +138,20 @@ static void ibmvfc_tgt_move_login(struct ibmvfc_target *); static const char *unknown_error = "unknown error"; +static long h_reg_sub_crq(unsigned long unit_address, unsigned long ioba, + unsigned long length, unsigned long *cookie, + unsigned long *irq) +{ + unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; + long rc; + + rc = plpar_hcall(H_REG_SUB_CRQ, retbuf, unit_address, ioba, length); + *cookie = retbuf[0]; + *irq = retbuf[1]; + + return rc; +} + static int ibmvfc_check_caps(struct ibmvfc_host *vhost, unsigned long cap_flags) { u64 host_caps = be64_to_cpu(vhost->login_buf->resp.capabilities); -- 2.27.0