Re: cg14 frambuffer bug in 2.2.19 (and probably 2.4.x as well)

Alex Buell (alex.buell@tahallah.demon.co.uk)
Fri, 27 Jul 2001 14:04:32 +0100 (BST)


On Fri, 27 Jul 2001, David S. Miller wrote:

> I've made this change in both my 2.2.x and 2.4.x trees.
> Thanks a lot for hunting this down and making a fix.

Is the 2.4.7 fix anything like this:

if (c->enable) {
u8 tmp = sbus_readb(&cur->ccr);

tmp |= CG14_CCR_ENABLE;
sbus_writeb(tmp, &cur->ccr);
}
else {
u8 tmp = sbus_readb(&cur->ccr);

tmp &= ~CG14_CCR_ENABLE;
sbus_writeb(tmp, &cur->ccr);
}

It looks a bit ugly though. I'd prefer:

u8 tmp = sbus_readb(&cur->ccr);

if (c->enable)
tmp != CG14_CCR_ENABLE;
else
tmp &= ~CG14_CCR_ENABLE;

sbus_writeb(tmp, &cur->ccr);

I'll test this as soon as I recompile 2.4.7 with egcs 1.1.2 to prove a
theory of mine that using 2.95.3 results in non-bootable kernels.

PS: I'm still learning the internals of the sparc32 port. Lots of lovely
confusing bits to hack my way through. :o)

-- 
Hey, they *are* out to get you, but it's nothing personal.

http://www.tahallah.demon.co.uk

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/