From patchwork Wed Jan 22 02:24:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 13946758 X-Patchwork-Delegate: kw@linux.com Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 08AD414A619; Wed, 22 Jan 2025 02:25:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.248.49.38 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737512706; cv=none; b=G2151OeXIiTr06gAkWfQjxmyEWfTVTxnW6ZDNeJSsYW28Ozzu9K1nJdx7nD4EIbncgGpNQGIzctipnf/8+g8zUnvj+amwfD3U5i/D9Yv1gNm3YnP+mVdpKLd9Tywuun79yy6Ea+4VRt2jRGAgknfY+Clb7T164+EjBIt1KK+19w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737512706; c=relaxed/simple; bh=zNjjVTNpCe9/02Yg7k2e+F/dI6XDTX/eYAktHa0ZlHA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uKifPFxgOjb++Er0CEaxDu8kve8IlMdT6XVMtmGsdDCC+RfZZO2YzVdO/osGkdp8Z93I/m4N545vC4Grgl7ctYOvaPnfSIow5vvYi81Ayr3A3jh1abpeyJkmYXHvoUWb9CH8pF5lIQh4gebF9IY0sJ7wiWzZARGnFuezp4fb8rc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=socionext.com; spf=pass smtp.mailfrom=socionext.com; arc=none smtp.client-ip=202.248.49.38 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=socionext.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=socionext.com Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 22 Jan 2025 11:24:56 +0900 Received: from mail.mfilter.local (mail-arc01.css.socionext.com [10.213.46.36]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id 8C1DE2010183; Wed, 22 Jan 2025 11:24:56 +0900 (JST) Received: from kinkan2.css.socionext.com ([172.31.9.51]) by m-FILTER with ESMTP; Wed, 22 Jan 2025 11:24:56 +0900 Received: from plum.e01.socionext.com (unknown [10.212.245.39]) by kinkan2.css.socionext.com (Postfix) with ESMTP id A537C3730; Wed, 22 Jan 2025 11:24:55 +0900 (JST) From: Kunihiko Hayashi To: =?unknown-8bit?q?Manivannan_Sadhasivam_=3Cmanivannan=2Esadhasivam=40lina?= =?unknown-8bit?q?ro=2Eorg=3E=2C_Krzysztof_Wilczy=8F=AB=CDski__=3Ckw=40linux?= =?unknown-8bit?q?=2Ecom=3E=2C_Kishon_Vijay_Abraham_I_=3Ckishon=40kernel=2Eo?= =?unknown-8bit?q?rg=3E=2C_Arnd_Bergmann_=3Carnd=40arndb=2Ede=3E=2C_Greg_Kro?= =?unknown-8bit?q?ah-Hartman_=3Cgregkh=40linuxfoundation=2Eorg=3E=2C_Lorenzo?= =?unknown-8bit?q?_Pieralisi_=3Clpieralisi=40kernel=2Eorg=3E=2C_Gustavo_Pime?= =?unknown-8bit?q?ntel_=3Cgustavo=2Epimentel=40synopsys=2Ecom=3E?= Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi , stable@vger.kernel.org Subject: [PATCH v2 3/3] misc: pci_endpoint_test: Fix irq_type to convey the correct type Date: Wed, 22 Jan 2025 11:24:46 +0900 Message-Id: <20250122022446.2898248-4-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250122022446.2898248-1-hayashi.kunihiko@socionext.com> References: <20250122022446.2898248-1-hayashi.kunihiko@socionext.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There are two variables that indicate the interrupt type to be used in the next test execution, "irq_type" as global and test->irq_type. The global is referenced from pci_endpoint_test_get_irq() to preserve the current type for ioctl(PCITEST_GET_IRQTYPE). The type set in this function isn't reflected in the global "irq_type", so ioctl(PCITEST_GET_IRQTYPE) returns the previous type. As a result, the wrong type will be displayed in "pcitest" as follows: # pcitest -i 0 SET IRQ TYPE TO LEGACY: OKAY # pcitest -I GET IRQ TYPE: MSI Fix this issue by propagating the current type to the global "irq_type". Cc: stable@vger.kernel.org Fixes: b2ba9225e031 ("misc: pci_endpoint_test: Avoid using module parameter to determine irqtype") Signed-off-by: Kunihiko Hayashi --- drivers/misc/pci_endpoint_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index a342587fc78a..33058630cd50 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -742,6 +742,7 @@ static bool pci_endpoint_test_set_irq(struct pci_endpoint_test *test, if (!pci_endpoint_test_request_irq(test)) goto err; + irq_type = test->irq_type; return true; err: