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

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

?? ehci-pci.c

?? host usb 主設備程序 支持sd卡 mouse keyboard 的最單單的驅動程序 gcc編譯
?? C
字號:
/* * EHCI HCD (Host Controller Driver) PCI Bus Glue. * * Copyright (c) 2000-2004 by David Brownell * * 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. */#ifndef CONFIG_PCI#error "This file is PCI bus glue.  CONFIG_PCI must be defined."#endif/*-------------------------------------------------------------------------*//* called after powerup, by probe or system-pm "wakeup" */static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev){	u32			temp;	int			retval;	/* optional debug port, normally in the first BAR */	temp = pci_find_capability(pdev, 0x0a);	if (temp) {		pci_read_config_dword(pdev, temp, &temp);		temp >>= 16;		if ((temp & (3 << 13)) == (1 << 13)) {			temp &= 0x1fff;			ehci->debug = ehci_to_hcd(ehci)->regs + temp;			temp = ehci_readl(ehci, &ehci->debug->control);			ehci_info(ehci, "debug port %d%s\n",				HCS_DEBUG_PORT(ehci->hcs_params),				(temp & DBGP_ENABLED)					? " IN USE"					: "");			if (!(temp & DBGP_ENABLED))				ehci->debug = NULL;		}	}	/* we expect static quirk code to handle the "extended capabilities"	 * (currently just BIOS handoff) allowed starting with EHCI 0.96	 */	/* PCI Memory-Write-Invalidate cycle support is optional (uncommon) */	retval = pci_set_mwi(pdev);	if (!retval)		ehci_dbg(ehci, "MWI active\n");	ehci_port_power(ehci, 0);	return 0;}/* called during probe() after chip reset completes */static int ehci_pci_setup(struct usb_hcd *hcd){	struct ehci_hcd		*ehci = hcd_to_ehci(hcd);	struct pci_dev		*pdev = to_pci_dev(hcd->self.controller);	u32			temp;	int			retval;	switch (pdev->vendor) {	case PCI_VENDOR_ID_TOSHIBA_2:		/* celleb's companion chip */		if (pdev->device == 0x01b5) {#ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO			ehci->big_endian_mmio = 1;#else			ehci_warn(ehci,				  "unsupported big endian Toshiba quirk\n");#endif		}		break;	}	ehci->caps = hcd->regs;	ehci->regs = hcd->regs +		HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));	dbg_hcs_params(ehci, "reset");	dbg_hcc_params(ehci, "reset");        /* ehci_init() causes memory for DMA transfers to be         * allocated.  Thus, any vendor-specific workarounds based on         * limiting the type of memory used for DMA transfers must         * happen before ehci_init() is called. */	switch (pdev->vendor) {	case PCI_VENDOR_ID_NVIDIA:		/* NVidia reports that certain chips don't handle		 * QH, ITD, or SITD addresses above 2GB.  (But TD,		 * data buffer, and periodic schedule are normal.)		 */		switch (pdev->device) {		case 0x003c:	/* MCP04 */		case 0x005b:	/* CK804 */		case 0x00d8:	/* CK8 */		case 0x00e8:	/* CK8S */			if (pci_set_consistent_dma_mask(pdev,						DMA_31BIT_MASK) < 0)				ehci_warn(ehci, "can't enable NVidia "					"workaround for >2GB RAM\n");			break;		}		break;	}	/* cache this readonly data; minimize chip reads */	ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);	retval = ehci_halt(ehci);	if (retval)		return retval;	/* data structure init */	retval = ehci_init(hcd);	if (retval)		return retval;	switch (pdev->vendor) {	case PCI_VENDOR_ID_TDI:		if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {			ehci->is_tdi_rh_tt = 1;			tdi_reset(ehci);		}		break;	case PCI_VENDOR_ID_AMD:		/* AMD8111 EHCI doesn't work, according to AMD errata */		if (pdev->device == 0x7463) {			ehci_info(ehci, "ignoring AMD8111 (errata)\n");			retval = -EIO;			goto done;		}		break;	case PCI_VENDOR_ID_NVIDIA:		switch (pdev->device) {		/* Some NForce2 chips have problems with selective suspend;		 * fixed in newer silicon.		 */		case 0x0068:			pci_read_config_dword(pdev, PCI_REVISION_ID, &temp);			if ((temp & 0xff) < 0xa4)				ehci->no_selective_suspend = 1;			break;		}		break;	}	if (ehci_is_TDI(ehci))		ehci_reset(ehci);	/* at least the Genesys GL880S needs fixup here */	temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);	temp &= 0x0f;	if (temp && HCS_N_PORTS(ehci->hcs_params) > temp) {		ehci_dbg(ehci, "bogus port configuration: "			"cc=%d x pcc=%d < ports=%d\n",			HCS_N_CC(ehci->hcs_params),			HCS_N_PCC(ehci->hcs_params),			HCS_N_PORTS(ehci->hcs_params));		switch (pdev->vendor) {		case 0x17a0:		/* GENESYS */			/* GL880S: should be PORTS=2 */			temp |= (ehci->hcs_params & ~0xf);			ehci->hcs_params = temp;			break;		case PCI_VENDOR_ID_NVIDIA:			/* NF4: should be PCC=10 */			break;		}	}	/* Serial Bus Release Number is at PCI 0x60 offset */	pci_read_config_byte(pdev, 0x60, &ehci->sbrn);	/* Workaround current PCI init glitch:  wakeup bits aren't	 * being set from PCI PM capability.	 */	if (!device_can_wakeup(&pdev->dev)) {		u16	port_wake;		pci_read_config_word(pdev, 0x62, &port_wake);		if (port_wake & 0x0001)			device_init_wakeup(&pdev->dev, 1);	}#ifdef	CONFIG_USB_SUSPEND	/* REVISIT: the controller works fine for wakeup iff the root hub	 * itself is "globally" suspended, but usbcore currently doesn't	 * understand such things.	 *	 * System suspend currently expects to be able to suspend the entire	 * device tree, device-at-a-time.  If we failed selective suspend	 * reports, system suspend would fail; so the root hub code must claim	 * success.  That's lying to usbcore, and it matters for for runtime	 * PM scenarios with selective suspend and remote wakeup...	 */	if (ehci->no_selective_suspend && device_can_wakeup(&pdev->dev))		ehci_warn(ehci, "selective suspend/wakeup unavailable\n");#endif	retval = ehci_pci_reinit(ehci, pdev);done:	return retval;}/*-------------------------------------------------------------------------*/#ifdef	CONFIG_PM/* suspend/resume, section 4.3 *//* These routines rely on the PCI bus glue * to handle powerdown and wakeup, and currently also on * transceivers that don't need any software attention to set up * the right sort of wakeup. * Also they depend on separate root hub suspend/resume. */static int ehci_pci_suspend(struct usb_hcd *hcd, pm_message_t message){	struct ehci_hcd		*ehci = hcd_to_ehci(hcd);	unsigned long		flags;	int			rc = 0;	if (time_before(jiffies, ehci->next_statechange))		msleep(10);	/* Root hub was already suspended. Disable irq emission and	 * mark HW unaccessible, bail out if RH has been resumed. Use	 * the spinlock to properly synchronize with possible pending	 * RH suspend or resume activity.	 *	 * This is still racy as hcd->state is manipulated outside of	 * any locks =P But that will be a different fix.	 */	spin_lock_irqsave (&ehci->lock, flags);	if (hcd->state != HC_STATE_SUSPENDED) {		rc = -EINVAL;		goto bail;	}	ehci_writel(ehci, 0, &ehci->regs->intr_enable);	(void)ehci_readl(ehci, &ehci->regs->intr_enable);	/* make sure snapshot being resumed re-enumerates everything */	if (message.event == PM_EVENT_PRETHAW) {		ehci_halt(ehci);		ehci_reset(ehci);	}	clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); bail:	spin_unlock_irqrestore (&ehci->lock, flags);	// could save FLADJ in case of Vaux power loss	// ... we'd only use it to handle clock skew	return rc;}static int ehci_pci_resume(struct usb_hcd *hcd){	struct ehci_hcd		*ehci = hcd_to_ehci(hcd);	struct pci_dev		*pdev = to_pci_dev(hcd->self.controller);	// maybe restore FLADJ	if (time_before(jiffies, ehci->next_statechange))		msleep(100);	/* Mark hardware accessible again as we are out of D3 state by now */	set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);	/* If CF is still set, we maintained PCI Vaux power.	 * Just undo the effect of ehci_pci_suspend().	 */	if (ehci_readl(ehci, &ehci->regs->configured_flag) == FLAG_CF) {		int	mask = INTR_MASK;		if (!device_may_wakeup(&hcd->self.root_hub->dev))			mask &= ~STS_PCD;		ehci_writel(ehci, mask, &ehci->regs->intr_enable);		ehci_readl(ehci, &ehci->regs->intr_enable);		return 0;	}	ehci_dbg(ehci, "lost power, restarting\n");	usb_root_hub_lost_power(hcd->self.root_hub);	/* Else reset, to cope with power loss or flush-to-storage	 * style "resume" having let BIOS kick in during reboot.	 */	(void) ehci_halt(ehci);	(void) ehci_reset(ehci);	(void) ehci_pci_reinit(ehci, pdev);	/* emptying the schedule aborts any urbs */	spin_lock_irq(&ehci->lock);	if (ehci->reclaim)		ehci->reclaim_ready = 1;	ehci_work(ehci);	spin_unlock_irq(&ehci->lock);	/* here we "know" root ports should always stay powered */	ehci_port_power(ehci, 1);	ehci_writel(ehci, ehci->command, &ehci->regs->command);	ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag);	ehci_readl(ehci, &ehci->regs->command);	/* unblock posted writes */	hcd->state = HC_STATE_SUSPENDED;	return 0;}#endifstatic const struct hc_driver ehci_pci_hc_driver = {	.description =		hcd_name,	.product_desc =		"EHCI Host Controller",	.hcd_priv_size =	sizeof(struct ehci_hcd),	/*	 * generic hardware linkage	 */	.irq =			ehci_irq,	.flags =		HCD_MEMORY | HCD_USB2,	/*	 * basic lifecycle operations	 */	.reset =		ehci_pci_setup,	.start =		ehci_run,#ifdef	CONFIG_PM	.suspend =		ehci_pci_suspend,	.resume =		ehci_pci_resume,#endif	.stop =			ehci_stop,	.shutdown =		ehci_shutdown,	/*	 * managing i/o requests and associated device resources	 */	.urb_enqueue =		ehci_urb_enqueue,	.urb_dequeue =		ehci_urb_dequeue,	.endpoint_disable =	ehci_endpoint_disable,	/*	 * scheduling support	 */	.get_frame_number =	ehci_get_frame,	/*	 * root hub support	 */	.hub_status_data =	ehci_hub_status_data,	.hub_control =		ehci_hub_control,	.bus_suspend =		ehci_bus_suspend,	.bus_resume =		ehci_bus_resume,};/*-------------------------------------------------------------------------*//* PCI driver selection metadata; PCI hotplugging uses this */static const struct pci_device_id pci_ids [] = { {	/* handle any USB 2.0 EHCI controller */	PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_EHCI, ~0),	.driver_data =	(unsigned long) &ehci_pci_hc_driver,	},	{ /* end: all zeroes */ }};MODULE_DEVICE_TABLE(pci, pci_ids);/* pci driver glue; this is a "new style" PCI driver module */static struct pci_driver ehci_pci_driver = {	.name =		(char *) hcd_name,	.id_table =	pci_ids,	.probe =	usb_hcd_pci_probe,	.remove =	usb_hcd_pci_remove,#ifdef	CONFIG_PM	.suspend =	usb_hcd_pci_suspend,	.resume =	usb_hcd_pci_resume,#endif	.shutdown = 	usb_hcd_pci_shutdown,};

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本大胆欧美人术艺术动态| 一区二区免费在线播放| 欧美无人高清视频在线观看| av激情综合网| 97se亚洲国产综合自在线观| av中文字幕在线不卡| 成人av免费在线播放| 成人免费视频播放| 99在线精品视频| 色噜噜久久综合| 欧美日韩精品欧美日韩精品一 | 成人性生交大片免费看在线播放 | 色老综合老女人久久久| 99re热这里只有精品免费视频| jlzzjlzz亚洲女人18| 91福利资源站| 日韩午夜av电影| 日本一区二区三区dvd视频在线| 国产精品网曝门| 一区二区三区四区乱视频| 亚洲高清免费一级二级三级| 日韩电影在线观看电影| 国产一区二区三区四区五区美女| 国产精品1区2区3区| k8久久久一区二区三区| 欧美精品1区2区| 国产亚洲精品福利| 亚洲精品一二三| 日本不卡在线视频| 成人av片在线观看| 日韩三级伦理片妻子的秘密按摩| 久久久久久影视| 亚洲激情欧美激情| 久久精品理论片| 91久久香蕉国产日韩欧美9色| 欧美一区二区日韩| 国产精品美女久久久久久久| 亚洲成人三级小说| 国产成人精品免费| 在线成人免费视频| 亚洲色图色小说| 国产一区二区在线影院| 欧美色爱综合网| 国产精品你懂的| 久久99精品国产91久久来源| 欧美性受xxxx黑人xyx性爽| 日韩欧美国产一区在线观看| 综合久久给合久久狠狠狠97色| 精品在线亚洲视频| 91精品中文字幕一区二区三区| 中文字幕电影一区| 九九**精品视频免费播放| 色猫猫国产区一区二在线视频| 国产校园另类小说区| 日本aⅴ免费视频一区二区三区| 色婷婷久久99综合精品jk白丝| 久久精品免费在线观看| 男女男精品视频| 欧美日本一道本| 一个色综合网站| 一本久久a久久免费精品不卡| 国产日韩欧美a| 国产精选一区二区三区| 精品福利一二区| 久久激情五月婷婷| 欧美区视频在线观看| 亚洲一区二区av在线| 欧美综合一区二区| 一区二区三区毛片| 欧美亚日韩国产aⅴ精品中极品| 亚洲免费av高清| 91极品美女在线| 亚洲图片一区二区| 欧美日韩国产精品成人| 午夜精品一区二区三区电影天堂| 在线观看日韩精品| 亚洲综合一二区| 欧美区在线观看| 久久国产精品第一页| 日韩欧美国产午夜精品| 奇米精品一区二区三区四区 | 一区二区成人在线| 欧美色中文字幕| 日韩福利电影在线| 日韩欧美电影一区| 国产剧情在线观看一区二区| 国产女同性恋一区二区| 成人免费观看视频| 亚洲男人电影天堂| 欧美日韩日日骚| 蜜桃av一区二区在线观看| 精品成人佐山爱一区二区| 国产不卡在线播放| 亚洲精品久久久久久国产精华液| 91福利在线观看| 蜜桃精品视频在线观看| 国产天堂亚洲国产碰碰| 色菇凉天天综合网| 日韩高清欧美激情| 国产三级精品三级| 欧美亚洲动漫制服丝袜| 经典三级视频一区| 自拍偷在线精品自拍偷无码专区| 精品视频免费在线| 国产不卡视频在线播放| 一区二区日韩电影| 久久久亚洲精品一区二区三区 | 日韩一区二区三区视频| 精品在线一区二区| 亚洲色图清纯唯美| 精品久久久久一区二区国产| 99国产精品久久久久久久久久| 日韩激情视频在线观看| 国产精品系列在线| 欧美一级日韩一级| 北岛玲一区二区三区四区| 天天色综合天天| 国产精品久久久久影院老司| 欧美一区二区三区影视| 97久久精品人人做人人爽| 精品影视av免费| 亚洲成人先锋电影| 亚洲视频免费在线观看| 精品久久久久久久久久久院品网| 91免费小视频| 国产99久久久国产精品潘金| 无码av免费一区二区三区试看| 国产精品久久一级| 2023国产精品| 欧美一级片免费看| 欧美在线一二三四区| av激情亚洲男人天堂| 国产一区二区三区在线观看免费| 日本不卡一区二区| 亚洲国产欧美在线人成| 亚洲私人黄色宅男| 国产日韩欧美麻豆| 国产亚洲精品精华液| 欧美精品一区二区三区一线天视频 | 日韩欧美国产综合| 欧美日韩国产精选| 欧美日韩高清不卡| 欧美天堂一区二区三区| 在线观看区一区二| 91色在线porny| 97成人超碰视| 91香蕉视频污在线| 99久久99久久免费精品蜜臀| 国产精品一区二区免费不卡 | 国产精品免费人成网站| 久久精品日产第一区二区三区高清版| 69堂国产成人免费视频| 91精品国产一区二区三区香蕉 | 国产婷婷一区二区| 欧美极品aⅴ影院| 亚洲国产高清aⅴ视频| 国产精品久久久久久久岛一牛影视 | 久久久久久久久久久久久久久99 | 天天色综合成人网| 亚洲成av人片一区二区梦乃| 亚洲成人黄色小说| 蜜臀精品一区二区三区在线观看| 免费人成在线不卡| 韩日精品视频一区| 粉嫩av一区二区三区粉嫩| 9久草视频在线视频精品| 色又黄又爽网站www久久| 色av成人天堂桃色av| 欧美日韩国产精品自在自线| 日韩亚洲国产中文字幕欧美| 2023国产精华国产精品| 亚洲视频 欧洲视频| 夜夜嗨av一区二区三区中文字幕 | 欧美色中文字幕| 日韩亚洲欧美综合| 国产农村妇女精品| 亚洲电影一级片| 精品一区二区久久久| 99视频精品全部免费在线| 欧美日韩1234| 亚洲国产成人午夜在线一区| 亚洲一区二区四区蜜桃| 久久99精品久久久| 91亚洲永久精品| 欧美一级免费观看| 国产精品国产三级国产aⅴ入口| 一区二区三区欧美在线观看| 免费一区二区视频| 99re热这里只有精品视频| 日韩一区二区三区av| 亚洲欧洲99久久| 日本在线不卡一区| 不卡的av电影在线观看| 欧美精品一级二级| 欧美国产在线观看| 欧美a一区二区| 欧美性视频一区二区三区| 久久久久久久久久看片| 天天亚洲美女在线视频| www.日本不卡|