aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/dasd.c')
-rw-r--r--drivers/s390/block/dasd.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 82d9ce36bd0b..4e266f43332d 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -369,6 +369,11 @@ dasd_state_ready_to_online(struct dasd_device * device)
369 device->state = DASD_STATE_ONLINE; 369 device->state = DASD_STATE_ONLINE;
370 if (device->block) { 370 if (device->block) {
371 dasd_schedule_block_bh(device->block); 371 dasd_schedule_block_bh(device->block);
372 if ((device->features & DASD_FEATURE_USERAW)) {
373 disk = device->block->gdp;
374 kobject_uevent(&disk_to_dev(disk)->kobj, KOBJ_CHANGE);
375 return 0;
376 }
372 disk = device->block->bdev->bd_disk; 377 disk = device->block->bdev->bd_disk;
373 disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0); 378 disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0);
374 while ((part = disk_part_iter_next(&piter))) 379 while ((part = disk_part_iter_next(&piter)))
@@ -394,7 +399,7 @@ static int dasd_state_online_to_ready(struct dasd_device *device)
394 return rc; 399 return rc;
395 } 400 }
396 device->state = DASD_STATE_READY; 401 device->state = DASD_STATE_READY;
397 if (device->block) { 402 if (device->block && !(device->features & DASD_FEATURE_USERAW)) {
398 disk = device->block->bdev->bd_disk; 403 disk = device->block->bdev->bd_disk;
399 disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0); 404 disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0);
400 while ((part = disk_part_iter_next(&piter))) 405 while ((part = disk_part_iter_next(&piter)))
@@ -2258,8 +2263,20 @@ static void dasd_setup_queue(struct dasd_block *block)
2258{ 2263{
2259 int max; 2264 int max;
2260 2265
2261 blk_queue_logical_block_size(block->request_queue, block->bp_block); 2266 if (block->base->features & DASD_FEATURE_USERAW) {
2262 max = block->base->discipline->max_blocks << block->s2b_shift; 2267 /*
2268 * the max_blocks value for raw_track access is 256
2269 * it is higher than the native ECKD value because we
2270 * only need one ccw per track
2271 * so the max_hw_sectors are
2272 * 2048 x 512B = 1024kB = 16 tracks
2273 */
2274 max = 2048;
2275 } else {
2276 max = block->base->discipline->max_blocks << block->s2b_shift;
2277 }
2278 blk_queue_logical_block_size(block->request_queue,
2279 block->bp_block);
2263 blk_queue_max_hw_sectors(block->request_queue, max); 2280 blk_queue_max_hw_sectors(block->request_queue, max);
2264 blk_queue_max_segments(block->request_queue, -1L); 2281 blk_queue_max_segments(block->request_queue, -1L);
2265 /* with page sized segments we can translate each segement into 2282 /* with page sized segments we can translate each segement into