Hello,
I'm porting uClinux for W90N740, the kernel is booted successful, but the USB
Host has some problems. After the kernel is booted, I plug in a USB Card
reader, the kernel outputs the following messages, I don't understand the
messages, :(
The attachment is the HCD source code for W90N740.
$ cat /proc/kmsg &
74
$ <5>Linux version 2.6.22-uc0 ([EMAIL PROTECTED]) (gcc version 3.4.3) #479 Mon
Oct 1 12:32:33 CST 2007
<4>CPU: Winbond-W90N740 [32103201] revision 1 (ARMvundefined/unknown),
cr=00000000
<4>Machine: W90N740
<4>W90N740 cache init
<7>On node 0 totalpages: 4096
<7> DMA zone: 32 pages used for memmap
<7> DMA zone: 0 pages reserved
<7> DMA zone: 4064 pages, LIFO batch:0
<7> Normal zone: 0 pages used for memmap
<4>Built 1 zonelists. Total pages: 4064
<5>Kernel command line: init=/linuxrc console=ttyS0,115200 root=31:2
<4>PID hash table entries: 64 (order: 6, 256 bytes)
<4>Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
<4>Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
<6>Memory:1 banks
<4> 16MB = 16MB total
<5>Memory: 14772KB available (1168K code, 244K data, 44K init)
<6>Calibrating delay loop... <5>39.83 BogoMIPS
<4>Mount-cache hash table entries: 512
<5>SCSI subsystem initialized
<6>usbcore: registered new interface driver usbfs
<6>usbcore: registered new interface driver hub
<6>usbcore: registered new device driver usb
<4>NetWinder Floating Point Emulator V0.97 (double precision)
<6>NTFS driver 2.1.28 [Flags: R/W].
<6>io scheduler noop registered (default)
<6>Serial: W90N740 driver $Revision: 1.00 $
<3>scsi_debug_init: out of memory, 1
<4>uclinux[mtd]: RAM probe address=0x7f000000 size=0x200000
<5>Creating 5 MTD partitions on "cramfs":
<5>0x00000000-0x00010000 : "uBoot"
<5>0x00010000-0x00100000 : "Kernel"
<5>0x00100000-0x001e0000 : "Cramfs"
<5>0x001e0000-0x001f0000 : "ParamA"
<5>0x001f0000-0x00200000 : "ParamB"
<4>uclinux[mtd]: set Cramfs to be root filesystem
<7>ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
<7>ohci_hcd: block sizes: ed 64 td 64
<4>w90n740_usb_set_power(0013b4f8, 1, 1)
<4>w90n740_usb_set_power(0013b4f8, 2, 1)
<4>w90n740 start USB host controller.
<6>w90n740-ohci w90n740-ohci: W90N74X OHCI
<7>drivers/usb/core/inode.c: creating file 'devices'
<7>drivers/usb/core/inode.c: creating file '001'
<6>w90n740-ohci w90n740-ohci: new USB bus registered, assigned bus number 1
<6>w90n740-ohci w90n740-ohci: irq 9, io mem 0xfff05000
<7>w90n740-ohci w90n740-ohci: created debug files
<7>w90n740-ohci w90n740-ohci: enabling initreset quirk
<7>w90n740-ohci w90n740-ohci: OHCI controller state
<7>w90n740-ohci w90n740-ohci: OHCI 1.0, NO legacy support registers
<7>w90n740-ohci w90n740-ohci: control 0x083 HCFS=operational CBSR=3
<7>w90n740-ohci w90n740-ohci: cmdstatus 0x00000 SOC=0
<7>w90n740-ohci w90n740-ohci: intrstatus 0x00000004 SF
<7>w90n740-ohci w90n740-ohci: intrenable 0x8000004a MIE RHSC RD WDH
<7>w90n740-ohci w90n740-ohci: hcca frame #0004
<7>w90n740-ohci w90n740-ohci: roothub.a 01000002 POTPGT=1 NDP=2(2)
<7>w90n740-ohci w90n740-ohci: roothub.b 00000000 PPCM=0000 DR=0000
<7>w90n740-ohci w90n740-ohci: roothub.status 00008000 DRWE
<7>w90n740-ohci w90n740-ohci: roothub.portstatus [0] 0x00000100 PPS
<7>w90n740-ohci w90n740-ohci: roothub.portstatus [1] 0x00000100 PPS
<7>usb usb1: default language 0x0409
<7>usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
<6>usb usb1: Product: W90N74X OHCI
<6>usb usb1: Manufacturer: Linux 2.6.22-uc0 ohci_hcd
<6>usb usb1: SerialNumber: W90N74x
<7>usb usb1: uevent
<7>usb usb1: usb_probe_device
<6>usb usb1: configuration #1 chosen from 1 choice
<7>usb usb1: adding 1-0:1.0 (config #1, interface 0)
<7>usb 1-0:1.0: uevent
<7>usb 1-0:1.0: uevent
<7>hub 1-0:1.0: usb_probe_interface
<7>hub 1-0:1.0: usb_probe_interface - got id
<6>hub 1-0:1.0: USB hub found
<6>hub 1-0:1.0: 2 ports detected
<7>hub 1-0:1.0: standalone hub
<7>hub 1-0:1.0: ganged power switching
<7>hub 1-0:1.0: global over-current protection
<7>hub 1-0:1.0: power on to power good time: 2ms
<7>hub 1-0:1.0: local power source is good
<7>hub 1-0:1.0: no over-current condition exists
<7>hub 1-0:1.0: enabling power on all ports
<7>hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0000
<7>drivers/usb/core/inode.c: creating file '001'
<6>Initializing USB Mass Storage driver...
<7>w90n740-ohci w90n740-ohci: GetStatus roothub.portstatus [0] = 0x00000100 PPS
<7>w90n740-ohci w90n740-ohci: GetStatus roothub.portstatus [1] = 0x00000100 PPS
<6>usbcore: registered new interface driver usb-storage
<6>USB Mass Storage support registered.
<4>VFS: Mounted root (cramfs filesystem) readonly.
<6>Freeing init memory: 44K
<7>opening ttyS0...uart_open(0) called
<4>Open an initial console succeed.
<5>Clock: old time 1970/01/01 - 00:00:01 GMT
<5>Clock: new time 2007/06/01 - 10:37:47 GMT
The card reader is plugged into the USB port at this time and the kernel prints
the following messages:
<7>w90n740-ohci w90n740-ohci: rhsc
<7>hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0002
<7>w90n740-ohci w90n740-ohci: GetStatus roothub.portstatus [0] = 0x00010101 CSC
PPS CCS
<7>hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
<7>w90n740-ohci w90n740-ohci: GetStatus roothub.portstatus [0] = 0x00000101 PPS
CCS
<7>w90n740-ohci w90n740-ohci: GetStatus roothub.portstatus [0] = 0x00000101 PPS
CCS
<7>w90n740-ohci w90n740-ohci: GetStatus roothub.portstatus [0] = 0x00000101 PPS
CCS
<7>w90n740-ohci w90n740-ohci: GetStatus roothub.portstatus [0] = 0x00000101 PPS
CCS
<7>w90n740-ohci w90n740-ohci: GetStatus roothub.portstatus [0] = 0x00000101 PPS
CCS
<7>hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
<7>w90n740-ohci w90n740-ohci: GetStatus roothub.portstatus [0] = 0x00100103
PRSC PPS PES CCS
usb 1-1: new full speed USB device using w90n740-ohci and address 2
<6>usb 1-1: new full sp€ed USB device using w90n740-ohci and address 2
<7>drivers/usb/host/ohci-dbg.c: SUB 00315a40 dev=0 ep=0in-ctrl flags=0 len=0/64
stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00315a40 dev=0 ep=0in-ctrl flags=0
len=18/64 stat=0
<7>drivers/usb/host/ohci-dbg.c: setup(8): 80 06 00 01 00 00 40 00
<7>drivers/usb/host/ohci-dbg.c: data(18/64): 12 01 00 02 00 00 00 40 8f 05 66
63 00 01 01 02... stat:0
<7>w90n740-ohci w90n740-ohci: GetStatus roothub.portstatus [0] = 0x00100103
PRSC PPS PES CCS
<7>drivers/usb/host/ohci-dbg.c: SUB 003159f8 dev=0 ep=0out-ctrl flags=0 len=0/0
stat=-115
<7>drivers/usb/host/ohci-dbg.c: setup(8): 00 05 02 00 00 00 00 00
<7>drivers/usb/host/ohci-dbg.c: RET 003159f8 dev=0 ep=0out-ctrl flags=0 len=0/0
stat=0
<7>drivers/usb/host/ohci-dbg.c: SUB 00315a18 dev=2 ep=0in-ctrl flags=0 len=0/18
stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00315a18 dev=2 ep=0in-ctrl flags=0
len=18/18 stat=0
<7>drivers/usb/host/ohci-dbg.c: setup(8): 80 06 00 01 00 00 12 00
<7>drivers/usb/housb 1-1: Product: Mass Storage Device
st/ohci-usb 1-1: Manufacturer: Generic
dbg.c: dusb 1-1: SerialNumber: 058F0O1111B1
ata(18/18): 12 01 00 02 00 00 00 40 8f 05 66 63 00 01001 02... stat:0
@7>drivers/usb/host/ohci-dbg.c: Susb 1-1: configuration #1 chosen from 1 choice
UB 00315c48 dev=2 ep=0in-ctrl flags=0 len=0/9 stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00315c48 dev=2 ep=0in-ctrl scsi0 : SCSI
emulation for USB Mass Storage devices
flass=0 len=9/9 stat=0
<7>drivers/usb/host/ohci-dbg.c: setup(8): 80 06 00 02 00 00 09 00
<7>drivers/usbhhost/ohci-dbg.c: data(9/9): 09 02 20 00 01 01 00 80 32 stat:0
<7>drivers/usb/host/ohci-dbg.c: SUB 00315c70 dev=2 ep=0in-ctrl flags=0 len=0/32
stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00315c70 dev=2 ep=0in-ctrl flags=0
len=32/32 stat=0
<7>drivers/usb/host/ohci-dbg.c: setup(8): 80 06 00 02 00 00 20 00
<7>drivers/usb/host/ohci-dbg.c: data(32/32): 09 02 20 00 01 01 00 80 32 09 04
00 00 02 08 06... stat:0
<7>drivers/usb/host/ohci-dbg.c: SUB 00315f00 dev=2 ep=0in-ctrl flags=0
len=0/255 stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00315f00 dev=2 ep=0in-ctrl flags=0
len=4/255 stat=0
<7>drivers/usb/host/ohci-dbg.c: setup(8): 80 06 00 03 00 00 ff 00
<7>drivers/usb/host/ohci-dbg.c: data(4/255): 04 03 09 04 stat:0
<7>usb 1-1: default language 0x0409
<7>drivers/usb/host/ohci-dbg.c: SUB 00315f00 dev=2 ep=0in-ctrl flags=0
len=0/255 stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00315f00 dev=2 ep=0in-ctrl flags=0
len=40/255 stat=0
<7>drivers/usb/host/ohci-dbg.c: setup(8): 80 06 02 03 09 04 ff 00
<7>drivers/usb/host/ohci-dbg.c: data(40/255): 28 03 4d 00 61 00 73 00 73 00 20
00 53 00 74 00... stat:0
<7>drivers/usb/host/ohci-dbg.c: SUB 00315f20 dev=2 ep=0in-ctrl flags=0
len=0/255 stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00315f20 dev=2 ep=0in-ctrl flags=0
len=16/255 stat=0
<7>drivers/usb/host/ohci-dbg.c: setup(8): 80 06 01 03 09 04 ff 00
<7>drivers/usb/host/ohci-dbg.c: data(16/255): 10 03 47 00 65 00 6e 00 65 00 72
00 69 00 63 00 stat:0
<7>drivers/usb/host/ohci-dbg.c: SUB 00315f30 dev=2 ep=0in-ctrl flags=0
len=0/255 stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00315f30 dev=2 ep=0in-ctrl flags=0
len=26/255 stat=0
<7>drivers/usb/host/ohci-dbg.c: setup(8): 80 06 03 03 09 04 ff 00
<7>drivers/usb/host/ohci-dbg.c: data(26/255): 1a 03 30 00 35 00 38 00 46 00 30
00 4f 00 31 00... stat:0
<7>usb 1-1: new device strings: Mfr=1, Product=2, SerialNumber=3
<6>usb 1-1: Product: Mass Storage Device
<6>usb 1-1: Manufacturer: Generic
<6>usb 1-1: SerialNumber: 058F0O1111B1
<7>usb 1-1: uevent
<7>usb 1-1: usb_probe_device
<6>usb 1-1: configuration #1 chosen from 1 choice
<7>drivers/usb/host/ohci-dbg.c: SUB 002a2f48 dev=2 ep=0out-ctrl flags=0 len=0/0
stat=-115
<7>drivers/usb/host/ohci-dbg.c: setup(8): 00 09 01 00 00 00 00 00
<7>drivers/usb/host/ohci-dbg.c: RET 002a2f48 dev=2 ep=0out-ctrl flags=0 len=0/0
stat=0
<7>usb 1-1: adding 1-1:1.0 (config #1, interface 0)
<7>usb 1-1:1.0: uevent
<7>usb 1-1:1.0: uevent
<7>usb-storage 1-1:1.0: usb_probe_interface
<7>usb-storage 1-1:1.0: usb_probe_interface - got id
<7>usb-storage: USB Mass Storage device detected
<7>usb-storage: -- associate_dev
<7>usb-storage: Vendor: 0x058f, Product: 0x6366, Revision: 0x0100
<7>usb-storage: Interface Subclass: 0x06, Protocol: 0x50
<7>usb-storage: Transport: Bulk
<7>usb-storage: Protocol: Transparent SCSI
<6>scsi0 : SCSI emulation for USB Mass Storage devices
<7>usb-storage: *** thread sleeping.
<7>usb-storage: device found at 2
<7>usb-storage: waiting for device to settle before scanning
<7>drivers/usb/core/inode.c: creating file '002'
<7>hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0002
<7>w90n740-ohci w90n740-ohci: GetStatus roothub.portstatus [0] = 0x00000103 PPS
PES CCS
<7>usb-storaee: usb_stor_control_msg: rq=fe rqtype=a1 value=0000 index=00 len=1
<7>drivers/usb/host/ohci-dbg.c: SUB 00336738 dev=2 ep=0in-ctrl flags=c len=0/1
stat=-115
<7>drivers/usb/host/oscsi 0:0:0:0: Direct-Access Multi Flash Reader
1.00 PQ: 0 ANSI: 0
hci-dbg.c: RET 00336738 dev22 pp=0in-ctrl flags=c len=1/1 stat=0
<7>drivers/usb/host/ohci-dbg.c: setup(8): a1 fe 00 00 00 00 01000
<7>drivers/usb/host/ohci-dbg.c: data(1/1): 00 stat:0
<7>usb-storage: GetMaxLUN command result is 1, data is 0
<7>usb-storage: queuecommand called
<7>usb-storage: *** thread awakened.
<7>usb-storage: Command INQUIRY (6 bytes)
<7>usb-storage: 12 00 00 00 24 00
<7>usb-storage: Bulk Command S 0x43425355 T 0x1 L 36 F 128 Trg 0 LUN 0 CL 6
<7>usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
<7>drivers/usb/host/ohci-dbg.c: SUB 00336738 dev=2 ep=1out-bulk flags=c
len=0/31 stat=-115
<7>drivers/usb/host/ohci-dbg.c: data(0/31): 55 53 42 43 01 00 00 00 24 00 00 00
80 00 06 12... stat:-115
<7>drivers/usb/host/ohci-dbg.c: RET 00336738 dev=2 ep=1out-bulk flags=c
len=31/31 stat=0
<7>usb-storage: Status code 0; transferred 31/31
<7>usb-storage: -- transfer complete
<7>usb-storage: Bulk command transfer result=0
<7>usb-storage: usb_stor_bulk_transfer_sglist: xfer 36 bytes, 1 entries
<7>drivers/usb/host/ohci-dbg.c: SUB 0032f698 dev=2 ep=2in-bulk flags=5 len=0/36
stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 0032f698 dev=2 ep=2in-bulk flags=5
len=36/36 stat=0
<7>drivers/usb/host/ohci-dbg.c: data(36/36): 00 80 00 00 1f 00 00 00 4d 75 6c
74 69 20 20 20... stat:0
<7>usb-storage: Status code 0; transferred 36/36
<7>usb-storage: -- transfer complete
<7>usb-storage: Bulk data transfer result 0x0
<7>usb-storage: Attempting to get CSW...
<7>usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
<7>drivers/usb/host/ohci-dbg.c: SUB 00336738 dev=2 ep=2in-bulk flags=c len=0/13
stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00336738 dev=2 ep=2in-bulk flags=c
len=13/13 stat=0
<7>drivers/usb/host/ohci-dbg.c: data(13/13): 55 53 42 53 01 00 00 00 00 00 00
00 00 stat:0
<7>usb-storage: Status code 0; transferred 13/13
<7>usb-storage: -- transfer complete
<7>usb-storage: Bulk status result = 0
<7>usb-storage: Bulk Status S 0x53425355 T 0x1 R 0 Stat 0x0
<7>usb-storage: scsi cmd done, result=0x0
<7>usb-storage: *** thread sleeping.
<5>scsi 0:0:0:0: Direct-Access Multi Flash Reader 1.00 PQ: 0 ANSI: 0
<7>usb-storage: queuecommand called
<7>usb-storage: *** thread awakened.
<7>usb-storage: Command TEST_UNIT_READY (6 bytes)
<7>usb-storage: 00 00 00 00 00 00
<7>usb-storage: Bulk Command S 0x43425355 T 0x2 L 0 F 0 Trg 0 LUN 0 CL 6
<7>usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
<7>drivers/usb/host/ohci-dbg.c: SUB 00336738 dev=2 ep=1out-bulk flags=c
len=0/31 stat=-115
<7>drivers/usb/host/ohci-dbg.c: data(0/31): 55 53 42 43 02 00 00 00 00 00 00 00
00 00 06 00... stat:-115
<7>drivers/usb/host/ohci-dbg.c: RET 00336738 dev=2 ep=1out-bulk flags=c
len=31/31 stat=0
<7>usb-storage: Status code 0; transferred 31/31
<7>usb-storage: -- transfer complete
<7>usb-storage: Bulk command transfer result=0
<7>usb-storage: Attempting to get CSW...
<7>usb-storage: usb_stor_bulk_transfer_buf: ffer 13 bytes
<7>drivers/usb/host/ohci-dbg.c: SUB 00336738 dev=2 ep=2in-bulk flags=c len=0/13
stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00336738 dev=2 ep=2in-bulk flags=c
len=13/13 stat=0
<7>drivers/usb/host/ohci-dbg.c: data(13/13): 55 53 42 53 02 00 00 00 00 00 0
00 01 stat:0
<7>usb-storage: Status code 0; transferred 13/13
<7>usb-storage: -- transfer complete
<7>usb-storage: Bulk status result = 0
<7>usb-storage: Bulk Status S 0x53425355 T 0x2 R 0 Stat 0x1
<7>usb-storage: -- transport indicates command failure
<7>usb-storage: Issuing auto-REQUEST_SENSE
<7>usb-storage: Bulk Command S 0x43425355 T 0x3 L 18 F 128 Trg 0 LUN 0 CL 6
<7>usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
<7>drivers/usb/host/ohci-dbg.c: SUB 00336738 dev=2 ep=1out-bulk flags=c
len=0/31 stat=-115
<7>drivers/usb/host/ohci-dbg.c: data(0/31): 55 53 42 43 03 00 00 00 12 00 00 00
80 00 06 03... stat:-115
<7>drivers/usb/host/ohci-dbg.c: RET 00336738 dev=2 ep=1out-bulk flags=c
len=31/31 stat=0
<7>usb-storage: Status code 0; transferred 31/31
<7>usb-storage: -- transfer complete
<7>usb-storage: Bulk command transfer result=0
<7>usb-storage: usb_stor_bulk_transfer_buf: xfer 18 bytes
<7>drivers/usb/host/ohci-dbg.c: SUB 00336738 dev=2 ep=2in-bulk flags=8 len=0/18
stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00336738 dev=2 ep=2in-bulk flags=8
len=18/18 stat=0
<7>drivers/usb/host/ohci-dbg.c: data(18/18): f0 02 06 00 00 00 00 0a 00 aa 55
42 28 00 02 00... stat:0
<7>usb-storage: Status code 0; transferred 18/18
<7>usb-storage: -- transfer complete
<7>usb-storage: Bulk data transfer result 0x0
<7>usb-storage: Attempting to get CSW...
<7>usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
<7>drivers/usb/host/ohci-dbg.c: SUB 00336738 dev=2 ep=2in-bulk flags=c len=0/13
stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00336738 dev=2 ep=2in-bulk flags=c
len=13/13 stat=0
<7>drivers/usb/host/ohci-dbg.c: data(13/13): 55 53 42 53 03 00 00 00 00 00 00
00 00 stat:0
<7>usb-storage: Status code 0; transferred 13/13
<7>usb-storage: -- transfer complete
<7>usb-storage: Bulk status result = 0
<7>usb-storage: Bulk Status S 0x53425355 T 0x3 R 0 Stat 0x0
<7>usb-storage: -- Result from auto-sense is 0
<7>usb-storage: -- code: 0xf0, key: 0x6, ASC: 0x28, ASCQ: 0x0
<7>usb-storage: Unit Attention: Not ready to ready change, medium may have
changed
<7>usb-storage: scsi cmd done, result=0x2
<7>usb-storage: *** thread sleeping.
<7>usb-storage: queuecommand called
<7>usb-storage: *** thread awakened.
<7>usb-storage: Command TEST_UNIT_READY (6 bytes)
<7>usb-storage: 00 00 00 00 00 00
<7>usb-storage: Bulk Command S 0x43425355 T 0x4 L 0 F 0 Trg 0 LUN 0 CL 6
<7>usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
<7>drivers/usb/host/ohci-dbg.c: SUB 00336738 dev=2 ep=1out-bulk flags=c
len=0/31 stat=-115
<7>drivers/usb/host/ohci-dbg.c: data(0/31): 55 53 42 43 04 00 00 00 00 00 00 00
00 00 06 00... stat:-115
<7>drivers/usb/host/ohci-dbg.c: RET 00336738 dev=2 ep=1out-bulk flags=c
len=31/31 stat=0
<7>usb-storage: Status code 0; transferred 31/31
<7>usb-storage: -- transfer complete
<7>usb-storage: Bulk command transfer result=0
<7>usb-storage: Attempting to get CSW...
<7>usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
<7>drivers/usb/host/ohci-dbg.c: SUB 00336738 dev=2 ep=2in-bulk flags=c len=0/13
stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 00336738 dev=2 ep=2in-bulk flags=c
len=13/13 stat=0
<7>drivers/usb/host/ohci-dbg.c: data(13/13): 55 53 42 53 04 00 00 00 00 00 00
00 00 stat:0
<7>usb-storage: Status code 0; transferred 13/13
<7>usb-storage: -- transfer complete
<7>usb-storage: Bulk status result = 0
<7>usb-storage: Bulk Status S 0x53425355 T 0x4 R 0 Stat 0x0
<7>usb-storage: scsi cmd done, result=0x0
<7>usb-storage: *** thread sleeping.
<7>usb-storage: queuecommand called
<7>usb-storage: *** thread awakened.
<7>usb-storage: Command READ_CAPACITY (10 bytes)
<7>usb-storage: 25 00 00 00 00 00 00 00 00 00
<7>usb-storage: Bulk Command S 0x43425355 T 0x5 L 8 F 128 Trg 0 LUN 0 CL 10
<7>usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
<7>drivers/usb/host/ohci-dbg.c: SUB 00336738 dev=2 ep=1out-bulk flags=c
len=0/31 stat=-115
<7>drivers/usb/host/ohci-dbg.c: data(0/31): 55 53 42 43 05 00 00 00 08 00 00 00
80 00 0a 25... stat:-115
<7>drivers/usb/host/ohci-dbg.c: RET 00336738 dev=2 ep=1out-bulk flags=c
len=31/31 stat=0
<7>usb-storage: Status code 0; transferred 31/31
<7>usb-storage: -- transfer complete
<7>usb-storage: Bulk command transfer result=0
<7>usb-storage: usb_stor_bulk_transfer_sglist: xfer 8 bytes, 1 entries
<7>drivers/usb/host/ohci-dbg.c: SUB 0032cdb8 dev=2 ep=2in-bulk flags=5 len=0/8
stat=-115
<7>drivers/usb/host/ohci-dbg.c: RET 0032cdb8 dev=2 ep=2in-bulk flags=5 len=8/8
stat=0
<7>drivers/usb/host/ohci-dbg.c: data(8/8): 00 01 f5 ff 00 00 02 00 stat:0
<7>usb-storage: Status code 0; transferred 8/8
<7>usb-storage: -- transfer complete
<7>usb-storage: Bulk data transfer result 0x0
<7>usb-storage: Attempting to get CSW...
<7>usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
<7>drivers/usb/host/ohci-dbg.c: SUB 00336738 dev=2 ep=2in-bulk flags=c len=0/13
stat=-115
$ <7>usb-storage: command_abort called
<7>usb-storage: usb_stor_stop_transport called
<7>usb-storage: -- cancelling URB
<7>drivers/usb/host/ohci-dbg.c: UNLINK 00336738 dev=2 ep=2in-bulk flags=c
len=0/13 stat=-104
There is nothing in /proc/bus/usb!
What should I do?
Darwin Chen.
-----------------------------------------------------------
/*
* linux/drivers/usb/host/ohci-w90n740.c
* OHCI HCD (Host Controller Driver) for Winbond w90n740.
*
* (C) Copyright 2006-2008 Chen Weiwen <[EMAIL PROTECTED]>
*
* USB Bus Glue for Winbond W90N740
*
* Written by Chen Weiwen <[EMAIL PROTECTED]>
* Based on fragments of Samsung S3c24xx Christopher Hoover <[EMAIL PROTECTED]>.
*
* Modified for W90N740 from ohci-s3c2410.c
* by Chen Weiwen, <[EMAIL PROTECTED]>
* Copyright (C) 2006-2008 Chen Weiwen
*
* This file is licenced under the GPL.
*/
#include <linux/platform_device.h>
#include <asm/hardware.h>
#include <asm/arch/usb-control.h>
#define valid_port(idx) ((idx) == 1 || (idx) == 2)
#define HCRootHubStatus 0xFFF05050
void enable_usb_clock()
{
unsigned long nClockSel;
nClockSel = CSR_READ(CLKSEL);
nClockSel |= 0x00000080;
CSR_WRITE(CLKSEL, nClockSel);
}
void disable_usb_clock()
{
unsigned long nClockSel;
nClockSel = CSR_READ(CLKSEL);
nClockSel &= 0xFFFFFF7F;
CSR_WRITE(CLKSEL, nClockSel);
}
static void w90n740_usb_power_control(int port, int to) {
int ps = CSR_READ(HCRootHubStatus);
if(to)
CSR_WRITE(HCRootHubStatus, ps|0x10000);
else
CSR_WRITE(HCRootHubStatus, ps|0x01);
}
static void w90n740_usb_enable_oc(struct w90n740_hcd_info * info, int on) { }
static struct w90n740_hcd_info *to_w90n740_info(struct usb_hcd *hcd) {
return hcd->self.controller->platform_data;
}
static void w90n740_start_hc(struct platform_device *dev, struct usb_hcd *hcd) {
struct w90n740_hcd_info *info = dev->dev.platform_data;
printk("w90n740 start USB host controller.\n");
enable_usb_clock();
mdelay(2); //let the bus clock stabilise
}
static void w90n740_stop_hc(struct platform_device *dev) {
struct w90n740_hcd_info *info = dev->dev.platform_data;
if (info != NULL) {
info->report_oc = NULL;
info->hcd = NULL;
if (info->enable_oc != NULL) {
(info->enable_oc)(info, 0);
}
}
disable_usb_clock();
}
/* w90n740_usb_set_power
*
* configure the power on a port, by calling the platform device
* routine registered with the platform device */
static void w90n740_usb_set_power(struct w90n740_hcd_info *info,
int port, int to)
{
int ps = CSR_READ(0xfff05048);
if (info == NULL)
return;
printk(KERN_DEBUG "w90n740_usb_set_power(%08x, %d, %d)\n", info, port,
to);
CSR_WRITE(0xfff05048,ps|0x200);
ps = CSR_READ(HCRootHubStatus);
if(to)
CSR_WRITE(HCRootHubStatus, ps|0x10000);
else
CSR_WRITE(HCRootHubStatus, ps|0x01);
}
/* may be called without controller electrically present */
/* may be called with controller, bus, and devices active */
/*
* usb_hcd_w90n740_remove - shutdown processing for HCD
* @dev: USB Host Controller being removed
* Context: !in_interrupt()
*
* Reverses the effect of usb_hcd_3c2410_probe(), first invoking
* the HCD's stop() method. It is always called from a thread
* context, normally "rmmod", "apmd", or something similar.
*
*/
static void
usb_hcd_w90n740_remove (struct usb_hcd *hcd, struct platform_device *dev) {
usb_remove_hcd(hcd);
w90n740_stop_hc(dev);
iounmap(hcd->regs);
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
usb_put_hcd(hcd);
}
/**
* usb_hcd_w90n740_probe - initialize W90N740-based HCDs
* Context: !in_interrupt()
*
* Allocates basic resources for this USB host controller, and
* then invokes the start() method for the HCD associated with it
* through the hotplug entry's driver_data.
*
*/
static int usb_hcd_w90n740_probe (const struct hc_driver *driver,
struct platform_device *dev)
{
struct usb_hcd *hcd = NULL;
int retval;
struct w90n740_hcd_info * info = (struct w90n740_hcd_info
*)dev->dev.platform_data;
w90n740_usb_set_power(dev->dev.platform_data, 1, 1);
w90n740_usb_set_power(dev->dev.platform_data, 2, 1);
hcd = usb_create_hcd(driver, &dev->dev, "W90N74x");
if (hcd == NULL)
return -ENOMEM;
hcd->rsrc_start = dev->resource[0].start;
hcd->rsrc_len = dev->resource[0].end - dev->resource[0].start + 1;
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
dev_err(&dev->dev, "request_mem_region failed");
retval = -EBUSY;
goto err_put;
}
w90n740_start_hc(dev, hcd);
hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
if (!hcd->regs) {
dev_err(&dev->dev, "ioremap failed\n");
retval = -ENOMEM;
goto err_ioremap;
}
ohci_hcd_init(hcd_to_ohci(hcd));
retval = usb_add_hcd(hcd,INT_USBINT0 , IRQF_DISABLED);
if (retval != 0)
goto err_ioremap;
return 0;
err_ioremap:
w90n740_stop_hc(dev);
iounmap(hcd->regs);
err_mem:
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
err_put:
usb_put_hcd(hcd);
return retval;
}
static int ohci_w90n740_start (struct usb_hcd *hcd) {
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
int ret;
if ((ret = ohci_init(ohci)) < 0)
return ret;
if ((ret = ohci_run (ohci)) < 0) {
err ("can't start %s", hcd->self.bus_name);
ohci_stop (hcd);
return ret;
}
return 0;
}
static const struct hc_driver ohci_w90n740_hc_driver = {
.description = hcd_name,
.product_desc = "W90N74X OHCI",
.hcd_priv_size = sizeof(struct ohci_hcd),
/*
* generic hardware linkage
*/
.irq = ohci_irq,
.flags = HCD_USB11 | HCD_MEMORY,
/*
* basic lifecycle operations
*/
.start = ohci_w90n740_start,
.stop = ohci_stop,
.shutdown = ohci_shutdown,
/*
* managing i/o requests and associated device resources
*/
.urb_enqueue = ohci_urb_enqueue,
.urb_dequeue = ohci_urb_dequeue,
.endpoint_disable = ohci_endpoint_disable,
/*
* scheduling support
*/
.get_frame_number = ohci_get_frame,
/*
* root hub support
*/
.hub_status_data = ohci_hub_status_data,
.hub_control = ohci_hub_control,
.hub_irq_enable = ohci_rhsc_enable,
#ifdef CONFIG_PM
.bus_suspend = ohci_bus_suspend,
.bus_resume = ohci_bus_resume,
#endif
.start_port_reset = ohci_start_port_reset,
};
/* device driver */
static int ohci_hcd_w90n740_drv_probe(struct platform_device *pdev) {
return usb_hcd_w90n740_probe(&ohci_w90n740_hc_driver, pdev); }
static int ohci_hcd_w90n740_drv_remove(struct platform_device *pdev) {
struct usb_hcd *hcd = platform_get_drvdata(pdev);
usb_hcd_w90n740_remove(hcd, pdev);
return 0;
}
static struct platform_driver ohci_hcd_w90n740_driver = {
.probe = ohci_hcd_w90n740_drv_probe,
.remove = ohci_hcd_w90n740_drv_remove,
.shutdown = usb_hcd_platform_shutdown,
.driver = {
.owner = THIS_MODULE,
.name = "w90n740-ohci",
},
};
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users