Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp93919pxb; Mon, 13 Sep 2021 13:55:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5e3zKWOS71lHWEWBLVVBkouWvKt31S/C30dhd934HHEHXCurIdHL5xYwXOEteSD6NqJc2 X-Received: by 2002:aa7:de85:: with SMTP id j5mr15154650edv.147.1631566508672; Mon, 13 Sep 2021 13:55:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631566508; cv=none; d=google.com; s=arc-20160816; b=ibsKIGpvj6XTC3GP8IEwNmSBc2X8oNzloHGca57gNNwdIR7Sm7h1ZiX1FnEeqAD20T rSg+moHoQftPJAqdkctx0iiShryPhbRqwKZrcnxkWJeO4zMOfaw4z1JQedlmA6DNuvhC PBmNsMR7Hgw3Nm5N5gLhzPzT9+/aIpEh4C9goL074CypNfS4qxari7C6kirZglEiyGTw g7fHUMpwQkwYiN0FwJ2ua1PwSvDX5sHdgCgx3N664kEbMIZaubWdde6Xt4eAFcc+afHy C8ZNTYq5MlHba5oagTkfDdjULiJKcEfcoQrrqklOfPrkTSchsb6czY41gTgsF0L4Qntc mJag== 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=t4ZrqazyfKzScFJ57aX9wjiKndxrVxz3wthzej21N/c=; b=arg+lBPWSK4Wczk5BFLbhplU5IhNUsvYyph1FE9Qmt5MUl4i5d5BWRpr9eHK1NXKzj km3CgWtD5G51I6MhQHo+QSo4u9zCdsSTfUPr57DzKVmpgjSUDzmK821zdY6r1ElTdiAf hyuTwgfQxXpKknMSaF6ZKSny+0yEEYApxr3LRFUP5c/fo1THg9flbIZ36I0XGrYay1v3 UZ/K1WUcpvb+nPwA5o3Ogh4jigMHrVNN9mjR0pIZNMRhdTPF6OPY9cH1wGlABL6cZyAP f7KdHM56Z+YD0WjbIwdH6ZX3Sg68aLgVrHUN2eCOIK2r0yQ1nkrbC1txTUFLWQNoymrf cu6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ygQCqcfr; 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 b1si10771453ejb.600.2021.09.13.13.54.45; Mon, 13 Sep 2021 13:55:08 -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=ygQCqcfr; 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 S245560AbhIMNyp (ORCPT + 99 others); Mon, 13 Sep 2021 09:54:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:60356 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244950AbhIMNvj (ORCPT ); Mon, 13 Sep 2021 09:51:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5DA2C615E6; Mon, 13 Sep 2021 13:34:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631540051; bh=QGnjh3XPIh8bYFm4lHeIH8Vrts5kHz0cIN/fyO2v4Zk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ygQCqcfrSDq+OLB4CfgIn+Iit53zfu6DEk+7KQO5yKCiN9rScMP5qJqBiKiekTXOB 0XDeB0iOqskbpv+fraRI9uQ/krkSfNVp6Wq1t5B1dEHH0TGk6UasdHtTYPMzWzoKNP rlGWqcw5kaMz94lhzCsVedRrmd2VH+WONI6h0lsg= 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.13 031/300] crypto: qat - handle both source of interrupt in VF ISR Date: Mon, 13 Sep 2021 15:11:32 +0200 Message-Id: <20210913131110.376199998@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131109.253835823@linuxfoundation.org> References: <20210913131109.253835823@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 888388acb6bd..3e4f64d248f9 100644 --- a/drivers/crypto/qat/qat_common/adf_vf_isr.c +++ b/drivers/crypto/qat/qat_common/adf_vf_isr.c @@ -160,6 +160,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 */ @@ -172,7 +173,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 */ @@ -184,10 +185,10 @@ static irqreturn_t adf_isr(int irq, void *privdata) csr_ops->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