aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_eer.c
diff options
context:
space:
mode:
authorStefan Weinhuber <wein@de.ibm.com>2009-03-26 10:23:48 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-03-26 10:24:05 -0400
commitf3eb5384cf0325c02e306b1d81e70f81a03d7432 (patch)
tree4d75517ad2c61ac2f8b6431eafd62b5d32c188ed /drivers/s390/block/dasd_eer.c
parentb44b0ab3bac16356f03e94b1b49ba9305710c445 (diff)
[S390] dasd: add High Performance FICON support
To support High Performance FICON, the DASD device driver has to translate I/O requests into the new transport mode control words (TCW) instead of the traditional (command mode) CCW requests. Signed-off-by: Stefan Weinhuber <wein@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_eer.c')
-rw-r--r--drivers/s390/block/dasd_eer.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c
index f8e05ce98621..9ce4209552ae 100644
--- a/drivers/s390/block/dasd_eer.c
+++ b/drivers/s390/block/dasd_eer.c
@@ -297,11 +297,12 @@ static void dasd_eer_write_standard_trigger(struct dasd_device *device,
297 struct dasd_eer_header header; 297 struct dasd_eer_header header;
298 unsigned long flags; 298 unsigned long flags;
299 struct eerbuffer *eerb; 299 struct eerbuffer *eerb;
300 char *sense;
300 301
301 /* go through cqr chain and count the valid sense data sets */ 302 /* go through cqr chain and count the valid sense data sets */
302 data_size = 0; 303 data_size = 0;
303 for (temp_cqr = cqr; temp_cqr; temp_cqr = temp_cqr->refers) 304 for (temp_cqr = cqr; temp_cqr; temp_cqr = temp_cqr->refers)
304 if (temp_cqr->irb.esw.esw0.erw.cons) 305 if (dasd_get_sense(&temp_cqr->irb))
305 data_size += 32; 306 data_size += 32;
306 307
307 header.total_size = sizeof(header) + data_size + 4; /* "EOR" */ 308 header.total_size = sizeof(header) + data_size + 4; /* "EOR" */
@@ -316,9 +317,11 @@ static void dasd_eer_write_standard_trigger(struct dasd_device *device,
316 list_for_each_entry(eerb, &bufferlist, list) { 317 list_for_each_entry(eerb, &bufferlist, list) {
317 dasd_eer_start_record(eerb, header.total_size); 318 dasd_eer_start_record(eerb, header.total_size);
318 dasd_eer_write_buffer(eerb, (char *) &header, sizeof(header)); 319 dasd_eer_write_buffer(eerb, (char *) &header, sizeof(header));
319 for (temp_cqr = cqr; temp_cqr; temp_cqr = temp_cqr->refers) 320 for (temp_cqr = cqr; temp_cqr; temp_cqr = temp_cqr->refers) {
320 if (temp_cqr->irb.esw.esw0.erw.cons) 321 sense = dasd_get_sense(&temp_cqr->irb);
321 dasd_eer_write_buffer(eerb, cqr->irb.ecw, 32); 322 if (sense)
323 dasd_eer_write_buffer(eerb, sense, 32);
324 }
322 dasd_eer_write_buffer(eerb, "EOR", 4); 325 dasd_eer_write_buffer(eerb, "EOR", 4);
323 } 326 }
324 spin_unlock_irqrestore(&bufferlock, flags); 327 spin_unlock_irqrestore(&bufferlock, flags);
@@ -451,6 +454,7 @@ int dasd_eer_enable(struct dasd_device *device)
451{ 454{
452 struct dasd_ccw_req *cqr; 455 struct dasd_ccw_req *cqr;
453 unsigned long flags; 456 unsigned long flags;
457 struct ccw1 *ccw;
454 458
455 if (device->eer_cqr) 459 if (device->eer_cqr)
456 return 0; 460 return 0;
@@ -468,10 +472,11 @@ int dasd_eer_enable(struct dasd_device *device)
468 cqr->expires = 10 * HZ; 472 cqr->expires = 10 * HZ;
469 clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags); 473 clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags);
470 474
471 cqr->cpaddr->cmd_code = DASD_ECKD_CCW_SNSS; 475 ccw = cqr->cpaddr;
472 cqr->cpaddr->count = SNSS_DATA_SIZE; 476 ccw->cmd_code = DASD_ECKD_CCW_SNSS;
473 cqr->cpaddr->flags = 0; 477 ccw->count = SNSS_DATA_SIZE;
474 cqr->cpaddr->cda = (__u32)(addr_t) cqr->data; 478 ccw->flags = 0;
479 ccw->cda = (__u32)(addr_t) cqr->data;
475 480
476 cqr->buildclk = get_clock(); 481 cqr->buildclk = get_clock();
477 cqr->status = DASD_CQR_FILLED; 482 cqr->status = DASD_CQR_FILLED;