USB flash memory stick works on 8.3-rel, fails on 9.2 & 10.0

Julian H. Stacey jhs at berklix.com
Fri Mar 7 14:08:05 UTC 2014


A 16G USB flash memory stick here works with 8.3-RELEASE but fails (on same
PC & port) to create /dev/da* on FreeBSD-9 & 10. (devd running on all3)
What should I change for the stick ?
What can we change on FreeBSD so similar devices dont fail ?

On 8.3-RELEASE LED stays on, dev/da* appera, & can mount,.
On 9.2 & 10.0- Releases, the LED flashes faster than a whirling dervish,
but no /dev/da*

9.2-RELEASE shows:
 (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 01 d5 37 fe 00 00 01 00 
 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
 (da0:umass-sim0:0:0:0): Retrying command
 ugen1.3: <USB2.0> at usbus1 (disconnected)
 umass0: at uhub3, port 1, addr 3 (disconnected)
 (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 01 d5 37 fe 00 00 01 00 
 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
 (da0:umass-sim0:0:0:0): Retrying command
 (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 01 d5 37 fe 00 00 01 00 
 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
 (da0:umass-sim0:0:0:0): Retrying command
 (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 01 d5 37 fe 00 00 01 00 
 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
 (da0:umass-sim0:0:0:0): Retrying command
 (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 01 d5 37 fe 00 00 01 00 
 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
 (da0:umass-sim0:0:0:0): Error 5, Retries exhausted
 (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 00 00 00 00 00 00 00 00 00 
 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
 (da0:umass-sim0:0:0:0): Retrying command
 (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 00 00 00 00 00 00 00 00 00 
 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
 (da0:umass-sim0:0:0:0): Error 5, Retries exhausted
 (da0:umass-sim0:0:0:0): got CAM status 0x44
 (da0:umass-sim0:0:0:0): fatal error, failed to attach to device
 (da0:umass-sim0:0:0:0): lost device - 0 outstanding, 5 refs
 (da0:umass-sim0:0:0:0): removing device entry
 ugen1.3: <USB2.0> at usbus1
 umass0: <USB2.0 DISK, class 0/0, rev 2.00/1.00, addr 3> on usbus1
 umass0:  SCSI over Bulk-Only; quirks = 0x0100
 umass0:2:0:-1: Attached to scbus2
 da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
 da0: <USB2.0 DISK 0.00> Removable Direct Access SCSI-4 device 
 da0: 40.000MB/s transfers
 da0: 15015MB (30750720 512 byte sectors: 255H 63S/T 1914C)
 da0: quirks=0x2<NO_6_BYTE>

10.0-RELEASE on same PC shows similar, as does another 9.2 PC

9.2 devd -d does start doing the right thing eg:
 Processing event '+umass0 at bus=2 hubaddr=1 port=1 devaddr=3
 interface=0 vendor=0x048d product=0x1170 devclass=0x00 devsubclass=0x00
 sernum="0000000004DA3CC3" release=0x0100 mode=host intclass=0x08
 intsubclass=0x06 intprotocol=0x50  on uhub2'

 Executing 'sleep 4; rm -f /devusb/hama16g; ln -s /dev/`echo
 umass0|sed -e s/umass/da/`s1 /devusb/hama16g;mkdir /media/hama16g;
 chmod 777 /media/hama16g; chown jhs:staff /media/hama16g;
 `/site/usr/local/bin/fsck.sh` -y -t msdosfs /devusb/hama16g;mount
 -t msdosfs /devusb/hama16g /media/hama16g'
 Can't stat /devusb/hama16g
 ** /devusb/hama16g
 Can't open `/devusb/hama16g'
 mount_msdosfs: /devusb/hama16g:

My /devusb/hama16g@ -> /dev/da0s1 (works for other sticks) is left
dangling as no /dev/da* to point to.

2nd PC usbconfig shows:
ugen5.2: <DISK USB2.0> at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (480mA)

( BTW Seems a lot of power for a stick ?  A same size 16G USB3 stick (on
same USB 2 socket) reports ugen5.2: <Mass Storage Device JetFlash>
at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA), & the
USB3 stick mounts OK. )

usbconfig -u 5 -a 2 do_request 0x81 0x06 0x2200 0 0x100 # copied from man.
REQUEST = <ERROR>

usbconfig -u 5 -a 2 dump_curr_config_desc
ugen5.2: <DISK USB2.0> at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (480mA)

 Configuration index 0

    bLength = 0x0009 
    bDescriptorType = 0x0002 
    wTotalLength = 0x0020 
    bNumInterfaces = 0x0001 
    bConfigurationValue = 0x0001 
    iConfiguration = 0x0000  <no string>
    bmAttributes = 0x0080 
    bMaxPower = 0x00f0 

    Interface 0
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0000 
      bAlternateSetting = 0x0000 
      bNumEndpoints = 0x0002 
      bInterfaceClass = 0x0008 
      bInterfaceSubClass = 0x0006 
      bInterfaceProtocol = 0x0050 
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0001  <OUT>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0200 
        bInterval = 0x0001 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 

     Endpoint 1
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0082  <IN>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0200 
        bInterval = 0x0001 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 

usbconfig -u 5 -a 2 dump_device_desc
ugen5.2: <DISK USB2.0> at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (480mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x0000 
  bDeviceSubClass = 0x0000 
  bDeviceProtocol = 0x0000 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x048d 
  idProduct = 0x1170 
  bcdDevice = 0x0100 
  iManufacturer = 0x0001  <retrieving string failed>
  iProduct = 0x0002  <retrieving string failed>
  iSerialNumber = 0x0003  <retrieving string failed>
  bNumConfigurations = 0x0001 

usbconfig -u 5 -a 2  power_on
ls /dev/da*
	ls: No match.
xs usbconfig -u 5 -a 2  power_off
	shell hangs

Per man usb_quirk, I tried a reboot with usb_quirk_load="YES" in
/boot/loader.conf , did not help.

Rebooted with 8.3-RELEASE, stick works.

BTW This "Hama" stick is a very lightly used device, not worn out,
In case anyone else has one to try, it's:
Product code 34 090894, 10 Euro from Mueller, Munich, Germany 2012_10_11 
Cardboard marked USB2 6 MB/sec Bar Code 4 047443 144492.

Cheers,
Julian
- -- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com
 Reply below not above, like a play script.  Indent old text with "> ".
 Send plain text.  No quoted-printable, HTML, base64, multipart/alternative.
		Boycott Putin's Russia, invaders of Ukraine


More information about the freebsd-usb mailing list