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

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

?? ohci-hcd.c

?? usb driver for 2.6.17
?? C
?? 第 1 頁 / 共 2 頁
字號:
		temp = 500;	/* arbitrary: five seconds */		ohci_writel (ohci, OHCI_INTR_OC, &ohci->regs->intrenable);		ohci_writel (ohci, OHCI_OCR, &ohci->regs->cmdstatus);		while (ohci_readl (ohci, &ohci->regs->control) & OHCI_CTRL_IR) {			msleep (10);			if (--temp == 0) {				ohci_err (ohci, "USB HC takeover failed!"					"  (BIOS/SMM bug)\n");				return -EBUSY;			}		}		ohci_usb_reset (ohci);	}#endif	/* Disable HC interrupts */	ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);	/* flush the writes, and save key bits like RWC */	if (ohci_readl (ohci, &ohci->regs->control) & OHCI_CTRL_RWC)		ohci->hc_control |= OHCI_CTRL_RWC;	/* Read the number of ports unless overridden */	if (ohci->num_ports == 0)		ohci->num_ports = roothub_a(ohci) & RH_A_NDP;	if (ohci->hcca)		return 0;	ohci->hcca = dma_alloc_coherent (hcd->self.controller,			sizeof *ohci->hcca, &ohci->hcca_dma, 0);	if (!ohci->hcca)		return -ENOMEM;	if ((ret = ohci_mem_init (ohci)) < 0)		ohci_stop (hcd);	else {		register_reboot_notifier (&ohci->reboot_notifier);		create_debug_files (ohci);	}	return ret;}/*-------------------------------------------------------------------------*//* Start an OHCI controller, set the BUS operational * resets USB and controller * enable interrupts  */static int ohci_run (struct ohci_hcd *ohci){  	u32			mask, temp;	int			first = ohci->fminterval == 0;	struct usb_hcd		*hcd = ohci_to_hcd(ohci);	disable (ohci);	/* boot firmware should have set this up (5.1.1.3.1) */	if (first) {		temp = ohci_readl (ohci, &ohci->regs->fminterval);		ohci->fminterval = temp & 0x3fff;		if (ohci->fminterval != FI)			ohci_dbg (ohci, "fminterval delta %d\n",				ohci->fminterval - FI);		ohci->fminterval |= FSMP (ohci->fminterval) << 16;		/* also: power/overcurrent flags in roothub.a */	}  	/* Reset USB nearly "by the book".  RemoteWakeupConnected was	 * saved if boot firmware (BIOS/SMM/...) told us it's connected,	 * or if bus glue did the same (e.g. for PCI add-in cards with	 * PCI PM support).	 */	ohci_dbg (ohci, "resetting from state '%s', control = 0x%x\n",			hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS),			ohci_readl (ohci, &ohci->regs->control));	if ((ohci->hc_control & OHCI_CTRL_RWC) != 0			&& !device_may_wakeup(hcd->self.controller))		device_init_wakeup(hcd->self.controller, 1);	switch (ohci->hc_control & OHCI_CTRL_HCFS) {	case OHCI_USB_OPER:		temp = 0;		break;	case OHCI_USB_SUSPEND:	case OHCI_USB_RESUME:		ohci->hc_control &= OHCI_CTRL_RWC;		ohci->hc_control |= OHCI_USB_RESUME;		temp = 10 /* msec wait */;		break;	// case OHCI_USB_RESET:	default:		ohci->hc_control &= OHCI_CTRL_RWC;		ohci->hc_control |= OHCI_USB_RESET;		temp = 50 /* msec wait */;		break;	}	ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);	// flush the writes	(void) ohci_readl (ohci, &ohci->regs->control);	msleep(temp);	temp = roothub_a (ohci);	if (!(temp & RH_A_NPS)) {		/* power down each port */		for (temp = 0; temp < ohci->num_ports; temp++)			ohci_writel (ohci, RH_PS_LSDA,				&ohci->regs->roothub.portstatus [temp]);	}	// flush those writes	(void) ohci_readl (ohci, &ohci->regs->control);	memset (ohci->hcca, 0, sizeof (struct ohci_hcca));	/* 2msec timelimit here means no irqs/preempt */	spin_lock_irq (&ohci->lock);retry:	/* HC Reset requires max 10 us delay */	ohci_writel (ohci, OHCI_HCR,  &ohci->regs->cmdstatus);	temp = 30;	/* ... allow extra time */	while ((ohci_readl (ohci, &ohci->regs->cmdstatus) & OHCI_HCR) != 0) {		if (--temp == 0) {			spin_unlock_irq (&ohci->lock);			ohci_err (ohci, "USB HC reset timed out!\n");			return -1;		}		udelay (1);	}	/* now we're in the SUSPEND state ... must go OPERATIONAL	 * within 2msec else HC enters RESUME	 *	 * ... but some hardware won't init fmInterval "by the book"	 * (SiS, OPTi ...), so reset again instead.  SiS doesn't need	 * this if we write fmInterval after we're OPERATIONAL.	 * Unclear about ALi, ServerWorks, and others ... this could	 * easily be a longstanding bug in chip init on Linux.	 */	if (ohci->flags & OHCI_QUIRK_INITRESET) {		ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);		// flush those writes		(void) ohci_readl (ohci, &ohci->regs->control);	}	/* Tell the controller where the control and bulk lists are	 * The lists are empty now. */	ohci_writel (ohci, 0, &ohci->regs->ed_controlhead);	ohci_writel (ohci, 0, &ohci->regs->ed_bulkhead);	/* a reset clears this */	ohci_writel (ohci, (u32) ohci->hcca_dma, &ohci->regs->hcca);	periodic_reinit (ohci);	/* some OHCI implementations are finicky about how they init.	 * bogus values here mean not even enumeration could work.	 */	if ((ohci_readl (ohci, &ohci->regs->fminterval) & 0x3fff0000) == 0			|| !ohci_readl (ohci, &ohci->regs->periodicstart)) {		if (!(ohci->flags & OHCI_QUIRK_INITRESET)) {			ohci->flags |= OHCI_QUIRK_INITRESET;			ohci_dbg (ohci, "enabling initreset quirk\n");			goto retry;		}		spin_unlock_irq (&ohci->lock);		ohci_err (ohci, "init err (%08x %04x)\n",			ohci_readl (ohci, &ohci->regs->fminterval),			ohci_readl (ohci, &ohci->regs->periodicstart));		return -EOVERFLOW;	} 	/* start controller operations */	ohci->hc_control &= OHCI_CTRL_RWC; 	ohci->hc_control |= OHCI_CONTROL_INIT | OHCI_USB_OPER; 	ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);	hcd->state = HC_STATE_RUNNING;	/* wake on ConnectStatusChange, matching external hubs */	ohci_writel (ohci, RH_HS_DRWE, &ohci->regs->roothub.status);	/* Choose the interrupts we care about now, others later on demand */	mask = OHCI_INTR_INIT;	ohci_writel (ohci, mask, &ohci->regs->intrstatus);	ohci_writel (ohci, mask, &ohci->regs->intrenable);	/* handle root hub init quirks ... */	temp = roothub_a (ohci);	temp &= ~(RH_A_PSM | RH_A_OCPM);	if (ohci->flags & OHCI_QUIRK_SUPERIO) {		/* NSC 87560 and maybe others */		temp |= RH_A_NOCP;		temp &= ~(RH_A_POTPGT | RH_A_NPS);		ohci_writel (ohci, temp, &ohci->regs->roothub.a);	} else if ((ohci->flags & OHCI_QUIRK_AMD756) || distrust_firmware) {		/* hub power always on; required for AMD-756 and some		 * Mac platforms.  ganged overcurrent reporting, if any.		 */		temp |= RH_A_NPS;		ohci_writel (ohci, temp, &ohci->regs->roothub.a);	}	ohci_writel (ohci, RH_HS_LPSC, &ohci->regs->roothub.status);	ohci_writel (ohci, (temp & RH_A_NPS) ? 0 : RH_B_PPCM,						&ohci->regs->roothub.b);	// flush those writes	(void) ohci_readl (ohci, &ohci->regs->control);	spin_unlock_irq (&ohci->lock);	// POTPGT delay is bits 24-31, in 2 ms units.	mdelay ((temp >> 23) & 0x1fe);	hcd->state = HC_STATE_RUNNING;	ohci_dump (ohci, 1);	return 0;}/*-------------------------------------------------------------------------*//* an interrupt happens */static irqreturn_t ohci_irq (struct usb_hcd *hcd, struct pt_regs *ptregs){	struct ohci_hcd		*ohci = hcd_to_ohci (hcd);	struct ohci_regs __iomem *regs = ohci->regs; 	int			ints; 	/* we can eliminate a (slow) ohci_readl()	   if _only_ WDH caused this irq */	if ((ohci->hcca->done_head != 0)			&& ! (hc32_to_cpup (ohci, &ohci->hcca->done_head)				& 0x01)) {		ints =  OHCI_INTR_WDH;	/* cardbus/... hardware gone before remove() */	} else if ((ints = ohci_readl (ohci, &regs->intrstatus)) == ~(u32)0) {		disable (ohci);		ohci_dbg (ohci, "device removed!\n");		return IRQ_HANDLED;	/* interrupt for some other device? */	} else if ((ints &= ohci_readl (ohci, &regs->intrenable)) == 0) {		return IRQ_NOTMINE;	} 	if (ints & OHCI_INTR_UE) {		disable (ohci);		ohci_err (ohci, "OHCI Unrecoverable Error, disabled\n");		// e.g. due to PCI Master/Target Abort		ohci_dump (ohci, 1);		ohci_usb_reset (ohci);	}	if (ints & OHCI_INTR_RD) {		ohci_vdbg (ohci, "resume detect\n");		ohci_writel (ohci, OHCI_INTR_RD, &regs->intrstatus);		if (hcd->state != HC_STATE_QUIESCING)			usb_hcd_resume_root_hub(hcd);	}	if (ints & OHCI_INTR_WDH) {		if (HC_IS_RUNNING(hcd->state))			ohci_writel (ohci, OHCI_INTR_WDH, &regs->intrdisable);			spin_lock (&ohci->lock);		dl_done_list (ohci, ptregs);		spin_unlock (&ohci->lock);		if (HC_IS_RUNNING(hcd->state))			ohci_writel (ohci, OHCI_INTR_WDH, &regs->intrenable); 	}  	/* could track INTR_SO to reduce available PCI/... bandwidth */	/* handle any pending URB/ED unlinks, leaving INTR_SF enabled	 * when there's still unlinking to be done (next frame).	 */	spin_lock (&ohci->lock);	if (ohci->ed_rm_list)		finish_unlinks (ohci, ohci_frame_no(ohci), ptregs);	if ((ints & OHCI_INTR_SF) != 0 && !ohci->ed_rm_list			&& HC_IS_RUNNING(hcd->state))		ohci_writel (ohci, OHCI_INTR_SF, &regs->intrdisable);		spin_unlock (&ohci->lock);	if (HC_IS_RUNNING(hcd->state)) {		ohci_writel (ohci, ints, &regs->intrstatus);		ohci_writel (ohci, OHCI_INTR_MIE, &regs->intrenable);			// flush those writes		(void) ohci_readl (ohci, &ohci->regs->control);	}	return IRQ_HANDLED;}/*-------------------------------------------------------------------------*/static void ohci_stop (struct usb_hcd *hcd){		struct ohci_hcd		*ohci = hcd_to_ohci (hcd);	ohci_dbg (ohci, "stop %s controller (state 0x%02x)\n",		hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS),		hcd->state);	ohci_dump (ohci, 1);	flush_scheduled_work();	ohci_usb_reset (ohci);	ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);		remove_debug_files (ohci);	unregister_reboot_notifier (&ohci->reboot_notifier);	ohci_mem_cleanup (ohci);	if (ohci->hcca) {		dma_free_coherent (hcd->self.controller, 				sizeof *ohci->hcca, 				ohci->hcca, ohci->hcca_dma);		ohci->hcca = NULL;		ohci->hcca_dma = 0;	}}/*-------------------------------------------------------------------------*//* must not be called from interrupt context */#ifdef	CONFIG_PMstatic int ohci_restart (struct ohci_hcd *ohci){	int temp;	int i;	struct urb_priv *priv;	/* mark any devices gone, so they do nothing till khubd disconnects.	 * recycle any "live" eds/tds (and urbs) right away.	 * later, khubd disconnect processing will recycle the other state,	 * (either as disconnect/reconnect, or maybe someday as a reset).	 */ 	spin_lock_irq(&ohci->lock);	disable (ohci);	usb_root_hub_lost_power(ohci_to_hcd(ohci)->self.root_hub);	if (!list_empty (&ohci->pending))		ohci_dbg(ohci, "abort schedule...\n");	list_for_each_entry (priv, &ohci->pending, pending) {		struct urb	*urb = priv->td[0]->urb;		struct ed	*ed = priv->ed;		switch (ed->state) {		case ED_OPER:			ed->state = ED_UNLINK;			ed->hwINFO |= cpu_to_hc32(ohci, ED_DEQUEUE);			ed_deschedule (ohci, ed);			ed->ed_next = ohci->ed_rm_list;			ed->ed_prev = NULL;			ohci->ed_rm_list = ed;			/* FALLTHROUGH */		case ED_UNLINK:			break;		default:			ohci_dbg(ohci, "bogus ed %p state %d\n",					ed, ed->state);		}		spin_lock (&urb->lock);		urb->status = -ESHUTDOWN;		spin_unlock (&urb->lock);	}	finish_unlinks (ohci, 0, NULL);	spin_unlock_irq(&ohci->lock);	/* paranoia, in case that didn't work: */	/* empty the interrupt branches */	for (i = 0; i < NUM_INTS; i++) ohci->load [i] = 0;	for (i = 0; i < NUM_INTS; i++) ohci->hcca->int_table [i] = 0;		/* no EDs to remove */	ohci->ed_rm_list = NULL;	/* empty control and bulk lists */	 	ohci->ed_controltail = NULL;	ohci->ed_bulktail    = NULL;	if ((temp = ohci_run (ohci)) < 0) {		ohci_err (ohci, "can't restart, %d\n", temp);		return temp;	} else {		/* here we "know" root ports should always stay powered,		 * and that if we try to turn them back on the root hub		 * will respond to CSC processing.		 */		i = ohci->num_ports;		while (i--)			ohci_writel (ohci, RH_PS_PSS,				&ohci->regs->roothub.portstatus [i]);		ohci_dbg (ohci, "restart complete\n");	}	return 0;}#endif/*-------------------------------------------------------------------------*/#define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESCMODULE_AUTHOR (DRIVER_AUTHOR);MODULE_DESCRIPTION (DRIVER_INFO);MODULE_LICENSE ("GPL");#ifdef CONFIG_PCI#include "ohci-pci.c"#endif#ifdef CONFIG_SA1111#include "ohci-sa1111.c"#endif#ifdef CONFIG_ARCH_S3C2410#include "ohci-s3c2410.c"#endif#ifdef CONFIG_ARCH_OMAP#include "ohci-omap.c"#endif#ifdef CONFIG_ARCH_LH7A404#include "ohci-lh7a404.c"#endif#ifdef CONFIG_PXA27x#include "ohci-pxa27x.c"#endif#ifdef CONFIG_SOC_AU1X00#include "ohci-au1xxx.c"#endif#ifdef CONFIG_SOC_PNX8550#include "ohci-pnx8550.c"#endif#ifdef CONFIG_USB_OHCI_HCD_PPC_SOC#include "ohci-ppc-soc.c"#endif#ifdef CONFIG_ARCH_AT91RM9200#include "ohci-at91.c"#endif#if !(defined(CONFIG_PCI) \      || defined(CONFIG_SA1111) \      || defined(CONFIG_ARCH_S3C2410) \      || defined(CONFIG_ARCH_OMAP) \      || defined (CONFIG_ARCH_LH7A404) \      || defined (CONFIG_PXA27x) \      || defined (CONFIG_SOC_AU1X00) \      || defined (CONFIG_USB_OHCI_HCD_PPC_SOC) \      || defined (CONFIG_ARCH_AT91RM9200) \      || defined (CONFIG_SOC_PNX8550) \	)#error "missing bus glue for ohci-hcd"#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合久久久久久久久| 日本强好片久久久久久aaa| 国产精品1024久久| 久久久久久久久久看片| 激情五月播播久久久精品| 精品福利在线导航| 国产伦理精品不卡| 亚洲国产精品国自产拍av| 日韩欧美一级精品久久| 精品一区二区免费在线观看| 久久精品综合网| 99re这里只有精品6| 亚洲成在线观看| 欧美成人免费网站| 成人一区二区三区| 亚洲欧美成人一区二区三区| 欧美日韩国产一级片| 国产一区二区美女诱惑| 国产精品毛片高清在线完整版| 91首页免费视频| 日本91福利区| 国产精品欧美久久久久无广告| 欧美在线免费视屏| 国产一区欧美日韩| 亚洲最色的网站| 久久先锋资源网| 欧美午夜电影一区| 国产iv一区二区三区| 亚洲第一久久影院| 国产欧美一区二区精品秋霞影院| 91亚洲国产成人精品一区二区三 | 国产成人精品一区二区三区四区 | 一卡二卡三卡日韩欧美| 日韩免费观看高清完整版| av午夜精品一区二区三区| 日日摸夜夜添夜夜添国产精品| 久久久精品欧美丰满| 欧美嫩在线观看| 成人高清视频在线观看| 日本在线不卡一区| 国产精品乱子久久久久| 91精品国产麻豆国产自产在线 | 欧美人妇做爰xxxⅹ性高电影| 高清视频一区二区| 日本特黄久久久高潮| 国产精品美女一区二区在线观看| 欧美高清激情brazzers| 99久久精品国产观看| 国产一区二区精品在线观看| 亚洲成人动漫在线观看| 国产精品久久福利| 日产国产欧美视频一区精品| 亚洲美女精品一区| 国产三区在线成人av| 日韩一区二区在线播放| 在线观看欧美黄色| 97久久久精品综合88久久| 国产成人综合亚洲网站| 日本午夜一本久久久综合| 一区二区三区在线免费观看| 中文字幕一区二区不卡 | 欧美日韩视频在线观看一区二区三区| 国产成人综合亚洲91猫咪| 久久精品国产成人一区二区三区| 亚洲国产精品麻豆| 亚洲综合成人网| 亚洲精品大片www| 亚洲色图都市小说| 亚洲色图欧洲色图| 亚洲欧美aⅴ...| 国产精品福利一区二区| 国产精品白丝在线| 国产精品美女久久久久久久久| 精品国产一区二区三区av性色| 91精品国产91综合久久蜜臀| 777午夜精品视频在线播放| 欧美日韩在线播放三区| 欧美日韩国产在线播放网站| 欧美日韩精品欧美日韩精品一| 欧美狂野另类xxxxoooo| 欧美老年两性高潮| 日韩一区二区三区免费观看| 日韩免费观看高清完整版| 欧美mv日韩mv国产网站app| 亚洲精品一区二区三区香蕉| 精品免费视频一区二区| 久久久国产综合精品女国产盗摄| 国产人成亚洲第一网站在线播放| 国产精品久久99| 亚洲一区二区欧美激情| 日本伊人午夜精品| 国产精品一区二区不卡| 99久久久无码国产精品| 欧美色综合天天久久综合精品| 欧美精品黑人性xxxx| 精品欧美乱码久久久久久1区2区 | 欧美视频在线一区| 欧美一二三四区在线| 国产色91在线| 夜夜精品视频一区二区| 免费观看在线综合| 国产成人丝袜美腿| 欧美在线不卡一区| 91精品视频网| 国产日韩欧美麻豆| 亚洲一区二区三区免费视频| 日本aⅴ免费视频一区二区三区| 国产91清纯白嫩初高中在线观看| 欧美国产成人精品| 亚洲免费伊人电影| 蜜臀av性久久久久蜜臀aⅴ流畅 | 97久久超碰国产精品电影| 欧美日韩一区二区不卡| 精品久久久久久久久久久院品网 | 精品久久国产老人久久综合| 欧美精彩视频一区二区三区| 亚洲高清中文字幕| 国产在线精品一区二区三区不卡| 91在线观看免费视频| 日韩美一区二区三区| 亚洲欧美电影一区二区| 国产中文字幕精品| 在线视频欧美精品| 久久精品亚洲国产奇米99| 亚洲电影一级片| 国产成人精品一区二| 欧美一区二区福利在线| 亚洲免费观看高清| 国产呦精品一区二区三区网站| 色婷婷精品大视频在线蜜桃视频 | 国产精品456| 911精品产国品一二三产区| 国产精品成人在线观看| 毛片不卡一区二区| 欧洲人成人精品| 欧美国产激情一区二区三区蜜月| 欧美a级理论片| 欧美三区在线视频| 亚洲欧美日韩一区二区| 国产综合色在线| 日韩一级黄色片| 亚洲成人免费av| 欧美三级日韩在线| 国产精品久久久久久一区二区三区| 久久精品国产77777蜜臀| 欧美日韩在线播放三区四区| 亚洲美女屁股眼交| 99久久er热在这里只有精品15| 久久久久久久免费视频了| 久久精品国产精品青草| 欧美一级艳片视频免费观看| 亚洲成人一区二区| 在线精品视频免费观看| 亚洲女女做受ⅹxx高潮| 成人网男人的天堂| 久久一夜天堂av一区二区三区 | 26uuu亚洲综合色欧美| 日韩高清一级片| 欧美日韩一区久久| 亚洲一二三四在线观看| 色噜噜狠狠成人网p站| 亚洲欧洲国产日韩| 久久久av毛片精品| 国产一区二区三区在线观看精品 | 国产无一区二区| 国产成人啪免费观看软件| 国产视频不卡一区| 成人av在线影院| 国产精品成人网| 一本色道**综合亚洲精品蜜桃冫| 亚洲三级免费电影| 91久久奴性调教| 肉色丝袜一区二区| 欧美一区二区三区在线电影| 麻豆国产欧美日韩综合精品二区 | 99精品欧美一区| 亚洲乱码国产乱码精品精98午夜| 91在线云播放| 亚洲最新视频在线观看| 91精品一区二区三区久久久久久| 蜜臀99久久精品久久久久久软件 | 国产精品日产欧美久久久久| 成人精品亚洲人成在线| 伊人婷婷欧美激情| 欧美日韩高清在线| 狠狠色丁香九九婷婷综合五月| 久久一夜天堂av一区二区三区| 波多野结衣精品在线| 亚洲午夜久久久久| 精品美女在线观看| 成人精品高清在线| 亚洲国产综合人成综合网站| 日韩色在线观看| 丰满白嫩尤物一区二区| 一区二区在线电影| 欧美日本一区二区在线观看| 国产麻豆精品95视频| 亚洲女厕所小便bbb| 日韩精品一区二区三区四区| 99久久免费视频.com|