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

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

?? ehci-hub.c

?? host usb 主設備程序 支持sd卡 mouse keyboard 的最單單的驅動程序 gcc編譯
?? C
?? 第 1 頁 / 共 2 頁
字號:
		 */		if (!(temp & PORT_CONNECT))			ehci->reset_done [i] = 0;		if ((temp & mask) != 0				|| ((temp & PORT_RESUME) != 0					&& time_after_eq(jiffies,						ehci->reset_done[i]))) {			if (i < 7)			    buf [0] |= 1 << (i + 1);			else			    buf [1] |= 1 << (i - 7);			status = STS_PCD;		}	}	/* FIXME autosuspend idle root hubs */	spin_unlock_irqrestore (&ehci->lock, flags);	return status ? retval : 0;}/*-------------------------------------------------------------------------*/static voidehci_hub_descriptor (	struct ehci_hcd			*ehci,	struct usb_hub_descriptor	*desc) {	int		ports = HCS_N_PORTS (ehci->hcs_params);	u16		temp;	desc->bDescriptorType = 0x29;	desc->bPwrOn2PwrGood = 10;	/* ehci 1.0, 2.3.9 says 20ms max */	desc->bHubContrCurrent = 0;	desc->bNbrPorts = ports;	temp = 1 + (ports / 8);	desc->bDescLength = 7 + 2 * temp;	/* two bitmaps:  ports removable, and usb 1.0 legacy PortPwrCtrlMask */	memset (&desc->bitmap [0], 0, temp);	memset (&desc->bitmap [temp], 0xff, temp);	temp = 0x0008;			/* per-port overcurrent reporting */	if (HCS_PPC (ehci->hcs_params))		temp |= 0x0001;		/* per-port power control */	else		temp |= 0x0002;		/* no power switching */#if 0// re-enable when we support USB_PORT_FEAT_INDICATOR below.	if (HCS_INDICATOR (ehci->hcs_params))		temp |= 0x0080;		/* per-port indicators (LEDs) */#endif	desc->wHubCharacteristics = (__force __u16)cpu_to_le16 (temp);}/*-------------------------------------------------------------------------*/#define	PORT_WAKE_BITS	(PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)static int ehci_hub_control (	struct usb_hcd	*hcd,	u16		typeReq,	u16		wValue,	u16		wIndex,	char		*buf,	u16		wLength) {	struct ehci_hcd	*ehci = hcd_to_ehci (hcd);	int		ports = HCS_N_PORTS (ehci->hcs_params);	u32 __iomem	*status_reg = &ehci->regs->port_status[wIndex - 1];	u32		temp, status;	unsigned long	flags;	int		retval = 0;	unsigned	selector;	/*	 * FIXME:  support SetPortFeatures USB_PORT_FEAT_INDICATOR.	 * HCS_INDICATOR may say we can change LEDs to off/amber/green.	 * (track current state ourselves) ... blink for diagnostics,	 * power, "this is the one", etc.  EHCI spec supports this.	 */	spin_lock_irqsave (&ehci->lock, flags);	switch (typeReq) {	case ClearHubFeature:		switch (wValue) {		case C_HUB_LOCAL_POWER:		case C_HUB_OVER_CURRENT:			/* no hub-wide feature/status flags */			break;		default:			goto error;		}		break;	case ClearPortFeature:		if (!wIndex || wIndex > ports)			goto error;		wIndex--;		temp = ehci_readl(ehci, status_reg);		/*		 * Even if OWNER is set, so the port is owned by the		 * companion controller, khubd needs to be able to clear		 * the port-change status bits (especially		 * USB_PORT_FEAT_C_CONNECTION).		 */		switch (wValue) {		case USB_PORT_FEAT_ENABLE:			ehci_writel(ehci, temp & ~PORT_PE, status_reg);			break;		case USB_PORT_FEAT_C_ENABLE:			ehci_writel(ehci, (temp & ~PORT_RWC_BITS) | PORT_PEC,					status_reg);			break;		case USB_PORT_FEAT_SUSPEND:			if (temp & PORT_RESET)				goto error;			if (ehci->no_selective_suspend)				break;			if (temp & PORT_SUSPEND) {				if ((temp & PORT_PE) == 0)					goto error;				/* resume signaling for 20 msec */				temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);				ehci_writel(ehci, temp | PORT_RESUME,						status_reg);				ehci->reset_done [wIndex] = jiffies						+ msecs_to_jiffies (20);			}			break;		case USB_PORT_FEAT_C_SUSPEND:			/* we auto-clear this feature */			break;		case USB_PORT_FEAT_POWER:			if (HCS_PPC (ehci->hcs_params))				ehci_writel(ehci,					  temp & ~(PORT_RWC_BITS | PORT_POWER),					  status_reg);			break;		case USB_PORT_FEAT_C_CONNECTION:			ehci_writel(ehci, (temp & ~PORT_RWC_BITS) | PORT_CSC,					status_reg);			break;		case USB_PORT_FEAT_C_OVER_CURRENT:			ehci_writel(ehci, (temp & ~PORT_RWC_BITS) | PORT_OCC,					status_reg);			break;		case USB_PORT_FEAT_C_RESET:			/* GetPortStatus clears reset */			break;		default:			goto error;		}		ehci_readl(ehci, &ehci->regs->command);	/* unblock posted write */		break;	case GetHubDescriptor:		ehci_hub_descriptor (ehci, (struct usb_hub_descriptor *)			buf);		break;	case GetHubStatus:		/* no hub-wide feature/status flags */		memset (buf, 0, 4);		//cpu_to_le32s ((u32 *) buf);		break;	case GetPortStatus:		if (!wIndex || wIndex > ports)			goto error;		wIndex--;		status = 0;		temp = ehci_readl(ehci, status_reg);		// wPortChange bits		if (temp & PORT_CSC)			status |= 1 << USB_PORT_FEAT_C_CONNECTION;		if (temp & PORT_PEC)			status |= 1 << USB_PORT_FEAT_C_ENABLE;		if ((temp & PORT_OCC) && !ignore_oc)			status |= 1 << USB_PORT_FEAT_C_OVER_CURRENT;		/* whoever resumes must GetPortStatus to complete it!! */		if (temp & PORT_RESUME) {			/* Remote Wakeup received? */			if (!ehci->reset_done[wIndex]) {				/* resume signaling for 20 msec */				ehci->reset_done[wIndex] = jiffies						+ msecs_to_jiffies(20);				/* check the port again */				mod_timer(&ehci_to_hcd(ehci)->rh_timer,						ehci->reset_done[wIndex]);			}			/* resume completed? */			else if (time_after_eq(jiffies,					ehci->reset_done[wIndex])) {				status |= 1 << USB_PORT_FEAT_C_SUSPEND;				ehci->reset_done[wIndex] = 0;				/* stop resume signaling */				temp = ehci_readl(ehci, status_reg);				ehci_writel(ehci,					temp & ~(PORT_RWC_BITS | PORT_RESUME),					status_reg);				retval = handshake(ehci, status_reg,					   PORT_RESUME, 0, 2000 /* 2msec */);				if (retval != 0) {					ehci_err(ehci,						"port %d resume error %d\n",						wIndex + 1, retval);					goto error;				}				temp &= ~(PORT_SUSPEND|PORT_RESUME|(3<<10));			}		}		/* whoever resets must GetPortStatus to complete it!! */		if ((temp & PORT_RESET)				&& time_after_eq(jiffies,					ehci->reset_done[wIndex])) {			status |= 1 << USB_PORT_FEAT_C_RESET;			ehci->reset_done [wIndex] = 0;			/* force reset to complete */			ehci_writel(ehci, temp & ~(PORT_RWC_BITS | PORT_RESET),					status_reg);			/* REVISIT:  some hardware needs 550+ usec to clear			 * this bit; seems too long to spin routinely...			 */			retval = handshake(ehci, status_reg,					PORT_RESET, 0, 750);			if (retval != 0) {				ehci_err (ehci, "port %d reset error %d\n",					wIndex + 1, retval);				goto error;			}			/* see what we found out */			temp = check_reset_complete (ehci, wIndex, status_reg,					ehci_readl(ehci, status_reg));		}		/* transfer dedicated ports to the companion hc */		if ((temp & PORT_CONNECT) &&				test_bit(wIndex, &ehci->companion_ports)) {			temp &= ~PORT_RWC_BITS;			temp |= PORT_OWNER;			ehci_writel(ehci, temp, status_reg);			ehci_dbg(ehci, "port %d --> companion\n", wIndex + 1);			temp = ehci_readl(ehci, status_reg);		}		/*		 * Even if OWNER is set, there's no harm letting khubd		 * see the wPortStatus values (they should all be 0 except		 * for PORT_POWER anyway).		 */		if (temp & PORT_CONNECT) {			status |= 1 << USB_PORT_FEAT_CONNECTION;			// status may be from integrated TT			status |= ehci_port_speed(ehci, temp);		}		if (temp & PORT_PE)			status |= 1 << USB_PORT_FEAT_ENABLE;		if (temp & (PORT_SUSPEND|PORT_RESUME))			status |= 1 << USB_PORT_FEAT_SUSPEND;		if (temp & PORT_OC)			status |= 1 << USB_PORT_FEAT_OVER_CURRENT;		if (temp & PORT_RESET)			status |= 1 << USB_PORT_FEAT_RESET;		if (temp & PORT_POWER)			status |= 1 << USB_PORT_FEAT_POWER;#ifndef	EHCI_VERBOSE_DEBUG	if (status & ~0xffff)	/* only if wPortChange is interesting */#endif		dbg_port (ehci, "GetStatus", wIndex + 1, temp);		put_unaligned(cpu_to_le32 (status), (__le32 *) buf);		break;	case SetHubFeature:		switch (wValue) {		case C_HUB_LOCAL_POWER:		case C_HUB_OVER_CURRENT:			/* no hub-wide feature/status flags */			break;		default:			goto error;		}		break;	case SetPortFeature:		selector = wIndex >> 8;		wIndex &= 0xff;		if (!wIndex || wIndex > ports)			goto error;		wIndex--;		temp = ehci_readl(ehci, status_reg);		if (temp & PORT_OWNER)			break;		temp &= ~PORT_RWC_BITS;		switch (wValue) {		case USB_PORT_FEAT_SUSPEND:			if (ehci->no_selective_suspend)				break;			if ((temp & PORT_PE) == 0					|| (temp & PORT_RESET) != 0)				goto error;			if (device_may_wakeup(&hcd->self.root_hub->dev))				temp |= PORT_WAKE_BITS;			ehci_writel(ehci, temp | PORT_SUSPEND, status_reg);			break;		case USB_PORT_FEAT_POWER:			if (HCS_PPC (ehci->hcs_params))				ehci_writel(ehci, temp | PORT_POWER,						status_reg);			break;		case USB_PORT_FEAT_RESET:			if (temp & PORT_RESUME)				goto error;			/* line status bits may report this as low speed,			 * which can be fine if this root hub has a			 * transaction translator built in.			 */			if ((temp & (PORT_PE|PORT_CONNECT)) == PORT_CONNECT					&& !ehci_is_TDI(ehci)					&& PORT_USB11 (temp)) {				ehci_dbg (ehci,					"port %d low speed --> companion\n",					wIndex + 1);				temp |= PORT_OWNER;			} else {				ehci_vdbg (ehci, "port %d reset\n", wIndex + 1);				temp |= PORT_RESET;				temp &= ~PORT_PE;				/*				 * caller must wait, then call GetPortStatus				 * usb 2.0 spec says 50 ms resets on root				 */				ehci->reset_done [wIndex] = jiffies						+ msecs_to_jiffies (50);			}			ehci_writel(ehci, temp, status_reg);			break;		/* For downstream facing ports (these):  one hub port is put		 * into test mode according to USB2 11.24.2.13, then the hub		 * must be reset (which for root hub now means rmmod+modprobe,		 * or else system reboot).  See EHCI 2.3.9 and 4.14 for info		 * about the EHCI-specific stuff.		 */		case USB_PORT_FEAT_TEST:			if (!selector || selector > 5)				goto error;			ehci_quiesce(ehci);			ehci_halt(ehci);			temp |= selector << 16;			ehci_writel(ehci, temp, status_reg);			break;		default:			goto error;		}		ehci_readl(ehci, &ehci->regs->command);	/* unblock posted writes */		break;	default:error:		/* "stall" on error */		retval = -EPIPE;	}	spin_unlock_irqrestore (&ehci->lock, flags);	return retval;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美你懂的| 亚洲欧美日韩系列| 色老头久久综合| 精彩视频一区二区三区| 亚洲一区二区视频| 国产精品女主播av| 精品久久久久久久久久久久久久久久久 | 成人av电影在线观看| 日本怡春院一区二区| 亚洲精品日韩一| 中文字幕精品综合| 精品久久久久久久久久久久久久久| 欧美婷婷六月丁香综合色| 成人动漫视频在线| 国产一区二区三区最好精华液| 亚洲成人av在线电影| 中文字幕综合网| 欧美激情综合五月色丁香| 精品国产露脸精彩对白| 欧美男女性生活在线直播观看| 97国产精品videossex| 丁香激情综合国产| 国产成人午夜99999| 国产美女在线观看一区| 久久精品99国产精品日本| 首页国产丝袜综合| 午夜精品123| 天天av天天翘天天综合网色鬼国产| ...xxx性欧美| 日韩理论电影院| 亚洲色图欧美激情| 亚洲另类春色校园小说| 亚洲欧美一区二区久久| 中文字幕一区二区在线观看| 国产欧美一区二区三区在线老狼| 亚洲精品在线一区二区| 欧美精品一区二区三区高清aⅴ| 日韩免费看的电影| 亚洲精品一区二区三区蜜桃下载| 日韩你懂的在线播放| 欧美mv日韩mv亚洲| 久久久www免费人成精品| 久久夜色精品国产欧美乱极品| 欧美精品一区二区精品网| 国产亚洲欧美色| 国产精品网友自拍| 亚洲男人天堂av网| 亚洲一二三专区| 三级精品在线观看| 久久国产麻豆精品| 国产不卡高清在线观看视频| av色综合久久天堂av综合| 日本久久精品电影| 欧美亚洲综合久久| 日韩免费观看2025年上映的电影| 久久久久久综合| 日韩理论电影院| 亚洲sss视频在线视频| 久久精品国产一区二区| 成人夜色视频网站在线观看| 色婷婷综合久久| 91精品国产综合久久精品app | 国产午夜精品一区二区三区嫩草| 久久精品人人做人人爽人人| 国产精品不卡在线| 亚洲成av人片一区二区| 久久成人久久鬼色| 92精品国产成人观看免费| 欧美日韩精品福利| 久久亚洲春色中文字幕久久久| 国产精品国产精品国产专区不蜜 | 日韩国产一区二| 国产资源在线一区| 一道本成人在线| 日韩一级视频免费观看在线| 中文字幕欧美区| 午夜伊人狠狠久久| 国产丶欧美丶日本不卡视频| 91久久线看在观草草青青| 欧美一级夜夜爽| 中文字幕在线不卡一区二区三区| 午夜av一区二区三区| 国产精品资源在线观看| 欧美视频一区在线| 国产亚洲1区2区3区| 午夜精品久久久久久久久久| 国产精品一区二区x88av| 欧美亚洲动漫精品| 久久久高清一区二区三区| 有坂深雪av一区二区精品| 国产一区欧美二区| 欧美日韩亚洲另类| 中文字幕av在线一区二区三区| 日韩二区三区四区| 一本色道久久综合亚洲aⅴ蜜桃 | 欧美午夜片在线看| 日本一区二区三区久久久久久久久不| 亚瑟在线精品视频| 99re6这里只有精品视频在线观看| 日韩欧美一区二区在线视频| 综合网在线视频| 国产精品一区2区| 日韩免费高清视频| 亚洲超碰精品一区二区| 99精品一区二区三区| 久久综合九色综合欧美亚洲| 亚洲成人免费视频| 91网页版在线| 国产精品国模大尺度视频| 国产一区二区三区免费看| 884aa四虎影成人精品一区| 一区二区三区在线视频观看58| 国产盗摄精品一区二区三区在线| 日韩一级高清毛片| 丝袜美腿高跟呻吟高潮一区| 色狠狠色噜噜噜综合网| 日韩一区有码在线| 成人黄色av网站在线| 久久久久久久性| 精品亚洲aⅴ乱码一区二区三区| 欧美日本在线视频| 午夜精品福利一区二区蜜股av| 色美美综合视频| 日韩美女久久久| av爱爱亚洲一区| 成人免费一区二区三区视频| 国产成人精品一区二区三区四区 | 久久激情综合网| 日韩视频在线永久播放| 日韩高清一级片| 欧美日韩成人一区二区| 日精品一区二区三区| 91精品麻豆日日躁夜夜躁| 午夜欧美电影在线观看| 555夜色666亚洲国产免| 日本vs亚洲vs韩国一区三区二区 | 久久亚洲捆绑美女| 经典三级视频一区| 久久久精品黄色| 高清不卡一二三区| 亚洲视频在线观看三级| 色天天综合久久久久综合片| 亚洲综合色在线| 777a∨成人精品桃花网| 美女在线一区二区| 国产午夜精品福利| 99综合影院在线| 亚洲免费在线观看视频| 欧美日韩中文国产| 青草国产精品久久久久久| 精品噜噜噜噜久久久久久久久试看 | 午夜精品久久久久久| 日韩精品一区在线观看| 国产不卡高清在线观看视频| 国产精品对白交换视频 | 欧美在线视频不卡| 日韩成人免费电影| 久久综合色8888| 91香蕉视频污| 日本美女一区二区| 国产精品天干天干在观线| 色拍拍在线精品视频8848| 日本在线不卡视频| 欧美激情在线一区二区三区| 91热门视频在线观看| 午夜电影一区二区| 国产人伦精品一区二区| 91高清视频在线| 另类小说视频一区二区| 国产精品久久久久久久久久久免费看 | 99这里只有精品| 五月婷婷另类国产| 国产视频一区在线播放| 一本色道久久综合狠狠躁的推荐 | 国产精品免费免费| 欧美体内she精高潮| 精品一区二区三区的国产在线播放| 国产精品久久精品日日| 欧美一级一区二区| 99久久亚洲一区二区三区青草| 丝袜诱惑亚洲看片| 国产精品成人免费在线| 欧美成人猛片aaaaaaa| 91国偷自产一区二区使用方法| 久久99久久久久| 一区二区三区在线观看动漫| 亚洲精品一区二区在线观看| 色综合久久天天| 国产精品一区二区在线播放| 亚洲成av人**亚洲成av**| 国产精品美女久久久久aⅴ国产馆| 欧美另类变人与禽xxxxx| 成人少妇影院yyyy| 久久99在线观看| 一个色综合网站| 国产视频一区在线播放| 日韩一区国产二区欧美三区| 色综合久久66| 成人精品免费看| 久久精品国产精品亚洲综合|