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

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

?? ohci-q.c

?? host usb 主設(shè)備程序 支持sd卡 mouse keyboard 的最單單的驅(qū)動(dòng)程序 gcc編譯
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
/* * OHCI HCD (Host Controller Driver) for USB. * * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at> * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net> * * This file is licenced under the GPL. */#include <linux/irq.h>static void urb_free_priv (struct ohci_hcd *hc, urb_priv_t *urb_priv){	int		last = urb_priv->length - 1;	if (last >= 0) {		int		i;		struct td	*td;		for (i = 0; i <= last; i++) {			td = urb_priv->td [i];			if (td)				td_free (hc, td);		}	}	list_del (&urb_priv->pending);	kfree (urb_priv);}/*-------------------------------------------------------------------------*//* * URB goes back to driver, and isn't reissued. * It's completely gone from HC data structures. * PRECONDITION:  ohci lock held, irqs blocked. */static voidfinish_urb (struct ohci_hcd *ohci, struct urb *urb)__releases(ohci->lock)__acquires(ohci->lock){	// ASSERT (urb->hcpriv != 0);	urb_free_priv (ohci, urb->hcpriv);	urb->hcpriv = NULL;	spin_lock (&urb->lock);	if (likely (urb->status == -EINPROGRESS))		urb->status = 0;	/* report short control reads right even though the data TD always	 * has TD_R set.  (much simpler, but creates the 1-td limit.)	 */	if (unlikely (urb->transfer_flags & URB_SHORT_NOT_OK)			&& unlikely (usb_pipecontrol (urb->pipe))			&& urb->actual_length < urb->transfer_buffer_length			&& usb_pipein (urb->pipe)			&& urb->status == 0) {		urb->status = -EREMOTEIO;	}	spin_unlock (&urb->lock);	switch (usb_pipetype (urb->pipe)) {	case PIPE_ISOCHRONOUS:		ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs--;		break;	case PIPE_INTERRUPT:		ohci_to_hcd(ohci)->self.bandwidth_int_reqs--;		break;	}#ifdef OHCI_VERBOSE_DEBUG	urb_print (urb, "RET", usb_pipeout (urb->pipe));#endif	/* urb->complete() can reenter this HCD */	spin_unlock (&ohci->lock);	usb_hcd_giveback_urb (ohci_to_hcd(ohci), urb);	spin_lock (&ohci->lock);	/* stop periodic dma if it's not needed */	if (ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0			&& ohci_to_hcd(ohci)->self.bandwidth_int_reqs == 0) {		ohci->hc_control &= ~(OHCI_CTRL_PLE|OHCI_CTRL_IE);		ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);	}}/*-------------------------------------------------------------------------* * ED handling functions *-------------------------------------------------------------------------*//* search for the right schedule branch to use for a periodic ed. * does some load balancing; returns the branch, or negative errno. */static int balance (struct ohci_hcd *ohci, int interval, int load){	int	i, branch = -ENOSPC;	/* iso periods can be huge; iso tds specify frame numbers */	if (interval > NUM_INTS)		interval = NUM_INTS;	/* search for the least loaded schedule branch of that period	 * that has enough bandwidth left unreserved.	 */	for (i = 0; i < interval ; i++) {		if (branch < 0 || ohci->load [branch] > ohci->load [i]) {			int	j;			/* usb 1.1 says 90% of one frame */			for (j = i; j < NUM_INTS; j += interval) {				if ((ohci->load [j] + load) > 900)					break;			}			if (j < NUM_INTS)				continue;			branch = i;		}	}	return branch;}/*-------------------------------------------------------------------------*//* both iso and interrupt requests have periods; this routine puts them * into the schedule tree in the apppropriate place.  most iso devices use * 1msec periods, but that's not required. */static void periodic_link (struct ohci_hcd *ohci, struct ed *ed){	unsigned	i;	ohci_vdbg (ohci, "link %sed %p branch %d [%dus.], interval %d\n",		(ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "",		ed, ed->branch, ed->load, ed->interval);	for (i = ed->branch; i < NUM_INTS; i += ed->interval) {		struct ed	**prev = &ohci->periodic [i];		__hc32		*prev_p = &ohci->hcca->int_table [i];		struct ed	*here = *prev;		/* sorting each branch by period (slow before fast)		 * lets us share the faster parts of the tree.		 * (plus maybe: put interrupt eds before iso)		 */		while (here && ed != here) {			if (ed->interval > here->interval)				break;			prev = &here->ed_next;			prev_p = &here->hwNextED;			here = *prev;		}		if (ed != here) {			ed->ed_next = here;			if (here)				ed->hwNextED = *prev_p;			wmb ();			*prev = ed;			*prev_p = cpu_to_hc32(ohci, ed->dma);			wmb();		}		ohci->load [i] += ed->load;	}	ohci_to_hcd(ohci)->self.bandwidth_allocated += ed->load / ed->interval;}/* link an ed into one of the HC chains */static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed){	int	branch;	if (ohci_to_hcd(ohci)->state == HC_STATE_QUIESCING)		return -EAGAIN;	ed->state = ED_OPER;	ed->ed_prev = NULL;	ed->ed_next = NULL;	ed->hwNextED = 0;	wmb ();	/* we care about rm_list when setting CLE/BLE in case the HC was at	 * work on some TD when CLE/BLE was turned off, and isn't quiesced	 * yet.  finish_unlinks() restarts as needed, some upcoming INTR_SF.	 *	 * control and bulk EDs are doubly linked (ed_next, ed_prev), but	 * periodic ones are singly linked (ed_next). that's because the	 * periodic schedule encodes a tree like figure 3-5 in the ohci	 * spec:  each qh can have several "previous" nodes, and the tree	 * doesn't have unused/idle descriptors.	 */	switch (ed->type) {	case PIPE_CONTROL:		if (ohci->ed_controltail == NULL) {			WARN_ON (ohci->hc_control & OHCI_CTRL_CLE);			ohci_writel (ohci, ed->dma,					&ohci->regs->ed_controlhead);		} else {			ohci->ed_controltail->ed_next = ed;			ohci->ed_controltail->hwNextED = cpu_to_hc32 (ohci,								ed->dma);		}		ed->ed_prev = ohci->ed_controltail;		if (!ohci->ed_controltail && !ohci->ed_rm_list) {			wmb();			ohci->hc_control |= OHCI_CTRL_CLE;			ohci_writel (ohci, 0, &ohci->regs->ed_controlcurrent);			ohci_writel (ohci, ohci->hc_control,					&ohci->regs->control);		}		ohci->ed_controltail = ed;		break;	case PIPE_BULK:		if (ohci->ed_bulktail == NULL) {			WARN_ON (ohci->hc_control & OHCI_CTRL_BLE);			ohci_writel (ohci, ed->dma, &ohci->regs->ed_bulkhead);		} else {			ohci->ed_bulktail->ed_next = ed;			ohci->ed_bulktail->hwNextED = cpu_to_hc32 (ohci,								ed->dma);		}		ed->ed_prev = ohci->ed_bulktail;		if (!ohci->ed_bulktail && !ohci->ed_rm_list) {			wmb();			ohci->hc_control |= OHCI_CTRL_BLE;			ohci_writel (ohci, 0, &ohci->regs->ed_bulkcurrent);			ohci_writel (ohci, ohci->hc_control,					&ohci->regs->control);		}		ohci->ed_bulktail = ed;		break;	// case PIPE_INTERRUPT:	// case PIPE_ISOCHRONOUS:	default:		branch = balance (ohci, ed->interval, ed->load);		if (branch < 0) {			ohci_dbg (ohci,				"ERR %d, interval %d msecs, load %d\n",				branch, ed->interval, ed->load);			// FIXME if there are TDs queued, fail them!			return branch;		}		ed->branch = branch;		periodic_link (ohci, ed);	}	/* the HC may not see the schedule updates yet, but if it does	 * then they'll be properly ordered.	 */	return 0;}/*-------------------------------------------------------------------------*//* scan the periodic table to find and unlink this ED */static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed){	int	i;	for (i = ed->branch; i < NUM_INTS; i += ed->interval) {		struct ed	*temp;		struct ed	**prev = &ohci->periodic [i];		__hc32		*prev_p = &ohci->hcca->int_table [i];		while (*prev && (temp = *prev) != ed) {			prev_p = &temp->hwNextED;			prev = &temp->ed_next;		}		if (*prev) {			*prev_p = ed->hwNextED;			*prev = ed->ed_next;		}		ohci->load [i] -= ed->load;	}	ohci_to_hcd(ohci)->self.bandwidth_allocated -= ed->load / ed->interval;	ohci_vdbg (ohci, "unlink %sed %p branch %d [%dus.], interval %d\n",		(ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "",		ed, ed->branch, ed->load, ed->interval);}/* unlink an ed from one of the HC chains. * just the link to the ed is unlinked. * the link from the ed still points to another operational ed or 0 * so the HC can eventually finish the processing of the unlinked ed * (assuming it already started that, which needn't be true). * * ED_UNLINK is a transient state: the HC may still see this ED, but soon * it won't.  ED_SKIP means the HC will finish its current transaction, * but won't start anything new.  The TD queue may still grow; device * drivers don't know about this HCD-internal state. * * When the HC can't see the ED, something changes ED_UNLINK to one of: * *  - ED_OPER: when there's any request queued, the ED gets rescheduled *    immediately.  HC should be working on them. * *  - ED_IDLE:  when there's no TD queue. there's no reason for the HC *    to care about this ED; safe to disable the endpoint. * * When finish_unlinks() runs later, after SOF interrupt, it will often * complete one or more URB unlinks before making that state change. */static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed){	ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP);	wmb ();	ed->state = ED_UNLINK;	/* To deschedule something from the control or bulk list, just	 * clear CLE/BLE and wait.  There's no safe way to scrub out list	 * head/current registers until later, and "later" isn't very	 * tightly specified.  Figure 6-5 and Section 6.4.2.2 show how	 * the HC is reading the ED queues (while we modify them).	 *	 * For now, ed_schedule() is "later".  It might be good paranoia	 * to scrub those registers in finish_unlinks(), in case of bugs	 * that make the HC try to use them.	 */	switch (ed->type) {	case PIPE_CONTROL:		/* remove ED from the HC's list: */		if (ed->ed_prev == NULL) {			if (!ed->hwNextED) {				ohci->hc_control &= ~OHCI_CTRL_CLE;				ohci_writel (ohci, ohci->hc_control,						&ohci->regs->control);				// a ohci_readl() later syncs CLE with the HC			} else				ohci_writel (ohci,					hc32_to_cpup (ohci, &ed->hwNextED),					&ohci->regs->ed_controlhead);		} else {			ed->ed_prev->ed_next = ed->ed_next;			ed->ed_prev->hwNextED = ed->hwNextED;		}		/* remove ED from the HCD's list: */		if (ohci->ed_controltail == ed) {			ohci->ed_controltail = ed->ed_prev;			if (ohci->ed_controltail)				ohci->ed_controltail->ed_next = NULL;		} else if (ed->ed_next) {			ed->ed_next->ed_prev = ed->ed_prev;		}		break;	case PIPE_BULK:		/* remove ED from the HC's list: */		if (ed->ed_prev == NULL) {			if (!ed->hwNextED) {				ohci->hc_control &= ~OHCI_CTRL_BLE;				ohci_writel (ohci, ohci->hc_control,						&ohci->regs->control);				// a ohci_readl() later syncs BLE with the HC			} else				ohci_writel (ohci,					hc32_to_cpup (ohci, &ed->hwNextED),					&ohci->regs->ed_bulkhead);		} else {			ed->ed_prev->ed_next = ed->ed_next;			ed->ed_prev->hwNextED = ed->hwNextED;		}		/* remove ED from the HCD's list: */		if (ohci->ed_bulktail == ed) {			ohci->ed_bulktail = ed->ed_prev;			if (ohci->ed_bulktail)				ohci->ed_bulktail->ed_next = NULL;		} else if (ed->ed_next) {			ed->ed_next->ed_prev = ed->ed_prev;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人丝袜美腿| 奇米精品一区二区三区四区| 国产a级毛片一区| 国产欧美精品一区aⅴ影院| 国产一区二区在线观看视频| 久久亚洲精华国产精华液| 国产成人免费在线观看不卡| 国产欧美一区二区三区在线看蜜臀| 粉嫩一区二区三区在线看| 中文字幕欧美日本乱码一线二线| 91小视频在线免费看| 一区二区三区四区乱视频| 欧美美女直播网站| 奇米色一区二区| 久久免费国产精品| 99精品桃花视频在线观看| 伊人性伊人情综合网| 91麻豆精品91久久久久久清纯| 久久国产精品区| 中文字幕一区二区三区在线播放| 色综合久久99| 蜜臀久久久久久久| 国产精品欧美一级免费| 91福利资源站| 激情五月激情综合网| 中文字幕在线一区| 91精品综合久久久久久| 大白屁股一区二区视频| 亚洲国产综合色| 国产午夜精品理论片a级大结局 | 国产精品久久精品日日| 欧美性xxxxxxxx| 国产馆精品极品| 亚洲高清不卡在线观看| 欧美国产视频在线| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 久久精品久久99精品久久| 亚洲女与黑人做爰| 精品盗摄一区二区三区| 精品视频一区二区三区免费| 国产盗摄精品一区二区三区在线| 亚洲国产精品久久久久秋霞影院 | 国产suv精品一区二区三区| 亚洲国产精品久久艾草纯爱| 国产日韩欧美在线一区| 91麻豆精品国产91久久久久久久久 | 日韩一区二区视频| 91在线视频观看| 国产麻豆精品久久一二三| 亚洲国产wwwccc36天堂| 国产精品成人免费在线| 久久色.com| 欧美一级片在线观看| 色婷婷国产精品| av在线播放一区二区三区| 九一九一国产精品| 日日夜夜精品免费视频| 日韩成人伦理电影在线观看| 亚洲女同女同女同女同女同69| xnxx国产精品| 日韩精品专区在线影院重磅| 欧美日韩一级二级| 91黄色免费版| 色乱码一区二区三区88| 成人三级在线视频| 国产传媒欧美日韩成人| 久久99国内精品| 免费黄网站欧美| 日韩福利电影在线| 丝袜美腿亚洲综合| 亚洲成人av中文| 亚洲高清免费视频| 亚洲国产视频在线| 午夜影院在线观看欧美| 亚洲国产视频一区| 亚洲影院理伦片| 亚洲高清免费一级二级三级| 亚洲成人综合视频| 一区二区三区日韩| 亚洲国产一区在线观看| 一区二区三区.www| 亚洲一卡二卡三卡四卡五卡| 夜夜嗨av一区二区三区网页| 亚洲老妇xxxxxx| 亚洲无人区一区| 日本成人中文字幕| 老司机精品视频在线| 美女www一区二区| 国产综合久久久久影院| 国产成人免费在线观看不卡| 成人教育av在线| 色婷婷综合久久久久中文一区二区| 色综合天天视频在线观看| 在线观看亚洲一区| 日韩一区二区视频在线观看| 久久影院视频免费| 欧美—级在线免费片| 一区二区三区在线播放| 天天操天天色综合| 国产一区二区三区精品欧美日韩一区二区三区 | 日韩欧美一区二区久久婷婷| 亚洲精品一区二区三区蜜桃下载| 国产人成亚洲第一网站在线播放| 中文字幕一区二区三区在线观看| 一区二区三区在线视频免费| 亚瑟在线精品视频| 精品一区二区三区在线播放 | 欧美一级片在线看| 精品在线播放午夜| 岛国一区二区三区| 欧美视频中文字幕| 精品久久一二三区| 亚洲视频网在线直播| 日韩精品免费视频人成| 国产精品一卡二| 欧美午夜不卡视频| 久久久亚洲午夜电影| 亚洲精品乱码久久久久久日本蜜臀| 日日嗨av一区二区三区四区| 成人综合婷婷国产精品久久免费| 91日韩一区二区三区| 日韩精品一区二区三区视频| 日韩美女视频19| 日本美女一区二区| 91亚洲精品久久久蜜桃网站| 欧美成人三级在线| 夜夜嗨av一区二区三区网页| 久久国产乱子精品免费女| 91精品1区2区| 久久综合色综合88| 亚洲电影你懂得| 99久久婷婷国产综合精品| 欧美大片在线观看一区| 亚洲激情在线播放| 国产福利91精品| 日韩欧美亚洲另类制服综合在线| 日韩毛片视频在线看| 国产精品资源在线观看| 91精品国产一区二区三区| 亚洲色图在线看| 国产一二三精品| 日韩欧美三级在线| 亚洲国产成人av好男人在线观看| 成人av在线影院| 久久久噜噜噜久久中文字幕色伊伊 | 欧亚洲嫩模精品一区三区| 国产日韩精品一区二区三区| 久久激情五月婷婷| 欧美日韩亚洲综合| 亚洲精品日日夜夜| 99精品视频在线免费观看| 中文字幕欧美日韩一区| 国产精品性做久久久久久| 日韩欧美一二三四区| 日韩二区三区在线观看| 欧美性受xxxx黑人xyx| 成人免费小视频| 暴力调教一区二区三区| 中文天堂在线一区| 成人午夜精品在线| 国产精品护士白丝一区av| 丁香六月综合激情| 欧美激情在线观看视频免费| 国产馆精品极品| 国产精品无遮挡| 粉嫩嫩av羞羞动漫久久久| 亚洲国产精品精华液ab| 大胆欧美人体老妇| 国产精品麻豆网站| 不卡视频免费播放| 亚洲品质自拍视频网站| 色婷婷综合五月| 一个色妞综合视频在线观看| 欧美丝袜丝交足nylons图片| 亚欧色一区w666天堂| 欧美一区二区成人| 狠狠色丁香婷婷综合久久片| 久久日韩粉嫩一区二区三区| 国产aⅴ精品一区二区三区色成熟| 国产精品家庭影院| 在线视频一区二区三区| 肉丝袜脚交视频一区二区| 8v天堂国产在线一区二区| 麻豆freexxxx性91精品| 国产视频一区在线播放| 本田岬高潮一区二区三区| 亚洲人成网站色在线观看| 在线观看一区二区精品视频| 日韩二区在线观看| 久久久午夜精品| 91丨九色丨尤物| 亚洲aaa精品| 精品国产乱码久久久久久夜甘婷婷| 国产+成+人+亚洲欧洲自线| 一区二区中文视频| 欧美男人的天堂一二区| 国产在线播放一区三区四| 国产精品久久久久久亚洲毛片| 在线影视一区二区三区| 久久99精品久久久久|