diff options
-rw-r--r-- | drivers/s390/cio/qdio_debug.h | 6 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_main.c | 70 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_setup.c | 6 |
3 files changed, 40 insertions, 42 deletions
diff --git a/drivers/s390/cio/qdio_debug.h b/drivers/s390/cio/qdio_debug.h index 8484b83698e1..5a4d85b829ad 100644 --- a/drivers/s390/cio/qdio_debug.h +++ b/drivers/s390/cio/qdio_debug.h | |||
@@ -61,18 +61,18 @@ | |||
61 | 61 | ||
62 | /* s390dbf views */ | 62 | /* s390dbf views */ |
63 | #define QDIO_DBF_SETUP_LEN 8 | 63 | #define QDIO_DBF_SETUP_LEN 8 |
64 | #define QDIO_DBF_SETUP_PAGES 4 | 64 | #define QDIO_DBF_SETUP_PAGES 8 |
65 | #define QDIO_DBF_SETUP_NR_AREAS 1 | 65 | #define QDIO_DBF_SETUP_NR_AREAS 1 |
66 | 66 | ||
67 | #define QDIO_DBF_TRACE_LEN 8 | 67 | #define QDIO_DBF_TRACE_LEN 8 |
68 | #define QDIO_DBF_TRACE_NR_AREAS 2 | 68 | #define QDIO_DBF_TRACE_NR_AREAS 2 |
69 | 69 | ||
70 | #ifdef CONFIG_QDIO_DEBUG | 70 | #ifdef CONFIG_QDIO_DEBUG |
71 | #define QDIO_DBF_TRACE_PAGES 16 | 71 | #define QDIO_DBF_TRACE_PAGES 32 |
72 | #define QDIO_DBF_SETUP_LEVEL 6 | 72 | #define QDIO_DBF_SETUP_LEVEL 6 |
73 | #define QDIO_DBF_TRACE_LEVEL 4 | 73 | #define QDIO_DBF_TRACE_LEVEL 4 |
74 | #else /* !CONFIG_QDIO_DEBUG */ | 74 | #else /* !CONFIG_QDIO_DEBUG */ |
75 | #define QDIO_DBF_TRACE_PAGES 4 | 75 | #define QDIO_DBF_TRACE_PAGES 8 |
76 | #define QDIO_DBF_SETUP_LEVEL 2 | 76 | #define QDIO_DBF_SETUP_LEVEL 2 |
77 | #define QDIO_DBF_TRACE_LEVEL 2 | 77 | #define QDIO_DBF_TRACE_LEVEL 2 |
78 | #endif /* CONFIG_QDIO_DEBUG */ | 78 | #endif /* CONFIG_QDIO_DEBUG */ |
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index d15648514a0f..444fc7e521d4 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c | |||
@@ -330,6 +330,7 @@ static int qdio_siga_output(struct qdio_q *q) | |||
330 | int cc; | 330 | int cc; |
331 | u32 busy_bit; | 331 | u32 busy_bit; |
332 | u64 start_time = 0; | 332 | u64 start_time = 0; |
333 | char dbf_text[15]; | ||
333 | 334 | ||
334 | QDIO_DBF_TEXT5(0, trace, "sigaout"); | 335 | QDIO_DBF_TEXT5(0, trace, "sigaout"); |
335 | QDIO_DBF_HEX5(0, trace, &q, sizeof(void *)); | 336 | QDIO_DBF_HEX5(0, trace, &q, sizeof(void *)); |
@@ -338,6 +339,9 @@ static int qdio_siga_output(struct qdio_q *q) | |||
338 | again: | 339 | again: |
339 | cc = qdio_do_siga_output(q, &busy_bit); | 340 | cc = qdio_do_siga_output(q, &busy_bit); |
340 | if (queue_type(q) == QDIO_IQDIO_QFMT && cc == 2 && busy_bit) { | 341 | if (queue_type(q) == QDIO_IQDIO_QFMT && cc == 2 && busy_bit) { |
342 | sprintf(dbf_text, "bb%4x%2x", q->irq_ptr->schid.sch_no, q->nr); | ||
343 | QDIO_DBF_TEXT3(0, trace, dbf_text); | ||
344 | |||
341 | if (!start_time) | 345 | if (!start_time) |
342 | start_time = get_usecs(); | 346 | start_time = get_usecs(); |
343 | else if ((get_usecs() - start_time) < QDIO_BUSY_BIT_PATIENCE) | 347 | else if ((get_usecs() - start_time) < QDIO_BUSY_BIT_PATIENCE) |
@@ -748,16 +752,18 @@ static void qdio_kick_outbound_q(struct qdio_q *q) | |||
748 | rc = qdio_siga_output(q); | 752 | rc = qdio_siga_output(q); |
749 | switch (rc) { | 753 | switch (rc) { |
750 | case 0: | 754 | case 0: |
751 | /* went smooth this time, reset timestamp */ | ||
752 | q->u.out.timestamp = 0; | ||
753 | |||
754 | /* TODO: improve error handling for CC=0 case */ | 755 | /* TODO: improve error handling for CC=0 case */ |
755 | #ifdef CONFIG_QDIO_DEBUG | 756 | #ifdef CONFIG_QDIO_DEBUG |
756 | QDIO_DBF_TEXT3(0, trace, "cc2reslv"); | 757 | if (q->u.out.timestamp) { |
757 | sprintf(dbf_text, "%4x%2x%2x", q->irq_ptr->schid.sch_no, q->nr, | 758 | QDIO_DBF_TEXT3(0, trace, "cc2reslv"); |
758 | atomic_read(&q->u.out.busy_siga_counter)); | 759 | sprintf(dbf_text, "%4x%2x%2x", q->irq_ptr->schid.sch_no, |
759 | QDIO_DBF_TEXT3(0, trace, dbf_text); | 760 | q->nr, |
761 | atomic_read(&q->u.out.busy_siga_counter)); | ||
762 | QDIO_DBF_TEXT3(0, trace, dbf_text); | ||
763 | } | ||
760 | #endif /* CONFIG_QDIO_DEBUG */ | 764 | #endif /* CONFIG_QDIO_DEBUG */ |
765 | /* went smooth this time, reset timestamp */ | ||
766 | q->u.out.timestamp = 0; | ||
761 | break; | 767 | break; |
762 | /* cc=2 and busy bit */ | 768 | /* cc=2 and busy bit */ |
763 | case (2 | QDIO_ERROR_SIGA_BUSY): | 769 | case (2 | QDIO_ERROR_SIGA_BUSY): |
@@ -1066,14 +1072,12 @@ void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1066 | if (IS_ERR(irb)) { | 1072 | if (IS_ERR(irb)) { |
1067 | switch (PTR_ERR(irb)) { | 1073 | switch (PTR_ERR(irb)) { |
1068 | case -EIO: | 1074 | case -EIO: |
1069 | sprintf(dbf_text, "ierr%4x", | 1075 | sprintf(dbf_text, "ierr%4x", irq_ptr->schid.sch_no); |
1070 | cdev->private->schid.sch_no); | ||
1071 | QDIO_DBF_TEXT2(1, setup, dbf_text); | 1076 | QDIO_DBF_TEXT2(1, setup, dbf_text); |
1072 | qdio_int_error(cdev); | 1077 | qdio_int_error(cdev); |
1073 | return; | 1078 | return; |
1074 | case -ETIMEDOUT: | 1079 | case -ETIMEDOUT: |
1075 | sprintf(dbf_text, "qtoh%4x", | 1080 | sprintf(dbf_text, "qtoh%4x", irq_ptr->schid.sch_no); |
1076 | cdev->private->schid.sch_no); | ||
1077 | QDIO_DBF_TEXT2(1, setup, dbf_text); | 1081 | QDIO_DBF_TEXT2(1, setup, dbf_text); |
1078 | qdio_int_error(cdev); | 1082 | qdio_int_error(cdev); |
1079 | return; | 1083 | return; |
@@ -1124,8 +1128,10 @@ void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1124 | struct qdio_ssqd_desc *qdio_get_ssqd_desc(struct ccw_device *cdev) | 1128 | struct qdio_ssqd_desc *qdio_get_ssqd_desc(struct ccw_device *cdev) |
1125 | { | 1129 | { |
1126 | struct qdio_irq *irq_ptr; | 1130 | struct qdio_irq *irq_ptr; |
1131 | char dbf_text[15]; | ||
1127 | 1132 | ||
1128 | QDIO_DBF_TEXT0(0, setup, "getssqd"); | 1133 | sprintf(dbf_text, "qssq%4x", cdev->private->schid.sch_no); |
1134 | QDIO_DBF_TEXT0(0, setup, dbf_text); | ||
1129 | 1135 | ||
1130 | irq_ptr = cdev->private->qdio_data; | 1136 | irq_ptr = cdev->private->qdio_data; |
1131 | if (!irq_ptr) | 1137 | if (!irq_ptr) |
@@ -1149,14 +1155,13 @@ int qdio_cleanup(struct ccw_device *cdev, int how) | |||
1149 | char dbf_text[15]; | 1155 | char dbf_text[15]; |
1150 | int rc; | 1156 | int rc; |
1151 | 1157 | ||
1158 | sprintf(dbf_text, "qcln%4x", cdev->private->schid.sch_no); | ||
1159 | QDIO_DBF_TEXT0(0, setup, dbf_text); | ||
1160 | |||
1152 | irq_ptr = cdev->private->qdio_data; | 1161 | irq_ptr = cdev->private->qdio_data; |
1153 | if (!irq_ptr) | 1162 | if (!irq_ptr) |
1154 | return -ENODEV; | 1163 | return -ENODEV; |
1155 | 1164 | ||
1156 | sprintf(dbf_text, "qcln%4x", irq_ptr->schid.sch_no); | ||
1157 | QDIO_DBF_TEXT1(0, trace, dbf_text); | ||
1158 | QDIO_DBF_TEXT0(0, setup, dbf_text); | ||
1159 | |||
1160 | rc = qdio_shutdown(cdev, how); | 1165 | rc = qdio_shutdown(cdev, how); |
1161 | if (rc == 0) | 1166 | if (rc == 0) |
1162 | rc = qdio_free(cdev); | 1167 | rc = qdio_free(cdev); |
@@ -1191,6 +1196,9 @@ int qdio_shutdown(struct ccw_device *cdev, int how) | |||
1191 | unsigned long flags; | 1196 | unsigned long flags; |
1192 | char dbf_text[15]; | 1197 | char dbf_text[15]; |
1193 | 1198 | ||
1199 | sprintf(dbf_text, "qshu%4x", cdev->private->schid.sch_no); | ||
1200 | QDIO_DBF_TEXT0(0, setup, dbf_text); | ||
1201 | |||
1194 | irq_ptr = cdev->private->qdio_data; | 1202 | irq_ptr = cdev->private->qdio_data; |
1195 | if (!irq_ptr) | 1203 | if (!irq_ptr) |
1196 | return -ENODEV; | 1204 | return -ENODEV; |
@@ -1205,10 +1213,6 @@ int qdio_shutdown(struct ccw_device *cdev, int how) | |||
1205 | return 0; | 1213 | return 0; |
1206 | } | 1214 | } |
1207 | 1215 | ||
1208 | sprintf(dbf_text, "qsqs%4x", irq_ptr->schid.sch_no); | ||
1209 | QDIO_DBF_TEXT1(0, trace, dbf_text); | ||
1210 | QDIO_DBF_TEXT0(0, setup, dbf_text); | ||
1211 | |||
1212 | tiqdio_remove_input_queues(irq_ptr); | 1216 | tiqdio_remove_input_queues(irq_ptr); |
1213 | qdio_shutdown_queues(cdev); | 1217 | qdio_shutdown_queues(cdev); |
1214 | qdio_shutdown_debug_entries(irq_ptr, cdev); | 1218 | qdio_shutdown_debug_entries(irq_ptr, cdev); |
@@ -1263,16 +1267,14 @@ int qdio_free(struct ccw_device *cdev) | |||
1263 | struct qdio_irq *irq_ptr; | 1267 | struct qdio_irq *irq_ptr; |
1264 | char dbf_text[15]; | 1268 | char dbf_text[15]; |
1265 | 1269 | ||
1270 | sprintf(dbf_text, "qfre%4x", cdev->private->schid.sch_no); | ||
1271 | QDIO_DBF_TEXT0(0, setup, dbf_text); | ||
1272 | |||
1266 | irq_ptr = cdev->private->qdio_data; | 1273 | irq_ptr = cdev->private->qdio_data; |
1267 | if (!irq_ptr) | 1274 | if (!irq_ptr) |
1268 | return -ENODEV; | 1275 | return -ENODEV; |
1269 | 1276 | ||
1270 | mutex_lock(&irq_ptr->setup_mutex); | 1277 | mutex_lock(&irq_ptr->setup_mutex); |
1271 | |||
1272 | sprintf(dbf_text, "qfqs%4x", irq_ptr->schid.sch_no); | ||
1273 | QDIO_DBF_TEXT1(0, trace, dbf_text); | ||
1274 | QDIO_DBF_TEXT0(0, setup, dbf_text); | ||
1275 | |||
1276 | cdev->private->qdio_data = NULL; | 1278 | cdev->private->qdio_data = NULL; |
1277 | mutex_unlock(&irq_ptr->setup_mutex); | 1279 | mutex_unlock(&irq_ptr->setup_mutex); |
1278 | 1280 | ||
@@ -1295,7 +1297,6 @@ int qdio_initialize(struct qdio_initialize *init_data) | |||
1295 | 1297 | ||
1296 | sprintf(dbf_text, "qini%4x", init_data->cdev->private->schid.sch_no); | 1298 | sprintf(dbf_text, "qini%4x", init_data->cdev->private->schid.sch_no); |
1297 | QDIO_DBF_TEXT0(0, setup, dbf_text); | 1299 | QDIO_DBF_TEXT0(0, setup, dbf_text); |
1298 | QDIO_DBF_TEXT0(0, trace, dbf_text); | ||
1299 | 1300 | ||
1300 | rc = qdio_allocate(init_data); | 1301 | rc = qdio_allocate(init_data); |
1301 | if (rc) | 1302 | if (rc) |
@@ -1319,7 +1320,6 @@ int qdio_allocate(struct qdio_initialize *init_data) | |||
1319 | 1320 | ||
1320 | sprintf(dbf_text, "qalc%4x", init_data->cdev->private->schid.sch_no); | 1321 | sprintf(dbf_text, "qalc%4x", init_data->cdev->private->schid.sch_no); |
1321 | QDIO_DBF_TEXT0(0, setup, dbf_text); | 1322 | QDIO_DBF_TEXT0(0, setup, dbf_text); |
1322 | QDIO_DBF_TEXT0(0, trace, dbf_text); | ||
1323 | 1323 | ||
1324 | if ((init_data->no_input_qs && !init_data->input_handler) || | 1324 | if ((init_data->no_input_qs && !init_data->input_handler) || |
1325 | (init_data->no_output_qs && !init_data->output_handler)) | 1325 | (init_data->no_output_qs && !init_data->output_handler)) |
@@ -1389,6 +1389,9 @@ int qdio_establish(struct qdio_initialize *init_data) | |||
1389 | unsigned long saveflags; | 1389 | unsigned long saveflags; |
1390 | int rc; | 1390 | int rc; |
1391 | 1391 | ||
1392 | sprintf(dbf_text, "qest%4x", cdev->private->schid.sch_no); | ||
1393 | QDIO_DBF_TEXT0(0, setup, dbf_text); | ||
1394 | |||
1392 | irq_ptr = cdev->private->qdio_data; | 1395 | irq_ptr = cdev->private->qdio_data; |
1393 | if (!irq_ptr) | 1396 | if (!irq_ptr) |
1394 | return -ENODEV; | 1397 | return -ENODEV; |
@@ -1399,10 +1402,6 @@ int qdio_establish(struct qdio_initialize *init_data) | |||
1399 | if (!try_module_get(THIS_MODULE)) | 1402 | if (!try_module_get(THIS_MODULE)) |
1400 | return -EINVAL; | 1403 | return -EINVAL; |
1401 | 1404 | ||
1402 | sprintf(dbf_text, "qest%4x", cdev->private->schid.sch_no); | ||
1403 | QDIO_DBF_TEXT0(0, setup, dbf_text); | ||
1404 | QDIO_DBF_TEXT0(0, trace, dbf_text); | ||
1405 | |||
1406 | mutex_lock(&irq_ptr->setup_mutex); | 1405 | mutex_lock(&irq_ptr->setup_mutex); |
1407 | qdio_setup_irq(init_data); | 1406 | qdio_setup_irq(init_data); |
1408 | 1407 | ||
@@ -1472,6 +1471,9 @@ int qdio_activate(struct ccw_device *cdev) | |||
1472 | unsigned long saveflags; | 1471 | unsigned long saveflags; |
1473 | char dbf_text[20]; | 1472 | char dbf_text[20]; |
1474 | 1473 | ||
1474 | sprintf(dbf_text, "qact%4x", cdev->private->schid.sch_no); | ||
1475 | QDIO_DBF_TEXT0(0, setup, dbf_text); | ||
1476 | |||
1475 | irq_ptr = cdev->private->qdio_data; | 1477 | irq_ptr = cdev->private->qdio_data; |
1476 | if (!irq_ptr) | 1478 | if (!irq_ptr) |
1477 | return -ENODEV; | 1479 | return -ENODEV; |
@@ -1485,10 +1487,6 @@ int qdio_activate(struct ccw_device *cdev) | |||
1485 | goto out; | 1487 | goto out; |
1486 | } | 1488 | } |
1487 | 1489 | ||
1488 | sprintf(dbf_text, "qact%4x", irq_ptr->schid.sch_no); | ||
1489 | QDIO_DBF_TEXT2(0, setup, dbf_text); | ||
1490 | QDIO_DBF_TEXT2(0, trace, dbf_text); | ||
1491 | |||
1492 | irq_ptr->ccw.cmd_code = irq_ptr->aqueue.cmd; | 1490 | irq_ptr->ccw.cmd_code = irq_ptr->aqueue.cmd; |
1493 | irq_ptr->ccw.flags = CCW_FLAG_SLI; | 1491 | irq_ptr->ccw.flags = CCW_FLAG_SLI; |
1494 | irq_ptr->ccw.count = irq_ptr->aqueue.count; | 1492 | irq_ptr->ccw.count = irq_ptr->aqueue.count; |
@@ -1663,7 +1661,7 @@ int do_QDIO(struct ccw_device *cdev, unsigned int callflags, | |||
1663 | #ifdef CONFIG_QDIO_DEBUG | 1661 | #ifdef CONFIG_QDIO_DEBUG |
1664 | char dbf_text[20]; | 1662 | char dbf_text[20]; |
1665 | 1663 | ||
1666 | sprintf(dbf_text, "doQD%04x", cdev->private->schid.sch_no); | 1664 | sprintf(dbf_text, "doQD%4x", cdev->private->schid.sch_no); |
1667 | QDIO_DBF_TEXT3(0, trace, dbf_text); | 1665 | QDIO_DBF_TEXT3(0, trace, dbf_text); |
1668 | #endif /* CONFIG_QDIO_DEBUG */ | 1666 | #endif /* CONFIG_QDIO_DEBUG */ |
1669 | 1667 | ||
diff --git a/drivers/s390/cio/qdio_setup.c b/drivers/s390/cio/qdio_setup.c index 1bd2a208db28..1679e2f91c94 100644 --- a/drivers/s390/cio/qdio_setup.c +++ b/drivers/s390/cio/qdio_setup.c | |||
@@ -165,7 +165,7 @@ static void setup_queues(struct qdio_irq *irq_ptr, | |||
165 | void **output_sbal_array = qdio_init->output_sbal_addr_array; | 165 | void **output_sbal_array = qdio_init->output_sbal_addr_array; |
166 | int i; | 166 | int i; |
167 | 167 | ||
168 | sprintf(dbf_text, "qfqs%4x", qdio_init->cdev->private->schid.sch_no); | 168 | sprintf(dbf_text, "qset%4x", qdio_init->cdev->private->schid.sch_no); |
169 | QDIO_DBF_TEXT0(0, setup, dbf_text); | 169 | QDIO_DBF_TEXT0(0, setup, dbf_text); |
170 | 170 | ||
171 | for_each_input_queue(irq_ptr, q, i) { | 171 | for_each_input_queue(irq_ptr, q, i) { |
@@ -285,7 +285,7 @@ void qdio_setup_ssqd_info(struct qdio_irq *irq_ptr) | |||
285 | rc = __get_ssqd_info(irq_ptr); | 285 | rc = __get_ssqd_info(irq_ptr); |
286 | if (rc) { | 286 | if (rc) { |
287 | QDIO_DBF_TEXT2(0, setup, "ssqdasig"); | 287 | QDIO_DBF_TEXT2(0, setup, "ssqdasig"); |
288 | sprintf(dbf_text, "schno%x", irq_ptr->schid.sch_no); | 288 | sprintf(dbf_text, "schn%4x", irq_ptr->schid.sch_no); |
289 | QDIO_DBF_TEXT2(0, setup, dbf_text); | 289 | QDIO_DBF_TEXT2(0, setup, dbf_text); |
290 | sprintf(dbf_text, "rc:%d", rc); | 290 | sprintf(dbf_text, "rc:%d", rc); |
291 | QDIO_DBF_TEXT2(0, setup, dbf_text); | 291 | QDIO_DBF_TEXT2(0, setup, dbf_text); |
@@ -447,7 +447,7 @@ void qdio_print_subchannel_info(struct qdio_irq *irq_ptr, | |||
447 | { | 447 | { |
448 | char s[80]; | 448 | char s[80]; |
449 | 449 | ||
450 | sprintf(s, "%s ", cdev->dev.bus_id); | 450 | sprintf(s, "%s sc:%x ", cdev->dev.bus_id, irq_ptr->schid.sch_no); |
451 | 451 | ||
452 | switch (irq_ptr->qib.qfmt) { | 452 | switch (irq_ptr->qib.qfmt) { |
453 | case QDIO_QETH_QFMT: | 453 | case QDIO_QETH_QFMT: |