Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp209579pxu; Wed, 25 Nov 2020 17:51:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwP5fVAy0ndfprNW6ITRRiJdcUOPPjK24wbFCtqTxdq0BRDH7RIZVHD5Jj9948kLKVg/aIR X-Received: by 2002:a17:906:d41:: with SMTP id r1mr647231ejh.383.1606355485709; Wed, 25 Nov 2020 17:51:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606355485; cv=none; d=google.com; s=arc-20160816; b=nwQnDc2SMqBfYslYd/kjjYs2tsoylxrkT1YlT9uzqHNTeL4XcUUNdJq0k39Hdla/8f 7Iu9BQ5KeL42UWuQNhV46QqaJjazneP3GggKmfjcqqC9xoCvf8jNy3h2t0xT2MrStGbB 3DPzzdgOEn+0X7bIRMLUD1n2pWMw8/fkAG1PTCmsUq+JwXTBh1b5nZ0892iB+IHA0B70 tSiiC26rG0zAcsCXRLDjU2q5W+0wRCfjyCNz9VinvDGaAYYllgmmNYaDfh2Cf95OwjxZ PtRFoZmwXA6jEdWaX+o3M0e5oQu45awBGExUeafCQNDOnjGD/qvvQ/Cr1z94QFYryylL zeOQ== 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=gC/vWuYTDA9qvAo5cfOWV0B5mMeAskVmH5S9vCf6JzY=; b=E50cck8OcBa5nzfIU7YEN+4hCYquoqBJ80uaWLJaOATZ6cUBW077mQc6TdoWalJ17J fu5qO14dLrCMUi5qwLkVODNWC8eToW1USlgVjq4KLYP4EuWEtsWuf3vEjsJYsPJVNQ7R zPTs1rKtZytXbsCAEiPZW12GnWWRj1fXeFIAlpl2HQ65cKUXDB72i42KfcUCfe8OwKif mzvUCzOk4NMoloYeABYdeCG9q+0B49G/rm+Y1+Vh1PVDAoUogoq5m8ON6shhJ8dBugly OuESywlEA//tSsNGo67ORPxUL7kHvQZ0Tnl7JC428v8IpYBFPOzYvhQf8h5E9frFdByS YXTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=srhamtFO; 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 c19si2372319edt.453.2020.11.25.17.51.03; Wed, 25 Nov 2020 17:51:25 -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=srhamtFO; 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 S1732193AbgKZBsn (ORCPT + 99 others); Wed, 25 Nov 2020 20:48:43 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:17310 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731956AbgKZBsm (ORCPT ); Wed, 25 Nov 2020 20:48:42 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AQ1VMuu186026; Wed, 25 Nov 2020 20:48: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=gC/vWuYTDA9qvAo5cfOWV0B5mMeAskVmH5S9vCf6JzY=; b=srhamtFOYAtPey0Sp+1sonArwZCbUZx3bCP8cVNy3B5N8ELYGZevmKSpQHofQMEfHM4F YG1bx5V+JXCZvyomG0zpqxYXhLHyvd9tVWaCZcvn8mGnFoagxYrKo+oxg6pDqlZgKAuS erUSWpN49i03d+3s/WY9J0TANVp1wcrGD22TdKzEZvdrDlpL5edIFOldySzATU4CHIDU zNEyPan9c/+qXvHDKwW4q/ttEwbWOa1mq7VlcNxdnhIHP7QtFi/kyo5K5R620pW4VP6b bfSWJJ+IDgn//v59GXkKMWkRFicOrTW+tYWJyl+5fsLFgkU05pudrZfOvGVLrCKFuQYM 1Q== Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0b-001b2d01.pphosted.com with ESMTP id 3521th1cyv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Nov 2020 20:48:33 -0500 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0AQ1lesS018622; Thu, 26 Nov 2020 01:48:33 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma05wdc.us.ibm.com with ESMTP id 34xth9bpx7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 Nov 2020 01:48:33 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0AQ1mM7W40370676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 26 Nov 2020 01:48:22 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A4BA46E04C; Thu, 26 Nov 2020 01:48:31 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5447C6E053; Thu, 26 Nov 2020 01:48:31 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 26 Nov 2020 01:48: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 Subject: [PATCH 05/13] ibmvfc: add Sub-CRQ IRQ enable/disable routine Date: Wed, 25 Nov 2020 19:48:16 -0600 Message-Id: <20201126014824.123831-6-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201126014824.123831-1-tyreld@linux.ibm.com> References: <20201126014824.123831-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-11-25_14:2020-11-25,2020-11-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 bulkscore=0 adultscore=0 malwarescore=0 mlxlogscore=740 suspectscore=1 priorityscore=1501 mlxscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011260001 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Each Sub-CRQ has its own interrupt. A hypercall is required to toggle the IRQ state. Provide the necessary mechanism via a helper function. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 571abdb48384..6eaedda4917a 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -3351,6 +3351,26 @@ static void ibmvfc_tasklet(void *data) spin_unlock_irqrestore(vhost->host->host_lock, flags); } +static int ibmvfc_toggle_scrq_irq(struct ibmvfc_sub_queue *scrq, int enable) +{ + struct device *dev = scrq->vhost->dev; + struct vio_dev *vdev = to_vio_dev(dev); + unsigned long rc; + int irq_action = H_ENABLE_VIO_INTERRUPT; + + if (!enable) + irq_action = H_DISABLE_VIO_INTERRUPT; + + rc = plpar_hcall_norets(H_VIOCTL, vdev->unit_address, irq_action, + scrq->hw_irq, 0, 0); + + if (rc) + dev_err(dev, "Couldn't %s sub-crq[%lu] irq. rc=%ld\n", + enable ? "enable" : "disable", scrq->hwq_id, rc); + + return rc; +} + /** * ibmvfc_init_tgt - Set the next init job step for the target * @tgt: ibmvfc target struct -- 2.27.0