Problem with USB4BSD on DesktopBSD 1.6 (i386)

Steve Anelay steve at anelay.net
Fri Jan 18 05:48:32 PST 2008


Hans Petter Selasky wrote:

> Hi,
> 
> The following sysctl will enable debugging:
> 
> sysctl hw.usb.umass.debug=-1
> 
> Have you tried loading "atausb" instead of "umass" ?
> 
> Also try to cat the complete disk and see where it stops.
> 
> dd if=/dev/da0 of=/dev/null bs=131072
> 
> BTW: I'm sorry to say that if you stress certain kinds of memory sticks they 
> will simply stop working due to poor software design inside the meory stick 
> itself. It is usually a problem of the memory stick manufacturer.
> 
> However there is a way to nice/throttle USB transfers now! And maybe it is an 
> idea to try that.
> 
> How fast are your memory sticks?
> 
> --HPS
> 
> 

Hi Peter

Thanks for getting back to me so soon.  Apologies if I've misinterpreted 
your advice, I've only been using DesktopBSD for a week.

Anyway, after enabling debugging lots of messages similar to the one 
below appeared in the log after inserting a stick:

Jan 17 18:41:33 TekBSD kernel: da0 at umass-sim0 bus 0 target 0 lun 0
Jan 17 18:41:33 TekBSD kernel: da0: < USB DISK 2.0 PMAP> Removable 
Direct Access SCSI-0 device
Jan 17 18:41:33 TekBSD kernel: umass0:umass_cam_action: 
11:0:0:XPT_GET_TRAN_SETTINGS:.
Jan 17 18:41:33 TekBSD kernel: umass0:umass_cam_action: 
11:0:0:XPT_PATH_INQ:.
Jan 17 18:41:33 TekBSD kernel: da0: 40.000MB/s transfers
Jan 17 18:41:33 TekBSD kernel: da0: 1961MB (4016128 512 byte sectors: 
255H 63S/T 249C)
Jan 17 18:41:33 TekBSD kernel: umass0:umass_cam_action: 
11:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense
Jan 17 18:41:33 TekBSD kernel: umass0:umass_bbb_dump_cbw: CBW 6: cmd = 
10b (0x250000000000...), data = 8b, lun = 0, dir = in
Jan 17 18:41:33 TekBSD kernel: umass0:umass_transfer_start: transfer 
index = 4
Jan 17 18:41:33 TekBSD kernel: umass0:umass_t_bbb_data_read_callback: 
max_bulk=131072, data_rem=8
Jan 17 18:41:33 TekBSD kernel: umass0:umass_t_bbb_data_read_callback: 
max_bulk=131072, data_rem=0
Jan 17 18:41:33 TekBSD kernel: umass0:umass_transfer_start: transfer 
index = 8
Jan 17 18:41:33 TekBSD kernel: umass0:umass_bbb_dump_csw: CSW 6: sig = 
0x53425355 (valid), tag = 0x00000006, res = 0, status = 0x00 (good)
Jan 17 18:41:33 TekBSD kernel: umass0:umass_cam_action: 
11:0:0:XPT_SCSI_IO: cmd: 0x1e, flags: 0xc0, 6b cmd/0b data/32b sense
Jan 17 18:41:33 TekBSD kernel: umass0:umass_bbb_dump_cbw: CBW 7: cmd = 
6b (0x1e0000000100), data = 0b, lun = 0, dir = out
Jan 17 18:41:33 TekBSD kernel: umass0:umass_transfer_start: transfer 
index = 8
Jan 17 18:41:33 TekBSD kernel: umass0:umass_bbb_dump_csw: CSW 7: sig = 
0x53425355 (valid), tag = 0x00000007, res = 0, status = 0x01 (failed)
Jan 17 18:41:33 TekBSD kernel: umass0:umass_t_bbb_status_callback: 
Command failed, residue = 0
Jan 17 18:41:33 TekBSD kernel: umass0:umass_cam_cb: Fetching 32 bytes of 
sense data
Jan 17 18:41:33 TekBSD kernel: umass0:umass_bbb_dump_cbw: CBW 8: cmd = 
6b (0x030000002000), data = 32b, lun = 0, dir = in

dd if=/dev/da0 of=/dev/null bs=131072 returned:

dd: /dev/da0: Input/output error
0+0 records in
0+0 records out
0 bytes transferred in 51.854561 secs (0 bytes/sec)

And rebuilding the kernel to use atausb instead of umass resulted in no 
improvement.  I inserted a stick as soon as I had rebooted with the new 
kernel and dmesg | tail showed the following:

afd0: FAILURE - PREVENT_ALLOW ILLEGAL REQUEST asc=0x24 ascq=0x00
afd0: FAILURE - PREVENT_ALLOW ILLEGAL REQUEST asc=0x24 ascq=0x00
afd0: FAILURE - PREVENT_ALLOW ILLEGAL REQUEST asc=0x24 ascq=0x00


And this was in the logs:

Jan 17 19:22:46 TekBSD kernel: da0: <Corsair Flash Voyager 1100> 
Removable Direct Access SCSI-0 device
Jan 17 19:22:46 TekBSD kernel: da0: 3.300MB/s transfers
Jan 17 19:22:46 TekBSD kernel: da0: 3872MB (7929856 512 byte sectors: 
255H 63S/T 493C)
Jan 17 19:22:46 TekBSD kernel: afd0: FAILURE - PREVENT_ALLOW ILLEGAL 
REQUEST asc=0x24 ascq=0x00
Jan 17 19:22:47 TekBSD last message repeated 10 times
Jan 17 19:24:31 TekBSD kernel: atausb0: at uhub1, port 4, addr 2 
(disconnected)
Jan 17 19:24:31 TekBSD kernel: afd0: detached
Jan 17 19:24:31 TekBSD kernel: (da0:ata10:0:0:0): lost device
Jan 17 19:24:31 TekBSD kernel: (da0:ata10:0:0:0): removing device entry
Jan 17 19:24:31 TekBSD kernel: atapicam10: detached
Jan 17 19:24:31 TekBSD kernel: ata10: detached

The usb sticks I'm using are two corsair flash voyagers 4GB (16mb/s) and 
one generic 2GB stick (12mb/s).

I'm not sure what you mean when you say there is a way to nice/throttle 
USB transfers now.  How would I do that?

Hope this means more to you than me, and thanks again.

Steve





More information about the freebsd-usb mailing list