Re: [PATCH 3/4] i2c-i801: Check if interrupts are disabled

Wolfram Sang
2014-11-11T14:41:07Z

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

> > > + if (pcists & SMBPCISTS_INTS)
> > > + dev_warn(&dev->dev, "An interrupt is pending!\n");
> >
> > You think it is better to not clear it?
>
> I admit I did not think about it. As I am trying to better understand
> the few mysterious failure cases that have been reported to me, I just
> wanted to log everything out of the ordinary. I have no idea what's
> considered the right thing to do in such a situation. Do you believe
> that clearing the interrupt is the appropriate action in that case?

Depends on the driver, I'd say (which I haven't looked at in detail). If
this causes the irq handler to be called as soon as the irq is
registered, and if the state machine gets confused then, then it should
be cleared beforehand, of course.

If this is not the case, then it might be better to be less intrusive,
spit the warning, and wait for somebody to show up with this message in
the logs.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]