转载 2016年06月01日 17:26:32

from 13.3. USB Urbs: http://www.makelinux.net/ldd3/chp-13-sect-3

Valid values for this variable include:


The urb transfer was successful.


The urb was stopped by a call to usb_kill_urb.



The urb was unlinked by a call to usb_unlink_urb, and the TRansfer_flags variable of the urb was set to URB_ASYNC_UNLINK.


The urb is still being processed by the USB host controllers. If your driver ever sees this value, it is a bug in your driver.


One of the following errors occurred with this urb:

  • A bitstuff error happened during the transfer.

  • No response packet was received in time by the hardware.


There was a CRC mismatch in the urb transfer.


The endpoint is now stalled. If the endpoint involved is not a control endpoint, this error can be cleared through a call to the function usb_clear_halt.


Data was received faster during the transfer than it could be written to system memory. This error value happens only for an IN urb.


Data could not be retrieved from the system memory during the transfer fast enough to keep up with the requested USB data rate. This error value happens only for an OUT urb.


A "babble" error happened to the urb. A "babble" error occurs when the endpoint receives more data than the endpoint's specified maximum packet size.


Occurs only if the URB_SHORT_NOT_OK flag is set in the urb's transfer_flags variable and means that the full amount of data requested by the urb was not received.


The USB device is now gone from the system.


Occurs only for a isochronous urb and means that the transfer was only partially completed. In order to determine what was transferred, the driver must look at the individual frame status.


Something very bad happened with the urb. The USB kernel documentation describes what this value means:

ISO madness, if this happens: Log off and go home

It also can happen if a parameter is incorrectly set in the urb stucture or if an incorrect function parameter in the usb_submit_urb call submitted the urb to the USB core.


There was a severe error with the USB host controller driver; it has now been disabled, or the device was disconnected from the system, and the urb was submitted after the device was removed. It can also occur if the configuration was changed for the device, while the urb was submitted to the device.

Generally, the error values -EPROTO, -EILSEQ, and -EOVERFLOW indicate hardware problems with the device, the device firmware, or the cable connecting the device to the computer.




有人问,怎么写一个驱动写这么久啊? 的确,一路走来,大家都不容易,但既然已经走到今天,我们能做的也只有是坚持下去。 usb_stor_acquire_resources(),从名字上来看是获取资源...

mini2440 usb host device controller驱动分析(二) -----数据(urb)的收发流程

这节分析urb的收发流程。我们首先知道对于usb device 来讲,读写数据用到的是usb_request。而对于usb host来讲,读写数据用到的是urb,有些类似于网络中skbuff。 无论是...
  • a_jige
  • a_jige
  • 2013年10月16日 17:23
  • 2125


Linux系统所有的 USB 设备通讯使用称为 urb 的东西( USB request block). 这个请求块用 struct urb 结构描述并且可在 include/linux/usb.h ...


大家常说,一个设备通常有多个配置,配置通常有多个接口,接口通常有多个端点。接口代表逻辑上的设备,比如声卡分为 录音和播放。访问设备时,访问的是某个接口(逻辑设备)。除了端点0之外,每个端点只支持一个传...


  • 2012年12月17日 19:27
  • 2KB
  • 下载




一. 简介              usb总线是一种轮询式总线,协议规定所有的数据传输都必须由主机发起,usb主机与设备之间是通过管道(pipe)传输的,管道两边分别对应主机中的数据缓冲区和设备侧...


urb介绍 usb requedt block 简称urb usb总线就像一条高速公路,货物、人流之类的可以看成是系统与设备交互的数据,而urb就可以看成是汽车。 ...


USB请求块(URB)——框架及机制 《Linux设备驱动开发详解》本书全面而详细地讲解了Linux设备驱动开发中涉及的理论以及多种设备驱动的框架。第20章主要讲解从主机侧角度看到的USB主机控制器...

USB 的 Urb

linux 内核中的 USB 代码和所有的 USB 设备通讯使用称为 urb 的东西( USB request block). 这个请求块用 struct urb 结构描述并且可在 include/l...