butterf1y 发表于 2012-8-21 07:38:03

ok6410 OTG 不能正常工作

当我加载OTG, gadget驱动时:

# 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
# 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: 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: Write Protect is off
sd 22:0:0:0: Mode Sense: 00 00 00 00
sd 22:0:0:0: Assuming drive cache: write through
sd 22:0:0:0: 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: Attached SCSI removable disk

飞凌-chongzi 发表于 2012-8-21 08:26:56

可能是参数不正确吧,那个udisk.img是什么文件

butterf1y 发表于 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

页: [1]
查看完整版本: ok6410 OTG 不能正常工作