Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] s390: lcs incorrect test

While debugging why our LCS emulator is having some problems I noticed the
following weirdness in drivers/s390/net/lcs.c routine lcs_irq. The `if'
statement is always true since SCHN_STAT_PCI is defined as 0x80.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Greg Smith and committed by
Linus Torvalds
698d0707 ac924c60

+1 -1
+1 -1
drivers/s390/net/lcs.c
··· 1348 1348 index = (struct ccw1 *) __va((addr_t) irb->scsw.cpa) 1349 1349 - channel->ccws; 1350 1350 if ((irb->scsw.actl & SCSW_ACTL_SUSPENDED) || 1351 - (irb->scsw.cstat | SCHN_STAT_PCI)) 1351 + (irb->scsw.cstat & SCHN_STAT_PCI)) 1352 1352 /* Bloody io subsystem tells us lies about cpa... */ 1353 1353 index = (index - 1) & (LCS_NUM_BUFFS - 1); 1354 1354 while (channel->io_idx != index) {