• Martin Kelly's avatar
    can: mcba_usb: fix device disconnect bug · 1cb35a33
    Martin Kelly authored
    Currently, when you disconnect the device, the driver infinitely
    resubmits all URBs, so you see:
    
    Rx URB aborted (-32)
    
    in an infinite loop.
    
    Fix this by catching -EPIPE (what we get in urb->status when the device
    disconnects) and not resubmitting.
    
    With this patch, I can plug and unplug many times and the driver
    recovers correctly.
    Signed-off-by: default avatarMartin Kelly <mkelly@xevo.com>
    Cc: linux-stable <stable@vger.kernel.org>
    Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
    1cb35a33
mcba_usb.c 20.9 KB