Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp562051pxb; Thu, 14 Jan 2021 12:39:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0Cr6kkgi2ALHi0X1mGBWYUExqvjUV64XzQ+0LRG90zxWbOClcMt99cVTTykIq0wvkiXUf X-Received: by 2002:a50:d888:: with SMTP id p8mr7138730edj.147.1610656764030; Thu, 14 Jan 2021 12:39:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610656764; cv=none; d=google.com; s=arc-20160816; b=aS9Uf/tjgj9GzBQRi0r3+QGBNHUtHfqm4irxgj7A6ao0QyX7RP4yqZSgRrnro6Q1Ta PxAkbSX2zIeDJcA1f0gwF/pS0mR9XsXFUiiGefG7YTjRU/suUKY1QxYVAA9U8nivOM9Z rYEtO7KmgDkGlhN8GTBJ0paDtMHSE0bXzIr8abgbfPfkhzT4E69l4z7UXj6H04mNZbfV Ks+mqtdl/OvQY4jswCChGekdleYpfscI8CFSUP6YPTEZaIjhg1iPulqxnISMw6KRw4Dg UB1paasEXQZ5dvVayeMLmbWvZMGgfUXXFWAw9If68c/fidxhniC4xbR333NmVTsmGaXN lOMA== 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=nKk1Um+B2/FZbZZiiN+/A8qPSztGvj/zmOxIlgLrIkE=; b=n0okYnxCwVnJkp9jNFuDun6Cb/r0OJ8q9ng9wLK6WXEkfKbw0tjTx3FlefLoWnFBNh J9qXd9gKV3UkURBpZN4wFz4A8QYS57aAUatKIdlp/1H9mnONB7vOqQ9EXIG/FU/rrHoE tGgDpeA0Qkd9Ww1dbn1RSMXa0kEAkhZKETe+s1ylEuS1gNEA/DxWX9kDoKQNeNJuSPYh 5eZJIkptDaW0rrIgKAqTtuUE/D41TWa3JrDpVCCo6ZnvD1+Gjz4nSlTpGP5FR4d0kWwa kLn9Ipkpa664UaVSTolBhQM9HXlDty7rky6lrlHi27FbMAhCf6Syv7GAhRfrFvPIT1ad PWCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=DTeRt6Kx; 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 k26si1157098ejz.48.2021.01.14.12.38.59; Thu, 14 Jan 2021 12:39:24 -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=DTeRt6Kx; 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 S1729241AbhANUdx (ORCPT + 99 others); Thu, 14 Jan 2021 15:33:53 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:61900 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727092AbhANUcm (ORCPT ); Thu, 14 Jan 2021 15:32:42 -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 10EKVjRX036399; Thu, 14 Jan 2021 15:31:55 -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=nKk1Um+B2/FZbZZiiN+/A8qPSztGvj/zmOxIlgLrIkE=; b=DTeRt6Kxay4pdWDRTekxaER5ytzAeX1TmVEG3xxLwh6VgVfd6cKf3Yau6yCBQJTQO9pz nzbgGO57FrALBqkCEVmQtbB8xeZ8o86MrKwOFl4rUtlsrp7e6sEYgOZ5Mi0Qgc4kvX8B JgYc0gZmkb9+ru7BDSjAAmS9yW5BZE7KW0jlF8eCZUaAASUaycExx7xcDRHn58a6XUNB BcyzCzKuokxKnMOA5yNHTVbttLP5zlim2Jg8Tym8xefpZPTpd/5sYzSmwgz3Cqt/dZkR fp4+M6HR5mUji0U9fpKfeKCdlIxUgu1Nfx1VAJaj3ESLgicZ5Q9FDTxPuVqwVAW0aBfC LQ== Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 362vbj94rp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Jan 2021 15:31:55 -0500 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 10EKS7fS007035; Thu, 14 Jan 2021 20:31:54 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma01dal.us.ibm.com with ESMTP id 35y449sr0f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Jan 2021 20:31:54 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 10EKVqLK23265688 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Jan 2021 20:31:52 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 628A16E05F; Thu, 14 Jan 2021 20:31:52 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0F98D6E052; Thu, 14 Jan 2021 20:31:52 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 14 Jan 2021 20:31:51 +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 v5 05/21] ibmvfc: define hcall wrapper for registering a Sub-CRQ Date: Thu, 14 Jan 2021 14:31:32 -0600 Message-Id: <20210114203148.246656-6-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210114203148.246656-1-tyreld@linux.ibm.com> References: <20210114203148.246656-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-14_07:2021-01-14,2021-01-14 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 adultscore=0 clxscore=1015 bulkscore=0 suspectscore=0 spamscore=0 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101140115 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 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