From patchwork Mon Feb 10 07:58:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 13967435 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 824E91BCA0F; Mon, 10 Feb 2025 07:58:24 +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=1739174306; cv=none; b=f9eiDDgArA224p3nLqVSDAaKgxTr9y8DccE8K5XW3Eu0Roj7PeUggkFk8ItLwk8BnglVjW4WELpzUs94EFtdHRNLv7y9hj0WPeNVM3Th0/yXKjmgIIFyoXNVY5Vsyyuk0dzG11M+dt7EJ0IAn58ihQXHFU2Xvov8hQ9XjwG7Qus= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739174306; c=relaxed/simple; bh=sWNOI2uoT7I2pQ45KuU15VwsIF8Tkr6Kp38yOtdv0C0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sZ6kVaR68i0Qa51LtvypELM0hqHhyQpfTkvZKiNI8zGiWnjJgFW3lCveOWnMSHTtQHoWQ4b43cIw+M91H/yxLaA/kB+HUKd0lhnRoLYCpFzFAkVw2oBfSNn9nhOrD4FOXkGLodzX2AKnE7SkjZEvRibjDu7zWCSgU5yRTTSbH+g= 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 iyokan2-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 10 Feb 2025 16:58:23 +0900 Received: from mail.mfilter.local (mail-arc02.css.socionext.com [10.213.46.40]) by iyokan2-ex.css.socionext.com (Postfix) with ESMTP id 9949C20090C1; Mon, 10 Feb 2025 16:58:23 +0900 (JST) Received: from kinkan2.css.socionext.com ([172.31.9.51]) by m-FILTER with ESMTP; Mon, 10 Feb 2025 16:58:23 +0900 Received: from plum.e01.socionext.com (unknown [10.212.245.39]) by kinkan2.css.socionext.com (Postfix) with ESMTP id D56211CDD; Mon, 10 Feb 2025 16:58:22 +0900 (JST) From: Kunihiko Hayashi To: Manivannan Sadhasivam , Krzysztof Wilczynski , Kishon Vijay Abraham I , Arnd Bergmann , Greg Kroah-Hartman , Lorenzo Pieralisi , Gustavo Pimentel , Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi , stable@vger.kernel.org Subject: [PATCH v3 3/5] misc: pci_endpoint_test: Fix irq_type to convey the correct type Date: Mon, 10 Feb 2025 16:58:10 +0900 Message-Id: <20250210075812.3900646-4-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250210075812.3900646-1-hayashi.kunihiko@socionext.com> References: <20250210075812.3900646-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 Reviewed-by: Niklas Cassel --- 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 f13fa32ef91a..6a0972e7674f 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -829,6 +829,7 @@ static int pci_endpoint_test_set_irq(struct pci_endpoint_test *test, return ret; } + irq_type = test->irq_type; return 0; }