From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>,
Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Subject: [PATCH] IDE: Fix request handling with ide-default & ATAPI
Date: Tue, 09 Sep 2003 20:34:54 +0200 [thread overview]
Message-ID: <1063132494.642.9.camel@gaston> (raw)
Hi Bart & Linus !
This patch fixes a bug that happens when a request gets to the
IDE layer for a drive using ide-default (that is with no
subdriver attached), like a Power Management request. In this
case, the core will wait for the device status to match
drive->read_stat, but that field contains by default a value
that is not suitable for ATAPI devices. This patch fixes it.
Linus, please apply (already validated with Bart)
diff -urN linux-2.5/drivers/ide/ide-default.c linuxppc-2.5-benh/drivers/ide/ide-default.c
--- linux-2.5/drivers/ide/ide-default.c 2003-09-09 20:15:34.000000000 +0200
+++ linuxppc-2.5-benh/drivers/ide/ide-default.c 2003-09-09 20:05:50.000000000 +0200
@@ -57,6 +57,14 @@
"driver with ide.c\n", drive->name);
return 1;
}
+
+ /* For the sake of the request layer, we must make sure we have a
+ * correct ready_stat value, that is 0 for ATAPI devices or we will
+ * fail any request like Power Management
+ */
+ if (drive->media != ide_disk)
+ drive->ready_stat = 0;
+
return 0;
}
reply other threads:[~2003-09-09 18:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1063132494.642.9.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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