Thread (10 messages) flat view 10 messages, 8 authors, 2021-02-11

Re: [PATCH V2] rtc: mc146818: Dont test for bit 0-5 in Register D

From: Thomas Gleixner <hidden>
Date: 2021-02-01 19:40:52
Also in: lkml

On Mon, Feb 01 2021 at 11:32, Linus Torvalds wrote:
On Mon, Feb 1, 2021 at 11:24 AM Thomas Gleixner [off-list ref] wrote:
quoted
While it cures the problem on the reporters machine it breaks machines
with Intel chipsets which use bit 0-5 of the D register. So check only
for bit 6 being 0 which is the case on these Intel machines as well.
This looks fine, but it might also be worth it simply just checking
for the only really special value: 0xff, and going "ok, that looks
like missing hardware".

That's what a few other drivers historically do in their probing
routines, so it's not unheard of (ie you can find drivers doing that
kind of

        /* If we read 0xff from the LSR, there is no UART here. */
        if (inb(.. port ..) == 0xff)

in their init routines.

Not a big deal either way, I just think it would be more in like with
what other places do in similar situations
Yeah, we can do that as well. Either way is fine.

Thanks,

        tglx
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help