红联Linux门户
Linux帮助

usb_serial_generic_write_bulk_callback - urb stoped: -32

发布时间:2017-09-11 09:37:49来源:linux网站作者:Jello
1.环境:
上位机:ubuntu16.04
Linux jello 4.4.0-89-generic #112-Ubuntu SMP Mon Jul 31 19:38:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
下位机:
/home/jello # uname -a
Linux  3.10.0 #2 SMP Mon Mar 6 17:52:09 CST 2017 armv7l GNU/Linux
 
2.背景:
上位机通过usb转串口连接下位机,使用kermit进行串口交互,突然在上位机就不能交互了,串口不响应了,使用dmesg |tail获取到以下信息:
pl2303 ttyUSB0: usb_serial_generic_write_bulk_callback - urb stoped: -32
 
3.解决方法:
降低上位机的usb传输速率
 
4.实施:
向内核启动参数中添加参数dwc_otg.speed=1
具体操作请看[附]:linux内核启动参数解析及添加
 
5.重启即可生效
 
附:linux内核启动参数解析及添加
1.环境:
ubuntu16.04
Linux jello 4.4.0-89-generic #112-Ubuntu SMP Mon Jul 31 19:38:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
2.查看当前linux内核的启动参数:
cat /proc/cmdline
笔者的输出内容如下:
BOOT_IMAGE=/boot/vmlinuz-4.4.0-89-generic root=UUID=bef418fa-4202-4513-b39b-cde6a5d9753f ro quiet splash vt.handoff=7
3.开始解析
root=UUID=bef418fa-4202-4513-b39b-cde6a5d9753f :这一串可以用root=/dev/sda1(假如根文件系统在第一个分区)来代替,但是不能用root=(hd0,msdos1)来代替
ro:启动时以只读方式挂载根文件系统
quiet:不进行打印信息的输出,所以去掉此项将会迎来很多打印信息
splash:显示开机动画
vt.handoff=7 : 图形界面会去使用tty7,此项用来禁止splash占用tty7,因此如果将splash参数去掉,此项就无效了
4.添加新的启动参数
vi /boot/grub/grub.cfg
此文件中会有第2步输出的内容,在其后追加参数即可,例如:
笔者的grub.cfg文件中就有如下行:(是不是与第2步输出的信息有些类似)
linux   /boot/vmlinuz-4.4.0-89-generic root=UUID=bef418fa-4202-4513-b39b-cde6a5d9753f ro  quiet splash $vt_handoff
假设笔者要加入参数dwc_otg.speed=1,那么修改后如下:
linux   /boot/vmlinuz-4.4.0-89-generic root=UUID=bef418fa-4202-4513-b39b-cde6a5d9753f ro  quiet splash $vt_handoff dwc_otg.speed=1
至此保存此文件重启即可使此参数生效
5.为何没有使用update-grub来更新grub.cfg文件呢?
update-grub命令无法满足更细致的内核参数修改需求
 
本文永久更新地址:http://www.linuxdiyf.com/linux/32567.html