亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? urb.txt

?? linux 內(nèi)核源代碼
?? TXT
字號(hào):
Revised: 2000-Dec-05.Again:   2002-Jul-06Again:   2005-Sep-19    NOTE:    The USB subsystem now has a substantial section in "The Linux Kernel API"    guide (in Documentation/DocBook), generated from the current source    code.  This particular documentation file isn't particularly current or    complete; don't rely on it except for a quick overview.1.1. Basic concept or 'What is an URB?'The basic idea of the new driver is message passing, the message itself is called USB Request Block, or URB for short. - An URB consists of all relevant information to execute any USB transaction   and deliver the data and status back. - Execution of an URB is inherently an asynchronous operation, i.e. the   usb_submit_urb(urb) call returns immediately after it has successfully  queued the requested action.- Transfers for one URB can be canceled with usb_unlink_urb(urb) at any time. - Each URB has a completion handler, which is called after the action  has been successfully completed or canceled. The URB also contains a  context-pointer for passing information to the completion handler.- Each endpoint for a device logically supports a queue of requests.  You can fill that queue, so that the USB hardware can still transfer  data to an endpoint while your driver handles completion of another.  This maximizes use of USB bandwidth, and supports seamless streaming  of data to (or from) devices when using periodic transfer modes.1.2. The URB structureSome of the fields in an URB are:struct urb{// (IN) device and pipe specify the endpoint queue	struct usb_device *dev;         // pointer to associated USB device	unsigned int pipe;              // endpoint information	unsigned int transfer_flags;    // ISO_ASAP, SHORT_NOT_OK, etc.// (IN) all urbs need completion routines	void *context;                  // context for completion routine	void (*complete)(struct urb *); // pointer to completion routine// (OUT) status after each completion	int status;                     // returned status// (IN) buffer used for data transfers	void *transfer_buffer;          // associated data buffer	int transfer_buffer_length;     // data buffer length	int number_of_packets;          // size of iso_frame_desc// (OUT) sometimes only part of CTRL/BULK/INTR transfer_buffer is used	int actual_length;              // actual data buffer length// (IN) setup stage for CTRL (pass a struct usb_ctrlrequest)	unsigned char* setup_packet;    // setup packet (control only)// Only for PERIODIC transfers (ISO, INTERRUPT)    // (IN/OUT) start_frame is set unless ISO_ASAP isn't set	int start_frame;                // start frame	int interval;                   // polling interval    // ISO only: packets are only "best effort"; each can have errors	int error_count;                // number of errors	struct usb_iso_packet_descriptor iso_frame_desc[0];};Your driver must create the "pipe" value using values from the appropriateendpoint descriptor in an interface that it's claimed.1.3. How to get an URB?URBs are allocated with the following call	struct urb *usb_alloc_urb(int isoframes, int mem_flags)Return value is a pointer to the allocated URB, 0 if allocation failed.The parameter isoframes specifies the number of isochronous transfer framesyou want to schedule. For CTRL/BULK/INT, use 0.  The mem_flags parameterholds standard memory allocation flags, letting you control (among otherthings) whether the underlying code may block or not.To free an URB, use	void usb_free_urb(struct urb *urb)You may free an urb that you've submitted, but which hasn't yet beenreturned to you in a completion callback.  It will automatically bedeallocated when it is no longer in use.1.4. What has to be filled in?Depending on the type of transaction, there are some inline functions defined in <linux/usb.h> to simplify the initialization, such asfill_control_urb() and fill_bulk_urb().  In general, they need the usbdevice pointer, the pipe (usual format from usb.h), the transfer buffer,the desired transfer length, the completion  handler, and its context. Take a look at the some existing drivers to see how they're used.Flags:For ISO there are two startup behaviors: Specified start_frame or ASAP.For ASAP set URB_ISO_ASAP in transfer_flags.If short packets should NOT be tolerated, set URB_SHORT_NOT_OK in transfer_flags.1.5. How to submit an URB?Just call	int usb_submit_urb(struct urb *urb, int mem_flags)The mem_flags parameter, such as SLAB_ATOMIC, controls memory allocation,such as whether the lower levels may block when memory is tight.It immediately returns, either with status 0 (request queued) or someerror code, usually caused by the following:- Out of memory (-ENOMEM)- Unplugged device (-ENODEV)- Stalled endpoint (-EPIPE)- Too many queued ISO transfers (-EAGAIN)- Too many requested ISO frames (-EFBIG)- Invalid INT interval (-EINVAL)- More than one packet for INT (-EINVAL)After submission, urb->status is -EINPROGRESS; however, you should neverlook at that value except in your completion callback.For isochronous endpoints, your completion handlers should (re)submitURBs to the same endpoint with the ISO_ASAP flag, using multi-buffering,to get seamless ISO streaming.1.6. How to cancel an already running URB?There are two ways to cancel an URB you've submitted but which hasn'tbeen returned to your driver yet.  For an asynchronous cancel, call	int usb_unlink_urb(struct urb *urb)It removes the urb from the internal list and frees all allocatedHW descriptors. The status is changed to reflect unlinking.  Notethat the URB will not normally have finished when usb_unlink_urb()returns; you must still wait for the completion handler to be called.To cancel an URB synchronously, call	void usb_kill_urb(struct urb *urb)It does everything usb_unlink_urb does, and in addition it waitsuntil after the URB has been returned and the completion handlerhas finished.  It also marks the URB as temporarily unusable, sothat if the completion handler or anyone else tries to resubmit itthey will get a -EPERM error.  Thus you can be sure that whenusb_kill_urb() returns, the URB is totally idle.1.7. What about the completion handler?The handler is of the following type:	typedef void (*usb_complete_t)(struct urb *, struct pt_regs *)I.e., it gets the URB that caused the completion call, plus theregister values at the time of the corresponding interrupt (if any).In the completion handler, you should have a look at urb->status todetect any USB errors. Since the context parameter is included in the URB,you can pass information to the completion handler. Note that even when an error (or unlink) is reported, data may have beentransferred.  That's because USB transfers are packetized; it might takesixteen packets to transfer your 1KByte buffer, and ten of them mighthave transferred successfully before the completion was called.NOTE:  ***** WARNING *****NEVER SLEEP IN A COMPLETION HANDLER.  These are normally calledduring hardware interrupt processing.  If you can, defer substantialwork to a tasklet (bottom half) to keep system latencies low.  You'llprobably need to use spinlocks to protect data structures you manipulatein completion handlers.1.8. How to do isochronous (ISO) transfers?For ISO transfers you have to fill a usb_iso_packet_descriptor structure,allocated at the end of the URB by usb_alloc_urb(n,mem_flags), for eachpacket you want to schedule.   You also have to set urb->interval to sayhow often to make transfers; it's often one per frame (which is onceevery microframe for highspeed devices).  The actual interval used willbe a power of two that's no bigger than what you specify.The usb_submit_urb() call modifies urb->interval to the implemented intervalvalue that is less than or equal to the requested interval value.  IfISO_ASAP scheduling is used, urb->start_frame is also updated.For each entry you have to specify the data offset for this frame (base istransfer_buffer), and the length you want to write/expect to read.After completion, actual_length contains the actual transferred length and status contains the resulting status for the ISO transfer for this frame.It is allowed to specify a varying length from frame to frame (e.g. foraudio synchronisation/adaptive transfer rates). You can also use the length 0 to omit one or more frames (striping).For scheduling you can choose your own start frame or ISO_ASAP. As explainedearlier, if you always keep at least one URB queued and your completionkeeps (re)submitting a later URB, you'll get smooth ISO streaming (if usbbandwidth utilization allows).If you specify your own start frame, make sure it's several frames in advanceof the current frame.  You might want this model if you're synchronizingISO data with some other event stream.1.9. How to start interrupt (INT) transfers?Interrupt transfers, like isochronous transfers, are periodic, and happenin intervals that are powers of two (1, 2, 4 etc) units.  Units are framesfor full and low speed devices, and microframes for high speed ones.The usb_submit_urb() call modifies urb->interval to the implemented intervalvalue that is less than or equal to the requested interval value.In Linux 2.6, unlike earlier versions, interrupt URBs are not automagicallyrestarted when they complete.  They end when the completion handler iscalled, just like other URBs.  If you want an interrupt URB to be restarted,your completion handler must resubmit it.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩三级一区| 一区二区三区在线影院| 麻豆精品一区二区三区| 91国在线观看| 亚洲视频图片小说| 91在线观看视频| 中文字幕中文字幕中文字幕亚洲无线| 蓝色福利精品导航| 日韩视频123| 国产福利视频一区二区三区| 精品久久免费看| 成人国产视频在线观看| 国产精品久久久久久久久图文区| 国产精品一区二区不卡| 久久精品这里都是精品| 99久久精品一区| 亚洲一区av在线| 日韩欧美中文一区二区| 韩国v欧美v日本v亚洲v| 国产精品三级视频| 99久久精品免费| 日本v片在线高清不卡在线观看| 91精品免费在线观看| 国产成人三级在线观看| 一区二区三区欧美| 精品国偷自产国产一区| 不卡一区在线观看| 老司机午夜精品99久久| 中文字幕在线不卡一区| 欧美精品乱码久久久久久| 狠狠色综合色综合网络| 亚洲综合一区二区精品导航| 精品久久一二三区| 在线观看网站黄不卡| 国产suv精品一区二区三区| 秋霞av亚洲一区二区三| 亚洲欧美乱综合| 国产日产精品一区| 欧美一卡2卡三卡4卡5免费| 日本道免费精品一区二区三区| 久久电影网电视剧免费观看| 伊人色综合久久天天人手人婷| 26uuu精品一区二区三区四区在线| 色婷婷亚洲综合| 成人一级黄色片| 国产一区二区美女诱惑| 天堂久久久久va久久久久| 亚洲精品久久久蜜桃| 国产精品午夜在线| 国产精品乱码妇女bbbb| 国产亚洲美州欧州综合国| 日韩欧美黄色影院| 日韩欧美一区二区视频| 欧美日韩一区二区电影| 欧美精选一区二区| 91 com成人网| 欧美大片一区二区| 久久久无码精品亚洲日韩按摩| 日韩精品一区在线| 久久久久国产一区二区三区四区| 精品日韩欧美在线| 国产精品私人影院| 亚洲免费在线看| 偷偷要91色婷婷| 久久电影国产免费久久电影| 国产成人精品免费在线| 99re成人精品视频| 欧洲另类一二三四区| 欧美一级免费大片| 久久精品人人做人人爽97| 亚洲人成7777| 人人精品人人爱| 99综合电影在线视频| 欧美三区在线观看| 国产午夜精品美女毛片视频| 一区二区欧美精品| 国产精品系列在线观看| 欧美主播一区二区三区| 精品福利一区二区三区| 亚洲一区二区在线免费观看视频 | 99re8在线精品视频免费播放| 欧美中文字幕久久| 国产日产欧美精品一区二区三区| 亚洲va欧美va天堂v国产综合| 国内欧美视频一区二区| 欧美精品日韩综合在线| 国产精品久久久久aaaa樱花| 美女视频网站黄色亚洲| 日本高清免费不卡视频| 国产精品美日韩| 极品尤物av久久免费看| 欧美日韩在线三区| 亚洲狠狠丁香婷婷综合久久久| 国产精品亚洲综合一区在线观看| 欧美日韩国产影片| 夜夜嗨av一区二区三区中文字幕| 丁香婷婷综合激情五月色| 精品国产污网站| 精品一区二区三区不卡| 欧美日韩小视频| 亚洲va欧美va人人爽| 欧美日韩卡一卡二| 日欧美一区二区| 911精品产国品一二三产区| 五月天国产精品| 欧美一区二区啪啪| 国产中文字幕一区| 国产亚洲欧洲997久久综合| 国产成人在线视频网站| 综合电影一区二区三区| 91美女视频网站| 一区二区三区在线不卡| 欧美喷潮久久久xxxxx| 美女爽到高潮91| 国产精品久久久久久久岛一牛影视| 国产高清精品在线| 中文子幕无线码一区tr| 色偷偷久久一区二区三区| 日韩电影免费一区| 国产精品美女久久久久久久网站| 成人av网站免费观看| 婷婷六月综合亚洲| 国产日本亚洲高清| 欧美军同video69gay| 成人激情校园春色| 日本在线不卡视频| 中文字幕一区二区三区在线播放| 欧美性极品少妇| 国产精品乡下勾搭老头1| 五月激情综合网| 亚洲免费av高清| 久久久99精品免费观看不卡| 欧美人体做爰大胆视频| 不卡av在线免费观看| 久久99精品国产.久久久久| 亚洲精品视频一区二区| 国产欧美日韩精品在线| 亚洲精品一区二区三区香蕉| 欧美日韩国产三级| 欧美日韩一二三区| 欧洲国内综合视频| 色欧美88888久久久久久影院| 国产伦精品一区二区三区在线观看| 亚洲午夜精品网| 亚洲精品成人a在线观看| 一区在线观看免费| 国产精品国产三级国产专播品爱网 | 国产亚洲制服色| 久久综合999| 国产偷国产偷亚洲高清人白洁| 91精品在线免费观看| 日韩一区二区中文字幕| 日韩欧美中文字幕精品| wwww国产精品欧美| 日本一区二区在线不卡| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 日韩福利电影在线| 欧美久久免费观看| 国产一区在线观看麻豆| 亚洲无人区一区| 一区在线中文字幕| 日本91福利区| 亚洲一区二区欧美激情| 欧美激情一区二区三区不卡| 国产亚洲成aⅴ人片在线观看| 国产精品美女久久久久av爽李琼 | 精品国产青草久久久久福利| 精品福利一区二区三区| 亚洲国产成人一区二区三区| 亚洲色图欧洲色图| 亚洲国产cao| 狠狠色伊人亚洲综合成人| 成人午夜大片免费观看| 国产精品123区| 欧美性欧美巨大黑白大战| 欧美一区二区精品在线| 中文字幕日本不卡| 精品综合久久久久久8888| 99久久精品国产观看| 欧美成人伊人久久综合网| 成人免费一区二区三区视频 | 中文字幕一区二区三区在线不卡| 亚洲电影欧美电影有声小说| 国产成人免费在线视频| 欧美一级夜夜爽| 午夜精品久久久久久久蜜桃app| 国产一区二区成人久久免费影院 | 国产美女在线观看一区| 8x福利精品第一导航| 亚洲一区二区高清| 99精品视频中文字幕| 欧美—级在线免费片| 国产精品系列在线播放| 日韩亚洲欧美在线| 免费一区二区视频| 欧美久久久一区| 人人超碰91尤物精品国产| 欧美亚洲愉拍一区二区| 亚洲高清免费在线| 欧美日韩综合不卡|