Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 2009 16:08:04 +0900
From:      Hiroharu Tamaru <tamaru@myn.rcast.u-tokyo.ac.jp>
To:        freebsd-usb@freebsd.org
Subject:   USB2: umass not detected correctly, axe not transmitting
Message-ID:  <sa64oz1lacr.wl%tamaru@myn.rcast.u-tokyo.ac.jp>

next in thread | raw e-mail | index | archive | help
Hi,

I have an Atom Z530 semi-embedded system and tried the new USB2 stack.
I found some oddities and decided to report here.

It is running 8.0-CURRENT as of yesterday, and I have GENERIC and USB2 
kernels to test with.  I am testing with two usb devices:

umass0: <JetFlash Mass Storage Device, class 0/0, rev 2.00/1.00, addr 2> on usbus3
axe0: <ASIX Electronics AX88178, rev 2.00/0.01, addr 3> on usbus3

First about the USB memory stick:

1) I setup a bootable USB memory stick, and this system
   boots off umass da0 if I have the old USB1 kernel.
   However, with USB2 kernel, it does not detect da0 at its final stage,
   and fails to find the root filesystem.
   I mean that the 'da0 at umass-sim0 bus 0 target 0 lun 0' message is not
   shown, and it is not listed in the kernel detected list of disks at
   'mountroot>' prompt (shown by typing '?').
  

2) If I boot from the internal ad0, and plug in this stick it gets detected:

ugen3.2: <JetFlash> at usbus3
umass0: <JetFlash Mass Storage Device, class 0/0, rev 2.00/1.00, addr 2> on usbus3
umass0:  SCSI over Bulk-Only; quirks = 0x0100
umass0:0:0:-1: Attached to scbus0
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
(probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI Status: Check Condition
(probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0
(probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed
(probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data)
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <JetFlash Transcend 4GB 8.07> Removable Direct Access SCSI-2 device 
da0: 40.000MB/s transfers
da0: 3830MB (7843840 512 byte sectors: 255H 63S/T 488C)

  however, it does not give the correct contents when read; it does not 
  detect the slices and all.

# ls /dev/da0*
/dev/da0
# dd if=/dev/da0 count=1 | hexdump -C
1+0 records in
1+0 records out
00000000  55 53 42 43 24 00 00 00  00 02 00 00 80 00 0a 28  |USBC$..........(|
00000010  00 00 00 00 00 00 00 01  00 00 00 00 00 00 00 c4  |................|
00000020  00 c4 30 37 8a aa 55 00  28 03 4d 00 61 00 73 00  |..07..U.(.M.a.s.|
00000030  73 00 20 00 53 00 74 00  6f 00 72 00 61 00 67 00  |s. .S.t.o.r.a.g.|
00000040  65 00 20 00 44 00 65 00  76 00 69 00 63 00 65 00  |e. .D.e.v.i.c.e.|
00000050  4a 65 74 46 6c 61 73 68  54 72 61 6e 73 63 65 6e  |JetFlashTranscen|
00000060  64 20 34 47 42 20 20 20  38 2e 30 31 8a aa 55 00  |d 4GB   8.01..U.|
00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 00 3c c3  |..............<.|
00000080  12 03 38 00 4c 00 4f 00  31 00 4d 00 43 00 42 00  |..8.L.O.1.M.C.B.|
00000090  52 00 3d 00 00 00 00 00  00 00 00 00 00 00 00 00  |R.=.............|
000000a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000000d0  00 00 00 00 68 50 51 49  00 00 00 00 00 00 00 00  |....hPQI........|
000000e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000160  00 0d 09 51 01 01 21 00  ff ff 01 0d 01 00 18 03  |...Q..!.........|
00000170  08 0c 14 01 01 03 b4 ff  01 00 00 a0 ff 00 07 e7  |................|
00000180  70 54 53 34 47 4a 46 56  33 35 00 00 00 00 00 00  |pTS4GJFV35......|
00000190  ca 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
512 bytes transferred in 0.000506 secs (1012009 bytes/sec)
00000200

  It gives the correct mbr and slice table when the USB1 kernel (GENERIC)
  is used, of course.



Next about the ethernet device:

  This device is detected correctly.

ugen3.3: <ASIX Electronics> at usbus3
axe0: <ASIX Electronics AX88178, rev 2.00/0.01, addr 3> on usbus3
axe0: PHYADDR 0xe0:0x18
miibus0: <MII bus> on axe0
ciphy0: <Cicada VSC8211 10/100/1000TX PHY> PHY 24 on miibus0
ciphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
ue0: <USB Ethernet> on axe0
ue0: Ethernet address: 00:90:cc:xx:xx:xx
ue0: link state changed to DOWN
ue0: link state changed to UP

# ifconfg ue0
ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:90:cc:xx:xx:xx
        inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active

  However it cannot transmit packets.
  'tcpdump -i ue0 -n' shows traffic, so it can recive packets.
  But by watching the wire from another host, no packet leaves this interface.


So, which details should I start reporting with?

Thanks.

Hiroharu



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?sa64oz1lacr.wl%tamaru>