• Johan Hovold's avatar
    USB: usb_wwan: fix potential blocked I/O after resume · ead9a10e
    Johan Hovold authored
    commit fb7ad4f93d9f0f7d49beda32f5e7becb94b29a4d 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: 's avatarJohan Hovold <jhovold@gmail.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    ead9a10e
usb_wwan.c 17.4 KB