Solve option1 ttyUSB1: option_instat_callback: error -2 error

My development board is connected to the EC200S module through the USB port. After sending the AT command through the ttyUSB port, it will always report an exception when it is closed:

option1 ttyUSB1: option_instat_callback: error -2

There is no other abnormality in reporting this error, but it may be a hidden danger, and I always feel abnormal.

Finding the reason on the Internet can basically lock the position, also because of the low version of the linux kernel used, because the high version has solved this problem, the solution:

Find the directory in the source code: /drivers/usb/serial/option.c

The option_instat_callback function code is added as shown in the following figure:

} else if (status == -ENOENT || status == -ESHUTDOWN) {
		dev_dbg(dev, "%s: urb stopped: %d\n", __func__, status);
} else
		dev_err(dev, "%s: error %d\n", __func__, status);

Then recompile the kernel, burn and test ok.

Reference link:

https://www.spinics.net/lists/linux-usb/msg111248.html

Guess you like

Origin blog.csdn.net/weixin_38293850/article/details/111151848