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.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index b755bac6ccbc..02cfe244e069 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -7,7 +7,7 @@
7 * Bugreports.to..: <Linux390@de.ibm.com> 7 * Bugreports.to..: <Linux390@de.ibm.com>
8 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 8 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
9 * 9 *
10 * $Revision: 1.158 $ 10 * $Revision: 1.161 $
11 */ 11 */
12 12
13#include <linux/config.h> 13#include <linux/config.h>
@@ -1131,13 +1131,17 @@ __dasd_process_blk_queue(struct dasd_device * device)
1131 request_queue_t *queue; 1131 request_queue_t *queue;
1132 struct request *req; 1132 struct request *req;
1133 struct dasd_ccw_req *cqr; 1133 struct dasd_ccw_req *cqr;
1134 int nr_queued; 1134 int nr_queued, feature_ro;
1135 1135
1136 queue = device->request_queue; 1136 queue = device->request_queue;
1137 /* No queue ? Then there is nothing to do. */ 1137 /* No queue ? Then there is nothing to do. */
1138 if (queue == NULL) 1138 if (queue == NULL)
1139 return; 1139 return;
1140 1140
1141 feature_ro = dasd_get_feature(device->cdev, DASD_FEATURE_READONLY);
1142 if (feature_ro < 0) /* no devmap */
1143 return;
1144
1141 /* 1145 /*
1142 * We requeue request from the block device queue to the ccw 1146 * We requeue request from the block device queue to the ccw
1143 * queue only in two states. In state DASD_STATE_READY the 1147 * queue only in two states. In state DASD_STATE_READY the
@@ -1157,8 +1161,8 @@ __dasd_process_blk_queue(struct dasd_device * device)
1157 elv_next_request(queue) && 1161 elv_next_request(queue) &&
1158 nr_queued < DASD_CHANQ_MAX_SIZE) { 1162 nr_queued < DASD_CHANQ_MAX_SIZE) {
1159 req = elv_next_request(queue); 1163 req = elv_next_request(queue);
1160 if (test_bit(DASD_FLAG_RO, &device->flags) && 1164
1161 rq_data_dir(req) == WRITE) { 1165 if (feature_ro && rq_data_dir(req) == WRITE) {
1162 DBF_DEV_EVENT(DBF_ERR, device, 1166 DBF_DEV_EVENT(DBF_ERR, device,
1163 "Rejecting write request %p", 1167 "Rejecting write request %p",
1164 req); 1168 req);
@@ -1631,6 +1635,7 @@ dasd_setup_queue(struct dasd_device * device)
1631 blk_queue_max_hw_segments(device->request_queue, -1L); 1635 blk_queue_max_hw_segments(device->request_queue, -1L);
1632 blk_queue_max_segment_size(device->request_queue, -1L); 1636 blk_queue_max_segment_size(device->request_queue, -1L);
1633 blk_queue_segment_boundary(device->request_queue, -1L); 1637 blk_queue_segment_boundary(device->request_queue, -1L);
1638 blk_queue_ordered(device->request_queue, 1);
1634} 1639}
1635 1640
1636/* 1641/*
@@ -1803,13 +1808,17 @@ dasd_generic_set_online (struct ccw_device *cdev,
1803 1808
1804{ 1809{
1805 struct dasd_device *device; 1810 struct dasd_device *device;
1806 int rc; 1811 int feature_diag, rc;
1812
1813 feature_diag = dasd_get_feature(cdev, DASD_FEATURE_USEDIAG);
1814 if (feature_diag < 0)
1815 return feature_diag;
1807 1816
1808 device = dasd_create_device(cdev); 1817 device = dasd_create_device(cdev);
1809 if (IS_ERR(device)) 1818 if (IS_ERR(device))
1810 return PTR_ERR(device); 1819 return PTR_ERR(device);
1811 1820
1812 if (test_bit(DASD_FLAG_USE_DIAG, &device->flags)) { 1821 if (feature_diag) {
1813 if (!dasd_diag_discipline_pointer) { 1822 if (!dasd_diag_discipline_pointer) {
1814 printk (KERN_WARNING 1823 printk (KERN_WARNING
1815 "dasd_generic couldn't online device %s " 1824 "dasd_generic couldn't online device %s "