嵌入式爱好者

查看: 5681|回复: 3

ok6410 OTG 不能正常工作

[复制链接]

0

主题

0

帖子

5

积分

i.MX6Q通行证

扫一扫,手机访问本帖
发表于 2012-8-21 07:38:03 | 显示全部楼层 |阅读模式
当我加载OTG, gadget驱动时:

[root@FORLINX6410]# insmod g_mass_storage.ko file=udisk.img
g_mass_storage gadget: Mass Storage Function, version: 2009/09/11
g_mass_storage gadget: Number of LUNs=1
lun0: LUN: removable file: /software/udisk.img
g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
g_mass_storage gadget: g_mass_storage ready
s3c-hsotg s3c-hsotg: EP0: DIEPCTL0=0x00008000, DOEPCTL0=0x00008000
s3c-hsotg s3c-hsotg: DCTL=0x00000002
s3c-hsotg s3c-hsotg: EP0: DIEPCTL0=0x00008000, DOEPCTL0=0x80008000
s3c-hsotg s3c-hsotg: S3C_GINTSTS_USBSusp
s3c-hsotg s3c-hsotg: S3C_GINTSTS_USBSusp
s3c-hsotg s3c-hsotg: bound driver g_mass_storage
[root@FORLINX6410]# s3c-hsotg s3c-hsotg: s3c_hsotg_irq: USBRst
s3c-hsotg s3c-hsotg: new device is high-speed
s3c-hsotg s3c-hsotg: s3c_hsotg_irq: USBRst
s3c-hsotg s3c-hsotg: new device is high-speed
s3c-hsotg s3c-hsotg: s3c_hsotg_irq: USBRst
s3c-hsotg s3c-hsotg: new device is high-speed
s3c-hsotg s3c-hsotg: s3c_hsotg_irq: USBRst
s3c-hsotg s3c-hsotg: new device is high-speed
s3c-hsotg s3c-hsotg: s3c_hsotg_irq: USBRst
s3c-hsotg s3c-hsotg: new device is high-speed
s3c-hsotg s3c-hsotg: s3c_hsotg_irq: USBRst
s3c-hsotg s3c-hsotg: new device is high-speed
s3c-hsotg s3c-hsotg: s3c_hsotg_irq: USBRst
s3c-hsotg s3c-hsotg: new device is high-speed
s3c-hsotg s3c-hsotg: s3c_hsotg_irq: USBRst
s3c-hsotg s3c-hsotg: new device is high-speed
s3c-hsotg s3c-hsotg: S3C_GINTSTS_USBSusp
s3c-hsotg s3c-hsotg: s3c_hsotg_irq: USBRst
s3c-hsotg s3c-hsotg: new device is full-speed
s3c-hsotg s3c-hsotg: s3c_hsotg_irq: USBRst
s3c-hsotg s3c-hsotg: new device is full-speed
s3c-hsotg s3c-hsotg: new address 37
g_mass_storage gadget: full speed config #1: Linux File-Backed Storage
s3c-hsotg s3c-hsotg: s3c_hsotg_ep_sethalt(ep cfad3954 ep1in, 1)
s3c-hsotg s3c-hsotg: s3c_hsotg_ep_sethalt(ep cfad3954 ep1in, 0)
s3c-hsotg s3c-hsotg: s3c_hsotg_irq: USBRst
s3c-hsotg s3c-hsotg: new device is full-speed
s3c-hsotg s3c-hsotg: s3c_hsotg_epint: ep0: INTknEP
s3c-hsotg s3c-hsotg: s3c_hsotg_epint: ep0: INTknEP
s3c-hsotg s3c-hsotg: s3c_hsotg_epint: ep0: INTknEP
s3c-hsotg s3c-hsotg: s3c_hsotg_epint: ep0: INTknEP
s3c-hsotg s3c-hsotg: s3c_hsotg_epint: ep0: INTknEP
s3c-hsotg s3c-hsotg: s3c_hsotg_epint: ep0: INTknEP
****


主机那边一直在复位:
usb 2-7: new high speed USB device number 80 using ehci_hcd
usb 2-7: device descriptor read/64, error -71
usb 2-7: device descriptor read/64, error -71
usb 2-7: new high speed USB device number 81 using ehci_hcd
usb 2-7: device descriptor read/64, error -71
usb 2-7: device descriptor read/64, error -71
usb 2-7: new high speed USB device number 82 using ehci_hcd
usb 2-7: device not accepting address 82, error -71
usb 2-7: new high speed USB device number 83 using ehci_hcd
usb 2-7: device not accepting address 83, error -71
hub 2-0:1.0: unable to enumerate USB device on port 7
usb 9-1: new full speed USB device number 38 using uhci_hcd
usb 9-1: not running at top speed; connect to a high speed hub
usb 9-1: New USB device found, idVendor=0525, idProduct=a4a5
usb 9-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 9-1: Product: Mass Storage Gadget
usb 9-1: Manufacturer: Linux 2.6.36.2 with s3c-hsotg
usb 9-1: configuration #1 chosen from 1 choice
scsi22 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 38
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 22:0:0:0: Direct-Access     Linux    File-CD Gadget   0326 PQ: 0 ANSI: 2
sd 22:0:0:0: Attached scsi generic sg13 type 0
sd 22:0:0:0: [sdm] 20480 512-byte logical blocks: (10.4 MB/10.0 MiB)
usb 9-1: reset full speed USB device number 38 using uhci_hcd
usb 9-1: device descriptor read/64, error -110
usb 9-1: device descriptor read/64, error -71
usb 9-1: reset full speed USB device number 38 using uhci_hcd
usb 9-1: device descriptor read/64, error -110
usb 9-1: device descriptor read/64, error -71
usb 9-1: reset full speed USB device number 38 using uhci_hcd
usb 9-1: device not accepting address 38, error -84
usb 9-1: reset full speed USB device number 38 using uhci_hcd
usb 9-1: device descriptor read/8, error -110
usb 9-1: device descriptor read/8, error -110
usb 9-1: USB disconnect, device number 38
sd 22:0:0:0: Device offlined - not ready after error recovery
sd 22:0:0:0: [sdm] Write Protect is off
sd 22:0:0:0: [sdm] Mode Sense: 00 00 00 00
sd 22:0:0:0: [sdm] Assuming drive cache: write through
sd 22:0:0:0: [sdm] Attached SCSI removable disk
usb 9-1: new full speed USB device number 39 using uhci_hcd
usb 9-1: device descriptor read/64, error -71
usb 9-1: device descriptor read/64, error -110
usb 9-1: new full speed USB device number 40 using uhci_hcd
usb 9-1: device descriptor read/64, error -71
usb 9-1: device descriptor read/64, error -110
usb 9-1: new full speed USB device number 41 using uhci_hcd
usb 9-1: device descriptor read/8, error -110
usb 9-1: device descriptor read/8, error -110
usb 9-1: new full speed USB device number 42 using uhci_hcd
usb 9-1: device descriptor read/8, error -110
usb 9-1: device descriptor read/8, error -110
hub 9-0:1.0: unable to enumerate USB device on port 1

当我使用insmod g_mass_storage.ko,不加任何参数时又能工作,这是怎么回事?
usb 2-7: new high speed USB device number 84 using ehci_hcd
usb 2-7: device descriptor read/64, error -71
usb 2-7: device descriptor read/64, error -71
usb 2-7: new high speed USB device number 85 using ehci_hcd
usb 2-7: device descriptor read/64, error -71
usb 2-7: device descriptor read/64, error -71
usb 2-7: new high speed USB device number 86 using ehci_hcd
usb 2-7: device not accepting address 86, error -71
usb 2-7: new high speed USB device number 87 using ehci_hcd
usb 2-7: device not accepting address 87, error -71
hub 2-0:1.0: unable to enumerate USB device on port 7
usb 9-1: new full speed USB device number 43 using uhci_hcd
usb 9-1: not running at top speed; connect to a high speed hub
usb 9-1: New USB device found, idVendor=0525, idProduct=a4a5
usb 9-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 9-1: Product: Mass Storage Gadget
usb 9-1: Manufacturer: Linux 2.6.36.2 with s3c-hsotg
usb 9-1: configuration #1 chosen from 1 choice
scsi23 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 43
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 23:0:0:0: Direct-Access     Linux    File-CD Gadget   0326 PQ: 0 ANSI: 2
sd 23:0:0:0: Attached scsi generic sg13 type 0
sd 23:0:0:0: [sdm] Attached SCSI removable disk
回复

使用道具 举报

1

主题

3670

帖子

4180

积分

发表于 2012-8-21 08:26:56 | 显示全部楼层
可能是参数不正确吧,那个udisk.img是什么文件
技术支持电话:0312-3119192
技术支持邮箱:Android@forlinx.com
点评回复 支持 反对

使用道具 举报

0

主题

0

帖子

5

积分

i.MX6Q通行证

 楼主| 发表于 2012-8-21 08:37:50 | 显示全部楼层
udisk.img只是一个用dd if=/dev/zero of=udisk.img bs=1M count=10成生的一个文件,我把文件格式化成FAT32再试试
点评回复 支持 反对

使用道具 举报

idle_cloud 该用户已被删除
发表于 2012-8-22 14:45:07 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
点评回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-12-25 21:54

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表