diff options
Diffstat (limited to 'drivers/s390/cio/qdio_main.c')
-rw-r--r-- | drivers/s390/cio/qdio_main.c | 57 |
1 files changed, 15 insertions, 42 deletions
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 99823477d57e..8a722f208325 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c | |||
@@ -298,7 +298,7 @@ static inline int qdio_siga_sync(struct qdio_q *q, unsigned int output, | |||
298 | } | 298 | } |
299 | 299 | ||
300 | cc = do_siga_sync(schid, output, input, fc); | 300 | cc = do_siga_sync(schid, output, input, fc); |
301 | if (cc) | 301 | if (unlikely(cc)) |
302 | DBF_ERROR("%4x SIGA-S:%2d", SCH_NO(q), cc); | 302 | DBF_ERROR("%4x SIGA-S:%2d", SCH_NO(q), cc); |
303 | return cc; | 303 | return cc; |
304 | } | 304 | } |
@@ -328,9 +328,6 @@ static int qdio_siga_output(struct qdio_q *q, unsigned int *busy_bit) | |||
328 | u64 start_time = 0; | 328 | u64 start_time = 0; |
329 | int cc; | 329 | int cc; |
330 | 330 | ||
331 | if (q->u.out.use_enh_siga) | ||
332 | fc = 3; | ||
333 | |||
334 | if (is_qebsm(q)) { | 331 | if (is_qebsm(q)) { |
335 | schid = q->irq_ptr->sch_token; | 332 | schid = q->irq_ptr->sch_token; |
336 | fc |= QDIO_SIGA_QEBSM_FLAG; | 333 | fc |= QDIO_SIGA_QEBSM_FLAG; |
@@ -339,7 +336,7 @@ again: | |||
339 | cc = do_siga_output(schid, q->mask, busy_bit, fc); | 336 | cc = do_siga_output(schid, q->mask, busy_bit, fc); |
340 | 337 | ||
341 | /* hipersocket busy condition */ | 338 | /* hipersocket busy condition */ |
342 | if (*busy_bit) { | 339 | if (unlikely(*busy_bit)) { |
343 | WARN_ON(queue_type(q) != QDIO_IQDIO_QFMT || cc != 2); | 340 | WARN_ON(queue_type(q) != QDIO_IQDIO_QFMT || cc != 2); |
344 | 341 | ||
345 | if (!start_time) { | 342 | if (!start_time) { |
@@ -367,7 +364,7 @@ static inline int qdio_siga_input(struct qdio_q *q) | |||
367 | } | 364 | } |
368 | 365 | ||
369 | cc = do_siga_input(schid, q->mask, fc); | 366 | cc = do_siga_input(schid, q->mask, fc); |
370 | if (cc) | 367 | if (unlikely(cc)) |
371 | DBF_ERROR("%4x SIGA-R:%2d", SCH_NO(q), cc); | 368 | DBF_ERROR("%4x SIGA-R:%2d", SCH_NO(q), cc); |
372 | return cc; | 369 | return cc; |
373 | } | 370 | } |
@@ -1288,7 +1285,6 @@ int qdio_establish(struct qdio_initialize *init_data) | |||
1288 | } | 1285 | } |
1289 | 1286 | ||
1290 | qdio_setup_ssqd_info(irq_ptr); | 1287 | qdio_setup_ssqd_info(irq_ptr); |
1291 | DBF_EVENT("qDmmwc:%2x", irq_ptr->ssqd_desc.mmwc); | ||
1292 | DBF_EVENT("qib ac:%4x", irq_ptr->qib.ac); | 1288 | DBF_EVENT("qib ac:%4x", irq_ptr->qib.ac); |
1293 | 1289 | ||
1294 | /* qebsm is now setup if available, initialize buffer states */ | 1290 | /* qebsm is now setup if available, initialize buffer states */ |
@@ -1466,48 +1462,25 @@ static int handle_outbound(struct qdio_q *q, unsigned int callflags, | |||
1466 | if (callflags & QDIO_FLAG_PCI_OUT) { | 1462 | if (callflags & QDIO_FLAG_PCI_OUT) { |
1467 | q->u.out.pci_out_enabled = 1; | 1463 | q->u.out.pci_out_enabled = 1; |
1468 | qperf_inc(q, pci_request_int); | 1464 | qperf_inc(q, pci_request_int); |
1469 | } | 1465 | } else |
1470 | else | ||
1471 | q->u.out.pci_out_enabled = 0; | 1466 | q->u.out.pci_out_enabled = 0; |
1472 | 1467 | ||
1473 | if (queue_type(q) == QDIO_IQDIO_QFMT) { | 1468 | if (queue_type(q) == QDIO_IQDIO_QFMT) { |
1474 | if (multicast_outbound(q)) | 1469 | /* One SIGA-W per buffer required for unicast HiperSockets. */ |
1470 | WARN_ON_ONCE(count > 1 && !multicast_outbound(q)); | ||
1471 | |||
1472 | rc = qdio_kick_outbound_q(q); | ||
1473 | } else if (unlikely(need_siga_sync(q))) { | ||
1474 | rc = qdio_siga_sync_q(q); | ||
1475 | } else { | ||
1476 | /* try to fast requeue buffers */ | ||
1477 | get_buf_state(q, prev_buf(bufnr), &state, 0); | ||
1478 | if (state != SLSB_CU_OUTPUT_PRIMED) | ||
1475 | rc = qdio_kick_outbound_q(q); | 1479 | rc = qdio_kick_outbound_q(q); |
1476 | else | 1480 | else |
1477 | if ((q->irq_ptr->ssqd_desc.mmwc > 1) && | 1481 | qperf_inc(q, fast_requeue); |
1478 | (count > 1) && | ||
1479 | (count <= q->irq_ptr->ssqd_desc.mmwc)) { | ||
1480 | /* exploit enhanced SIGA */ | ||
1481 | q->u.out.use_enh_siga = 1; | ||
1482 | rc = qdio_kick_outbound_q(q); | ||
1483 | } else { | ||
1484 | /* | ||
1485 | * One siga-w per buffer required for unicast | ||
1486 | * HiperSockets. | ||
1487 | */ | ||
1488 | q->u.out.use_enh_siga = 0; | ||
1489 | while (count--) { | ||
1490 | rc = qdio_kick_outbound_q(q); | ||
1491 | if (rc) | ||
1492 | goto out; | ||
1493 | } | ||
1494 | } | ||
1495 | goto out; | ||
1496 | } | 1482 | } |
1497 | 1483 | ||
1498 | if (need_siga_sync(q)) { | ||
1499 | qdio_siga_sync_q(q); | ||
1500 | goto out; | ||
1501 | } | ||
1502 | |||
1503 | /* try to fast requeue buffers */ | ||
1504 | get_buf_state(q, prev_buf(bufnr), &state, 0); | ||
1505 | if (state != SLSB_CU_OUTPUT_PRIMED) | ||
1506 | rc = qdio_kick_outbound_q(q); | ||
1507 | else | ||
1508 | qperf_inc(q, fast_requeue); | ||
1509 | |||
1510 | out: | ||
1511 | /* in case of SIGA errors we must process the error immediately */ | 1484 | /* in case of SIGA errors we must process the error immediately */ |
1512 | if (used >= q->u.out.scan_threshold || rc) | 1485 | if (used >= q->u.out.scan_threshold || rc) |
1513 | tasklet_schedule(&q->tasklet); | 1486 | tasklet_schedule(&q->tasklet); |