]> git.karo-electronics.de Git - linux-beck.git/commitdiff
s390/sclp: reduce dependency on event type masks
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 9 Sep 2014 10:53:12 +0000 (12:53 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 25 Sep 2014 08:52:01 +0000 (10:52 +0200)
The event type masks can change asynchronously. These changes are reported
by SCLP to the OS by state-change events which are retrieved with the read
event data command. The SCLP driver has a request queue, there is a window
where the read event data request has not completed yet but the SCLP console
drivers are trying to queue output requests. As the masks are not updated
yet the requests are discarded.

The simplest fix is to queue the console requests independent of the
event type masks and rely on SCLP to return with an error code if a
specific event type is not available.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/sclp_early.c
drivers/s390/char/sclp_rw.c
drivers/s390/char/sclp_vt220.c

index 1918d9dff45d0dfcca43cafe4bd762008c4448f6..5bd6cb145a87d4bfd4e11f7ca139bac1f7ec51e3 100644 (file)
@@ -281,7 +281,7 @@ out:
 
 static unsigned int __init sclp_con_check_linemode(struct init_sccb *sccb)
 {
-       if (!(sccb->sclp_send_mask & (EVTYP_OPCMD_MASK | EVTYP_PMSGCMD_MASK)))
+       if (!(sccb->sclp_send_mask & EVTYP_OPCMD_MASK))
                return 0;
        if (!(sccb->sclp_receive_mask & (EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK)))
                return 0;
index 3b13d58fe87bb7cf431a912052862c3be0d6ce7f..35a84af875ee97c046c8f9e9e2b3ddacae16eddc 100644 (file)
@@ -33,7 +33,7 @@ static void sclp_rw_pm_event(struct sclp_register *reg,
 
 /* Event type structure for write message and write priority message */
 static struct sclp_register sclp_rw_event = {
-       .send_mask = EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK,
+       .send_mask = EVTYP_MSG_MASK,
        .pm_event_fn = sclp_rw_pm_event,
 };
 
@@ -456,14 +456,9 @@ sclp_emit_buffer(struct sclp_buffer *buffer,
                return -EIO;
 
        sccb = buffer->sccb;
-       if (sclp_rw_event.sclp_receive_mask & EVTYP_MSG_MASK)
-               /* Use normal write message */
-               sccb->msg_buf.header.type = EVTYP_MSG;
-       else if (sclp_rw_event.sclp_receive_mask & EVTYP_PMSGCMD_MASK)
-               /* Use write priority message */
-               sccb->msg_buf.header.type = EVTYP_PMSGCMD;
-       else
-               return -EOPNOTSUPP;
+       /* Use normal write message */
+       sccb->msg_buf.header.type = EVTYP_MSG;
+
        buffer->request.command = SCLP_CMDW_WRITE_EVENT_DATA;
        buffer->request.status = SCLP_REQ_FILLED;
        buffer->request.callback = sclp_writedata_callback;
index b9a9f721716d478559cdc169ee0d1c201a186665..ae67386c03d3b8301a581c58a68a028d70f22fbf 100644 (file)
@@ -206,10 +206,6 @@ sclp_vt220_callback(struct sclp_req *request, void *data)
 static int
 __sclp_vt220_emit(struct sclp_vt220_request *request)
 {
-       if (!(sclp_vt220_register.sclp_receive_mask & EVTYP_VT220MSG_MASK)) {
-               request->sclp_req.status = SCLP_REQ_FAILED;
-               return -EIO;
-       }
        request->sclp_req.command = SCLP_CMDW_WRITE_EVENT_DATA;
        request->sclp_req.status = SCLP_REQ_FILLED;
        request->sclp_req.callback = sclp_vt220_callback;