[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100603101501.5e5d7148@nehalam>
Date: Thu, 3 Jun 2010 10:15:01 -0700
From: Stephen Hemminger <shemminger@...tta.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org
Subject: floppy driver assumes INITIAL_JIFFIES == 0
The ancient and crufty floppy driver has some serious problems if
used during the boot process. It will miss data, and cause OOPS
because of callback routines called in unexpected contexts.
All this goes away if INITIAL_JIFFIES is 0 as it was when this
driver was written.
The root cause of all this is lots of places that assume the initial
jiffies value is 0. Examples:
floppy_open:
if (!(mode & FMODE_NDELAY)) {
if (mode & (FMODE_READ|FMODE_WRITE)) {
UDRS->last_checked = 0;
start_motor:
if (!(raw_cmd->flags & FD_RAW_NO_MOTOR)) {
if (!(FDCS->dor & (0x10 << UNIT(current_drive)))) {
set_debugt();
/* no read since this drive is running */
DRS->first_read_date = 0;
and the relationship between select_date and select_delay.
The driver is a complex mess of spaghetti state. Does one of the original
authors have more background to fix this?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists