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

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

?? usbd-bus.c

?? Linux2.4.20針對三星公司的s3c2440內核基礎上的一些設備驅動代碼
?? 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> * * Changes copyright (c) 2003 MontaVista Software, Inc. * * 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)int dbgflg_usbdbi_init;EXPORT_SYMBOL(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. */EXPORT_SYMBOL(usbd_fill_rcv);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);                // XXX should we do this here?                usbd_flush_rcv(endpoint);		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. */EXPORT_SYMBOL(usbd_flush_rcv);void usbd_flush_rcv (struct usb_endpoint_instance *endpoint){	struct urb *rcv_urb = NULL;	unsigned long flags;        dbg_init (1, "endpoint: %d", endpoint->endpoint_address);	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. */EXPORT_SYMBOL(usbd_flush_tx);void usbd_flush_tx (struct usb_endpoint_instance *endpoint){	struct 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. */EXPORT_SYMBOL(usbd_flush_ep);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;        if ((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 urb *urb;                                while ((urb = first_urb_detached (&endpoint->rcv))) {                                        if (!urb->function_instance ||                                                         !urb->function_instance->function_driver->ops->recv_urb)                                         {                                                dbg_init (0, "usbd_device_bh: no recv_urb function");                                                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 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)                                           )                                        {                                                dbg_init (0, "usbd_device_bh: no urb_sent function");                                                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                if (device->status == USBD_CLOSING) {                        device->device_bh.data = NULL;                }        }        else {                dbg_init (0, "usbd_device_bh: device NULL");        }}EXPORT_SYMBOL(usbd_device_bh);/** * usbd_function_bh -  * @data: * * Bottom half handler to process events for functions. */void usbd_function_bh (void *data){	// Process control (ep0) events for the function layer.	struct usb_device_instance *device;        if ((device = data)) {		// Pick up endpoint 0.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产很黄免费观看久久| 天天亚洲美女在线视频| 精品美女一区二区三区| 欧美肥大bbwbbw高潮| 欧美日韩国产首页在线观看| 欧美日韩一区二区在线观看视频| 在线中文字幕一区二区| 欧美老肥妇做.爰bbww| 欧美年轻男男videosbes| 欧美日本免费一区二区三区| 8x福利精品第一导航| 日韩一区二区精品在线观看| 欧美电影免费观看高清完整版在 | 欧美不卡123| 欧美精品一区二区三区很污很色的| 精品女同一区二区| 国产免费成人在线视频| 国产精品久久三| 亚洲精品国产无套在线观| 亚洲影视在线观看| 日本欧美一区二区| 国产激情一区二区三区| 色婷婷激情综合| 91麻豆精品国产91久久久资源速度 | 91精彩视频在线| 欧美一区在线视频| 久久精品免费在线观看| 亚洲精品第一国产综合野| 午夜成人免费视频| 成人亚洲精品久久久久软件| 欧美中文字幕一区二区三区| 日韩午夜三级在线| 亚洲欧洲在线观看av| 免费成人在线视频观看| 国产不卡一区视频| 欧美精品在线观看播放| 国产日韩影视精品| 香蕉影视欧美成人| 北岛玲一区二区三区四区| 欧美午夜影院一区| 日本一区二区成人| 五月天欧美精品| 99免费精品视频| 欧美精品一区二区三区在线| 一区二区三区成人在线视频| 国产+成+人+亚洲欧洲自线| 欧美精品三级在线观看| 中文字幕日韩av资源站| 久久99精品久久久久婷婷| 91成人在线免费观看| 国产精品国产三级国产普通话蜜臀| 午夜精品爽啪视频| 在线精品亚洲一区二区不卡| 中文成人av在线| 国内外精品视频| 欧美夫妻性生活| 亚洲国产视频a| 日本精品一级二级| 亚洲日本护士毛茸茸| 成人黄色网址在线观看| 久久免费国产精品| 全国精品久久少妇| 欧美日韩的一区二区| 一区二区三区精品视频| 一本一道久久a久久精品综合蜜臀| 久久精品视频在线看| 久久aⅴ国产欧美74aaa| 欧美精品日韩一区| 图片区小说区区亚洲影院| 欧美视频在线不卡| 午夜国产不卡在线观看视频| 欧美高清视频在线高清观看mv色露露十八| 日韩一区中文字幕| 99riav久久精品riav| 亚洲日穴在线视频| 在线视频一区二区三区| 亚洲国产一区二区在线播放| 欧美日韩第一区日日骚| 人人狠狠综合久久亚洲| 精品国产露脸精彩对白| 国产精品一线二线三线| 中文av一区二区| 在线一区二区三区做爰视频网站| 一区二区三区四区乱视频| 欧美日韩一区国产| 另类人妖一区二区av| 久久久久久久久久电影| 成人av资源在线| 一级中文字幕一区二区| 欧美日本韩国一区二区三区视频 | 日韩国产欧美在线视频| 精品少妇一区二区三区日产乱码| 国产一区二区女| 亚洲色图视频网| 欧美精品18+| 国产91精品欧美| 亚洲国产一二三| 2020国产精品自拍| 成人app软件下载大全免费| 一区二区三区在线观看视频| 日韩一区二区三区视频在线观看| 激情久久五月天| 中文字幕一区二区三区在线播放 | 精品三级av在线| 成人动漫一区二区在线| 亚洲视频在线观看一区| 在线播放/欧美激情| 国产成人一级电影| 亚洲一区在线观看网站| 精品国产制服丝袜高跟| 在线亚洲人成电影网站色www| 日本三级亚洲精品| 国产精品久久久久9999吃药| 欧美肥妇bbw| 97久久精品人人爽人人爽蜜臀| 丝袜亚洲另类欧美| 中文字幕一区免费在线观看| 日韩久久久久久| 在线免费观看成人短视频| 久久精品99国产精品| 亚洲日本一区二区三区| 亚洲精品一区二区三区四区高清| 色综合久久综合网欧美综合网| 捆绑调教美女网站视频一区| 亚洲精品国产精华液| 国产亚洲欧洲997久久综合| 欧美精品丝袜久久久中文字幕| 成人免费视频播放| 久久不见久久见免费视频7| 午夜久久久影院| 亚洲精品大片www| 国产精品热久久久久夜色精品三区| 这里只有精品视频在线观看| 成人aa视频在线观看| 国产成人福利片| 韩国av一区二区三区| 久久精品国内一区二区三区| 五月激情综合婷婷| 亚洲一区二三区| 一区二区三区在线影院| 国产精品久久久久久福利一牛影视 | 自拍偷在线精品自拍偷无码专区 | 一本在线高清不卡dvd| 成人免费看片app下载| 国产成人亚洲综合a∨猫咪| 久久99久久久久久久久久久| 亚洲国产中文字幕在线视频综合| 中文字幕乱码日本亚洲一区二区| 精品成人一区二区三区四区| 欧美成人精品3d动漫h| 日韩视频在线观看一区二区| 欧美一级在线观看| 欧美一区二区三区小说| 日韩欧美色电影| 日韩欧美国产电影| 久久综合久久久久88| 久久久精品黄色| 国产欧美日韩卡一| 中文字幕亚洲综合久久菠萝蜜| 国产精品美日韩| 亚洲精品日韩一| 亚洲一区视频在线| 日本v片在线高清不卡在线观看| 首页国产丝袜综合| 久久国产福利国产秒拍| 国产老女人精品毛片久久| 成人久久久精品乱码一区二区三区| 国产宾馆实践打屁股91| 91年精品国产| 欧美久久一二区| 久久久99久久精品欧美| 国产精品国产成人国产三级| 亚洲综合精品久久| 日本视频一区二区三区| 国产福利不卡视频| 色婷婷激情综合| 91精品国产高清一区二区三区 | 7878成人国产在线观看| 久久综合九色欧美综合狠狠| 国产精品国产三级国产有无不卡 | 久久久久国产成人精品亚洲午夜| 国产精品美女视频| 午夜欧美在线一二页| 国产精品538一区二区在线| 色综合久久久网| 久久综合色婷婷| 一区二区三区在线视频播放| 国产在线日韩欧美| 在线观看日韩电影| 久久亚洲影视婷婷| 亚洲伊人色欲综合网| 韩国女主播成人在线| 在线亚洲人成电影网站色www| 精品国产免费久久| 亚洲最色的网站| 国产一区二区三区在线观看免费视频 | 欧美最猛黑人xxxxx猛交| 日韩欧美激情四射| 亚洲最色的网站| 99v久久综合狠狠综合久久|