Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp159518pxu; Wed, 2 Dec 2020 18:13:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsCrnGsbYSqviIBmOkmpcY1fkjicoFZd1cy7/M73No+Pf2RqFLkmXESAoWDbeNOwQZhNUx X-Received: by 2002:a05:6402:135a:: with SMTP id y26mr908418edw.330.1606961602345; Wed, 02 Dec 2020 18:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606961602; cv=none; d=google.com; s=arc-20160816; b=pRs9QojyOdTx0jrHhJQhWYxtsCVj5gwKUYEVgZXdO6aGlY+fGJCFFYHUgGyop49zcU 0BzmbdPZYiwLOR3sqkaGz5V3l406pEzIa0mNx17WFlOFK1/nrdntveuWItaILy7fJJOw KmMawm07v6AIN9a9kaxWW7p3g9BSK7DC6NzQDH6XCL1+QxPAGdoH8C7iejW9QEoU+rpM XYdUzJtPBIb6aqvK+ImIenKMC1H0KsGHD8enTL5i0D8VmC35IOi5/EHB2J4zquMnxZke vxNQ4k3mn2Ui62uX1p5NMGtAwMKpIQGfJejGroAetn6w25+H3LfBQwjp87PBUhy4smBD tjtg== 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=eiX01r1y8LPSBS9Rb1YMNQ8JP1TRdYHVPQE4pZOE1pkm5/QrHPVRE47SMeVhj2Qr2C ylVTudV/2TgrWLU694wsPz/oJbIMML/1q0kWZxbPuFD/+ahEj1vgsQhJrpMX8UI+9tFx gx7hxIqQLDTj9RrnPlhYZ5SUzQk00wId0cymNeFft+PzWLVTkmKhkWPYRqUw+Y9bSUV2 wecsEH6Py50z6y/ZSBWZtl5i1f9JV96df+AJaQChSOjN2F9xiircGmh7Cd+6mj0nVv7Y HtiG8RTys6WTveMPOGPSn/YEwRpBvQI/sQwp8wwYUJ+Nrp9cvHge4ZFkPL2/oUK76fIR xSZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=FxqiK1f1; 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 bj16si285937ejb.652.2020.12.02.18.12.59; Wed, 02 Dec 2020 18:13:22 -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=FxqiK1f1; 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 S1729599AbgLCCJj (ORCPT + 99 others); Wed, 2 Dec 2020 21:09:39 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:49810 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728279AbgLCCJB (ORCPT ); Wed, 2 Dec 2020 21:09:01 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B322kER095952; Wed, 2 Dec 2020 21:08:13 -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=FxqiK1f1dHlPpF5SniKkC5nugqEFuOnj3tNk4h1HmjUPO/tjRgNiVnno345a6tZQi0Fv /CnoLE6XCliqrTgUr6veQtt1u9011PT/0kKgUSOOJO2tSdq2vXBtHJ/XBfiTNFnK7gfH IL/NBn2NaSqSvgNwDgCm94Ac9cCegX7hPAEQOILgF3dHwQcgwC3ACGm5uET7NJVbVWW1 cSyzHJIjIAcjBnVfz8yUruEQ09pX2TIcnoEGTCJBHXHYNwgScRMTJ91z7uNBuU5zEwGb s2sPNHscNITmhZV0yRZeAJPmlogPPoHhV9fd60EMlOlghWtkJximV+uCmKA4nWIRbX8v Gg== 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 356jfcxxc9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 21:08:13 -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 0B327Wme010529; Thu, 3 Dec 2020 02:08:12 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma01dal.us.ibm.com with ESMTP id 355rf7px9q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Dec 2020 02:08:12 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0B328A5g11338290 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Dec 2020 02:08:10 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B294A78063; Thu, 3 Dec 2020 02:08:10 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1D69678064; Thu, 3 Dec 2020 02:08:10 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 3 Dec 2020 02:08:10 +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 v3 02/18] ibmvfc: define hcall wrapper for registering a Sub-CRQ Date: Wed, 2 Dec 2020 20:07:50 -0600 Message-Id: <20201203020806.14747-3-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201203020806.14747-1-tyreld@linux.ibm.com> References: <20201203020806.14747-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-02_14:2020-11-30,2020-12-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 suspectscore=1 mlxlogscore=999 spamscore=0 malwarescore=0 mlxscore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012030009 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