注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

我的博客

笨笨猫

 
 
 

日志

 
 

usb debug  

2011-10-20 11:03:30|  分类: MeeGo |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

今天调试USB HOST ,当插入U盘的时候发现了以下的错误

device descriptor read/64, error -71

源代码中的-71(/include/asm-generic/erro.h)代表的是协议的错误,百思不得其解

晚上睡觉的时候,想到,协议的错误应该就是时序的错误,时序的错误就代表了硬件走线应该是有问题,

把到USB端口的线做的很短,发现问题解决了。

-------------------------------------

设备在2.4下工作正常,但是到了2.6下面会出现device descriptor read/64, error -110错误,这样设备就没有挂上,不能使用,只有拔插操作才能解决。

有人碰到马?怎么解觉得?

我知道对于一些flash 卡,可以通过修改scsi 里面的 inq_timeout 来解决。因为有些老设备反应时间较长。

但是对于其他设备呢?

共同讨论。

richardhesidu 发表于 2008-10-25 08:19

echo -1 >/sys/module/usbcore/parameters/autosuspend
-----------------------------
usb device descriptor read/64 error -62

Hey all,

I recently bought a DVI+USB KVM switch. After receiving it the day before yesterday it worked like a charm, switching between my windows laptop (work) and my Ubuntu 8.10 box.

The odd thing is that next day its suddenly not working. There was a software update through the update manager right after I installed, that may be to blame, but I don't remember what it updated.

Now when I boot up the USB component (that carries the mouse and keyboard signal) gives me an error when Xorg launches:

usb device descriptor read/64 error -62

I have searched for this error, and found some articles with a similar error (different -71 instead of -62) that suggested the ehci_hcd module is to blame (bug in the kernel) but I tried the workaround (rmmod ehci_hcd) and this didn't fix anything.

Its just really weird that it would work one day, and not the next.

Any suggestions appreciated.
Did you find a solution?

I've been looking for one for about two years.

None of the solutions I've found work

The most promising was this one

http://ubuntuforums.org/showthread.php?t=797789

I had to add usbcore.autosuspend=-1 in the grub menu for the kernel line I'm booting with.

Still no cigar.

Did you try this:
http://www.mepis.org/node/5860

In short as root:
echo Y > /sys/module/usbcore/parameters/old_scheme_first

(5)
由于PQFP封装的AT91RM9200只有一个usb主端口,而usb从端口是不能用。在Linux2-.6.21启动时会有以下错误提示:
usb 1-2: new low speed USB device using at91_ohci and address 2
usb 1-2: device descriptor read/64, error -62
usb 1-2: device descriptor read/64, error -62
usb 1-2: new low speed USB device using at91_ohci and address 3
usb 1-2: device descriptor read/64, error -62
usb 1-2: device descriptor read/64, error -62
usb 1-2: new low speed USB device using at91_ohci and address 4
usb 1-2: device not accepting address 4, error -62
usb 1-2: new low speed USB device using at91_ohci and address 5
usb 1-2: device not accepting address 5, error -62

解决:
在/linux/arch/arm/mach-at91/board-dk.c文件,将usb ports值改为1,则显示有一个usb端口。
static struct at91_usbh_data __initdata dk_usbh_data = {
.ports =1, // 2,
};

不知道动了什么,内核启动的时候忽然打印出下面的错误信息:

usb 1-1: new full speed USB device using s3c2410-ohci and address 2
usb 1-1: device descriptor read/64, error -62
usb 1-1: device descriptor read/64, error -62
usb 1-1: new full speed USB device using s3c2410-ohci and address 3
usb 1-1: device descriptor read/64, error -62
usb 1-1: device descriptor read/64, error -62
usb 1-1: new full speed USB device using s3c2410-ohci and address 4
usb 1-1: device not accepting address 4, error -62
usb 1-1: new full speed USB device using s3c2410-ohci and address 5
usb 1-1: device not accepting address 5, error -62

 

在网上查了下说是UPLLCON赋值的问题。

 

试了些办法,最终延长了MPLLCON寄存器赋值和UPLLCON寄存器赋值之间延迟后解决了错误。

 

具体修改了以下代码:
vi uboot1.1.4/board/fl2440/fl2440.c


修改board_init函数以下语句:
        clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV);

        /* some delay between MPLL and UPLL */
        delay (4000);
       
        /* configure UPLL */
       clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV);
将其改为:
        clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV);

        /* some delay between MPLL and UPLL */
        delay (4000);

 

        delay (4000);
       
        /* configure UPLL */
        clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV);

 

也就是多加一个delay (4000);


向各位高手请教,最近我移植了linux-2.6.20(+2.6.20-at91.patch)到AT91RM9200的板子上,在usb口上插上u盘可用,信息如下:
usb 1-1: new full speed USB device using at91_ohci and address 11
usb 1-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
scsi 0:0:0:0: Direct-Access USB Flash Disk 2.00 PQ: 0 ANSI: 2
SCSI device sda: 509376 512-byte hdwr sectors (261 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
SCSI device sda: 509376 512-byte hdwr sectors (261 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
sda: sda1
sd 0:0:0:0: Attached scsi removable disk sda
说明usb口上插入u盘时可以用的。

在usb口上插入usb HUB 提示信息如下:
# usb 1-1: new full speed USB device using at91_ohci and address 6
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
说明系统检测到了usb hub
但是在usb Hub上插上U盘过后出现信息如下:
usb 1-1.2: new full speed USB device using at91_ohci and address 7
usb 1-1.2: device descriptor read/64, error -62
usb 1-1.2: device descriptor read/64, error -62
usb 1-1.2: new full speed USB device using at91_ohci and address 8
usb 1-1.2: device descriptor read/64, error -62
usb 1-1.2: device descriptor read/64, error -62
usb 1-1.2: new full speed USB device using at91_ohci and address 9
usb 1-1.2: device not accepting address 9, error -62
usb 1-1.2: new full speed USB device using at91_ohci and address 10
usb 1-1.2: device not accepting address 10, error -62

我在asm-generic/errno.h中 error -62 为:
#define ETIME 62 /* Timer expired */
在Documentation/usb/error-codes.txt
-ETIME (**) No response packet received within the prescribed
bus turn-around time. This error may instead be
reported as -EPROTO or -EILSEQ.

请各路高手帮我分析一下,到底是什么原因?不胜感激。
其他的2.6的内核也试过了,也出现同样的问题。


我换了一个USB HUB过后可以用了。



我最近也遇到这样的问题了,郁闷中。
我的是isp1161,同样,设备直接连接没问题。一旦通过2.0的HUB接,则只有低速设备可以工作。假如2.0HUB和主机之间再插入一个1.1的HUB,又没有问题了。
我把isp1161的驱动和文档都看烂了也没发现问题。同样版本的内核,驱动2410的host,也没问题。
我只能猜想,这些所谓的“兼容USB2.0”的1.1主机,硬件上不兼容2.0HUB。

MICRO2440 USBHUB识别不到 -62错误

usb debug - 笨笨猫 - 我的博客
买的MICRO2440的开发板,USB HUB那块有时候不能识别到,不知道是什么原因!希望你们公司能帮忙解决!!
usb 1-1: new full speed USB device using s3c2410-ohci and address 2
usb 1-1: device descriptor read/64, error -62
usb 1-1: device descriptor read/64, error -62
usb 1-1: new full speed USB device using s3c2410-ohci and address 3
usb 1-1: device descriptor read/64, error -62
usb 1-1: device descriptor read/64, error -62
usb 1-1: new full speed USB device using s3c2410-ohci and address 4
usb 1-1: device not accepting address 4, error -62
usb 1-1: new full speed USB device using s3c2410-ohci and address 5
usb 1-1: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 1
问题终于找到了,硬件上的问题!我发现你们友善之臂的东西也就玩玩可以,如果要用来做项目生产真是有问题,硬件上的东西出这种问题,我真是无语,至于是什么原因你们自己好好反省下吧!

查了这么多天,一直未找出原因来!究竟usb_control_msg函数返回-62是什么引起的! 估计是与CPU本身时钟设置有关!在那里能看到与CPU USB HOST设置相关的代码呢,正在追查.......
你的USB 硬件有问题。先检查硬件USB供电,再看驱动。

-62的错误是超时错误,时钟问题和USB供电问题。

我遇到过此类的错误,你出现了好多非时钟错误,应该是USB供电有问题。

我已经试过修改old_scheme_first和HUB_BOOT_RESET_TIME=HUB_SHORT_RESET_TIME=HUB_LONG_RESET_TIME=500.
还是会出现这些信息.请各位高手帮忙,谢谢!

网上找了个方法,估计是把这个问题解决了(不间断的测试了几次)
总结在这里,给以后遇到同样问题的朋友看吧:)
USB读写不稳定解决方法

       在目录kernel26_h/drivers/usb/host/ohci-s3c2410.c文件中将下面函数的内同修改为



static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd)

{

       struct s3c2410_hcd_info *info = dev->dev.platform_data;



       //======

       unsigned long upllvalue =  (0x38<<12)|(0x02<<4)|(0x01);

       unsigned long upllvalue1 = (0x38<<12)|(0x02<<4)|(0x02);

       dev_dbg(&dev->dev, "s3c2410_start_hc:\n");

//=====

       __raw_writel(upllvalue,S3C2410_UPLLCON);

       mdelay(20);

       __raw_writel(upllvalue1,S3C2410_UPLLCON);

       mdelay(20);

//=====

       clk_enable(clk);

       mdelay(10);

       if (info != NULL) {

              info->hcd       = hcd;

              info->report_oc = s3c2410_hcd_oc;



              if (info->enable_oc != NULL) {

                     (info->enable_oc)(info, 1);

              }

       }

}

主要功能是在USB寄存器初始化的之前给它较高的频率,等初始化完成后在将频率恢复为正常的48MHZ。
  评论这张
 
阅读(3267)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017