aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index da2f97dfa8f8..6eee41beec73 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -178,17 +178,17 @@ EXPORT_SYMBOL(ide_complete_rq);
178 178
179void ide_kill_rq(ide_drive_t *drive, struct request *rq) 179void ide_kill_rq(ide_drive_t *drive, struct request *rq)
180{ 180{
181 u8 drv_req = blk_special_request(rq) && rq->rq_disk;
182 u8 media = drive->media;
183
181 drive->failed_pc = NULL; 184 drive->failed_pc = NULL;
182 185
183 if (drive->media == ide_tape) 186 if ((media == ide_floppy && drv_req) || media == ide_tape)
184 rq->errors = IDE_DRV_ERROR_GENERAL; 187 rq->errors = IDE_DRV_ERROR_GENERAL;
185 188
186 if (blk_special_request(rq) && rq->rq_disk) { 189 if ((media == ide_floppy || media == ide_tape) && drv_req)
187 struct ide_driver *drv; 190 ide_complete_rq(drive, 0);
188 191 else
189 drv = *(struct ide_driver **)rq->rq_disk->private_data;
190 drv->end_request(drive, 0, 0);
191 } else
192 ide_end_request(drive, 0, 0); 192 ide_end_request(drive, 0, 0);
193} 193}
194 194