From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Linux Kernel List <linux-kernel@vger.kernel.org>, jongk@linux-m68k.org
Subject: 8250_hp300: initialisation ordering bug
Date: Sun, 4 Sep 2005 11:19:01 +0100 [thread overview]
Message-ID: <20050904111901.A30509@flint.arm.linux.org.uk> (raw)
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
next reply other threads:[~2005-09-04 10:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-04 10:19 Russell King [this message]
2005-09-07 20:17 ` 8250_hp300: initialisation ordering bug 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050904111901.A30509@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=jongk@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox