summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-06-15 22:16:10 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-06-15 22:16:10 +0200
commit2c7eaa43c3bb7b3b9fe2051d17f308c1f0728c78 (patch)
tree1b359598ea212bf7036bcc018186e0a8f20ac5f4 /drivers/ide/ide-tape.c
parenta9c415090710a108edcd81b3392b90396f190a9a (diff)
downloadlinux-2c7eaa43c3bb7b3b9fe2051d17f308c1f0728c78.tar.gz
linux-2c7eaa43c3bb7b3b9fe2051d17f308c1f0728c78.tar.bz2
linux-2c7eaa43c3bb7b3b9fe2051d17f308c1f0728c78.zip
ide: BUG() on unknown requests
Unsupported requests should be never handed down to device drivers and the best thing we can do upon discovering such request inside driver's ->do_request method is to just BUG(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 3a3f10f3f8fe..013dc595fab6 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -586,15 +586,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
debug_log(DBG_SENSE, "sector: %llu, nr_sectors: %u\n"
(unsigned long long)blk_rq_pos(rq), blk_rq_sectors(rq));
- if (!(blk_special_request(rq) || blk_sense_request(rq))) {
- /* We do not support buffer cache originated requests. */
- printk(KERN_NOTICE "ide-tape: %s: Unsupported request in "
- "request queue (%d)\n", drive->name, rq->cmd_type);
- if (blk_fs_request(rq) == 0 && rq->errors == 0)
- rq->errors = -EIO;
- ide_complete_rq(drive, -EIO, ide_rq_bytes(rq));
- return ide_stopped;
- }
+ BUG_ON(!(blk_special_request(rq) || blk_sense_request(rq)));
/* Retry a failed packet command */
if (drive->failed_pc && drive->pc->c[0] == REQUEST_SENSE) {