Page MenuHomeFreeBSD

sys/dev/ichsmb: Silence unhandled SMBALERT device_printfs
ClosedPublic

Authored by linnemannr_gmail.com on May 4 2023, 6:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 9, 4:15 PM
Unknown Object (File)
Dec 7 2024, 5:56 PM
Unknown Object (File)
Nov 19 2024, 7:10 PM
Unknown Object (File)
Oct 28 2024, 4:23 PM
Unknown Object (File)
Oct 18 2024, 12:45 PM
Unknown Object (File)
Sep 27 2024, 1:50 AM
Unknown Object (File)
Sep 23 2024, 9:37 AM
Unknown Object (File)
Sep 22 2024, 10:05 PM
Subscribers
None

Details

Summary

The ichsmb driver does not actually handle SMBALERT, other than by logging the
first 16 occurences of the ICH_HST_STA_SMBALERT_STS_SMBALERT status
flag. Because the SMBALERT is not acknowledged by the host, clearing it in the
host status register does not appear to work as long as some slave device is
pulling the SMBALERT line low, at least for C2000 chips. As a result, if a slave
device does pull SMBALERT low the interrupt handler will always loop its maximum
of 16 times attempting to clear all status register flags and device_printf the
status register. The result is the kernel message buffer is littered with these
device_printfs at every interrupt.

To remedy the problem, the ICH_HST_STA_SMBALERT_STS flag is zeroed in the read
host status register value, just as with ICH_HST_STA_INUSE_STS and
ICH_HST_STA_HOST_BUSY. This allows the loop to break when no other flags that
must be handled are set in the host status register. Additionally, because the
SMBALERT is not actually handled the SMBALERT logging is omitted as it has no
actual function at this time.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 51332
Build 48223: arc lint + arc unit

Event Timeline

linnemannr_gmail.com created this revision.

Seems reasonable... Not sure why we're getting SMBALERTs, and would feel better knowing... but for now, this is fine... we don't do anything with it...

This revision is now accepted and ready to land.May 4 2023, 10:15 PM

We could be getting them for any number of reasons, it all depends on the slaves on the bus and how they behave. It's an optional signal though, so since we don't handle it we don't need to spam the kernel message buffer about it.