Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp487890pxu; Tue, 1 Dec 2020 17:01:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJybsjhu2jd5cGAxeopwNasPk0hQAHFH6JaAUOjnFCEphQui50ouzEUlO8TbCBKLFAv9Kh3I X-Received: by 2002:a17:906:56ca:: with SMTP id an10mr18103ejc.498.1606870865712; Tue, 01 Dec 2020 17:01:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606870865; cv=none; d=google.com; s=arc-20160816; b=gb64S4H3xFX+wAVFdqEyPUj3SdbvMGpSVpdY/3X4102JTt20PspgBGYdMQl53dfj0H pzcY+UBFavDZGyMwC4LJomodR5eBC0AkxJCFVbVbKv492J716UiARia38N05dMi7N4pV EvKNG2PDp8CzlavtZUrUy8TvBMDmQnz8ixOowMB3s0EhfpaEx5k2MDey7YST8p+Czh5j r0RqDdCgcyIxNiaHkqt2D4h3cFTtZC2VeIND74ZtOnldyoSQge+ju34BFseurjQDnwno LcVk/jwEWeoh0sfqvIu107MfPsYebSy0QlWl78vSl7QU13s7F9OZUYlqGtWF3wadpoR+ wRkw== 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=0RddKDffcQF0Fc8EScxESXNuAanc6Xy8eMCmYO4oF7E=; b=tAwr0E6Blos43gRCWtRi79Y7FSry7SVm6xQ2zQs0vxjz/UHN+Lg9qjQAC6hxVkKUK1 P1pc1uydyaksfUdM5p/RDsdC/pXlVNv8jxO3On/gXXKEnjwliVuXZXaYh9o+RRzh53ae sz5r8A/KiIc0EeR/PdmBFWyO58zclmv51o3FLfLENPK2qCHLgKdkhbBypcacz40h7SVj TfxSLDmQYYXZW4wM+qb8JqA3a+lECgHKGjLWt5iswrKy9X4P6m4kJE2Cp0QDCjptsQ7v m4rf6VN5baKm+OggtIwv1/9nRTiV2dAFSIm/ukcEfTw1Z9/t/Ybjm67qTc2fEiM53TeW jCag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=HCD2TRdC; 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 q5si974834ejr.681.2020.12.01.17.00.43; Tue, 01 Dec 2020 17:01:05 -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=HCD2TRdC; 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 S1727956AbgLBA5N (ORCPT + 99 others); Tue, 1 Dec 2020 19:57:13 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:7402 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727530AbgLBA5M (ORCPT ); Tue, 1 Dec 2020 19:57:12 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B20sbkE059431; Tue, 1 Dec 2020 19:56:23 -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=0RddKDffcQF0Fc8EScxESXNuAanc6Xy8eMCmYO4oF7E=; b=HCD2TRdC67DslpfV9zPYuPpWCVtPQZssaZDdXsRKTja0bKN8ZFUuVej5s4UgaX0yK15S dcajXggua3L/ZkRV90JF9gOTtM9cqUh4QDLw2FKrYUJ6080dKqzW9wHPt9aNJL2UqvRA orCeQGVwFlwLdd7cPxFsYdILIGFh3Usng8FjRlzJ6B7GnurN7zfObbUprJNMPTamg2rO Up8AgqvpObS7lu7RsnbDsoIXZ1uaQfnvWYRWP5aqzKCmZXZ5NPiYBcBLBdyXeP91VXUs VxeCsnQGqZyL1otSz6tzvw7sgSLlCCHEXibHvEFrFtpFn5WVCl2ExRlcbg1ogxGcrWuY Jw== 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 355gtc707q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Dec 2020 19:56:20 -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 0B20cNlJ028139; Wed, 2 Dec 2020 00:53:35 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma03dal.us.ibm.com with ESMTP id 353e69beew-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 00:53:35 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0B20rRiU12649096 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Dec 2020 00:53:27 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0204578063; Wed, 2 Dec 2020 00:53:34 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8699F78060; Wed, 2 Dec 2020 00:53:33 +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:33 +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 05/17] ibmvfc: add Sub-CRQ IRQ enable/disable routine Date: Tue, 1 Dec 2020 18:53:17 -0600 Message-Id: <20201202005329.4538-6-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 suspectscore=1 bulkscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=766 clxscore=1015 adultscore=0 mlxscore=0 impostorscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012010142 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 Reviewed-by: Brian King --- 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 4860487c6779..97f00fefa809 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -3361,6 +3361,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