On Tue, Aug 02 2005, Steven Scholz wrote: > [PATCH] ide: kill requests when drive is not present anymore > > Signed-off-by: Steven Scholz <[EMAIL PROTECTED]> > > Ok? > > Change the CHANGELOG at your will. > > -- > Steven
> --- linux-2.6.13-rc5/drivers/ide/ide-io.c 2005-06-17 21:48:29.000000000 > +0200 > +++ linux-2.6.13-rc4-at91-multiIO/drivers/ide/ide-io.c 2005-08-02 > 15:46:53.000000000 +0200 > @@ -1230,7 +1257,17 @@ void do_ide_request(request_queue_t *q) > { > ide_drive_t *drive = q->queuedata; > > - ide_do_request(HWGROUP(drive), IDE_NO_IRQ); > + if (drive->present) > + ide_do_request(HWGROUP(drive), IDE_NO_IRQ); > + else { > + struct request *rq; > + printk(KERN_WARNING "%s: not present, killing requests\n", > drive->name); > + while ((rq = elv_next_request(q)) != NULL) { > + blkdev_dequeue_request(rq); > + end_that_request_first(rq, 0, rq->hard_nr_sectors); > + end_that_request_last(rq); > + } > + } > } > > /* Looks good to me now, that's one item off Barts list :-) -- Jens Axboe - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html