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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? usbd-bus.c

?? linux嵌入式課程實踐中的一個關于聲卡驅動程序 。
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * linux/drivers/usbd/usbd-bus.c - USB Device Prototype * * Copyright (c) 2000, 2001, 2002 Lineo * Copyright (c) 2001 Hewlett Packard * * By:  *      Stuart Lynne <sl@lineo.com>,  *      Tom Rushworth <tbr@lineo.com>,  *      Bruce Balden <balden@lineo.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */#include <linux/config.h>#define USBD_CONFIG_NOWAIT_DEREGISTER_DEVICE 1#include <linux/module.h>#include <linux/init.h>#include <linux/kernel.h>#include <linux/list.h>#include <asm/uaccess.h>#include <linux/netdevice.h>#include <linux/skbuff.h>#include <linux/etherdevice.h>#include <net/arp.h>#include <linux/rtnetlink.h>#include <linux/smp_lock.h>#include <linux/ctype.h>#include <linux/timer.h>#include <linux/string.h>#include <linux/atmdev.h>#include <linux/pkt_sched.h>#include "usbd.h"#include "usbd-debug.h"#include "usbd-func.h"#include "usbd-bus.h"#include "usbd-inline.h"extern int usb_devices;extern struct usb_function_driver ep0_driver;extern int registered_functions;extern struct list_head function_drivers;extern struct list_head devices;        static __inline__ struct usb_function_driver *list_entry_func(const struct list_head *le){    return list_entry(le, struct usb_function_driver, drivers);}static __inline__ struct usb_device_instance *list_entry_device(const struct list_head *le){    return list_entry(le, struct usb_device_instance, devices);}// Debug stuff - dbgflg_usbdbi_init must be defined in the main part of the bus driver (e.g. *_bi/init.c)extern int      dbgflg_usbdbi_init;#define dbg_init(lvl,fmt,args...) dbgPRINT(dbgflg_usbdbi_init,lvl,fmt,##args)extern int registered_functions;extern int registered_devices;/** * usbd_fill_rcv - fill the rx recyle queue with empty urbs * @endpoint: * * Fill the recycle queue so that receive has some empty urbs to use. */void usbd_fill_rcv(struct usb_device_instance *device, struct usb_endpoint_instance *endpoint, int num){    int i;    unsigned buffersize;    dbg_init(1, "endpoint: %d", endpoint->endpoint_address);    if (endpoint->rcv_packetSize) {        // we need to allocate URBs with enough room for the endpoints transfersize plus one rounded         // up to the next packetsize                buffersize = ((endpoint->rcv_transferSize + endpoint->rcv_packetSize) / endpoint->rcv_packetSize) *            endpoint->rcv_packetSize;        dbg_init(1, "endpoint: %d packetSize: %d transferSize: %d buffersize: %d",                 endpoint->endpoint_address, endpoint->rcv_packetSize, endpoint->rcv_transferSize, buffersize);        for (i = 0; i < num; i++) {            usbd_recycle_urb(usbd_alloc_urb(device, device->function_instance_array, endpoint->endpoint_address, buffersize));        }    }    else {        dbg_init(0, "endpoint: %d packetSize is Zero!", endpoint->endpoint_address);    }}/** * usbd_flush_rcv - flush rcv * @endpoint: * * Iterate across the rx list and dispose of any urbs. */void usbd_flush_rcv(struct usb_endpoint_instance *endpoint){    struct usbd_urb *rcv_urb = NULL;    unsigned long flags;         if (endpoint) {        local_irq_save(flags);        if ((rcv_urb = endpoint->rcv_urb)) {            endpoint->rcv_urb = NULL;            usbd_dealloc_urb(rcv_urb);        }        while ((rcv_urb = first_urb_detached(&endpoint->rdy))) {            usbd_dealloc_urb(rcv_urb);        }        local_irq_restore(flags);    }}/** * usbd_flush_tx - flush tx urbs from endpoint * @endpoint: * * Iterate across the tx list and cancel any outstanding urbs. */void usbd_flush_tx(struct usb_endpoint_instance *endpoint){    struct usbd_urb *send_urb = NULL;    unsigned long flags;         if (endpoint) {        local_irq_save(flags);        if ((send_urb = endpoint->tx_urb)) {            endpoint->tx_urb = NULL;            usbd_urb_sent_irq(send_urb, SEND_FINISHED_ERROR);        }        while ((send_urb = first_urb_detached(&endpoint->tx))) {            usbd_urb_sent_irq(send_urb, SEND_FINISHED_ERROR);        }        local_irq_restore(flags);    }}/** * usbd_flush_ep - flush urbs from endpoint * @endpoint: * * Iterate across the approrpiate tx or rcv list and cancel any outstanding urbs. */void usbd_flush_ep(struct usb_endpoint_instance *endpoint){    if (endpoint) {        if (endpoint->endpoint_address & 0x7f) {            usbd_flush_tx(endpoint);        }        else {            usbd_flush_rcv(endpoint);        }    }}/** * usbd_device_bh -  * @data: * * Bottom half handler to process sent or received urbs. */      void usbd_device_bh(void *data){    struct usb_device_instance *device = data;    int i;    for (i = 0; i < device->bus->driver->max_endpoints; i++) {        struct usb_endpoint_instance *endpoint = device->bus->endpoint_array + i;        // process received urbs        if (endpoint->endpoint_address && (endpoint->endpoint_address & USB_REQ_DIRECTION_MASK) == USB_REQ_HOST2DEVICE) {            struct usbd_urb *urb;            while ((urb = first_urb_detached(&endpoint->rcv))) {                if ( !urb->function_instance || !urb->function_instance->function_driver->ops->recv_urb) {                    printk("usbd_device_bh: no recv_urb function\n");                    usbd_recycle_urb(urb);                }                else if (urb->function_instance->function_driver->ops->recv_urb(urb)) {                    // XXX printk(KERN_ERR"usbd_device_bh: recv_urb failed\n");                    usbd_recycle_urb(urb);                }            }        }        // process sent urbs        if (endpoint->endpoint_address && (endpoint->endpoint_address & USB_REQ_DIRECTION_MASK) == USB_REQ_DEVICE2HOST) {            struct usbd_urb *urb;            while ((urb = first_urb_detached(&endpoint->done))) {                if ( !urb->function_instance || !urb->function_instance->function_driver->ops->urb_sent ||                        urb->function_instance->function_driver->ops->urb_sent(urb, urb->status))                 {                    printk(KERN_ERR"usbd_device_bh: no urb_sent function\n");                    usbd_dealloc_urb(urb);                }            }        }    }#if defined(CONFIG_SA1100_COLLIE) && defined(CONFIG_PM)    {        // Please clear autoPowerCancel flag during the transmission and  the reception.        // XXX XXX extern         int    autoPowerCancel;        autoPowerCancel = 0;                // Auto Power Off Cancel    }#endif#if defined(CONFIG_SA1110_CALYPSO) && defined(CONFIG_PM)    // Shouldn't need to make this atomic, all we need is a change indicator    device->usbd_rxtx_timestamp = jiffies;#endif    //MOD_DEC_USE_COUNT;    //printk(KERN_DEBUG"usbd_device_bh: USE: %d\n", GET_USE_COUNT(THIS_MODULE));    return;}/** * usbd_function_bh -  * @data: * * Bottom half handler to process events for functions. */      void usbd_function_bh(void *data){    struct usb_device_instance *device;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
www一区二区| 欧美在线一区二区| 国产欧美一区视频| 北岛玲一区二区三区四区| 中文字幕精品三区| 色综合天天综合色综合av | 亚洲国产精品久久人人爱| 91丝袜国产在线播放| 亚洲免费资源在线播放| 日本精品视频一区二区| 午夜视频一区二区| 精品福利一区二区三区免费视频| 狠狠色丁香久久婷婷综| 欧美激情一区二区三区四区| 一本大道av一区二区在线播放| 亚洲一二三区不卡| 精品粉嫩超白一线天av| 岛国精品在线播放| 亚洲无线码一区二区三区| 日韩三级在线观看| 91在线国产观看| 免费一级片91| 亚洲欧洲国产日韩| 日韩三级视频在线看| 成人免费福利片| 亚洲va欧美va国产va天堂影院| 日韩欧美一区电影| 色综合色综合色综合| 午夜一区二区三区在线观看| 久久亚洲欧美国产精品乐播 | 午夜欧美视频在线观看| 欧美变态tickle挠乳网站| 国产.欧美.日韩| 天天影视涩香欲综合网| 国产午夜精品一区二区| 欧美日韩亚洲综合在线| 国产成人免费9x9x人网站视频| 亚洲制服丝袜在线| 欧美国产成人在线| 日韩精品一区二区三区中文精品| 91日韩一区二区三区| 免费视频一区二区| 一区二区三区在线高清| 久久精品欧美一区二区三区麻豆| 欧美日韩在线电影| 91香蕉视频污| 国产成人夜色高潮福利影视| 日韩电影网1区2区| 亚洲国产人成综合网站| 欧美激情在线观看视频免费| 日韩一区二区免费在线电影| 欧美在线看片a免费观看| 成人sese在线| 国产 欧美在线| 国产福利一区二区三区| 免费的成人av| 天堂av在线一区| 亚洲精品国产高清久久伦理二区| 国产精品情趣视频| 久久九九久久九九| 精品免费国产二区三区| 91精品视频网| 777色狠狠一区二区三区| 欧美伊人久久大香线蕉综合69| 91麻豆国产在线观看| 国产不卡视频在线播放| 国产一区二区三区观看| 看电视剧不卡顿的网站| 免费看精品久久片| 日韩va亚洲va欧美va久久| 亚洲国产成人va在线观看天堂| 亚洲精品中文在线观看| 亚洲欧洲日韩一区二区三区| 国产精品蜜臀av| 亚洲色图制服诱惑| 亚洲综合在线观看视频| 一区二区三区欧美在线观看| 一区二区三区在线观看网站| 一区二区三区欧美| 性感美女极品91精品| 亚洲成人一二三| 七七婷婷婷婷精品国产| 日韩av电影天堂| 久久97超碰国产精品超碰| 日韩电影在线看| 老司机免费视频一区二区三区| 看电影不卡的网站| 国产成人av影院| 成人国产精品视频| 91啪亚洲精品| 欧美喷潮久久久xxxxx| 这里只有精品电影| 欧美大肚乱孕交hd孕妇| 欧美一级国产精品| 国产午夜亚洲精品理论片色戒| 国产精品久久久久三级| 亚洲视频电影在线| 日本sm残虐另类| 国产精品69毛片高清亚洲| a亚洲天堂av| 777亚洲妇女| 2023国产精品视频| 亚洲乱码精品一二三四区日韩在线| 一二三区精品视频| 久久国产精品99精品国产| 国产伦精品一区二区三区免费迷| 99久久精品免费看国产| 欧美性大战久久久久久久| 日韩欧美国产一区二区三区| 国产女人18毛片水真多成人如厕| 亚洲裸体xxx| 久久不见久久见免费视频7| av动漫一区二区| 日韩一区二区三免费高清| 中文字幕一区日韩精品欧美| 香蕉加勒比综合久久| 成熟亚洲日本毛茸茸凸凹| 欧美三级午夜理伦三级中视频| 欧美精品一区二区三区一线天视频| 亚洲欧洲日本在线| 久久精品99国产精品日本| 91在线一区二区| 精品久久一区二区| 亚洲成av人影院| 成人午夜在线视频| 日韩免费视频一区二区| 亚洲精品中文字幕乱码三区| 国产麻豆9l精品三级站| 欧美日产国产精品| 亚洲美女少妇撒尿| 国产成人av电影在线观看| 欧美美女直播网站| 亚洲日本va午夜在线影院| 国产乱码精品一品二品| 欧美精品在欧美一区二区少妇| 中文字幕乱码一区二区免费| 久久99久久久欧美国产| 欧美性感一区二区三区| 亚洲国产精品ⅴa在线观看| 美国毛片一区二区三区| 欧美丝袜丝交足nylons| 自拍偷拍国产精品| 成人三级在线视频| 26uuu色噜噜精品一区| 日本欧美在线看| 欧美久久久久免费| 亚洲电影在线免费观看| 色综合天天综合网国产成人综合天 | 亚洲三级电影网站| 国产麻豆精品95视频| 日韩一级欧美一级| 天天av天天翘天天综合网色鬼国产| 91欧美一区二区| 综合网在线视频| 91女人视频在线观看| 中文在线一区二区| 国产精品一区三区| 日本一区二区在线不卡| 国产成人日日夜夜| 国产精品麻豆99久久久久久| 国产精品123| 国产精品入口麻豆原神| 成人免费看视频| 日本一区二区高清| 成人动漫av在线| 亚洲男同性恋视频| 日本精品一区二区三区高清| 亚洲精品国产第一综合99久久 | 国产精品视频一区二区三区不卡| 国产精品亚洲午夜一区二区三区 | 欧美激情一区二区三区四区| 国产一区二区免费在线| 精品91自产拍在线观看一区| 久久99精品国产麻豆婷婷| 26uuu欧美日本| 成人永久免费视频| 亚洲欧洲日韩av| 欧美日韩视频在线观看一区二区三区| 一区二区三区在线视频观看58| 欧美日韩亚洲另类| 久久国产免费看| 国产精品成人午夜| 欧美色综合天天久久综合精品| 五月婷婷激情综合| 精品国产凹凸成av人导航| 国产成人精品www牛牛影视| 中文字幕一区二区三区乱码在线| 91日韩精品一区| 日韩精品一级中文字幕精品视频免费观看 | 久久久精品欧美丰满| 成人av电影免费在线播放| 一区二区三区日韩在线观看| 9191成人精品久久| 粉嫩av一区二区三区| 亚洲精品国产视频| 精品国产99国产精品| 99久久精品免费观看| 秋霞午夜鲁丝一区二区老狼| 久久精品在这里| 欧美在线免费观看亚洲|