Let me know if your testbed is ready, and I would send my last usb dir tar ball to you.
Regards
YH
-----邮件原件----- 发件人: Steven James [mailto:pyro@linuxlabs.com] 发送时间: 2004年5月17日 6:14 收件人: YhLu 抄送: Linuxbios; Takeshi Sone 主题: Re: USB boot
Greetings,
Sorry about the delay in replying.
The length field is encoded as n-1 with 0x7ff a special value meaning 0.
IIRC, a USB protocol error would cause a stall condition. A 0 transfer when data is expected is a SCSI level error.
As you can see, the USB code doesn't have nearly enough error checking.
It looks like control messages are fine since the device gets configured, but the bulk transfers seem to be broken.
It might be good to write poison to the buffers to verify that no data goes to them.
Since everything seems to be returning no data, probably the SCSI command is not being sent to the device correctly.
Hopefully, this week, I can get my test board going again so I can do some debugging as well.
G'day, sjames
-------------------------steven james, director of research, linux labs ... ........ ..... .... 230 peachtree st nw ste 2701 the original linux labs atlanta.ga.us 30303 -since 1995 http://www.linuxlabs.com office & fax 866.545.6306 -----------------------------------------------------------------------
On Fri, 14 May 2004, YhLu wrote:
Here are the new results.
- for usb_control_msg: every return + 2047 packet????
- for bulk_transfer: every out is ok, but every in only return fixed 2048
len data.
Regards
YH
Loading Etherboot version: 5.2.4 ROM segment 0x0000 length 0x0000 reloc 0x00020000 CPU 2285 Mhz Etherboot 5.2.4 (GPL) http://etherboot.org Tagged ELF for [TG3][FILO] Relocating _text from: [0002d5f0,0008fc20) to [efe9d9d0,eff00000) Probing pci nic... [tg3-5704]Ethernet addr: 00:E0:81:61:8C:27 Tigon3 [partno(BCM95704A6) rev 2003 PHY(5401)] (PCIX:100MHz:64-bit)
<abort> Probing pci nic... [tg3-5704]Ethernet addr: 00:E0:81:61:8C:28 Tigon3 [partno(BCM95704A6) rev 2003 PHY(5704)] (PCIX:100MHz:64-bit) <abort> Probing pci nic... Probing pci disk... [FILO]FILO version 0.4.1 (root@tst2723-rh9) Fri May 14 17:10:13 PDT 2004 Press <Enter> for default boot, or <Esc> for boot prompt... boot: uda1:/ram0_2.5_2.6.5_k8.2_mydisk7.elf LinuxLabs USB bootloader raw frame_list is at 00079560 frame_list is at 00079630 frame_list_link: addr: 00078570 frame_list_link: raw addr: efef5f40 frame_list_link: terminate: 00000000 frame_list_link: queue: 00000001 frame_list_link: depth: 00000000 dummy_td = 00070500 raw frame_list is at 0007b560 frame_list is at 0007b630 frame_list_link: addr: 00078590 frame_list_link: raw addr: efef5f60 frame_list_link: terminate: 00000000 frame_list_link: queue: 00000001 frame_list_link: depth: 00000000 dummy_td = 00070540 raw frame_list is at 0007d560 frame_list is at 0007d630 frame_list_link: addr: 000785b0 frame_list_link: raw addr: efef5f80 frame_list_link: terminate: 00000000 frame_list_link: queue: 00000001 frame_list_link: depth: 00000000 dummy_td = 00070580 raw frame_list is at 0007f560 frame_list is at 0007f630 frame_list_link: addr: 000785d0 frame_list_link: raw addr: efef5fa0 frame_list_link: terminate: 00000000 frame_list_link: queue: 00000001 frame_list_link: depth: 00000000 dummy_td = 000705c0 Found OHCI at 0d182630 Resetting OHCI USB HC reset_hc usb-0d182630: ctrl = 0x00000600 ;ohc_init setting
framelist
to: efef7000 Starting OHCI Found OHCI at 0d183630 Resetting OHCI USB HC reset_hc usb-0d183630: ctrl = 0x00000600 ;ohc_init setting
framelist
to: efef9000 Starting OHCI Found UHCI at 00002400 Resetting UHCI uhc_init setting framelist to: efefb000 Starting UHCI HCI at 00002400 Found UHCI at 00002420 Resetting UHCI uhc_init setting framelist to: efefd000 Starting UHCI HCI at 00002420 poll_usb1 i=0 poll_usb1 i=1 poll_usb1 i=2 poll_u_root_hub1
v=00000480
poll_u_root_hub1 v=00001493poll_u_root_hub2 v=00001493
poll_u_root_hub21
v=00001493 Connection on port 00002412 New USB device, setting address 00000003 usb_control_msg: request_type = 00000000 request = 00000005 wLength=0 usb_control_message returning 2047 Fetching device descriptor length usb_control_msg: request_type = 00000080 request = 00000006 wLength=8 usb_control_message returning 2054 Fetching device descriptor usb_control_msg: request_type = 00000080 request = 00000006 wLength=18 usb_control_message returning 2064 Fetching config descriptor length usb_control_msg: request_type = 00000080 request = 00000006 wLength=8 usb_control_message returning 2054 Fetching config descriptor usb_control_msg: request_type = 00000080 request = 00000006 wLength=32 usb_control_message returning 2078 device: bLength: 00000012 type: 00000001 bcdVersion: 0000000200000000 Class: 00000000 SubClass: 00000000 protocol: 00000000 max_packet: 00000040 idVendor: 00001005 idProduct: 0000b113 bcdDeviceVersion: 0000000100000000 iManufacturor: 00000000 iProduct: 00000001 iSerial: 00000002 bNumConfig: 00000001 config: bLength: 00000009 type: 00000002 wTotalLength: 00000020 bNumInterfaces: 00000001 bConfigurationValue: 00000001 iConfiguration: 00000000 bmAttributes: 00000080 bMaxPower: 000000fa
Interface(00081e6b): bLength: 00000009 type: 00000004 bInterfaceNumber: 00000000 bAlternateSetting: 00000000 bNumEndpoints: 00000002 bInterfaceClass: 00000008 bInterfaceSubClass: 00000006 bInterfaceProtocol: 00000050 iInterface: 00000000
Endpoint (00081e74): bLength: 00000007 type: 00000005 bEndpointAddress: 00000081 bmAttributes: 00000002 wMaxPacketSize: 00000040 bInterval: 00000000 Endpoint (00081e7b): bLength: 00000007 type: 00000005 bEndpointAddress: 00000002 bmAttributes: 00000002 wMaxPacketSize: 00000040 bInterval: 00000000
Selecting Configuration number 00000001: usb_control_msg: request_type = 00000000 request = 00000009 wLength=0 usb_control_message returning 2047 clear stall on ep=00000081 usb_control_msg: request_type = 00000002 request = 00000001 wLength=0 usb_control_message returning 2047 clear stall on ep=00000002 usb_control_msg: request_type = 00000002 request = 00000001 wLength=0 usb_control_message returning 2047 00000008:00000006:00000050 Manufacturor: unknown usb_control_msg: request_type = 00000080 request = 00000006 wLength=4 usb_control_message returning 2050 usb_control_msg: request_type = 00000080 request = 00000006 wLength=32 usb_control_message returning 2078 Product: USB Flash Drive usb_control_msg: request_type = 00000080 request = 00000006 wLength=4 usb_control_message returning 2050 usb_control_msg: request_type = 00000080 request = 00000006 wLength=32 usb_control_message returning 2078 Serial: 070B01001340CA0 desc address (phy) = efeff820, (virt) = 00081e50 conf address (phy) = efeff832, (virt) = 00081e62 Mass storage, bulk only SCSI transparent Requesting initial sense data bulk_transfer: ep = 00000002 len=31 bulk_transfer returning 31 bulk_transfer: ep = 00000081 len=32 bulk_transfer returning 2048 bulk_transfer: ep = 00000081 len=13 bulk_transfer returning 2048 sense data
:00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000:000
00000:00000000:00000000:00000000:00000000:00000000:00000000:00000000:0000000
0:00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000:00
000000:00000000:00000000:00000000:00000000:00000000:00000000
code = 00000000 key = 00000000
Info: 00000000 bulk_transfer: ep = 00000002 len=31 bulk_transfer returning 31 scsi_command reading 8 bytes bulk_transfer: ep = 00000081 len=8 bulk_transfer returning 2048 scsi_command read 2048 bytes scsi_command fetching csw bulk_transfer: ep = 00000081 len=13 bulk_transfer returning 2048 scsi_command csw is 2048 bytes 1 0 byte blocks part address (phy) = efeff400, (virt) = 00081a30 bulk_transfer: ep = 00000002 len=31 bulk_transfer returning 31 scsi_command reading 512 bytes bulk_transfer: ep = 00000081 len=512 bulk_transfer returning 2048 scsi_command read 2048 bytes scsi_command fetching csw bulk_transfer: ep = 00000081 len=13 bulk_transfer returning 2048 scsi_command csw is 2048 bytes ll_read_block returns 512 0: boot=00000000, start=00000000 length=00000000 1: boot=00000000, start=00000000 length=00000000 2: boot=00000000, start=00000000 length=00000000 3: boot=00000000, start=00000000 length=00000000 DEVICE CONFIGURED poll_usb1 i=3 poll_u_root_hub1 v=00000480 poll_u_root_hub1
v=00000480
poll_usb1 i=0 poll_usb1 i=1poll_usb1 i=2 poll_u_root_hub1 v=00000480 poll_u_root_hub1 v=00000495 poll_usb1 i=3 poll_u_root_hub1
v=00000480
poll_u_root_hub1 v=00000480 Found USB block device 3 Requesting initial sense data bulk_transfer: ep = 00000002 len=31 bulk_transfer returning 31 bulk_transfer: ep = 00000081 len=32 bulk_transfer returning 2048 bulk_transfer: ep = 00000081 len=13 bulk_transfer returning 2048 sense data
:00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000:000
00000:00000000:00000000:00000000:00000000:00000000:00000000:00000000:0000000
0:00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000:00
000000:00000000:00000000:00000000:00000000:00000000:00000000
code = 00000000 key = 00000000
Info: 00000000 bulk_transfer: ep = 00000002 len=31 bulk_transfer returning 31 scsi_command reading 512 bytes bulk_transfer: ep = 00000081 len=512 bulk_transfer returning 2048 scsi_command read 2048 bytes scsi_command fetching csw bulk_transfer: ep = 00000081 len=13 bulk_transfer returning 2048 scsi_command csw is 2048 bytes ll_read_block returns 512 part address (phy) = efeffa94, (virt) = 000820c4 0: boot=00000000, start=00000000 length=00000000 1: boot=00000000, start=00000000 length=00000000 2: boot=00000000, start=00000000 length=00000000 3: boot=00000000, start=00000000 length=00000000 sector= 0 bulk_transfer: ep = 00000002 len=31 bulk_transfer returning 31 scsi_command reading 512 bytes bulk_transfer: ep = 00000081 len=512 bulk_transfer returning 2048 scsi_command read 2048 bytes scsi_command fetching csw bulk_transfer: ep = 00000081 len=13 bulk_transfer returning 2048 scsi_command csw is 2048 bytes sector= 68 bulk_transfer: ep = 00000002 len=31 bulk_transfer returning 31 scsi_command reading 512 bytes bulk_transfer: ep = 00000081 len=512 bulk_transfer returning 2048 scsi_command read 2048 bytes scsi_command fetching csw bulk_transfer: ep = 00000081 len=13 bulk_transfer returning 2048 scsi_command csw is 2048 bytes