Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2934299pxb; Tue, 12 Jan 2021 02:09:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwET/OQrskGBiZShgAEk8fRvmIW3mYUi1MqgvJPqHkUjpgGrbxltNRRDJKeSmFxpOKNcmJj X-Received: by 2002:a17:906:36da:: with SMTP id b26mr2603712ejc.28.1610446175741; Tue, 12 Jan 2021 02:09:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610446175; cv=none; d=google.com; s=arc-20160816; b=cc2tENaG0Bj+1PLzRGVwltbUwb2VDruw8wezHaBc48ukQqYwhsg4k/i3844u3rx8E2 lhzGlp1KM7fV43vbJ/4x61p0z+O+6ZQrZzjmz8ZVdI80CV+Jz0uM0uJQJWCRh9BLRfhK vWZduEIxbKvriV0FMdSAZmxIqmr6X7e/DgIUtlGBkkY/fjXqtgZt7Y72Qk1P8AgqHD48 MmvMY7/R9Syndscud7TJWVqJ1vUksqB37K7ajxaJl2zE9B9xz95E5uIDPxensv2hCu+t a+LfqRv5sjN1XZXtv0HdRWyV8MWoKDl5eeHH2KKQVtXZAghW6ZWHe5G6rqQ5CeWHOKF3 tVqg== 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=BcDVb3bASKP8n3XTdtz5NuaFmqzBKGe0LTF+tKXgA6s=; b=NvRvQUn9U/txcMbfD0Rg8OMnOOxw90Jax7PW6Fifxg8tZ0GhV246gfAA2ckBo9VpjA 039Fut3sWZZozwufsaDYrbd10hxp+xaPhZlNn3UvxLDD4n+6Ha7p7Fhhwhn5gJ5WVjio HxCyQeqBcl/vv4Jr4LdBP0gMF0HgFZ/M2oZjIFZvZ7hJOuWtwmQqsK9XbXBGpFnOn7hh vLt1PzWtrF5BkpTyqZ8mu3fn9jxRmr/6j+HJ+BH3ZpMdVrhhi3DpI2ONDeso5TIjcGAE qSD7PP/MOzgcHO83tJQGynmFJs9r+oApgkXSk9PKUVRe7OITZfUYcT222Js6zT9QhVm7 KTuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=dJC8UE+Q; 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 k10si972258eji.9.2021.01.12.02.09.11; Tue, 12 Jan 2021 02:09:35 -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=dJC8UE+Q; 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 S2391569AbhALAYx (ORCPT + 99 others); Mon, 11 Jan 2021 19:24:53 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:3756 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403856AbhAKXNU (ORCPT ); Mon, 11 Jan 2021 18:13:20 -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 10BN9Fe8028249; Mon, 11 Jan 2021 18:12:33 -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=BcDVb3bASKP8n3XTdtz5NuaFmqzBKGe0LTF+tKXgA6s=; b=dJC8UE+Qn8ezpMR9v4a1FBDNruf36aK7UkDppWX7QLY2DjmvD5uFxMmTtRkfhka6JrGx MLt5aP134olB584DSObpeyisXAsFWg39F5zLcuqYHwpMv8WGJBNDS6ZTUD50tD1dzHXz X2ZJlAQAfOHodhdmXcJBsVXW33wGAVEAKDhH3zcfM6k8Ms2TxxxdGP+whThEDQ9K7DwQ uBoKnWMaIelS76l4GtxinOBlCe2jXlExZy+HgBRqABpfi+5WF5m6FwUdyyee6lT6I+dZ yBkt7ITuUlUKKgC3YgZjjrDHlIkcx5PaBbXH7pfF0G9ScXXhG/8EQ/XyOrWKKWLRtRtF +Q== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 360yc7ry3c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Jan 2021 18:12:32 -0500 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 10BN8CXs008286; Mon, 11 Jan 2021 23:12:32 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma03dal.us.ibm.com with ESMTP id 35y448xcp0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Jan 2021 23:12:31 +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 10BNCUjP27656678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Jan 2021 23:12:30 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3E7BA78066; Mon, 11 Jan 2021 23:12:30 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C7B6B7805E; Mon, 11 Jan 2021 23:12:29 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 11 Jan 2021 23:12:29 +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 v4 05/21] ibmvfc: define hcall wrapper for registering a Sub-CRQ Date: Mon, 11 Jan 2021 17:12:09 -0600 Message-Id: <20210111231225.105347-6-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210111231225.105347-1-tyreld@linux.ibm.com> References: <20210111231225.105347-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.343,18.0.737 definitions=2021-01-11_34:2021-01-11,2021-01-11 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 spamscore=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 impostorscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101110130 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 --- 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 524e81164d70..612c7f3d7bd3 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