• Julian Wiedmann's avatar
    s390/qeth: avoid control IO completion stalls · 901e3f49
    Julian Wiedmann authored
    For control IO, qeth currently tracks the index of the buffer that it
    expects to complete the next IO on each qeth_channel. If the channel
    presents an IRQ while this buffer has not yet completed, no completion
    processing for _any_ completed buffer takes place.
    So if the 'next buffer' is skipped for any sort of reason* (eg. when it
    is released due to error conditions, before the IO is started), the
    buffer obviously won't switch to PROCESSED until it is eventually
    allocated for a _different_ IO and completes.
    Until this happens, all completion processing on that channel stalls
    and pending requests possibly time out.
    
    As a fix, remove the whole 'next buffer' logic and simply process any
    IO buffer right when it completes. A channel will never have more than
    one IO pending, so there's no risk of processing out-of-sequence.
    
    *Note: currently just one location in the code really handles this problem,
           by advancing the 'next' index manually.
    Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    901e3f49
qeth_core.h 27.2 KB