i2c: designware: Disable SMBus interrupts to prevent storms from mis-configured firmware
Andy Shevchenko
Reviewed-byQuoted 4 lines · Jinhui Guo
When probing the I2C master, disable SMBus interrupts to prevent storms caused by broken firmware mis-configuring IC_SMBUS=1; the handler never services them and a mis-configured SMBUS Master extend-clock timeout can flood the CPU.
...
Quoted 4 lines
#define
DW_IC_TX_ABRT_SOURCE0x80
#defineDW_IC_ENABLE_STATUS0x9c
#defineDW_IC_CLR_RESTART_DET0xa8
+#defineDW_IC_SMBUS_INTR_MASK0xcc
It seems one TAB too little.
Quoted 3 lines
#define
DW_IC_COMP_PARAM_10xf4
#defineDW_IC_COMP_VERSION0xf8
#defineDW_IC_SDA_HOLD_MIN_VERS0x3131312A/* "111*" == v1.11* */
...
The rest LGTM, but let Mika to review.
FWIW,
Reviewed-by Andy Shevchenko <[email protected]>
Signature · 2 lines
With Best Regards, Andy Shevchenko