From 493715f9b8173da8a1ca8af12a22eb1ded79d4eb Mon Sep 17 00:00:00 2001 From: Ahmad Khalifa Date: Fri, 19 Apr 2024 16:43:19 -0600 Subject: [PATCH] ig4_iic: Warn on NACK Some DSDTs define non-existent devices, warn the user when an access is attempted on one of these devices. Reviewed by: imp, markj, Elliott Mitchell Pull Request: https://github.com/freebsd/freebsd-src/pull/1125 --- sys/dev/ichiic/ig4_iic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/ichiic/ig4_iic.c b/sys/dev/ichiic/ig4_iic.c index 98c160ec9fd2..652d5a084f8b 100644 --- a/sys/dev/ichiic/ig4_iic.c +++ b/sys/dev/ichiic/ig4_iic.c @@ -675,6 +675,10 @@ ig4iic_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) rpstart = !stop; } + if (error == IIC_ENOACK && bootverbose) + device_printf(dev, "Warning: NACK for slave address 0x%x\n", + msgs[i].slave >> 1); + if (!allocated) sx_unlock(&sc->call_lock); return (error);