[PATCH] PPC64 iSeries virtual cd fix

From: Stephen Rothwell
Date: Mon Mar 22 2004 - 18:49:36 EST


Hi Andrew,

This patch stops an oops caused by certain ioctls being performed
on the virtual cdrom. In particular, the eject and tray close
operations were affected.

Please apply and forward to Linus.
--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

diff -ruN ppc64-2.5-iseries/drivers/cdrom/viocd.c ppc64-2.5-iseries.eject/drivers/cdrom/viocd.c
--- ppc64-2.5-iseries/drivers/cdrom/viocd.c 2004-03-07 18:05:28.000000000 +1100
+++ ppc64-2.5-iseries.eject/drivers/cdrom/viocd.c 2004-03-22 17:54:53.000000000 +1100
@@ -338,8 +338,9 @@
struct request *req;

while ((rwreq == 0) && ((req = elv_next_request(q)) != NULL)) {
- /* check for any kind of error */
- if (send_request(req) < 0) {
+ if (!blk_fs_request(req))
+ end_request(req, 0);
+ else if (send_request(req) < 0) {
printk(VIOCD_KERN_WARNING
"unable to send message to OS/400!");
end_request(req, 0);

Attachment: pgp00000.pgp
Description: PGP signature