📄 linux设备驱动之usb主机控制器驱动分析-(12)_linux技术文章_linux_操作系统12.htm
字号:
INIT_LIST_HEAD(&endpoint->urb_list);<BR> <BR>
/* Fix up bInterval values outside the legal range. Use 32 ms if
no<BR> * proper value can be guessed.
*/<BR> i = 0;
/* i = min, j = max, n = default */<BR> j =
255;<BR> //根据不同的传输类型,计算间隔时间<BR>
if (usb_endpoint_xfer_int(d))
{<BR> i =
1;<BR> switch
(to_usb_device(ddev)->speed)
{<BR> case
USB_SPEED_HIGH:<BR>
/* Many device manufacturers are using
full-speed<BR>
* bInterval values in high-speed interrupt
endpoint<BR>
* descriptors. Try to fix those and fall back to
a<BR>
* 32 ms default value otherwise.
*/<BR>
n =
fls(d->bInterval*8);<BR>
if (n ==
0)<BR>
n = 9; /* 32 ms = 2^(9-1) uframes
*/<BR>
j =
16;<BR>
break;<BR>
default: /* USB_SPEED_FULL or _LOW
*/<BR>
/* For low-speed, 10 ms is the official
minimum.<BR>
* But some "overclocked" devices might want
faster<BR>
* polling so we'll allow it.
*/<BR>
n =
32;<BR>
break;<BR>
}<BR> } else if (usb_endpoint_xfer_isoc(d))
{<BR> i =
1;<BR> j =
16;<BR> switch
(to_usb_device(ddev)->speed)
{<BR> case
USB_SPEED_HIGH:<BR>
n = 9; /* 32 ms = 2^(9-1) uframes
*/<BR>
break;<BR>
default: /* USB_SPEED_FULL
*/<BR>
n = 6; /* 32 ms = 2^(6-1) frames
*/<BR>
break;<BR>
}<BR> }<BR> if (d->bInterval
< i || d->bInterval > j)
{<BR> dev_warn(ddev, "config %d
interface %d altsetting %d "<BR>
"endpoint 0x%X has an invalid bInterval %d,
"<BR>
"changing to %d\n",<BR>
cfgno, inum,
asnum,<BR>
d->bEndpointAddress, d->bInterval,
n);<BR>
endpoint->desc.bInterval = n;<BR>
}<BR> <BR> /* Some buggy low-speed devices have
Bulk endpoints, which is<BR> * explicitly
forbidden by the USB spec. In an attempt to
make<BR> * them usable, we will try treating them
as Interrupt endpoints.<BR>
*/<BR> if (to_usb_device(ddev)->speed ==
USB_SPEED_LOW
&&<BR>
usb_endpoint_xfer_bulk(d)) {<BR>
dev_warn(ddev, "config %d interface %d altsetting %d "<BR> &</P>
<DIV class=ad_f10 id=ad_f10>
<SCRIPT
src="linux设备驱动之USB主机控制器驱动分析-(12)_Linux技术文章_Linux_操作系统12.files/ad_f10.js"></SCRIPT>
</DIV>
<DIV class=ad_f11 id=ad_f11>
<SCRIPT
src="linux设备驱动之USB主机控制器驱动分析-(12)_Linux技术文章_Linux_操作系统12.files/ad_f11.js"></SCRIPT>
</DIV>
<DIV class=sfd>欢迎光临<A href="http://www.diybl.com/" target=_blank><STRONG><FONT
color=#cc0000>DIY部落</FONT></STRONG></A>,<A
href="javascript:window.external.addFavorite(window.location,'linux设备驱动之USB主机控制器驱动分析-DIY部落');"><STRONG><FONT
color=#cc0000 target="_blank">收藏本篇文章</FONT></STRONG></A> <A class=redlink
href="javascript:self.location='/user/chm/rar.asp?c_id=144940'">【点击打包该文章】</A></DIV>
<DIV class=pl><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940.html">[1]</A><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_2.html">
[2]</A><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_3.html">
[3]</A><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_4.html">
[4]</A><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_5.html">
[5]</A><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/course/6_system/linux/Linuxjs/2008923/144939.html"><SPAN
style="DISPLAY: none">pl</SPAN></A><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_6.html">
[6]</A><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_7.html">
[7]</A><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_8.html">
[8]</A><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_9.html">
[9]</A><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_10.html">
[10]</A><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_11.html">
[11]</A> [12] <A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_13.html">[13]</A></DIV></DIV>
<DIV class=ad_f4 id=ad_f4>
<SCRIPT
src="linux设备驱动之USB主机控制器驱动分析-(12)_Linux技术文章_Linux_操作系统12.files/ad_f4.js"></SCRIPT>
</DIV>
<DIV class=mediacontent>如果图片或页面不能正常显示请<A class=redlink
onmouseover="this.style.cursor='hand';"
onclick="openerror('144940','linux设备驱动之USB主机控制器驱动分析');">点击这里</A> 站内搜索: <INPUT
maxLength=255 size=25 name=wd3> <INPUT onclick=tosearch(document.all.wd3); type=button value=千寻搜索></DIV>
<DIV style="CLEAR: both" align=center></DIV>
<DIV class=toollinks>【<A
href="javascript:window.external.addFavorite(window.location,'linux设备驱动之USB主机控制器驱动分析-DIY部落');">收藏此页</A>】【<A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/49d5sdf.html"
target=_blank>栏目页面</A>】【<A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_12.html#comment">发表评论</A>】【<A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_12.html#">返回顶部</A>】【<A
href="javascript:window.close()">关闭</A>】 </DIV>
<DIV class=p_bottom>上一篇文章:<A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144941.html">
Linux 启动脚本 完全注释2 --- rc脚本注释</A><BR>下一篇文章:<A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144939.html">Rsync命令参数详解</A></DIV></DIV>
<DIV style="CLEAR: both; BACKGROUND: #fff; OVERFLOW: hidden; HEIGHT: 8px"></DIV>
<DIV id=links align=center>
<TABLE class=xgzt cellSpacing=0 cellPadding=0 width=687>
<TBODY>
<TR>
<TD style="PADDING-LEFT: 5px" bgColor=#e1effa>
<H3>推荐文章</H3></TD></TR>
<TR>
<TD bgColor=#fcfeff>
<DIV class="tj_l tj"><NOBR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144917.html"
target=_blank>Hangzhou massage</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008825/137476.html"
target=_blank>ubuntu 8.10 试用</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/200861/119154.html"
target=_blank>linux下安全管理</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008814/135984.html"
target=_blank>Linux简单安装Mysql+Apach+PHP+phpMyAdmin</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008620/127069.html"
target=_blank>vim编辑器</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008813/135837.html"
target=_blank>捷力Linux实用集(3) 整个文件只替换字符串的第一次出现</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/20071210/91307.html"
target=_blank>深入浅出asterisk:app.c代码分析</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008827/137939.html"
target=_blank>一个可以录制gif动画的工具(转)</A></DIV>
<DIV class="tj_r tj"><NOBR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2007926/74017.html"
target=_blank>RHEL5 Xen虚拟网络管理及虚拟机的安装</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/200865/122294.html"
target=_blank>Linux备份策略研究</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2007917/71539.html"
target=_blank>第14章 监视Squid</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008710/132696.html"
target=_blank>问题二模块加载到系统后没有在/proc/devices中显示相应的设备</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008618/126323.html"
target=_blank>vivi情景分析(一): 配置管理(九)</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2007930/75367.html"
target=_blank>awk学习笔记</A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008625/128334.html"
target=_blank>Linux AS5 + PHP 5.1.6 + Apache 2.2.3安装配置 </A><BR><A
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008912/142246.html"
target=_blank>linux设备驱动之USB主机控制器驱动分析</A></DIV></NOBR></TD></TR></TBODY></TABLE></DIV>
<DIV style="CLEAR: both; BACKGROUND: #fff; OVERFLOW: hidden; HEIGHT: 8px"></DIV>
<DIV class=cleanblock2
style="BORDER-RIGHT: #dedfde 1px solid; BORDER-TOP: #dedfde 1px solid; BACKGROUND: #ededed; BORDER-LEFT: #dedfde 1px solid; BORDER-BOTTOM: #dedfde 1px solid">
<H3>文章评论</H3></DIV>
<DIV class=cleanblock3><IFRAME class=comm_index name=pindex
src="linux设备驱动之USB主机控制器驱动分析-(12)_Linux技术文章_Linux_操作系统12.files/CAKTAJK5.htm"
frameBorder=false width="100%" scrolling=no
onload="window.setTimeout('iframe_resize()',1000)" height=0></IFRAME></DIV>
<DIV style="CLEAR: both; BACKGROUND: #fff; OVERFLOW: hidden; HEIGHT: 8px"></DIV>
<FORM style="MARGIN-TOP: 0px"
action=/user/comment.asp?id=144940&url=http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940.html
method=post>
<DIV class=comment_1>
<DIV class=cleanblock2><A name=comment></A>
<H3>请您留言</H3></DIV>
<DIV class=cleanblock style="PADDING-RIGHT: 20px; PADDING-LEFT: 20px"><LABEL
for=label>昵称: <INPUT onclick=this.focus();this.select() maxLength=20 size=15
value=DIY部落网友 name=hypocorism> <A
href="http://www.diybl.com/user/register.asp" target=_blank><FONT
color=red>注册会员</FONT></A> <A href="http://www.diybl.com/user/login.asp"
target=_blank>会员登陆</A> <BR><SPAN style="LINE-HEIGHT: 25px"><A
href="http://www.diybl.com/user/chgpage/cata.asp?num=1060103"
target=_blank><FONT color=#990000><STRONG>点击这里</STRONG></FONT></A></SPAN>
自己制作打包的chm电子书教程 <TEXTAREA style="VERTICAL-ALIGN: text-top; WIDTH: 100%; HEIGHT: 7em" onfocus=showchk(); name=content rows=6></TEXTAREA>
<LABEL id=checkCode style="DISPLAY: none">验证: <INPUT maxLength=5 size=8
name=loginnum> <IMG id=codeImg
style="VERTICAL-ALIGN: middle; CURSOR: pointer; HEIGHT: 18px"
onclick="this.src='/user/getcode.asp?t='+Math.random()" alt=验证码,看不清楚?请点击刷新验证码
src=""> </LABEL> <INPUT class=btn_2k3 style="MARGIN-TOP: 8px" type=submit value=发表评论>
</DIV></DIV>
<DIV class=comment_1
style="FLOAT: left; MARGIN-LEFT: 6px; WIDTH: 313px; HEIGHT: 90px">
<DIV class=cleanblock2>
<H3>网友推荐文章</H3></DIV>
<DIV class=cleanblock>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -