⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linux设备驱动之usb主机控制器驱动分析-(13)_linux技术文章_linux_操作系统13.htm

📁 linux设备驱动之USB主机控制器驱动分析
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0073)http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_13.html -->
<HTML><HEAD><TITLE>linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统</TITLE>
<META http-equiv=Content-Type content=text/html;charset=gb2312>
<META content=www.diybl.com,DIY部落版权所有 name=Copyright>
<META content=linux设备驱动之USB主机控制器驱动分析_Linux技术文章_Linux_操作系统 name=keywords>
<META 
content="linux设备驱动之USB主机控制器驱动分析_Linux技术文章_#160;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; " 
name=description B..? is 0x%X endpoint>
<META content=index,follow name=robots>
<META content=INDEX,FOLLOW name=GOOGLEBOT><LINK href="article2.css" 
type=text/css rel=stylesheet><LINK 
href="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.files/article2.css" 
type=text/css rel=stylesheet>
<SCRIPT 
src="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.files/article.js" 
type=text/javascript></SCRIPT>

<SCRIPT 
src="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.files/1060103.js" 
type=text/javascript></SCRIPT>

<META content="MSHTML 6.00.2900.3395" name=GENERATOR></HEAD>
<BODY><INPUT type=hidden value=144940 name=passage_id><INPUT type=hidden 
value=1060103 name=catalog_id> 
<DIV id=wrap>
<DIV class=top_bar align=center>
<TABLE cellSpacing=0 width=935>
  <TBODY>
  <TR>
    <TD><A href="http://www.diybl.com/">网站首页</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://news.diybl.com/" target=_blank>新闻首页</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://www.diybl.com/course/1_web/">网页设计</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://www.diybl.com/course/2_picdesign/">图形动画</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://www.diybl.com/course/3_program/">软件编程</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://www.diybl.com/course/4_webprogram/">网站开发</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://www.diybl.com/course/5_office/">办公软件</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://www.diybl.com/course/6_system/">操作系统</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://www.diybl.com/course/7_databases/">数据库</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://www.diybl.com/course/webjsh/">网络技术</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://www.diybl.com/course/comshiti/">认证考试</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://www.diybl.com/course/fwzl/">范文资料</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://www.diybl.com/course/hack/">黑客攻防</A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://www.diybl.com/chm/" target=_blank><FONT 
      color=red>书籍教程</FONT></A></TD>
    <TD class=top_bar_sline></TD>
    <TD><A href="http://bbs.diybl.com/" 
target=_blank>进入论坛</A></TD></TR></TBODY></TABLE></DIV>
<TABLE class=adNone id=PublicRelation cellSpacing=0 cellPadding=0 width=950 
border=0>
  <TBODY>
  <TR>
    <TD vAlign=top width=864>
      <DIV class=logo><A href="http://www.diybl.com/" target=_blank><IMG 
      height=60 
      src="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.files/logo.gif" 
      width=200></A></DIV>
      <DIV class=ad_f1 id=ad_f1>
      <SCRIPT 
      src="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.files/ad_f1.js"></SCRIPT>
      </DIV><!--<div class="top_bar2">-->
      <UL class=menu>
        <LI><A href="http://www.diybl.com/course/6_system/linux/" 
        target=_blank><SPAN>Linux</SPAN></A>
        <LI><A href="http://www.diybl.com/course/6_system/linux/Linuxxl/" 
        target=_blank><SPAN>Linux系列教程</SPAN></A>
        <LI><A href="http://www.diybl.com/course/6_system/linux/linuxjq/" 
        target=_blank><SPAN>Linux应用技巧</SPAN></A>
        <LI><A 
        href="http://www.diybl.com/course/6_system/linux/Linuxjs/18fdsdzoktk.html" 
        target=_blank><SPAN>Linux技术文章</SPAN></A></LI></UL><!--</div>--></TD>
    <TD width=6></TD>
    <TD vAlign=top align=middle width=100>
      <DIV class=hotNCout>
      <DIV class=hotNC>
      <UL>
        <LI><A 
        href="javascript:window.external.addFavorite('http://www.diybl.com/','DIY部落');">加入收藏</A> 

        <LI><A href="http://www.diybl.com/map.html" target=_blank>网站地图</A> 
        <LI><A href="http://www.diybl.com/chm/" target=_blank>书籍教程</A> 
        <LI><A href="http://www.diybl.com/user/register.asp" 
        target=_blank>会员注册</A> </LI></UL></DIV></DIV></TD></TR></TBODY></TABLE>
<DIV class=split style="HEIGHT: 3px"></DIV>
<DIV class=ad_ftop id=ad_ftop>
<SCRIPT 
src="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.files/ad_ftop.js"></SCRIPT>
</DIV>
<DIV class=subNav>
<DIV style="FLOAT: right"><INPUT name=wd1> <INPUT onclick=tosearch(document.all.wd1); type=button value=" 千寻搜索 "></DIV><SPAN><A 
href="http://www.diybl.com/">DIY部落</A> &gt;&gt; <A 
href="http://www.diybl.com/course/6_system/">操作系统</A> &gt;&gt; <A 
href="http://www.diybl.com/course/6_system/linux/">Linux</A> &gt;&gt; <A 
href="http://www.diybl.com/course/6_system/linux/Linuxjs/18fdsdzoktk.html">Linux技术文章</A> 
&gt;&gt; 正文</SPAN></DIV>
<DIV class=split></DIV>
<DIV class=main>
<DIV class=lc_blue>
<DIV class=lcBlk>
<H1>linux设备驱动之USB主机控制器驱动分析</H1>
<DIV class=from_info>http://www.diybl.com/ 2008-9-23  网络 点击:<SPAN 
style="FONT-WEIGHT: bold; COLOR: #ff0000">
<SCRIPT 
src="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.files/p_count.htm" 
lanuage="javascript"></SCRIPT>
 </SPAN> <A 
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_13.html#comment">[ 
评论 ]</A></DIV>
<DIV class=artibody>
<DIV class=ad_f2 id=ad_f2>
<SCRIPT 
src="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.files/ad_f2.js"></SCRIPT>
</DIV>
<DIV class=ad_f3 id=ad_f3>
<SCRIPT 
src="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.files/ad_f3.js"></SCRIPT>
</DIV>文章搜索: <INPUT maxLength=255 size=30 name=wd2> &nbsp;&nbsp; <INPUT onclick=tosearch(document.all.wd2); type=button value=千寻搜索><A 
class=redlink 
href="javascript:self.location='/user/chm/rar.asp?c_id=48375'">【点击打包该文章】</A>
<SCRIPT 
src="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.files/art_top.js"></SCRIPT>
 
<P><SPAN>#160;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "endpoint 
0x%X is Bulk; changing to 
Interrupt\n",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; cfgno, inum, asnum, 
d-&gt;bEndpointAddress);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
endpoint-&gt;desc.bmAttributes = 
USB_ENDPOINT_XFER_INT;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
endpoint-&gt;desc.bInterval = 
1;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
(le16_to_cpu(endpoint-&gt;desc.wMaxPacketSize) &gt; 
8)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
endpoint-&gt;desc.wMaxPacketSize = cpu_to_le16(8);<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp; /* Skip over any Class Specific or 
Vendor Specific descriptors;<BR>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;* find the next 
endpoint or interface descriptor */<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;//同之前分析的一样,下一个描述符的有效地址和偏移<BR>&nbsp;&nbsp;&nbsp;&nbsp; endpoint-&gt;extra = 
buffer;<BR>&nbsp;&nbsp;&nbsp;&nbsp; i = find_next_descriptor(buffer, size, 
USB_DT_ENDPOINT,<BR>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
USB_DT_INTERFACE, &amp;n);<BR>&nbsp;&nbsp;&nbsp;&nbsp; endpoint-&gt;extralen = 
i;<BR>&nbsp;&nbsp;&nbsp;&nbsp; if (n &gt; 
0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dev_dbg(ddev, "skipped %d 
descriptor%s after %s\n",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; n, plural(n), "endpoint");<BR>&nbsp;&nbsp;&nbsp;&nbsp; return 
buffer - buffer0 + 
i;<BR>&nbsp;<BR>skip_to_next_endpoint_or_interface_descriptor:<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
i = find_next_descriptor(buffer, size, 
USB_DT_ENDPOINT,<BR>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
USB_DT_INTERFACE, NULL);<BR>&nbsp;&nbsp;&nbsp;&nbsp; return buffer - buffer0 + 
i;<BR>}<BR>&nbsp;<BR>到这里,root 
hub对应的配置,接口,端点信息都可以在usb_dev中找到了.UHCI的初始化工作就全部完成了.在之后的分析中,会经常涉及到具体的信息传输过程.在前面的代码中遇到也一笔代过了.为了以后的分析方便,在下一节里,对每个类型的传输过程做一个全面的分析.<BR>&nbsp;</SPAN> 
</P>
<DIV class=ad_f10 id=ad_f10>
<SCRIPT 
src="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.files/ad_f10.js"></SCRIPT>
</DIV>
<DIV class=ad_f11 id=ad_f11>
<SCRIPT 
src="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.files/ad_f11.js"></SCRIPT>
</DIV>
<DIV class=kjh>欢迎光临<A href="http://www.diybl.com/" target=_blank><STRONG><FONT 
color=#cc0000>DIY部落</FONT></STRONG></A>,<A 
href="http://www.diybl.com/course/6_system/linux/Linuxjs/18fdsdzoktk.html" 
target=_blank><STRONG><FONT color=#cc0000>点击这里</FONT></STRONG></A>查看更多文章教程   <A 
class=redlink 
href="javascript:self.location='/user/chm/rar.asp?c_id=144940'">【点击打包该文章】</A></DIV>
<DIV class=klkl><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/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><A 
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/course/6_system/linux/Linuxjs/2008923/144939.html"><SPAN 
style="DISPLAY: none">'klkl'</SPAN></A><A 
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_12.html"> 
[12]</A> [13] </DIV></DIV>
<DIV class=ad_f4 id=ad_f4>
<SCRIPT 
src="linux设备驱动之USB主机控制器驱动分析-(13)_Linux技术文章_Linux_操作系统13.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> &nbsp;&nbsp;<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/18fdsdzoktk.html" 
target=_blank>栏目页面</A>】【<A 
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_13.html#comment">发表评论</A>】【<A 
href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008923/144940_13.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/2008829/138581.html" 
      target=_blank>BSD的sh和csh的重定向操作符全解</A><BR><A 
      href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008710/132707.html" 
      target=_blank>用GRUB(包括WINGRUB)命令行模式引导安装Linux</A><BR><A 
      href="http://www.diybl.com/course/6_system/linux/Linuxjs/200865/122281.html" 
      target=_blank>gdb 调式子进程</A><BR><A 
      href="http://www.diybl.com/course/6_system/linux/Linuxjs/20071129/88867.html" 
      target=_blank>基于Linux操作系统的目录服务的实现</A><BR><A 
      href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008822/137059.html" 
      target=_blank>iftop 查看你的网卡流量</A><BR><A 
      href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008827/137903.html" 
      target=_blank>Linux下配置mysql,集群等....</A><BR><A 
      href="http://www.diybl.com/course/6_system/linux/Linuxjs/20071226/94117.html" 
      target=_blank>RED HAT AS4 升级 内核从2.6.9-22升级到2.6.9-34</A><BR><A 
      href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008819/136273.html" 
      target=_blank>用rsync实现网站镜像和备份</A></DIV>
      <DIV class="tj_r tj"><NOBR><A 
      href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008827/137886.html" 
      target=_blank>linux下driver disk 的制作</A><BR><A 
      href="http://www.diybl.com/course/6_system/linux/Linuxjs/200896/139451.html" 
      target=_blank>google浏览器--Chrome的介绍</A><BR><A 
      href="http://www.diybl.com/course/6_system/linux/Linuxjs/200875/130394.html" 
      target=_blank>Proc asound 文档</A><BR><A 
      href="http://www.diybl.com/course/6_system/linux/Linuxjs/2008622/127520.html" 
      target=_blank>NS编程与调试 - vim的用法zz</A><BR><A 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -