• Johan Hovold's avatar
    USB: usb_wwan: fix potential blocked I/O after resume · 75a5d8fe
    Johan Hovold authored
    commit fb7ad4f9 upstream.
    
    Keep trying to submit urbs rather than bail out on first read-urb
    submission error, which would also prevent I/O for any further ports
    from being resumed.
    
    Instead keep an error count, for all types of failed submissions, and
    let USB core know that something went wrong.
    
    Also make sure to always clear the suspended flag. Currently a failed
    read-urb submission would prevent cached writes as well as any
    subsequent writes from being submitted until next suspend-resume cycle,
    something which may not even necessarily happen.
    
    Note that USB core currently only logs an error if an interface resume
    failed.
    
    Fixes: 383cedc3 ("USB: serial: full autosuspend support for the
    option driver")
    Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    75a5d8fe
usb_wwan.c 18.8 KB