ide: use ->end_request only for private device driver requests

* Move IDE{FLOPPY,TAPE}_ERROR_* defines to <linux/ide.h> and rename them
  to IDE_DRV_ERROR_*.

* Handle ->end_request special cases for floppy/tape media in ide_kill_rq().

* Call ->end_request only for private device driver requests.

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
Bartlomiej Zolnierkiewicz
2009-03-27 12:46:34 +01:00
parent 5e2040fd0a
commit c152cc1a90
5 changed files with 25 additions and 31 deletions

View File

@@ -178,7 +178,12 @@ EXPORT_SYMBOL(ide_complete_rq);
void ide_kill_rq(ide_drive_t *drive, struct request *rq)
{
if (rq->rq_disk) {
drive->failed_pc = NULL;
if (drive->media == ide_tape)
rq->errors = IDE_DRV_ERROR_GENERAL;
if (blk_special_request(rq) && rq->rq_disk) {
struct ide_driver *drv;
drv = *(struct ide_driver **)rq->rq_disk->private_data;