Hi Jean, On Tue, Apr 10, 2018 at 9:44 AM, Jean Delvare <jdelvare@xxxxxxx> wrote: > Saving the original value of register SMBSLVCMD in > i801_enable_host_notify() doesn't work, because this function is > called not only at probe time but also at resume time. Do it in > i801_probe() instead, so that the saved value is not overwritten at > resume time. Sounds good. Thanks for spotting that! And thanks Jason also for the quick tests in the other thread. > > Signed-off-by: Jean Delvare <jdelvare@xxxxxxx> > Fixes: 22e94bd6779e ("i2c: i801: store and restore the SLVCMD register at load and unload") > Cc: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx> > Cc: Wolfram Sang <wsa@xxxxxxxxxxxxx> > --- > Jason, please test this patch and let us know if it fixes your problem. In any cases, this should go upstream and to stable I think. Reviewed-by: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx> Cheers, Benjamin > > drivers/i2c/busses/i2c-i801.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > --- linux-4.15.orig/drivers/i2c/busses/i2c-i801.c 2018-04-10 09:27:17.447796486 +0200 > +++ linux-4.15/drivers/i2c/busses/i2c-i801.c 2018-04-10 09:31:43.989877499 +0200 > @@ -965,8 +965,6 @@ static void i801_enable_host_notify(stru > if (!(priv->features & FEATURE_HOST_NOTIFY)) > return; > > - priv->original_slvcmd = inb_p(SMBSLVCMD(priv)); > - > if (!(SMBSLVCMD_HST_NTFY_INTREN & priv->original_slvcmd)) > outb_p(SMBSLVCMD_HST_NTFY_INTREN | priv->original_slvcmd, > SMBSLVCMD(priv)); > @@ -1614,6 +1612,10 @@ static int i801_probe(struct pci_dev *de > outb_p(inb_p(SMBAUXCTL(priv)) & > ~(SMBAUXCTL_CRC | SMBAUXCTL_E32B), SMBAUXCTL(priv)); > > + /* Remember original Host Notify setting */ > + if (priv->features & FEATURE_HOST_NOTIFY) > + priv->original_slvcmd = inb_p(SMBSLVCMD(priv)); > + > /* Default timeout in interrupt mode: 200 ms */ > priv->adapter.timeout = HZ / 5; > > > > -- > Jean Delvare > SUSE L3 Support