From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F86019D068; Thu, 15 Aug 2024 14:10:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723731057; cv=none; b=H0BD0e2axmnKEIRDuL9H/S7GRc6knj+98huR6b1T6utQ08ZouK1suecDBqWpSrsHj+lZgJrikaZ+nh4VUu6/pRdN3o36H+uqecE+Edheitb7gruGgeXK30rhUorJBA6wI5TMnRqUDOuPQqb/0ZnG3qXzrqg7iyicFZyyU+JC+Vk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723731057; c=relaxed/simple; bh=845M7Up8KgoTLzO0B+3GzXx8RkdncjA6xgenCwsI3u4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=av/5VnjZaqFS1WRMWV/WbsTFszQ9jZPiWasRji/SgXu9JaNsGm6/btk43FNbVbkRfcytTLtKa+fpoxpgCAApPhzfFaZpGv9bCW49Fzkdv2Zm22FPwTFZywewUYGybA1MAA4NKXMDdirCaywYLcU+0swKyEHd2yB+Wx8kCI/ZtZI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SSj8auY9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="SSj8auY9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCC1BC32786; Thu, 15 Aug 2024 14:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723731057; bh=845M7Up8KgoTLzO0B+3GzXx8RkdncjA6xgenCwsI3u4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SSj8auY9nKpGjKLvYHW1kutqS64QpI1EpH/k+A15wAGgm3iv3YDIRusSKk+kEXVCV AmNYD0vX7gBKYjhbI+QGKzM6/1DjikBsf/hWc06Kr4LmGuKBPXfi7r/3VDmb0wVvuJ Ao8pt+G5gXfryR2Wwy8EzNdSvAScPHlfq9sGToQc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , "Borislav Petkov (AMD)" , Sasha Levin Subject: [PATCH 5.4 010/259] x86/platform/iosf_mbi: Convert PCIBIOS_* return codes to errnos Date: Thu, 15 Aug 2024 15:22:23 +0200 Message-ID: <20240815131903.190436794@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240815131902.779125794@linuxfoundation.org> References: <20240815131902.779125794@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ilpo Järvinen [ Upstream commit 7821fa101eab529521aa4b724bf708149d70820c ] iosf_mbi_pci_{read,write}_mdr() use pci_{read,write}_config_dword() that return PCIBIOS_* codes but functions also return -ENODEV which are not compatible error codes. As neither of the functions are related to PCI read/write functions, they should return normal errnos. Convert PCIBIOS_* returns code using pcibios_err_to_errno() into normal errno before returning it. Fixes: 46184415368a ("arch: x86: New MailBox support driver for Intel SOC's") Signed-off-by: Ilpo Järvinen Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240527125538.13620-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Sasha Levin --- arch/x86/platform/intel/iosf_mbi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/platform/intel/iosf_mbi.c b/arch/x86/platform/intel/iosf_mbi.c index 9e24445004282..117cabcfe29db 100644 --- a/arch/x86/platform/intel/iosf_mbi.c +++ b/arch/x86/platform/intel/iosf_mbi.c @@ -62,7 +62,7 @@ static int iosf_mbi_pci_read_mdr(u32 mcrx, u32 mcr, u32 *mdr) fail_read: dev_err(&mbi_pdev->dev, "PCI config access failed with %d\n", result); - return result; + return pcibios_err_to_errno(result); } static int iosf_mbi_pci_write_mdr(u32 mcrx, u32 mcr, u32 mdr) @@ -91,7 +91,7 @@ static int iosf_mbi_pci_write_mdr(u32 mcrx, u32 mcr, u32 mdr) fail_write: dev_err(&mbi_pdev->dev, "PCI config access failed with %d\n", result); - return result; + return pcibios_err_to_errno(result); } int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr) -- 2.43.0