Skip to content

Commit

Permalink
s390/sclp: properly detect line mode console
Browse files Browse the repository at this point in the history
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 <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Christian Borntraeger authored and Martin Schwidefsky committed Sep 30, 2013
1 parent 7423435 commit 22bfda6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/s390/char/sclp_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ bool __init sclp_has_linemode(void)

if (sccb->header.response_code != 0x20)
return 0;
if (sccb->sclp_send_mask & (EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK))
return 1;
return 0;
if (!(sccb->sclp_send_mask & (EVTYP_OPCMD_MASK | EVTYP_PMSGCMD_MASK)))
return 0;
if (!(sccb->sclp_receive_mask & (EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK)))
return 0;
return 1;
}

bool __init sclp_has_vt220(void)
Expand Down

0 comments on commit 22bfda6

Please sign in to comment.