Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp46034pxb; Mon, 13 Sep 2021 12:31:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCGu/CJaltyA50lMIiNt+cjkIceTCy6BuR10oDh5lRzhgOirwb+Png2S+ozsJuuix3Owoq X-Received: by 2002:a05:6402:2c9:: with SMTP id b9mr15186843edx.109.1631561465203; Mon, 13 Sep 2021 12:31:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631561465; cv=none; d=google.com; s=arc-20160816; b=Hs/4J8cGYpoltdwv2ZJkLuWx6O4xeCoDwWocoONmpjbCcjJws3uNqTLB8pcVXGzup2 EJkxlPbSSAahB/O7AWz/xA45DBnEtGuWBMn/F685dHeH2VNDgCydKvWhgW6dYUJwUmkM 2b0Go+XAdUEhw0jLONiph5miRKI9sN8HKuu0tqRTQqOcDKF21zVRoKqLRLRef4MRS/0h BgW/34AJsCCiqLF7uJtA/aXh13i32hlWbkF50Uhd0w7beSGdCMw0IP5lC7dD6cLG4D4b e2gPY/hqpQg2sZ1dvyOkEHocJBF3ErlzIFqzcTXk0EIdctnT1roOTCxktyDvKLh9YF2r /QSA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5Dn4u4WR9b8E77iXJDMaMvHxh8BmTzOVr+b6uwT410E=; b=JCVk0OpKvivHyXx5+M5phq/jf0ofH8pVS1Dcvkr0VaIg2QA8bNu2SQrremzXqM/RYS u03KguXK5dUfgDaNArM/9NZKcsfsm62aAxDSFa2/+RkV7dkQNhzo2eAN95MtFGDQI1aj 8Cndj2dzJn102HjTO6K+YYopCSZZeYuio3KzkGuqvjBiEkulTzNcGlEMlrg5VkHKrOiX 99maL3akHH0PiABP7YkYYtPxyp8WTqzzy8ycRTMlx617N0gnZcrWYL/Tg5ZOLyyWBpUF 82/K5rhinE1ajh0ZFUoEbV0i5ZK+FP67eaxqUjFhAHMKhfMsZ9LdSqo+JNoAIpzTD8Xu h6rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="LQ/msgsB"; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ml15si7661578ejb.747.2021.09.13.12.30.41; Mon, 13 Sep 2021 12:31:05 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b="LQ/msgsB"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241601AbhIMNgP (ORCPT + 99 others); Mon, 13 Sep 2021 09:36:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:48112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241951AbhIMNbO (ORCPT ); Mon, 13 Sep 2021 09:31:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A384461130; Mon, 13 Sep 2021 13:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539521; bh=ruzdFOpugTE4tvFpaPEodh/V+m9xP7BGuEwvcoe+7SA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LQ/msgsBGWygsN5/VOOjvr2F/hlg+FD+x3sDVILVDbGcJoBfZwPxmdZ50jELR77Fn 5kO3ghjbnWjzBe0Vpu69XteoRqjhEIBrQvs5qynN6qReTZXzuSODSU+R8nQXb1xmZ7 9i/hnglRFinQNGozXAeuZmGS1GapX29jZOquUBqE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Giovanni Cabiddu , Marco Chiappero , Fiona Trahe , Herbert Xu , Sasha Levin Subject: [PATCH 5.10 029/236] crypto: qat - handle both source of interrupt in VF ISR Date: Mon, 13 Sep 2021 15:12:14 +0200 Message-Id: <20210913131101.337516651@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Giovanni Cabiddu [ Upstream commit 0a73c762e1eee33a5e5dc0e3488f1b7cd17249b3 ] The top half of the VF drivers handled only a source at the time. If an interrupt for PF2VF and bundle occurred at the same time, the ISR scheduled only the bottom half for PF2VF. This patch fixes the VF top half so that if both sources of interrupt trigger at the same time, both bottom halves are scheduled. This patch is based on earlier work done by Conor McLoughlin. Signed-off-by: Giovanni Cabiddu Reviewed-by: Marco Chiappero Reviewed-by: Fiona Trahe Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/qat/qat_common/adf_vf_isr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_vf_isr.c b/drivers/crypto/qat/qat_common/adf_vf_isr.c index 31a36288623a..024401ec9d1a 100644 --- a/drivers/crypto/qat/qat_common/adf_vf_isr.c +++ b/drivers/crypto/qat/qat_common/adf_vf_isr.c @@ -159,6 +159,7 @@ static irqreturn_t adf_isr(int irq, void *privdata) struct adf_bar *pmisc = &GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)]; void __iomem *pmisc_bar_addr = pmisc->virt_addr; + bool handled = false; u32 v_int; /* Read VF INT source CSR to determine the source of VF interrupt */ @@ -171,7 +172,7 @@ static irqreturn_t adf_isr(int irq, void *privdata) /* Schedule tasklet to handle interrupt BH */ tasklet_hi_schedule(&accel_dev->vf.pf2vf_bh_tasklet); - return IRQ_HANDLED; + handled = true; } /* Check bundle interrupt */ @@ -183,10 +184,10 @@ static irqreturn_t adf_isr(int irq, void *privdata) WRITE_CSR_INT_FLAG_AND_COL(bank->csr_addr, bank->bank_number, 0); tasklet_hi_schedule(&bank->resp_handler); - return IRQ_HANDLED; + handled = true; } - return IRQ_NONE; + return handled ? IRQ_HANDLED : IRQ_NONE; } static int adf_request_msi_irq(struct adf_accel_dev *accel_dev) -- 2.30.2