diff options
-rw-r--r-- | arch/s390/include/asm/qdio.h | 6 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_setup.c | 2 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_def.h | 1 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_qdio.c | 11 |
4 files changed, 19 insertions, 1 deletions
diff --git a/arch/s390/include/asm/qdio.h b/arch/s390/include/asm/qdio.h index 0eaae6260274..2ba630276295 100644 --- a/arch/s390/include/asm/qdio.h +++ b/arch/s390/include/asm/qdio.h | |||
@@ -84,6 +84,7 @@ struct qdr { | |||
84 | 84 | ||
85 | #define QIB_AC_OUTBOUND_PCI_SUPPORTED 0x40 | 85 | #define QIB_AC_OUTBOUND_PCI_SUPPORTED 0x40 |
86 | #define QIB_RFLAGS_ENABLE_QEBSM 0x80 | 86 | #define QIB_RFLAGS_ENABLE_QEBSM 0x80 |
87 | #define QIB_RFLAGS_ENABLE_DATA_DIV 0x02 | ||
87 | 88 | ||
88 | /** | 89 | /** |
89 | * struct qib - queue information block (QIB) | 90 | * struct qib - queue information block (QIB) |
@@ -284,6 +285,9 @@ struct slsb { | |||
284 | u8 val[QDIO_MAX_BUFFERS_PER_Q]; | 285 | u8 val[QDIO_MAX_BUFFERS_PER_Q]; |
285 | } __attribute__ ((packed, aligned(256))); | 286 | } __attribute__ ((packed, aligned(256))); |
286 | 287 | ||
288 | #define CHSC_AC2_DATA_DIV_AVAILABLE 0x0010 | ||
289 | #define CHSC_AC2_DATA_DIV_ENABLED 0x0002 | ||
290 | |||
287 | struct qdio_ssqd_desc { | 291 | struct qdio_ssqd_desc { |
288 | u8 flags; | 292 | u8 flags; |
289 | u8:8; | 293 | u8:8; |
@@ -332,6 +336,7 @@ typedef void qdio_handler_t(struct ccw_device *, unsigned int, int, | |||
332 | * @adapter_name: name for the adapter | 336 | * @adapter_name: name for the adapter |
333 | * @qib_param_field_format: format for qib_parm_field | 337 | * @qib_param_field_format: format for qib_parm_field |
334 | * @qib_param_field: pointer to 128 bytes or NULL, if no param field | 338 | * @qib_param_field: pointer to 128 bytes or NULL, if no param field |
339 | * @qib_rflags: rflags to set | ||
335 | * @input_slib_elements: pointer to no_input_qs * 128 words of data or NULL | 340 | * @input_slib_elements: pointer to no_input_qs * 128 words of data or NULL |
336 | * @output_slib_elements: pointer to no_output_qs * 128 words of data or NULL | 341 | * @output_slib_elements: pointer to no_output_qs * 128 words of data or NULL |
337 | * @no_input_qs: number of input queues | 342 | * @no_input_qs: number of input queues |
@@ -348,6 +353,7 @@ struct qdio_initialize { | |||
348 | unsigned char adapter_name[8]; | 353 | unsigned char adapter_name[8]; |
349 | unsigned int qib_param_field_format; | 354 | unsigned int qib_param_field_format; |
350 | unsigned char *qib_param_field; | 355 | unsigned char *qib_param_field; |
356 | unsigned char qib_rflags; | ||
351 | unsigned long *input_slib_elements; | 357 | unsigned long *input_slib_elements; |
352 | unsigned long *output_slib_elements; | 358 | unsigned long *output_slib_elements; |
353 | unsigned int no_input_qs; | 359 | unsigned int no_input_qs; |
diff --git a/drivers/s390/cio/qdio_setup.c b/drivers/s390/cio/qdio_setup.c index 6326b67c45d2..34c7e4046df4 100644 --- a/drivers/s390/cio/qdio_setup.c +++ b/drivers/s390/cio/qdio_setup.c | |||
@@ -368,6 +368,8 @@ static void setup_qib(struct qdio_irq *irq_ptr, | |||
368 | if (qebsm_possible()) | 368 | if (qebsm_possible()) |
369 | irq_ptr->qib.rflags |= QIB_RFLAGS_ENABLE_QEBSM; | 369 | irq_ptr->qib.rflags |= QIB_RFLAGS_ENABLE_QEBSM; |
370 | 370 | ||
371 | irq_ptr->qib.rflags |= init_data->qib_rflags; | ||
372 | |||
371 | irq_ptr->qib.qfmt = init_data->q_format; | 373 | irq_ptr->qib.qfmt = init_data->q_format; |
372 | if (init_data->no_input_qs) | 374 | if (init_data->no_input_qs) |
373 | irq_ptr->qib.isliba = | 375 | irq_ptr->qib.isliba = |
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index cb3640c6477c..6c6374ba1807 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
@@ -77,6 +77,7 @@ struct zfcp_reqlist; | |||
77 | #define ZFCP_STATUS_ADAPTER_HOST_CON_INIT 0x00000010 | 77 | #define ZFCP_STATUS_ADAPTER_HOST_CON_INIT 0x00000010 |
78 | #define ZFCP_STATUS_ADAPTER_ERP_PENDING 0x00000100 | 78 | #define ZFCP_STATUS_ADAPTER_ERP_PENDING 0x00000100 |
79 | #define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200 | 79 | #define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200 |
80 | #define ZFCP_STATUS_ADAPTER_DATA_DIV_ENABLED 0x00000400 | ||
80 | 81 | ||
81 | /* remote port status */ | 82 | /* remote port status */ |
82 | #define ZFCP_STATUS_PORT_PHYS_OPEN 0x00000001 | 83 | #define ZFCP_STATUS_PORT_PHYS_OPEN 0x00000001 |
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c index a638278c6025..c4559b29bebc 100644 --- a/drivers/s390/scsi/zfcp_qdio.c +++ b/drivers/s390/scsi/zfcp_qdio.c | |||
@@ -283,6 +283,7 @@ static void zfcp_qdio_setup_init_data(struct qdio_initialize *id, | |||
283 | id->q_format = QDIO_ZFCP_QFMT; | 283 | id->q_format = QDIO_ZFCP_QFMT; |
284 | memcpy(id->adapter_name, dev_name(&id->cdev->dev), 8); | 284 | memcpy(id->adapter_name, dev_name(&id->cdev->dev), 8); |
285 | ASCEBC(id->adapter_name, 8); | 285 | ASCEBC(id->adapter_name, 8); |
286 | id->qib_rflags = QIB_RFLAGS_ENABLE_DATA_DIV; | ||
286 | id->qib_param_field_format = 0; | 287 | id->qib_param_field_format = 0; |
287 | id->qib_param_field = NULL; | 288 | id->qib_param_field = NULL; |
288 | id->input_slib_elements = NULL; | 289 | id->input_slib_elements = NULL; |
@@ -294,8 +295,8 @@ static void zfcp_qdio_setup_init_data(struct qdio_initialize *id, | |||
294 | id->int_parm = (unsigned long) qdio; | 295 | id->int_parm = (unsigned long) qdio; |
295 | id->input_sbal_addr_array = (void **) (qdio->res_q); | 296 | id->input_sbal_addr_array = (void **) (qdio->res_q); |
296 | id->output_sbal_addr_array = (void **) (qdio->req_q); | 297 | id->output_sbal_addr_array = (void **) (qdio->req_q); |
297 | |||
298 | } | 298 | } |
299 | |||
299 | /** | 300 | /** |
300 | * zfcp_qdio_allocate - allocate queue memory and initialize QDIO data | 301 | * zfcp_qdio_allocate - allocate queue memory and initialize QDIO data |
301 | * @adapter: pointer to struct zfcp_adapter | 302 | * @adapter: pointer to struct zfcp_adapter |
@@ -358,6 +359,7 @@ int zfcp_qdio_open(struct zfcp_qdio *qdio) | |||
358 | struct qdio_initialize init_data; | 359 | struct qdio_initialize init_data; |
359 | struct zfcp_adapter *adapter = qdio->adapter; | 360 | struct zfcp_adapter *adapter = qdio->adapter; |
360 | struct ccw_device *cdev = adapter->ccw_device; | 361 | struct ccw_device *cdev = adapter->ccw_device; |
362 | struct qdio_ssqd_desc ssqd; | ||
361 | int cc; | 363 | int cc; |
362 | 364 | ||
363 | if (atomic_read(&adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP) | 365 | if (atomic_read(&adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP) |
@@ -368,6 +370,13 @@ int zfcp_qdio_open(struct zfcp_qdio *qdio) | |||
368 | if (qdio_establish(&init_data)) | 370 | if (qdio_establish(&init_data)) |
369 | goto failed_establish; | 371 | goto failed_establish; |
370 | 372 | ||
373 | if (qdio_get_ssqd_desc(init_data.cdev, &ssqd)) | ||
374 | goto failed_qdio; | ||
375 | |||
376 | if (ssqd.qdioac2 & CHSC_AC2_DATA_DIV_ENABLED) | ||
377 | atomic_set_mask(ZFCP_STATUS_ADAPTER_DATA_DIV_ENABLED, | ||
378 | &qdio->adapter->status); | ||
379 | |||
371 | if (qdio_activate(cdev)) | 380 | if (qdio_activate(cdev)) |
372 | goto failed_qdio; | 381 | goto failed_qdio; |
373 | 382 | ||