From: "Ivan T. Ivanov" <iivanov@suse.de>
To: corey@minyard.net
Cc: minyard@acm.org, openipmi-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipmi:ssif: Exit early when there is a SMBus error
Date: Sun, 18 Aug 2024 12:27:27 +0300 [thread overview]
Message-ID: <84eb700ee647cc40e9e99b086a8648e3@suse.de> (raw)
In-Reply-To: <Zr+Up+94gmPEHwcJ@mail.minyard.net>
Hi,
On 2024-08-16 21:04, Corey Minyard wrote:
> On Fri, Aug 16, 2024 at 09:54:58AM +0300, Ivan T. Ivanov wrote:
>> It is pointless to continue module probing when communication
>> with device is failing. This just fill logs with misleading
>> messages like this:
>
> So the BMC (or whatever is there) responds to a GET_DEVICE_ID command,
Well, not really. In cases where ssif_detect() returns -ENODEV, i2c core
i2c_detect_address() threat it as "We catch it here as this isn't an
error”.
See i2c_detect_address().
> but then doesn't properly handle any other valid and mandatory
> commands?
> And this device was added via ACPI or SMBIOS or device tree, almost
> certainly.
>
> My comments are:
>
> 1) This fix is wrong, because it may mask important things that need to
> be reported.
>
> 2) Fix the source of the problem. You can't expect software to
> compensate for all bad hardware and firmware. I'd guess the firmware
> tables are pointing to something that's not a BMC.
I am not saying that hardware or firmware do not have its issues in this
case. But just as it is written now ssif_probe() is fragile. It continue
asking device for features ignoring that there is no valid SMBus
communication.
>
> 3) It appears the response to the GET_DEVICE_ID command, though a
> response is returned, is not valid. The right way to handle this would
> be to do more validation in the ssif_detect() function. It doesn't do
> any validation of the response data, and that's really what needs to be
> done.
>
do_cmd() in ssif_detect() already do validation. Perhaps,
ssif_probe() should just not return ENODEV in case of error.
Thank you for your comments!
Regards,
Ivan
next prev parent reply other threads:[~2024-08-18 9:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-16 6:54 [PATCH] ipmi:ssif: Exit early when there is a SMBus error Ivan T. Ivanov
2024-08-16 18:04 ` Corey Minyard
2024-08-18 9:27 ` Ivan T. Ivanov [this message]
2024-08-20 10:20 ` Ivan T. Ivanov
2024-08-20 15:31 ` Corey Minyard
2024-08-20 15:42 ` Ivan T. Ivanov
2024-08-21 1:05 ` [PATCH] ipmi:ssif: Improve detecting during probing Corey Minyard
2024-08-22 7:22 ` Ivan T. Ivanov
2024-08-22 14:40 ` Corey Minyard
2024-08-26 11:31 ` Ivan T. Ivanov
2024-09-10 10:25 ` Ivan T. Ivanov
2024-09-10 11:30 ` Corey Minyard
2024-09-10 12:05 ` Ivan T. Ivanov
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=84eb700ee647cc40e9e99b086a8648e3@suse.de \
--to=iivanov@suse.de \
--cc=corey@minyard.net \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.org \
--cc=openipmi-developer@lists.sourceforge.net \
/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