Skip to content

Commit 22bfda6

Browse files
borntraegerMartin Schwidefsky
authored andcommitted
s390/sclp: properly detect line mode console
To detect a line mode console we need a message event type for the receive mask and a command event type for the send mask. Checking for a MSG event in the sclp send mask was wrong and might result in line mode consoles not being detected. Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent 7423435 commit 22bfda6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/s390/char/sclp_cmd.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,11 @@ bool __init sclp_has_linemode(void)
145145

146146
if (sccb->header.response_code != 0x20)
147147
return 0;
148-
if (sccb->sclp_send_mask & (EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK))
149-
return 1;
150-
return 0;
148+
if (!(sccb->sclp_send_mask & (EVTYP_OPCMD_MASK | EVTYP_PMSGCMD_MASK)))
149+
return 0;
150+
if (!(sccb->sclp_receive_mask & (EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK)))
151+
return 0;
152+
return 1;
151153
}
152154

153155
bool __init sclp_has_vt220(void)

0 commit comments

Comments
 (0)