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

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

?? ohci-hub.c

?? host usb 主設備程序 支持sd卡 mouse keyboard 的最單單的驅動程序 gcc編譯
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * OHCI HCD (Host Controller Driver) for USB. * * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at> * (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net> * * This file is licenced under GPL *//*-------------------------------------------------------------------------*//* * OHCI Root Hub ... the nonsharable stuff */#define dbg_port(hc,label,num,value) \	ohci_dbg (hc, \		"%s roothub.portstatus [%d] " \		"= 0x%08x%s%s%s%s%s%s%s%s%s%s%s%s\n", \		label, num, temp, \		(temp & RH_PS_PRSC) ? " PRSC" : "", \		(temp & RH_PS_OCIC) ? " OCIC" : "", \		(temp & RH_PS_PSSC) ? " PSSC" : "", \		(temp & RH_PS_PESC) ? " PESC" : "", \		(temp & RH_PS_CSC) ? " CSC" : "", \		\		(temp & RH_PS_LSDA) ? " LSDA" : "", \		(temp & RH_PS_PPS) ? " PPS" : "", \		(temp & RH_PS_PRS) ? " PRS" : "", \		(temp & RH_PS_POCI) ? " POCI" : "", \		(temp & RH_PS_PSS) ? " PSS" : "", \		\		(temp & RH_PS_PES) ? " PES" : "", \		(temp & RH_PS_CCS) ? " CCS" : "" \		);/*-------------------------------------------------------------------------*//* hcd->hub_irq_enable() */static void ohci_rhsc_enable (struct usb_hcd *hcd){	struct ohci_hcd		*ohci = hcd_to_ohci (hcd);	spin_lock_irq(&ohci->lock);	if (!ohci->autostop)		del_timer(&hcd->rh_timer);	/* Prevent next poll */	ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable);	spin_unlock_irq(&ohci->lock);}#define OHCI_SCHED_ENABLES \	(OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_PLE|OHCI_CTRL_IE)static void dl_done_list (struct ohci_hcd *);static void finish_unlinks (struct ohci_hcd *, u16);#ifdef	CONFIG_PMstatic int ohci_restart(struct ohci_hcd *ohci);static int ohci_rh_suspend (struct ohci_hcd *ohci, int autostop)__releases(ohci->lock)__acquires(ohci->lock){	int			status = 0;	ohci->hc_control = ohci_readl (ohci, &ohci->regs->control);	switch (ohci->hc_control & OHCI_CTRL_HCFS) {	case OHCI_USB_RESUME:		ohci_dbg (ohci, "resume/suspend?\n");		ohci->hc_control &= ~OHCI_CTRL_HCFS;		ohci->hc_control |= OHCI_USB_RESET;		ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);		(void) ohci_readl (ohci, &ohci->regs->control);		/* FALL THROUGH */	case OHCI_USB_RESET:		status = -EBUSY;		ohci_dbg (ohci, "needs reinit!\n");		goto done;	case OHCI_USB_SUSPEND:		if (!ohci->autostop) {			ohci_dbg (ohci, "already suspended\n");			goto done;		}	}	ohci_dbg (ohci, "%s root hub\n",			autostop ? "auto-stop" : "suspend");	/* First stop any processing */	if (!autostop && (ohci->hc_control & OHCI_SCHED_ENABLES)) {		ohci->hc_control &= ~OHCI_SCHED_ENABLES;		ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);		ohci->hc_control = ohci_readl (ohci, &ohci->regs->control);		ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrstatus);		/* sched disables take effect on the next frame,		 * then the last WDH could take 6+ msec		 */		ohci_dbg (ohci, "stopping schedules ...\n");		ohci->autostop = 0;		spin_unlock_irq (&ohci->lock);		msleep (8);		spin_lock_irq (&ohci->lock);	}	dl_done_list (ohci);	finish_unlinks (ohci, ohci_frame_no(ohci));	/* maybe resume can wake root hub */	if (device_may_wakeup(&ohci_to_hcd(ohci)->self.root_hub->dev) ||			autostop)		ohci->hc_control |= OHCI_CTRL_RWE;	else {		ohci_writel (ohci, OHCI_INTR_RHSC, &ohci->regs->intrdisable);		ohci->hc_control &= ~OHCI_CTRL_RWE;	}	/* Suspend hub ... this is the "global (to this bus) suspend" mode,	 * which doesn't imply ports will first be individually suspended.	 */	ohci->hc_control &= ~OHCI_CTRL_HCFS;	ohci->hc_control |= OHCI_USB_SUSPEND;	ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);	(void) ohci_readl (ohci, &ohci->regs->control);	/* no resumes until devices finish suspending */	if (!autostop) {		ohci->next_statechange = jiffies + msecs_to_jiffies (5);		ohci->autostop = 0;	}done:	return status;}static inline struct ed *find_head (struct ed *ed){	/* for bulk and control lists */	while (ed->ed_prev)		ed = ed->ed_prev;	return ed;}/* caller has locked the root hub */static int ohci_rh_resume (struct ohci_hcd *ohci)__releases(ohci->lock)__acquires(ohci->lock){	struct usb_hcd		*hcd = ohci_to_hcd (ohci);	u32			temp, enables;	int			status = -EINPROGRESS;	int			autostopped = ohci->autostop;	ohci->autostop = 0;	ohci->hc_control = ohci_readl (ohci, &ohci->regs->control);	if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) {		/* this can happen after resuming a swsusp snapshot */		if (hcd->state == HC_STATE_RESUMING) {			ohci_dbg (ohci, "BIOS/SMM active, control %03x\n",					ohci->hc_control);			status = -EBUSY;		/* this happens when pmcore resumes HC then root */		} else {			ohci_dbg (ohci, "duplicate resume\n");			status = 0;		}	} else switch (ohci->hc_control & OHCI_CTRL_HCFS) {	case OHCI_USB_SUSPEND:		ohci->hc_control &= ~(OHCI_CTRL_HCFS|OHCI_SCHED_ENABLES);		ohci->hc_control |= OHCI_USB_RESUME;		ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);		(void) ohci_readl (ohci, &ohci->regs->control);		ohci_dbg (ohci, "%s root hub\n",				autostopped ? "auto-start" : "resume");		break;	case OHCI_USB_RESUME:		/* HCFS changes sometime after INTR_RD */		ohci_dbg(ohci, "%swakeup root hub\n",				autostopped ? "auto-" : "");		break;	case OHCI_USB_OPER:		/* this can happen after resuming a swsusp snapshot */		ohci_dbg (ohci, "snapshot resume? reinit\n");		status = -EBUSY;		break;	default:		/* RESET, we lost power */		ohci_dbg (ohci, "lost power\n");		status = -EBUSY;	}	if (status == -EBUSY) {		if (!autostopped) {			spin_unlock_irq (&ohci->lock);			(void) ohci_init (ohci);			status = ohci_restart (ohci);			spin_lock_irq (&ohci->lock);		}		return status;	}	if (status != -EINPROGRESS)		return status;	if (autostopped)		goto skip_resume;	spin_unlock_irq (&ohci->lock);	/* Some controllers (lucent erratum) need extra-long delays */	msleep (20 /* usb 11.5.1.10 */ + 12 /* 32 msec counter */ + 1);	temp = ohci_readl (ohci, &ohci->regs->control);	temp &= OHCI_CTRL_HCFS;	if (temp != OHCI_USB_RESUME) {		ohci_err (ohci, "controller won't resume\n");		spin_lock_irq(&ohci->lock);		return -EBUSY;	}	/* disable old schedule state, reinit from scratch */	ohci_writel (ohci, 0, &ohci->regs->ed_controlhead);	ohci_writel (ohci, 0, &ohci->regs->ed_controlcurrent);	ohci_writel (ohci, 0, &ohci->regs->ed_bulkhead);	ohci_writel (ohci, 0, &ohci->regs->ed_bulkcurrent);	ohci_writel (ohci, 0, &ohci->regs->ed_periodcurrent);	ohci_writel (ohci, (u32) ohci->hcca_dma, &ohci->regs->hcca);	/* Sometimes PCI D3 suspend trashes frame timings ... */	periodic_reinit (ohci);	/* the following code is executed with ohci->lock held and	 * irqs disabled if and only if autostopped is true	 */skip_resume:	/* interrupts might have been disabled */	ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable);	if (ohci->ed_rm_list)		ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrenable);	/* Then re-enable operations */	ohci_writel (ohci, OHCI_USB_OPER, &ohci->regs->control);	(void) ohci_readl (ohci, &ohci->regs->control);	if (!autostopped)		msleep (3);	temp = ohci->hc_control;	temp &= OHCI_CTRL_RWC;	temp |= OHCI_CONTROL_INIT | OHCI_USB_OPER;	ohci->hc_control = temp;	ohci_writel (ohci, temp, &ohci->regs->control);	(void) ohci_readl (ohci, &ohci->regs->control);	/* TRSMRCY */	if (!autostopped) {		msleep (10);		spin_lock_irq (&ohci->lock);	}	/* now ohci->lock is always held and irqs are always disabled */	/* keep it alive for more than ~5x suspend + resume costs */	ohci->next_statechange = jiffies + STATECHANGE_DELAY;	/* maybe turn schedules back on */	enables = 0;	temp = 0;	if (!ohci->ed_rm_list) {		if (ohci->ed_controltail) {			ohci_writel (ohci,					find_head (ohci->ed_controltail)->dma,					&ohci->regs->ed_controlhead);			enables |= OHCI_CTRL_CLE;			temp |= OHCI_CLF;		}		if (ohci->ed_bulktail) {			ohci_writel (ohci, find_head (ohci->ed_bulktail)->dma,				&ohci->regs->ed_bulkhead);			enables |= OHCI_CTRL_BLE;			temp |= OHCI_BLF;		}	}	if (hcd->self.bandwidth_isoc_reqs || hcd->self.bandwidth_int_reqs)		enables |= OHCI_CTRL_PLE|OHCI_CTRL_IE;	if (enables) {		ohci_dbg (ohci, "restarting schedules ... %08x\n", enables);		ohci->hc_control |= enables;		ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);		if (temp)			ohci_writel (ohci, temp, &ohci->regs->cmdstatus);		(void) ohci_readl (ohci, &ohci->regs->control);	}	return 0;}static int ohci_bus_suspend (struct usb_hcd *hcd){	struct ohci_hcd		*ohci = hcd_to_ohci (hcd);	int			rc;	spin_lock_irq (&ohci->lock);	if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)))		rc = -ESHUTDOWN;	else		rc = ohci_rh_suspend (ohci, 0);	spin_unlock_irq (&ohci->lock);	return rc;}static int ohci_bus_resume (struct usb_hcd *hcd){	struct ohci_hcd		*ohci = hcd_to_ohci (hcd);	int			rc;	if (time_before (jiffies, ohci->next_statechange))		msleep(5);	spin_lock_irq (&ohci->lock);	if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)))		rc = -ESHUTDOWN;	else		rc = ohci_rh_resume (ohci);	spin_unlock_irq (&ohci->lock);	/* poll until we know a device is connected or we autostop */	if (rc == 0)		usb_hcd_poll_rh_status(hcd);	return rc;}/* Carry out polling-, autostop-, and autoresume-related state changes */static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,		int any_connected){	int	poll_rh = 1;	switch (ohci->hc_control & OHCI_CTRL_HCFS) {	case OHCI_USB_OPER:		/* keep on polling until we know a device is connected		 * and RHSC is enabled */		if (!ohci->autostop) {			if (any_connected ||					!device_may_wakeup(&ohci_to_hcd(ohci)						->self.root_hub->dev)) {				if (ohci_readl(ohci, &ohci->regs->intrenable) &						OHCI_INTR_RHSC)					poll_rh = 0;			} else {				ohci->autostop = 1;				ohci->next_statechange = jiffies + HZ;			}		/* if no devices have been attached for one second, autostop */		} else {			if (changed || any_connected) {				ohci->autostop = 0;				ohci->next_statechange = jiffies +						STATECHANGE_DELAY;			} else if (time_after_eq(jiffies,						ohci->next_statechange)					&& !ohci->ed_rm_list					&& !(ohci->hc_control &						OHCI_SCHED_ENABLES)) {				ohci_rh_suspend(ohci, 1);			}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美久久一二区| 亚洲国产美国国产综合一区二区| 国产精品乱码一区二三区小蝌蚪| 亚洲国产精品天堂| 成人免费视频免费观看| 日韩视频一区二区三区在线播放| 亚洲人成7777| 成人免费视频国产在线观看| 欧美一级xxx| 亚洲一二三级电影| 99精品视频在线观看| 国产网站一区二区| 久久99国产精品麻豆| 欧美日韩一区二区三区四区| 亚洲视频免费看| 成人动漫在线一区| 欧美电影免费观看高清完整版在线| 亚洲猫色日本管| 丁香六月综合激情| 欧美激情一二三区| 国产精品18久久久久久久久久久久 | 蜜桃91丨九色丨蝌蚪91桃色| 91久久精品一区二区三区| 国产网站一区二区三区| 国产一区二区三区黄视频| 日韩一二三区不卡| 久久电影网站中文字幕| 日韩一区二区三区av| 免费在线成人网| 日韩一区二区三区av| 精品亚洲欧美一区| 精品美女在线播放| 韩国视频一区二区| 久久久久国产精品麻豆| 国产精品一区二区在线观看网站| 精品国一区二区三区| 久久不见久久见中文字幕免费| 7777精品伊人久久久大香线蕉超级流畅 | 欧美精品日日鲁夜夜添| 亚洲mv在线观看| 欧美片网站yy| 日韩一区欧美二区| 日韩精品专区在线影院重磅| 精品亚洲国内自在自线福利| 久久久久久久久伊人| 国产成人丝袜美腿| 亚洲人成人一区二区在线观看| 日本久久一区二区| 午夜久久久影院| 欧美一区二区在线免费播放| 蜜桃传媒麻豆第一区在线观看| 欧美一卡2卡3卡4卡| 裸体在线国模精品偷拍| 欧美国产欧美亚州国产日韩mv天天看完整 | 久久精品久久综合| 日本一区二区三区久久久久久久久不 | 欧美日韩国产小视频在线观看| 三级欧美韩日大片在线看| 26uuu精品一区二区| 99国产精品久久久久久久久久久| 亚洲国产一区二区三区 | 中文字幕制服丝袜一区二区三区| 97精品电影院| 蜜桃av一区二区三区电影| 国产无一区二区| 欧美日韩国产高清一区二区三区 | 免费观看一级特黄欧美大片| 久久亚洲一区二区三区明星换脸| 成人开心网精品视频| 五月激情综合婷婷| 国产性色一区二区| 欧美私人免费视频| 国产精品一二二区| 天天综合色天天综合色h| 欧美精品一区二区三区久久久| 91麻豆文化传媒在线观看| 蜜臀av性久久久久蜜臀aⅴ| 亚洲视频中文字幕| 精品久久久久久最新网址| 日本电影亚洲天堂一区| 国产精品911| 久久er精品视频| 午夜精品一区二区三区电影天堂| 国产欧美日本一区视频| 日韩免费性生活视频播放| 色婷婷精品久久二区二区蜜臂av| 久久超碰97人人做人人爱| 亚洲狠狠爱一区二区三区| 国产精品国产自产拍在线| 欧美变态tickling挠脚心| 欧美日韩一区在线观看| 成人爱爱电影网址| 风流少妇一区二区| 国内成人自拍视频| 免费成人在线观看| 午夜伊人狠狠久久| 一区二区三区四区国产精品| 久久色视频免费观看| 欧美一级久久久| 欧美日韩中字一区| 91丨porny丨户外露出| 国产福利精品一区二区| 激情综合五月天| 日韩精品电影在线| 亚洲成人综合视频| 亚洲成人资源在线| 天堂成人国产精品一区| 亚洲福利视频导航| 午夜伊人狠狠久久| 日韩vs国产vs欧美| 日韩av电影免费观看高清完整版在线观看| 亚洲同性gay激情无套| 欧美国产激情一区二区三区蜜月| 精品国产三级a在线观看| 日韩一区二区三区电影| 日韩一区二区三区观看| 欧美一区日本一区韩国一区| 欧美视频中文字幕| 欧美午夜精品免费| 欧美日韩午夜在线| 精品婷婷伊人一区三区三| 欧洲国内综合视频| 51精品视频一区二区三区| 欧美一级理论性理论a| 91麻豆精品国产自产在线| 欧美成人性福生活免费看| 久久综合网色—综合色88| 中文字幕欧美区| 亚洲日本一区二区| 亚洲国产日日夜夜| 蜜芽一区二区三区| 激情国产一区二区| 国产成人免费在线视频| 色综合中文字幕国产| 亚洲国产aⅴ成人精品无吗| 一区二区三区在线高清| 天天操天天干天天综合网| 免费成人av在线| 国产不卡视频在线观看| av在线不卡网| 成人av午夜电影| 一本到不卡免费一区二区| 91麻豆精品久久久久蜜臀| 精品999久久久| 亚洲美女偷拍久久| 卡一卡二国产精品| 91日韩一区二区三区| 欧美一级理论片| 亚洲视频免费在线| 久久精品国产亚洲高清剧情介绍 | 亚洲视频香蕉人妖| 日韩高清在线观看| 成人小视频在线| 欧美喷潮久久久xxxxx| 久久久噜噜噜久噜久久综合| 亚洲嫩草精品久久| 国精品**一区二区三区在线蜜桃| 99国产麻豆精品| 欧美成人一区二区三区片免费| 亚洲视频在线观看三级| 日本午夜精品一区二区三区电影| 粉嫩蜜臀av国产精品网站| 欧美午夜在线一二页| 国产欧美精品一区二区三区四区| 五月综合激情网| 97久久精品人人做人人爽50路| 欧美一区二区三区视频免费播放 | 丝袜a∨在线一区二区三区不卡| 国产成人超碰人人澡人人澡| 欧美日韩激情在线| 最新成人av在线| 国产一区二区成人久久免费影院| 欧美性猛交xxxx乱大交退制版| 欧美国产精品中文字幕| 紧缚奴在线一区二区三区| 精品视频一区二区不卡| 亚洲欧洲国产专区| 狠狠色丁香久久婷婷综合_中| 欧美午夜精品免费| 亚洲欧美一区二区三区孕妇| 国产一区二区0| 久久综合久久综合亚洲| 美女网站视频久久| 在线播放中文一区| 亚洲一区二区视频| 波多野结衣在线一区| 国产三级久久久| 国产一二精品视频| 久久久亚洲午夜电影| 韩国v欧美v亚洲v日本v| 欧美一级片免费看| 美女mm1313爽爽久久久蜜臀| 3d动漫精品啪啪1区2区免费| 一个色在线综合| 欧美婷婷六月丁香综合色| 一区二区三区中文字幕电影| 99re66热这里只有精品3直播| 中文字幕在线不卡一区二区三区| 成人亚洲一区二区一| 国产午夜一区二区三区|