Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6283518iob; Tue, 10 May 2022 14:52:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJscuzgef71YmBh5wTJkp9Cf4dOGUw43s6RUIthOQkjO13ZX5kFDs8Ykqirapt+nzHnwBc X-Received: by 2002:aa7:da44:0:b0:428:659e:5c84 with SMTP id w4-20020aa7da44000000b00428659e5c84mr23621946eds.233.1652219548054; Tue, 10 May 2022 14:52:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652219548; cv=none; d=google.com; s=arc-20160816; b=ESwho5YEt10hGGhDCr66PbCZNf+nsueDgx5bbw5xwwVdqjlDAuTe8D77LVnVrG9Xgx b3W8kFmoCyRtXMaD3rC0mDYKR3duMjPzMzC5QI6sIOio/VQe9BopS9Y4y7rVgYqdEmHf X4kIwaGmADHr5pPZZyjqXSHrY11eQRQjHrL8RjP6oMnAw6n12KNsnAMGulPMTPhdhIKG DYSkQcMw+RjBfD+8AsFpE9xyi4Z4CNP0J+fhPijJbiNSFx/S5JiNG5FwrNzxs4GSXgtE 7gmuGsxUfvkd8YOF4uh9jBNKt0jRUifjkDAsthuNB5l3niI/rYGJolk67UBvc/SAXTGZ mxaQ== 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=qJVA87DloO4P7oIC2WNHLFiagn85EoerfQC7u23TtQw=; b=CTS0s1QFbp2Dgxn2K9P/ZScOsK/apOrx7DL/FP5m5U+s1UY1Rp4YlE0WmRiwJMlvBL MBTP/0/i6xr97nt9I+hEtLyvn4t3x0GjKoX2fBIWxPWb1i1lXr/PXhzFcmHyB0wPgjbX 8grYLGQDAfvKXI1YSi896VvfTp1QBBvkgaweSywuZqiCMC89za6PQ5uDFIN5CfiTl5wl 7zyo17RMRoeoqSs9bi95XIVTmxWNbRrVGnXcBNmsbVuACVW/tKU94p77MCA6/kQGuK4s nqSdRpXCRvJ33SnNmAUrNmNxUsSomY/6Vkgn58eXqnUszHSlLWJGh4KuC0NKQ1zN+ix3 qNiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DHrEZDHS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he35-20020a1709073da300b006f50b98790asi724326ejc.41.2022.05.10.14.52.04; Tue, 10 May 2022 14:52:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DHrEZDHS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1344694AbiEJOft (ORCPT + 99 others); Tue, 10 May 2022 10:35:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245474AbiEJOId (ORCPT ); Tue, 10 May 2022 10:08:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7320C9ED3; Tue, 10 May 2022 06:42:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 69CB3617E4; Tue, 10 May 2022 13:42:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69FB0C385A6; Tue, 10 May 2022 13:42:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652190148; bh=Wj5Hvo3EI9/ClIFsOlMSIyc5RZ6VM1C11DL/NbLekXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DHrEZDHSt+uF7NEwfId+D8+xCC36LJ/FV2x8j0wrbUlVxchLnzZ2DykCG7yrL4bmd Y0QXzKvf9cX/ytZJrLdjtsxWoilROjQZM1SnfVZ9qqw9V5OUvBR3/hys08WAvnLCmP qd0JYB491xB5wgWrttakfenUjDnA0DZMEs1gPTPo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, pali@kernel.org, =?UTF-8?q?Marek=20Beh=FAn?= , Lorenzo Pieralisi Subject: [PATCH 5.17 131/140] PCI: aardvark: Enable MSI-X support Date: Tue, 10 May 2022 15:08:41 +0200 Message-Id: <20220510130745.340554578@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130741.600270947@linuxfoundation.org> References: <20220510130741.600270947@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Roh?r commit 754e449889b22fc3c34235e8836f08f51121d307 upstream. According to PCI 3.0 specification, sending both MSI and MSI-X interrupts is done by DWORD memory write operation to doorbell message address. The write operation for MSI has zero upper 16 bits and the MSI interrupt number in the lower 16 bits, while the write operation for MSI-X contains a 32-bit value from MSI-X table. Since the driver only uses interrupt numbers from range 0..31, the upper 16 bits of the DWORD memory write operation to doorbell message address are zero even for MSI-X interrupts. Thus we can enable MSI-X interrupts. Testing proves that kernel can correctly receive MSI-X interrupts from PCIe cards which supports both MSI and MSI-X interrupts. Link: https://lore.kernel.org/r/20220110015018.26359-13-kabel@kernel.org Signed-off-by: Pali Roh?r Signed-off-by: Marek Beh?n Signed-off-by: Lorenzo Pieralisi Signed-off-by: Marek Beh?n Signed-off-by: Greg Kroah-Hartman --- drivers/pci/controller/pci-aardvark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -1337,7 +1337,7 @@ static struct irq_chip advk_msi_irq_chip static struct msi_domain_info advk_msi_domain_info = { .flags = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | - MSI_FLAG_MULTI_PCI_MSI, + MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX, .chip = &advk_msi_irq_chip, };