Commit 1b803805 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] hpt366.c: fix 'cat /proc/ide/hpt366' crash

Disable code doing outb() without any locking in /proc handler.
Otherwise 'cat /proc/ide/hpt366' crashes if done during I/O.

Noticed by John Stoffel <stoffel@lucent.com>.
parent 2ce4ee6a
......@@ -107,7 +107,7 @@ static int hpt366_get_info (char *buffer, char **addr, off_t offset, int count)
" %s\n",
(c0 & 0x80) ? "no" : "yes",
(c1 & 0x80) ? "no" : "yes");
#if 0
if (hpt_minimum_revision(dev, 3)) {
u8 cbl;
cbl = inb(iobase + 0x7b);
......@@ -120,7 +120,7 @@ static int hpt366_get_info (char *buffer, char **addr, off_t offset, int count)
(cbl & 0x01) ? 33 : 66);
p += sprintf(p, "\n");
}
#endif
p += sprintf(p, "--------------- drive0 --------- drive1 "
"------- drive0 ---------- drive1 -------\n");
p += sprintf(p, "DMA capable: %s %s"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment