hardkernel / linux

Linux kernel source tree
Other
427 stars 408 forks source link

plz add a fix to usb serial driver for odroid c2 #306

Open k1tzu opened 7 years ago

k1tzu commented 7 years ago

In its current condition it resets the whole usb driver after numerous errors if device is unplugged. The correct code is available in latest kernel but in your obsolete version it absent. The fix is simple: https://github.com/hardkernel/linux/blob/odroidc2-3.14.y/drivers/usb/serial/usb_wwan.c line 300

        if (err != -EPERM) {
            dev_err(dev, "%s: resubmit read urb failed. (%d)\n",
                __func__, err);
            /* busy also in error unless we are killed */
            usb_mark_last_busy(port->serial->dev);
        }

replace with

        if (err != -EPERM && err != -ENODEV) {
            dev_err(dev, "%s: resubmit read urb failed. (%d)\n",
                __func__, err);
            /* busy also in error unless we are killed */
            usb_mark_last_busy(port->serial->dev);
        }

just as seen in https://github.com/hardkernel/linux/blob/odroidxu4-4.9.y/drivers/usb/serial/usb_wwan.c line 319

crdev commented 6 years ago

:+1: