aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-18 11:57:10 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-18 11:57:10 -0500
commit91219a3b20325689eb80f7598cce2dc745db171d (patch)
tree0d82f056a6b48e27a126556ac12204c84b728b02 /drivers/s390
parentaabaf4c2050d21d39fe11eec889c508e84d6a328 (diff)
parent6d0abeca3242a88cab8232e4acd7e2bf088f3bc2 (diff)
Merge 3.14-rc3 into driver-core-next
We want those fixes here for testing and development. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/cio/cio.c40
-rw-r--r--drivers/s390/cio/qdio.h14
-rw-r--r--drivers/s390/cio/qdio_main.c2
3 files changed, 21 insertions, 35 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index 88e35d85d205..8ee88c4ebd83 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -342,8 +342,9 @@ static int cio_check_config(struct subchannel *sch, struct schib *schib)
342 */ 342 */
343int cio_commit_config(struct subchannel *sch) 343int cio_commit_config(struct subchannel *sch)
344{ 344{
345 struct schib schib;
346 int ccode, retry, ret = 0; 345 int ccode, retry, ret = 0;
346 struct schib schib;
347 struct irb irb;
347 348
348 if (stsch_err(sch->schid, &schib) || !css_sch_is_valid(&schib)) 349 if (stsch_err(sch->schid, &schib) || !css_sch_is_valid(&schib))
349 return -ENODEV; 350 return -ENODEV;
@@ -367,7 +368,10 @@ int cio_commit_config(struct subchannel *sch)
367 ret = -EAGAIN; 368 ret = -EAGAIN;
368 break; 369 break;
369 case 1: /* status pending */ 370 case 1: /* status pending */
370 return -EBUSY; 371 ret = -EBUSY;
372 if (tsch(sch->schid, &irb))
373 return ret;
374 break;
371 case 2: /* busy */ 375 case 2: /* busy */
372 udelay(100); /* allow for recovery */ 376 udelay(100); /* allow for recovery */
373 ret = -EBUSY; 377 ret = -EBUSY;
@@ -403,7 +407,6 @@ EXPORT_SYMBOL_GPL(cio_update_schib);
403 */ 407 */
404int cio_enable_subchannel(struct subchannel *sch, u32 intparm) 408int cio_enable_subchannel(struct subchannel *sch, u32 intparm)
405{ 409{
406 int retry;
407 int ret; 410 int ret;
408 411
409 CIO_TRACE_EVENT(2, "ensch"); 412 CIO_TRACE_EVENT(2, "ensch");
@@ -418,20 +421,14 @@ int cio_enable_subchannel(struct subchannel *sch, u32 intparm)
418 sch->config.isc = sch->isc; 421 sch->config.isc = sch->isc;
419 sch->config.intparm = intparm; 422 sch->config.intparm = intparm;
420 423
421 for (retry = 0; retry < 3; retry++) { 424 ret = cio_commit_config(sch);
425 if (ret == -EIO) {
426 /*
427 * Got a program check in msch. Try without
428 * the concurrent sense bit the next time.
429 */
430 sch->config.csense = 0;
422 ret = cio_commit_config(sch); 431 ret = cio_commit_config(sch);
423 if (ret == -EIO) {
424 /*
425 * Got a program check in msch. Try without
426 * the concurrent sense bit the next time.
427 */
428 sch->config.csense = 0;
429 } else if (ret == -EBUSY) {
430 struct irb irb;
431 if (tsch(sch->schid, &irb) != 0)
432 break;
433 } else
434 break;
435 } 432 }
436 CIO_HEX_EVENT(2, &ret, sizeof(ret)); 433 CIO_HEX_EVENT(2, &ret, sizeof(ret));
437 return ret; 434 return ret;
@@ -444,7 +441,6 @@ EXPORT_SYMBOL_GPL(cio_enable_subchannel);
444 */ 441 */
445int cio_disable_subchannel(struct subchannel *sch) 442int cio_disable_subchannel(struct subchannel *sch)
446{ 443{
447 int retry;
448 int ret; 444 int ret;
449 445
450 CIO_TRACE_EVENT(2, "dissch"); 446 CIO_TRACE_EVENT(2, "dissch");
@@ -456,16 +452,8 @@ int cio_disable_subchannel(struct subchannel *sch)
456 return -ENODEV; 452 return -ENODEV;
457 453
458 sch->config.ena = 0; 454 sch->config.ena = 0;
455 ret = cio_commit_config(sch);
459 456
460 for (retry = 0; retry < 3; retry++) {
461 ret = cio_commit_config(sch);
462 if (ret == -EBUSY) {
463 struct irb irb;
464 if (tsch(sch->schid, &irb) != 0)
465 break;
466 } else
467 break;
468 }
469 CIO_HEX_EVENT(2, &ret, sizeof(ret)); 457 CIO_HEX_EVENT(2, &ret, sizeof(ret));
470 return ret; 458 return ret;
471} 459}
diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h
index 8acaae18bd11..a563e4c00590 100644
--- a/drivers/s390/cio/qdio.h
+++ b/drivers/s390/cio/qdio.h
@@ -359,14 +359,12 @@ static inline int multicast_outbound(struct qdio_q *q)
359#define need_siga_sync_out_after_pci(q) \ 359#define need_siga_sync_out_after_pci(q) \
360 (unlikely(q->irq_ptr->siga_flag.sync_out_after_pci)) 360 (unlikely(q->irq_ptr->siga_flag.sync_out_after_pci))
361 361
362#define for_each_input_queue(irq_ptr, q, i) \ 362#define for_each_input_queue(irq_ptr, q, i) \
363 for (i = 0, q = irq_ptr->input_qs[0]; \ 363 for (i = 0; i < irq_ptr->nr_input_qs && \
364 i < irq_ptr->nr_input_qs; \ 364 ({ q = irq_ptr->input_qs[i]; 1; }); i++)
365 q = irq_ptr->input_qs[++i]) 365#define for_each_output_queue(irq_ptr, q, i) \
366#define for_each_output_queue(irq_ptr, q, i) \ 366 for (i = 0; i < irq_ptr->nr_output_qs && \
367 for (i = 0, q = irq_ptr->output_qs[0]; \ 367 ({ q = irq_ptr->output_qs[i]; 1; }); i++)
368 i < irq_ptr->nr_output_qs; \
369 q = irq_ptr->output_qs[++i])
370 368
371#define prev_buf(bufnr) \ 369#define prev_buf(bufnr) \
372 ((bufnr + QDIO_MAX_BUFFERS_MASK) & QDIO_MAX_BUFFERS_MASK) 370 ((bufnr + QDIO_MAX_BUFFERS_MASK) & QDIO_MAX_BUFFERS_MASK)
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
index c883a085c059..77466c4faabb 100644
--- a/drivers/s390/cio/qdio_main.c
+++ b/drivers/s390/cio/qdio_main.c
@@ -996,7 +996,7 @@ static void qdio_int_handler_pci(struct qdio_irq *irq_ptr)
996 } 996 }
997 } 997 }
998 998
999 if (!pci_out_supported(q)) 999 if (!(irq_ptr->qib.ac & QIB_AC_OUTBOUND_PCI_SUPPORTED))
1000 return; 1000 return;
1001 1001
1002 for_each_output_queue(irq_ptr, q, i) { 1002 for_each_output_queue(irq_ptr, q, i) {