public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 8250_hp300: initialisation ordering bug
@ 2005-09-04 10:19 Russell King
  2005-09-07 20:17 ` Kars de Jong
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King @ 2005-09-04 10:19 UTC (permalink / raw)
  To: Linux Kernel List, jongk

Hi,

I've noticed that 8250_hp300 is buggy wrt the ordering of hardware
initialisation to the visibility of devices to user space.  Namely,
8250_hp300 does the following:

        line = serial8250_register_port(&port);
...
        /* Enable board-interrupts */
        out_8(d->resource.start + DIO_VIRADDRBASE + DCA_IC, DCA_IC_IE);
        dio_set_drvdata(d, (void *)line);

        /* Reset the DCA */
        out_8(d->resource.start + DIO_VIRADDRBASE + DCA_ID, 0xff);
        udelay(100);

serial8250_register_port() makes the port visible to userspace, so
from that point on it could be opened.  However, if it's opened
prior to the remainder of the above completing, we will be missing
interrupts (and what effect does "reset the DCA" have?)

Surely this hardware fiddling should be completed before we register
the port?


-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-09-08 19:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-04 10:19 8250_hp300: initialisation ordering bug Russell King
2005-09-07 20:17 ` Kars de Jong
2005-09-07 20:33   ` Russell King
2005-09-08 19:42     ` Kars de Jong
2005-09-08 19:45       ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox