From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Florian Fainelli <florian.fainelli@telecomint.eu>,
Ralf Baechle <ralf@linux-mips.org>,
Phil Sutter <n0-1@freewrt.org>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] MIPS: Routerboard 532: Fix vendor retry check code
Date: Tue, 11 Jun 2024 16:14:35 +0200 [thread overview]
Message-ID: <Zmhby7DtfLGVj+8V@alpha.franken.de> (raw)
In-Reply-To: <20240508120700.51374-1-ilpo.jarvinen@linux.intel.com>
On Wed, May 08, 2024 at 03:07:00PM +0300, Ilpo Järvinen wrote:
> read_config_dword() contains strange condition checking ret for a
> number of values. The ret variable, however, is always zero because
> config_access() never returns anything else. Thus, the retry is always
> taken until number of tries is exceeded.
>
> The code looks like it wants to check *val instead of ret to see if the
> read gave an error response.
>
> Fixes: 73b4390fb234 ("[MIPS] Routerboard 532: Support for base system")
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> --
>
> IMPORTANT NOTE TO MAINTAINER:
>
> This change has potential of breaking something and I don't have HW to
> test this with. I only came across it while going through all PCIBIOS_*
> call chains. Clearly the current code non-sensical so something is not
> right but whether this is the right way to solve the problem, I'm not
> entirely sure because it will make small change into the behavior.
I have rework of this code sitting in one of my development branches
and I didn't spot the bug in the old code, but the new code does
what your fix is doing. So I'm pretty sure this change is correct.
> ---
> arch/mips/pci/ops-rc32434.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
applied to mips-fixes.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
prev parent reply other threads:[~2024-06-11 14:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 12:07 [PATCH 1/1] MIPS: Routerboard 532: Fix vendor retry check code Ilpo Järvinen
2024-06-11 14:14 ` Thomas Bogendoerfer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zmhby7DtfLGVj+8V@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=florian.fainelli@telecomint.eu \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=n0-1@freewrt.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox