diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/block/dasd.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/tape_block.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 794bfd962266..4d2df2f76ea0 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -1917,7 +1917,7 @@ static void __dasd_process_request_queue(struct dasd_block *block) | |||
1917 | return; | 1917 | return; |
1918 | } | 1918 | } |
1919 | /* Now we try to fetch requests from the request queue */ | 1919 | /* Now we try to fetch requests from the request queue */ |
1920 | while (!blk_queue_plugged(queue) && (req = blk_peek_request(queue))) { | 1920 | while ((req = blk_peek_request(queue))) { |
1921 | if (basedev->features & DASD_FEATURE_READONLY && | 1921 | if (basedev->features & DASD_FEATURE_READONLY && |
1922 | rq_data_dir(req) == WRITE) { | 1922 | rq_data_dir(req) == WRITE) { |
1923 | DBF_DEV_EVENT(DBF_ERR, basedev, | 1923 | DBF_DEV_EVENT(DBF_ERR, basedev, |
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 55d2d0f4eabc..83cea9a55e2f 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -48,14 +48,14 @@ | |||
48 | static DEFINE_MUTEX(tape_block_mutex); | 48 | static DEFINE_MUTEX(tape_block_mutex); |
49 | static int tapeblock_open(struct block_device *, fmode_t); | 49 | static int tapeblock_open(struct block_device *, fmode_t); |
50 | static int tapeblock_release(struct gendisk *, fmode_t); | 50 | static int tapeblock_release(struct gendisk *, fmode_t); |
51 | static int tapeblock_medium_changed(struct gendisk *); | 51 | static unsigned int tapeblock_check_events(struct gendisk *, unsigned int); |
52 | static int tapeblock_revalidate_disk(struct gendisk *); | 52 | static int tapeblock_revalidate_disk(struct gendisk *); |
53 | 53 | ||
54 | static const struct block_device_operations tapeblock_fops = { | 54 | static const struct block_device_operations tapeblock_fops = { |
55 | .owner = THIS_MODULE, | 55 | .owner = THIS_MODULE, |
56 | .open = tapeblock_open, | 56 | .open = tapeblock_open, |
57 | .release = tapeblock_release, | 57 | .release = tapeblock_release, |
58 | .media_changed = tapeblock_medium_changed, | 58 | .check_events = tapeblock_check_events, |
59 | .revalidate_disk = tapeblock_revalidate_disk, | 59 | .revalidate_disk = tapeblock_revalidate_disk, |
60 | }; | 60 | }; |
61 | 61 | ||
@@ -161,7 +161,6 @@ tapeblock_requeue(struct work_struct *work) { | |||
161 | 161 | ||
162 | spin_lock_irq(&device->blk_data.request_queue_lock); | 162 | spin_lock_irq(&device->blk_data.request_queue_lock); |
163 | while ( | 163 | while ( |
164 | !blk_queue_plugged(queue) && | ||
165 | blk_peek_request(queue) && | 164 | blk_peek_request(queue) && |
166 | nr_queued < TAPEBLOCK_MIN_REQUEUE | 165 | nr_queued < TAPEBLOCK_MIN_REQUEUE |
167 | ) { | 166 | ) { |
@@ -237,6 +236,7 @@ tapeblock_setup_device(struct tape_device * device) | |||
237 | disk->major = tapeblock_major; | 236 | disk->major = tapeblock_major; |
238 | disk->first_minor = device->first_minor; | 237 | disk->first_minor = device->first_minor; |
239 | disk->fops = &tapeblock_fops; | 238 | disk->fops = &tapeblock_fops; |
239 | disk->events = DISK_EVENT_MEDIA_CHANGE; | ||
240 | disk->private_data = tape_get_device(device); | 240 | disk->private_data = tape_get_device(device); |
241 | disk->queue = blkdat->request_queue; | 241 | disk->queue = blkdat->request_queue; |
242 | set_capacity(disk, 0); | 242 | set_capacity(disk, 0); |
@@ -340,8 +340,8 @@ tapeblock_revalidate_disk(struct gendisk *disk) | |||
340 | return 0; | 340 | return 0; |
341 | } | 341 | } |
342 | 342 | ||
343 | static int | 343 | static unsigned int |
344 | tapeblock_medium_changed(struct gendisk *disk) | 344 | tapeblock_check_events(struct gendisk *disk, unsigned int clearing) |
345 | { | 345 | { |
346 | struct tape_device *device; | 346 | struct tape_device *device; |
347 | 347 | ||
@@ -349,7 +349,7 @@ tapeblock_medium_changed(struct gendisk *disk) | |||
349 | DBF_LH(6, "tapeblock_medium_changed(%p) = %d\n", | 349 | DBF_LH(6, "tapeblock_medium_changed(%p) = %d\n", |
350 | device, device->blk_data.medium_changed); | 350 | device, device->blk_data.medium_changed); |
351 | 351 | ||
352 | return device->blk_data.medium_changed; | 352 | return device->blk_data.medium_changed ? DISK_EVENT_MEDIA_CHANGE : 0; |
353 | } | 353 | } |
354 | 354 | ||
355 | /* | 355 | /* |