s390/qdio: don't attempt IRQ avoidance on Output SBALs
authorJulian Wiedmann <jwi@linux.ibm.com>
Fri, 4 Oct 2019 09:07:13 +0000 (11:07 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 31 Oct 2019 16:20:51 +0000 (17:20 +0100)
Output interrupts are not subject to SLSB-based avoidance, so remove the
gratuitous SLSB updates for Output SBALs in ERROR state.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/cio/qdio_main.c

index d0c85862c2586fbdd74315d5030b2de6592bf35d..2b797cbb9d57779fbbf283cd99cd9a1044877300 100644 (file)
@@ -423,9 +423,6 @@ static inline void account_sbals(struct qdio_q *q, unsigned int count)
 static void process_buffer_error(struct qdio_q *q, unsigned int start,
                                 int count)
 {
-       unsigned char state = (q->is_input_q) ? SLSB_P_INPUT_NOT_INIT :
-                                       SLSB_P_OUTPUT_NOT_INIT;
-
        q->qdio_error = QDIO_ERROR_SLSB_STATE;
 
        /* special handling for no target buffer empty */
@@ -433,7 +430,7 @@ static void process_buffer_error(struct qdio_q *q, unsigned int start,
            q->sbal[start]->element[15].sflags == 0x10) {
                qperf_inc(q, target_full);
                DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "OUTFULL FTC:%02x", start);
-               goto set;
+               return;
        }
 
        DBF_ERROR("%4x BUF ERROR", SCH_NO(q));
@@ -442,13 +439,6 @@ static void process_buffer_error(struct qdio_q *q, unsigned int start,
        DBF_ERROR("F14:%2x F15:%2x",
                  q->sbal[start]->element[14].sflags,
                  q->sbal[start]->element[15].sflags);
-
-set:
-       /*
-        * Interrupts may be avoided as long as the error is present
-        * so change the buffer state immediately to avoid starvation.
-        */
-       set_buf_states(q, start, state, count);
 }
 
 static inline void inbound_primed(struct qdio_q *q, unsigned int start,
@@ -530,6 +520,11 @@ static int get_inbound_buffer_frontier(struct qdio_q *q, unsigned int start)
                return count;
        case SLSB_P_INPUT_ERROR:
                process_buffer_error(q, start, count);
+               /*
+                * Interrupts may be avoided as long as the error is present
+                * so change the buffer state immediately to avoid starvation.
+                */
+               set_buf_states(q, start, SLSB_P_INPUT_NOT_INIT, count);
                if (atomic_sub_return(count, &q->nr_buf_used) == 0)
                        qperf_inc(q, inbound_queue_full);
                if (q->irq_ptr->perf_stat_enabled)