The branch main has been updated by jmg: URL: https://cgit.FreeBSD.org/src/commit/?id=1ba6fd3de531a3e731d33e9ad376ce3fa602e866
commit 1ba6fd3de531a3e731d33e9ad376ce3fa602e866 Author: John-Mark Gurney <[email protected]> AuthorDate: 2025-12-03 21:19:10 +0000 Commit: John-Mark Gurney <[email protected]> CommitDate: 2025-12-03 21:19:10 +0000 ichsmb: shutdown interrupts to prevent spurious interrupts after kexec Obtained from: Hewlett Packard Enterprise Rebiewed by: jhb, jhibbits --- sys/dev/ichsmb/ichsmb.c | 11 +++++++++++ sys/dev/ichsmb/ichsmb_pci.c | 1 + sys/dev/ichsmb/ichsmb_var.h | 1 + 3 files changed, 13 insertions(+) diff --git a/sys/dev/ichsmb/ichsmb.c b/sys/dev/ichsmb/ichsmb.c index c5e9e2f1b9ed..e40a8a8a3886 100644 --- a/sys/dev/ichsmb/ichsmb.c +++ b/sys/dev/ichsmb/ichsmb.c @@ -703,4 +703,15 @@ ichsmb_detach(device_t dev) return 0; } +int +ichsmb_shutdown(device_t dev) +{ + const sc_p sc = device_get_softc(dev); + + /* Disable interrupts */ + bus_write_1(sc->io_res, ICH_HST_CNT, 0); + + return (0); +} + DRIVER_MODULE(smbus, ichsmb, smbus_driver, 0, 0); diff --git a/sys/dev/ichsmb/ichsmb_pci.c b/sys/dev/ichsmb/ichsmb_pci.c index e4d87fe1fed2..9ffb1de62dac 100644 --- a/sys/dev/ichsmb/ichsmb_pci.c +++ b/sys/dev/ichsmb/ichsmb_pci.c @@ -243,6 +243,7 @@ static device_method_t ichsmb_pci_methods[] = { DEVMETHOD(device_probe, ichsmb_pci_probe), DEVMETHOD(device_attach, ichsmb_pci_attach), DEVMETHOD(device_detach, ichsmb_detach), + DEVMETHOD(device_shutdown, ichsmb_shutdown), /* SMBus methods */ DEVMETHOD(smbus_callback, ichsmb_callback), diff --git a/sys/dev/ichsmb/ichsmb_var.h b/sys/dev/ichsmb/ichsmb_var.h index 7fb14804d3c4..8aeaf403781b 100644 --- a/sys/dev/ichsmb/ichsmb_var.h +++ b/sys/dev/ichsmb/ichsmb_var.h @@ -84,6 +84,7 @@ extern void ichsmb_release_resources(sc_p sc); extern int ichsmb_probe(device_t dev); extern int ichsmb_attach(device_t dev); extern int ichsmb_detach(device_t dev); +extern int ichsmb_shutdown(device_t dev); #endif /* _DEV_ICHSMB_ICHSMB_VAR_H */
