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

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

?? ehci-mem.c

?? host usb 主設備程序 支持sd卡 mouse keyboard 的最單單的驅動程序 gcc編譯
?? C
字號:
/* * Copyright (c) 2001 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. *//* this file is part of ehci-hcd.c *//*-------------------------------------------------------------------------*//* * There's basically three types of memory: *	- data used only by the HCD ... kmalloc is fine *	- async and periodic schedules, shared by HC and HCD ... these *	  need to use dma_pool or dma_alloc_coherent *	- driver buffers, read/written by HC ... single shot DMA mapped * * There's also PCI "register" data, which is memory mapped. * No memory seen by this driver is pageable. *//*-------------------------------------------------------------------------*//* Allocate the key transfer structures from the previously allocated pool */static inline void ehci_qtd_init (struct ehci_qtd *qtd, dma_addr_t dma){	memset (qtd, 0, sizeof *qtd);	qtd->qtd_dma = dma;	qtd->hw_token = cpu_to_le32 (QTD_STS_HALT);	qtd->hw_next = EHCI_LIST_END;	qtd->hw_alt_next = EHCI_LIST_END;	INIT_LIST_HEAD (&qtd->qtd_list);}static struct ehci_qtd *ehci_qtd_alloc (struct ehci_hcd *ehci, gfp_t flags){	struct ehci_qtd		*qtd;	dma_addr_t		dma;	qtd = dma_pool_alloc (ehci->qtd_pool, flags, &dma);	if (qtd != NULL) {		ehci_qtd_init (qtd, dma);	}	return qtd;}static inline void ehci_qtd_free (struct ehci_hcd *ehci, struct ehci_qtd *qtd){	dma_pool_free (ehci->qtd_pool, qtd, qtd->qtd_dma);}static void qh_destroy (struct kref *kref){	struct ehci_qh *qh = container_of(kref, struct ehci_qh, kref);	struct ehci_hcd *ehci = qh->ehci;	/* clean qtds first, and know this is not linked */	if (!list_empty (&qh->qtd_list) || qh->qh_next.ptr) {		ehci_dbg (ehci, "unused qh not empty!\n");		BUG ();	}	if (qh->dummy)		ehci_qtd_free (ehci, qh->dummy);	dma_pool_free (ehci->qh_pool, qh, qh->qh_dma);}static struct ehci_qh *ehci_qh_alloc (struct ehci_hcd *ehci, gfp_t flags){	struct ehci_qh		*qh;	dma_addr_t		dma;	qh = (struct ehci_qh *)		dma_pool_alloc (ehci->qh_pool, flags, &dma);	if (!qh)		return qh;	memset (qh, 0, sizeof *qh);	kref_init(&qh->kref);	qh->ehci = ehci;	qh->qh_dma = dma;	// INIT_LIST_HEAD (&qh->qh_list);	INIT_LIST_HEAD (&qh->qtd_list);	/* dummy td enables safe urb queuing */	qh->dummy = ehci_qtd_alloc (ehci, flags);	if (qh->dummy == NULL) {		ehci_dbg (ehci, "no dummy td\n");		dma_pool_free (ehci->qh_pool, qh, qh->qh_dma);		qh = NULL;	}	return qh;}/* to share a qh (cpu threads, or hc) */static inline struct ehci_qh *qh_get (struct ehci_qh *qh){	kref_get(&qh->kref);	return qh;}static inline void qh_put (struct ehci_qh *qh){	kref_put(&qh->kref, qh_destroy);}/*-------------------------------------------------------------------------*//* The queue heads and transfer descriptors are managed from pools tied * to each of the "per device" structures. * This is the initialisation and cleanup code. */static void ehci_mem_cleanup (struct ehci_hcd *ehci){	if (ehci->async)		qh_put (ehci->async);	ehci->async = NULL;	/* DMA consistent memory and pools */	if (ehci->qtd_pool)		dma_pool_destroy (ehci->qtd_pool);	ehci->qtd_pool = NULL;	if (ehci->qh_pool) {		dma_pool_destroy (ehci->qh_pool);		ehci->qh_pool = NULL;	}	if (ehci->itd_pool)		dma_pool_destroy (ehci->itd_pool);	ehci->itd_pool = NULL;	if (ehci->sitd_pool)		dma_pool_destroy (ehci->sitd_pool);	ehci->sitd_pool = NULL;	if (ehci->periodic)		dma_free_coherent (ehci_to_hcd(ehci)->self.controller,			ehci->periodic_size * sizeof (u32),			ehci->periodic, ehci->periodic_dma);	ehci->periodic = NULL;	/* shadow periodic table */	kfree(ehci->pshadow);	ehci->pshadow = NULL;}/* remember to add cleanup code (above) if you add anything here */static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags){	int i;	/* QTDs for control/bulk/intr transfers */	ehci->qtd_pool = dma_pool_create ("ehci_qtd",			ehci_to_hcd(ehci)->self.controller,			sizeof (struct ehci_qtd),			32 /* byte alignment (for hw parts) */,			4096 /* can't cross 4K */);	if (!ehci->qtd_pool) {		goto fail;	}	/* QHs for control/bulk/intr transfers */	ehci->qh_pool = dma_pool_create ("ehci_qh",			ehci_to_hcd(ehci)->self.controller,			sizeof (struct ehci_qh),			32 /* byte alignment (for hw parts) */,			4096 /* can't cross 4K */);	if (!ehci->qh_pool) {		goto fail;	}	ehci->async = ehci_qh_alloc (ehci, flags);	if (!ehci->async) {		goto fail;	}	/* ITD for high speed ISO transfers */	ehci->itd_pool = dma_pool_create ("ehci_itd",			ehci_to_hcd(ehci)->self.controller,			sizeof (struct ehci_itd),			32 /* byte alignment (for hw parts) */,			4096 /* can't cross 4K */);	if (!ehci->itd_pool) {		goto fail;	}	/* SITD for full/low speed split ISO transfers */	ehci->sitd_pool = dma_pool_create ("ehci_sitd",			ehci_to_hcd(ehci)->self.controller,			sizeof (struct ehci_sitd),			32 /* byte alignment (for hw parts) */,			4096 /* can't cross 4K */);	if (!ehci->sitd_pool) {		goto fail;	}	/* Hardware periodic table */	ehci->periodic = (__le32 *)		dma_alloc_coherent (ehci_to_hcd(ehci)->self.controller,			ehci->periodic_size * sizeof(__le32),			&ehci->periodic_dma, 0);	if (ehci->periodic == NULL) {		goto fail;	}	for (i = 0; i < ehci->periodic_size; i++)		ehci->periodic [i] = EHCI_LIST_END;	/* software shadow of hardware table */	ehci->pshadow = kcalloc(ehci->periodic_size, sizeof(void *), flags);	if (ehci->pshadow != NULL)		return 0;fail:	ehci_dbg (ehci, "couldn't init memory\n");	ehci_mem_cleanup (ehci);	return -ENOMEM;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区日韩欧美| 丰满岳乱妇一区二区三区| 亚洲精品视频在线看| 亚洲国产精品成人综合| 2欧美一区二区三区在线观看视频| 欧美精品免费视频| 欧美一级高清大全免费观看| 欧美日韩一区三区四区| 欧美日韩国产另类一区| 欧美性受极品xxxx喷水| 欧美日韩久久久| 欧美一级在线视频| 精品免费一区二区三区| 精品国产乱码久久久久久1区2区 | 日韩精品专区在线| 宅男噜噜噜66一区二区66| 欧美人体做爰大胆视频| 日韩精品中文字幕在线一区| 久久免费电影网| 中文字幕亚洲欧美在线不卡| 一区二区三区日韩| 午夜视频一区在线观看| 男女男精品网站| 国产伦精品一区二区三区在线观看| 国产盗摄视频一区二区三区| av影院午夜一区| 欧美日韩在线免费视频| 日韩欧美国产系列| 欧美国产亚洲另类动漫| 亚洲欧美日韩久久| 日韩影视精彩在线| 国产在线播放一区| 色综合久久久久综合99| 欧美精品国产精品| 久久精品一级爱片| 亚洲精品少妇30p| 免费日本视频一区| 成人97人人超碰人人99| 91麻豆精品国产91久久久资源速度| 日韩西西人体444www| 欧美国产精品一区二区| 亚洲国产精品精华液网站| 国产一区二区三区免费在线观看 | 精品国产乱码久久久久久夜甘婷婷 | 欧美亚洲综合在线| 欧美xxxx在线观看| 亚洲欧美日本在线| 蜜臀av亚洲一区中文字幕| a4yy欧美一区二区三区| 欧美一级艳片视频免费观看| 国产精品成人网| 蜜臀av亚洲一区中文字幕| 91老师国产黑色丝袜在线| 日韩网站在线看片你懂的| 国内精品伊人久久久久av一坑| av电影天堂一区二区在线 | 中文字幕制服丝袜成人av| 午夜影视日本亚洲欧洲精品| 国产精品资源在线看| 欧美日韩一区二区三区不卡| 国产日产精品1区| 视频一区视频二区中文字幕| 成人在线视频首页| 欧美一区二区日韩一区二区| 亚洲乱码国产乱码精品精的特点 | 中文字幕日韩欧美一区二区三区| 日韩专区中文字幕一区二区| 99精品黄色片免费大全| 精品国产人成亚洲区| 亚洲国产另类av| 99久久99久久综合| 国产亚洲va综合人人澡精品| 五月婷婷欧美视频| 91精品办公室少妇高潮对白| 国产人成亚洲第一网站在线播放 | 99视频在线精品| 久久夜色精品一区| 免费av成人在线| 欧美色大人视频| 亚洲欧洲日韩一区二区三区| 国产乱码精品一区二区三区五月婷| 欧美精选一区二区| 亚洲高清免费在线| 一本色道a无线码一区v| 国产精品三级av在线播放| 激情六月婷婷久久| 欧美一区二区黄| 同产精品九九九| 欧美羞羞免费网站| 一区二区三区在线观看网站| 91丨九色丨尤物| 国产精品福利一区| 成人app网站| 中文字幕一区二区三区精华液| 高清shemale亚洲人妖| 日韩你懂的在线播放| 日韩电影在线观看电影| 欧美日韩在线播放三区| 亚洲h精品动漫在线观看| 欧美三级电影精品| 亚洲午夜影视影院在线观看| 在线观看亚洲精品| 亚洲自拍偷拍图区| 欧美日韩一区二区三区不卡| 亚洲va韩国va欧美va| 欧美人xxxx| 蜜臀久久99精品久久久久宅男 | 国产精品欧美久久久久无广告| 国产制服丝袜一区| 国产日韩精品一区二区三区在线| 国内成+人亚洲+欧美+综合在线| 精品国产一区二区三区久久久蜜月 | 麻豆精品视频在线观看视频| 欧美一区二区不卡视频| 精品一区二区影视| 久久麻豆一区二区| 成人免费毛片aaaaa**| 国产精品久久久久aaaa| 色综合中文字幕国产 | 欧美精品乱码久久久久久| 亚洲国产乱码最新视频| 91精品国产综合久久久久久漫画 | 欧美日韩中文字幕一区二区| 视频一区二区欧美| 日韩精品一区二区三区在线观看| 久久不见久久见免费视频7| 26uuu色噜噜精品一区| 粉嫩久久99精品久久久久久夜| 《视频一区视频二区| 风流少妇一区二区| 久久久久久久久一| 99天天综合性| 亚洲一区二区三区在线看| 7777精品伊人久久久大香线蕉最新版| 久久精品久久久精品美女| 久久久不卡网国产精品一区| a亚洲天堂av| 亚洲va韩国va欧美va| 久久精品一区四区| 色呦呦日韩精品| 久久精品久久久精品美女| 中文字幕中文字幕中文字幕亚洲无线| 欧美三级欧美一级| 久久激情五月激情| 亚洲色图色小说| 日韩视频免费观看高清完整版| 成人中文字幕合集| 视频一区视频二区在线观看| 日本一区二区三区四区在线视频| 在线中文字幕一区| 国产精品123区| 午夜精品福利一区二区蜜股av| 久久久精品影视| 欧美色偷偷大香| 国产成人一区二区精品非洲| 亚洲一区在线观看视频| 久久精品视频一区二区三区| 欧美图片一区二区三区| 国产成人在线观看免费网站| 图片区日韩欧美亚洲| 国产精品天天摸av网| 91精品国产综合久久久久| www.亚洲激情.com| 美女一区二区久久| 亚洲精品免费在线观看| 久久夜色精品国产欧美乱极品| 欧美色视频一区| 成人午夜大片免费观看| 美日韩一区二区三区| 亚洲午夜在线视频| 欧美激情一区二区三区不卡| 日韩视频免费直播| 欧美色爱综合网| 93久久精品日日躁夜夜躁欧美| 国产主播一区二区三区| 日韩电影在线免费看| 一区二区三区免费观看| 亚洲国产岛国毛片在线| 欧美大尺度电影在线| 国产精品免费免费| 精品免费视频.| 制服视频三区第一页精品| 色88888久久久久久影院野外| 国产伦精品一区二区三区免费迷 | 中文字幕一区二区三区在线观看| 精品奇米国产一区二区三区| 欧美精品在线观看播放| 色综合视频在线观看| heyzo一本久久综合| 国产精品一线二线三线精华| 免费成人av在线| 婷婷久久综合九色国产成人| 一级女性全黄久久生活片免费| 国产精品午夜在线观看| 亚洲精品一线二线三线无人区| 91精品国产免费| 91精品国产综合久久精品性色 | 亚洲国产另类精品专区| 亚洲男人天堂一区| 亚洲人成亚洲人成在线观看图片|