Look, the problem is easy. Backout the changes to ide_cdrom_do_request()
and cdrom_start_read(), then re-add the
HWGROUP(drive)->rq->special = NULL;
in cdrom_end_request() before calling ide_end_request()
Something ala, completely untested (not even compiled). See the thread
about the ide-cd changes being broken.
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.558 -> 1.559
# drivers/ide/ide-cd.c 1.35 -> 1.36
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/04/24 axboe@burns.home.kernel.dk 1.559
# "fix" rq->special and ar usage, needs proper fixing
# --------------------------------------------
#
diff -Nru a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
--- a/drivers/ide/ide-cd.c Wed Apr 24 15:32:59 2002
+++ b/drivers/ide/ide-cd.c Wed Apr 24 15:32:59 2002
@@ -558,10 +558,7 @@
if ((rq->flags & REQ_CMD) && !rq->current_nr_sectors)
uptodate = 1;
-#if 0
- /* FIXME --mdcki */
HWGROUP(drive)->rq->special = NULL;
-#endif
ide_end_request(drive, uptodate);
}
@@ -1217,22 +1214,13 @@
/*
* Start a read request from the CD-ROM.
*/
-static ide_startstop_t cdrom_start_read(struct ata_device *drive, struct ata_request *ar, unsigned int block)
+static ide_startstop_t cdrom_start_read(struct ata_device *drive, unsigned int block)
{
struct cdrom_info *info = drive->driver_data;
- struct request *rq = ar->ar_rq;
-
- if (ar->ar_flags & ATA_AR_QUEUED) {
-// spin_lock_irqsave(DRIVE_LOCK(drive), flags);
- blkdev_dequeue_request(rq);
-// spin_unlock_irqrestore(DRIVE_LOCK(drive), flags);
- }
-
+ struct request *rq = HWGROUP(drive)->rq;
restore_request(rq);
- rq->special = ar;
-
/* Satisfy whatever we can of this request from our cached sector. */
if (cdrom_read_from_buffer(drive))
return ide_stopped;
@@ -1665,30 +1653,8 @@
if (IDE_LARGE_SEEK(info->last_block, block, IDECD_SEEK_THRESHOLD) && drive->dsc_overlap)
action = cdrom_start_seek (drive, block);
else {
- unsigned long flags;
- struct ata_request *ar;
-
- /*
- * get a new command (push ar further down to avoid grabbing lock here
- */
- spin_lock_irqsave(DRIVE_LOCK(drive), flags);
-
- ar = ata_ar_get(drive);
-
- /*
- * we've reached maximum queue depth, bail
- */
- if (!ar) {
- spin_unlock_irqrestore(DRIVE_LOCK(drive), flags);
-
- return ide_started;
- }
-
- ar->ar_rq = rq;
- spin_unlock_irqrestore(DRIVE_LOCK(drive), flags);
-
if (rq_data_dir(rq) == READ)
- action = cdrom_start_read(drive, ar, block);
+ action = cdrom_start_read(drive, block);
else
action = cdrom_start_write(drive, rq);
}
-- Jens Axboe- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/