Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp158816pxu; Wed, 2 Dec 2020 18:11:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyt2Jdik+CNCac5uAy90bAvhX4GYojqczPDkkIrVGNPL4Z0EAsHaLx3iefktavX6MWvaJvP X-Received: by 2002:a17:906:9345:: with SMTP id p5mr650348ejw.40.1606961510088; Wed, 02 Dec 2020 18:11:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606961510; cv=none; d=google.com; s=arc-20160816; b=s6fG3K10NrjG6C2ywk3hzSJzr+Ao5kF9goscYHAVQswJkvafjjeePgMRTLS/5RCBHV Itf+VIIY+hC4eVbNl4x9mfG9qPDlrvqGk+ZJuXu8+bqzNl6L2DIQU5gatxdxx+i6uDI6 95/zJT3URXUGH9KgrK91pGseXAuhGDxwFsWXofHSPco6vu/eqpv5ct1BHUsnU6tyYcWw 568uTMPcHEuzxmL39o4cExl6xUA310IpsoExVAxPQj0sQmG26KeYl7J5x2BipIZ+VOit mfj/Ad/Z4NhbOhuQvhfRZG5v+ATkGnpabzeXZ3pxf/WLBGoVo0TPj8tWmCZm29FOr2t5 p/lg== 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=0vrJkpxV7J6wUU6nHBy8wxjwXBtmUbHss6o/M2/SEuI=; b=PG5O0g+b9/2znqBi5JEU9VzCFZwqTizcj/NWzf7VIpOi8vnjaACpfZFRD6j184J7p3 4gPmKXk7h5EBpmpwnnM4T7b7MweZWW5pj0jT+NYwNdDQKVuKFxLeBqCCQRmcC7hXsnBX CuMtz0oTfTc0UCoQzfB4fBYmbwIFMAxmGsWx9iH+oHfZblwdcies3n96J/J44UAVLG+H ccJ+L5Anp2ceBQPab62/lbqimRcBIfANzJneTcDHm56J1toZJQQUT4mi5hwfSsf0Lohg +Ft51MXSNPKnQzM7Ag430DkNvU3xoitnhbl6bHsS0+u5EjP8epgp1QGL+R5okkfCMi3m RYWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=GRCHzgZE; 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 s2si106399edc.33.2020.12.02.18.11.27; Wed, 02 Dec 2020 18:11:50 -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=GRCHzgZE; 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 S1729462AbgLCCJC (ORCPT + 99 others); Wed, 2 Dec 2020 21:09:02 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:11392 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728142AbgLCCJA (ORCPT ); Wed, 2 Dec 2020 21:09:00 -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 0B322lbo095985; Wed, 2 Dec 2020 21:08:15 -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=0vrJkpxV7J6wUU6nHBy8wxjwXBtmUbHss6o/M2/SEuI=; b=GRCHzgZED+MHc7NVpt8I+4MfvrqoLpnealIRqV5G8YuuwbxFlfL0JoocBUK/y8K2jbt+ Qt/8Bw2ms0jHnINmTVVHgra4LPP27u19o4ddOK8fSOhAFhSllxG1RG6w7/Yp2IjjbS0k 4e8PCyDjFnQtSz5LL/KUQozRRoZdpfdH6r/SMXstiKf9kbxm2LqYGUjOZuN3PBFJfH5O remkjn/KixdVebJZVriU9PD6kH6Q3iD+KoErubcvTecj7KHkgaE311fWp4D234CTl6GA jH0dVWC1vO0iFnvvJIeRqJVJHKOcFLoPJD2+p33rdFJ0upfOPSFzRbzZsbpeijNlOUDl Ow== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 356jfcxxdc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 21:08:15 -0500 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0B327YJZ004616; Thu, 3 Dec 2020 02:08:14 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma04wdc.us.ibm.com with ESMTP id 354ysup6px-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Dec 2020 02:08:14 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0B328CJm25559308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Dec 2020 02:08:12 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C88AF78066; Thu, 3 Dec 2020 02:08:12 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 31E4178060; Thu, 3 Dec 2020 02:08:12 +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:12 +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 05/18] ibmvfc: add Sub-CRQ IRQ enable/disable routine Date: Wed, 2 Dec 2020 20:07:53 -0600 Message-Id: <20201203020806.14747-6-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=766 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 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 f879be666c84..e082935f56cf 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