Re: usb/154192: In Garmin Oregon GPS, only the first umass device is visible since upgrade of 9.0-current

2011-01-22 Thread Hans Petter Selasky
On Friday 21 January 2011 14:48:53 Thiemo Nordenholz wrote:
 Number: 154192
 Category:   usb
 Synopsis:   In Garmin Oregon GPS, only the first umass device is
 visible since upgrade of 9.0-current Confidential:   no
 Severity:   non-critical
 Priority:   medium
 Responsible:freebsd-usb
 State:  open
 Quarter:
 Keywords:
 Date-Required:
 Class:  sw-bug
 Submitter-Id:   current-users
 Arrival-Date:   Fri Jan 21 13:50:07 UTC 2011
 Closed-Date:
 Last-Modified:
 Originator: Thiemo Nordenholz
 Release:9-current
 Organization:
 
 Environment:
 FreeBSD feynman 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Thu Jan 20 16:26:22 CET
 2011 thiemo@feynman:/usr/obj/usr/src.new/sys/FEYNMAN  i386
 
 Description:
 After upgrading from 9.0-CURRENT as of Jun 08, 2010, to the state csup'ed
 on Sep 29, 2010, I am missing the SD card in my GPS receiver usually
 accessible as USB mass storage. The internal (first) storage in the
 receiver is still visible to fBSD.
 
 Before the upgrade, the working output after attaching the GPS looked
 like this:
 
 Sep 20 11:57:13 feynman root: Unknown USB device: vendor 0x091e product
 0x231b bus uhub0 Sep 20 11:57:13 feynman kernel: ugen0.2: vendor 0x091e
 at usbus0 Sep 20 11:57:13 feynman kernel: umass0: vendor 0x091e product
 0x231b, class 0/0, rev 1.10/5.09, addr 2 on usbus0 Sep 20 11:57:13
 feynman kernel: umass0:  SCSI over Bulk-Only; quirks = 0x Sep 20
 11:57:14 feynman kernel: umass0:2:0:-1: Attached to scbus2
 Sep 20 11:57:14 feynman kernel: da0 at umass-sim0 bus 0 target 0 lun 0
 Sep 20 11:57:14 feynman kernel: da0: Garmin GARMIN Flash 1.00 Removable
 Direct Access SCSI-5 device Sep 20 11:57:14 feynman kernel: da0: 1.000MB/s
 transfers
 Sep 20 11:57:14 feynman kernel: da0: 3906MB (7999488 512 byte sectors: 255H
 63S/T 497C) Sep 20 11:57:14 feynman kernel: da1 at umass-sim0 bus 0 target
 0 lun 1 Sep 20 11:57:14 feynman kernel: da1: Garmin GARMIN SD Card 1.00
 Removable Direct Access SCSI-5 device Sep 20 11:57:14 feynman kernel: da1:
 1.000MB/s transfers
 Sep 20 11:57:14 feynman kernel: da1: 7580MB (15523840 512 byte sectors:
 255H 63S/T 966C)
 
 Today (in the meantime upgraded to the fBSD revision as cited above in the
 uname -a output, csup'ed yesterday), the da1 device is missing:
 
 Jan 21 14:27:25 feynman kernel: ugen0.2: vendor 0x091e at usbus0
 Jan 21 14:27:25 feynman kernel: umass0: vendor 0x091e product 0x231b,
 class 0/0, rev 1.10/5.09, addr 2 on usbus0 Jan 21 14:27:25 feynman root:
 Unknown USB device: vendor 0x091e product 0x231b bus uhub0 Jan 21 14:27:26
 feynman kernel: da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 Jan 21
 14:27:26 feynman kernel: da0: Garmin GARMIN Flash 1.00 Removable Direct
 Access SCSI-5 device Jan 21 14:27:26 feynman kernel: da0: 1.000MB/s
 transfers
 Jan 21 14:27:26 feynman kernel: da0: 3906MB (7999488 512 byte sectors: 255H
 63S/T 497C)
 
 When attaching the GPS to a system running Solaris, both mass storage
 devices are visible and working, so I assume the device itself is okay...
 

Try to upgrade USB code to the latest. There I a know issue affecting device 
enumeration.

--HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/154192: In Garmin Oregon GPS, only the first umass device is visible since upgrade of 9.0-current

2011-01-22 Thread Hans Petter Selasky
The following reply was made to PR usb/154192; it has been noted by GNATS.

From: Hans Petter Selasky hsela...@c2i.net
To: freebsd-usb@freebsd.org
Cc: Thiemo Nordenholz list+lg3hxa01jll9p...@thiemo.net,
 freebsd-gnats-sub...@freebsd.org
Subject: Re: usb/154192: In Garmin Oregon GPS, only the first umass device is 
visible since upgrade of 9.0-current
Date: Sat, 22 Jan 2011 11:33:32 +0100

 On Friday 21 January 2011 14:48:53 Thiemo Nordenholz wrote:
  Number: 154192
  Category:   usb
  Synopsis:   In Garmin Oregon GPS, only the first umass device is
  visible since upgrade of 9.0-current Confidential:   no
  Severity:   non-critical
  Priority:   medium
  Responsible:freebsd-usb
  State:  open
  Quarter:
  Keywords:
  Date-Required:
  Class:  sw-bug
  Submitter-Id:   current-users
  Arrival-Date:   Fri Jan 21 13:50:07 UTC 2011
  Closed-Date:
  Last-Modified:
  Originator: Thiemo Nordenholz
  Release:9-current
  Organization:
  
  Environment:
  FreeBSD feynman 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Thu Jan 20 16:26:22 CET
  2011 thiemo@feynman:/usr/obj/usr/src.new/sys/FEYNMAN  i386
  
  Description:
  After upgrading from 9.0-CURRENT as of Jun 08, 2010, to the state csup'ed
  on Sep 29, 2010, I am missing the SD card in my GPS receiver usually
  accessible as USB mass storage. The internal (first) storage in the
  receiver is still visible to fBSD.
  
  Before the upgrade, the working output after attaching the GPS looked
  like this:
  
  Sep 20 11:57:13 feynman root: Unknown USB device: vendor 0x091e product
  0x231b bus uhub0 Sep 20 11:57:13 feynman kernel: ugen0.2: vendor 0x091e
  at usbus0 Sep 20 11:57:13 feynman kernel: umass0: vendor 0x091e product
  0x231b, class 0/0, rev 1.10/5.09, addr 2 on usbus0 Sep 20 11:57:13
  feynman kernel: umass0:  SCSI over Bulk-Only; quirks = 0x Sep 20
  11:57:14 feynman kernel: umass0:2:0:-1: Attached to scbus2
  Sep 20 11:57:14 feynman kernel: da0 at umass-sim0 bus 0 target 0 lun 0
  Sep 20 11:57:14 feynman kernel: da0: Garmin GARMIN Flash 1.00 Removable
  Direct Access SCSI-5 device Sep 20 11:57:14 feynman kernel: da0: 1.000MB/s
  transfers
  Sep 20 11:57:14 feynman kernel: da0: 3906MB (7999488 512 byte sectors: 255H
  63S/T 497C) Sep 20 11:57:14 feynman kernel: da1 at umass-sim0 bus 0 target
  0 lun 1 Sep 20 11:57:14 feynman kernel: da1: Garmin GARMIN SD Card 1.00
  Removable Direct Access SCSI-5 device Sep 20 11:57:14 feynman kernel: da1:
  1.000MB/s transfers
  Sep 20 11:57:14 feynman kernel: da1: 7580MB (15523840 512 byte sectors:
  255H 63S/T 966C)
  
  Today (in the meantime upgraded to the fBSD revision as cited above in the
  uname -a output, csup'ed yesterday), the da1 device is missing:
  
  Jan 21 14:27:25 feynman kernel: ugen0.2: vendor 0x091e at usbus0
  Jan 21 14:27:25 feynman kernel: umass0: vendor 0x091e product 0x231b,
  class 0/0, rev 1.10/5.09, addr 2 on usbus0 Jan 21 14:27:25 feynman root:
  Unknown USB device: vendor 0x091e product 0x231b bus uhub0 Jan 21 14:27:26
  feynman kernel: da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 Jan 21
  14:27:26 feynman kernel: da0: Garmin GARMIN Flash 1.00 Removable Direct
  Access SCSI-5 device Jan 21 14:27:26 feynman kernel: da0: 1.000MB/s
  transfers
  Jan 21 14:27:26 feynman kernel: da0: 3906MB (7999488 512 byte sectors: 255H
  63S/T 497C)
  
  When attaching the GPS to a system running Solaris, both mass storage
  devices are visible and working, so I assume the device itself is okay...
  
 
 Try to upgrade USB code to the latest. There I a know issue affecting device 
 enumeration.
 
 --HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


da(4) not attaching to USB drive

2011-01-22 Thread Matthias Apitz

Hello,

I have the problem with my new laptop Acer Aspire One that an USB disk
is not attaching most of the time; the disk itself works in 3 other
laptops without any problem; here is a (normal) bad and one positive example
from messages:


Jan 22 09:22:44 tinyCurrent root: Unknown USB device: vendor 0x07ab product 
0xfc8e bus uhub4
Jan 22 09:22:44 tinyCurrent kernel: ugen4.3: Freecom at usbus4
Jan 22 09:22:44 tinyCurrent kernel: umass0: Bulk Only Interface on usbus4
Jan 22 09:22:44 tinyCurrent kernel: umass0:  SCSI over Bulk-Only; quirks = 
0x
Jan 22 09:22:45 tinyCurrent kernel: umass0:0:0:-1: Attached to scbus0
Jan 22 09:22:57 tinyCurrent kernel: ugen4.3: Freecom at usbus4 (disconnected)
Jan 22 09:22:57 tinyCurrent kernel: umass0: at uhub4, port 1, addr 3 
(disconnected)
Jan 22 09:22:57 tinyCurrent kernel: (probe0:umass-sim0:0:0:0): AutoSense failed


Jan 22 09:23:10 tinyCurrent root: Unknown USB device: vendor 0x07ab product 
0xfc8e bus uhub4
Jan 22 09:23:10 tinyCurrent kernel: ugen4.3: Freecom at usbus4
Jan 22 09:23:10 tinyCurrent kernel: umass0: Bulk Only Interface on usbus4
Jan 22 09:23:10 tinyCurrent kernel: umass0:  SCSI over Bulk-Only; quirks = 
0x
Jan 22 09:23:11 tinyCurrent kernel: umass0:0:0:-1: Attached to scbus0
Jan 22 09:23:11 tinyCurrent kernel: da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
Jan 22 09:23:11 tinyCurrent kernel: da0: Freecom Hard Drive XS 1.00 Fixed 
Direct Access SCSI-2 device 
Jan 22 09:23:11 tinyCurrent kernel: da0: 40.000MB/s transfers
Jan 22 09:23:11 tinyCurrent kernel: da0: 1430799MB (2930277168 512 byte 
sectors: 255H 63S/T 182401C)

The kernel is 9-CURRENT r21 (October 2010). Any ideas?

matthias
-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e g...@unixarea.de - w http://www.unixarea.de/
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/154192: In Garmin Oregon GPS, only the first umass device is visible since upgrade of 9.0-current

2011-01-22 Thread Thiemo Nordenholz
 Try to upgrade USB code to the latest. There I a know issue affecting device 
 enumeration.

Just cvsup'ed and tested again with the same result:

 uname -a
FreeBSD feynman 9.0-CURRENT FreeBSD 9.0-CURRENT #1: Sat Jan 22 12:53:38 CET 
2011 thiemo@feynman:/usr/obj/usr/src.new/sys/FEYNMAN  i386

Jan 22 13:10:59 feynman root: Unknown USB device: vendor 0x091e product 0x231b 
bus uhub0
Jan 22 13:10:59 feynman kernel: ugen0.2: vendor 0x091e at usbus0
Jan 22 13:10:59 feynman kernel: umass0: vendor 0x091e product 0x231b, class 
0/0, rev 1.10/5.09, addr 2 on usbus0
Jan 22 13:11:00 feynman kernel: da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
Jan 22 13:11:00 feynman kernel: da0: Garmin GARMIN Flash 1.00 Removable 
Direct Access SCSI-5 device 
Jan 22 13:11:00 feynman kernel: da0: 1.000MB/s transfers
Jan 22 13:11:00 feynman kernel: da0: 3906MB (7999488 512 byte sectors: 255H 
63S/T 497C)
[ unplugging device here ]
Jan 22 13:11:34 feynman kernel: ugen0.2: vendor 0x091e at usbus0 
(disconnected)
Jan 22 13:11:34 feynman kernel: umass0: at uhub0, port 1, addr 2 (disconnected)
Jan 22 13:11:34 feynman kernel: (da0:umass-sim0:0:0:0): lost device
Jan 22 13:11:34 feynman kernel: (da0:umass-sim0:0:0:0): removing device entry

 camcontrol reportluns da0
2 LUNs found
0
0

Cheers,
  Thiemo

-- 
Query a PGP key server (e.g. http://www.pgp.net/) for my public key 41068629.
Strange sender address? Please see http://www.thiemo.net/misc/list-mail.shtml
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/154192: In Garmin Oregon GPS, only the first umass device is visible since upgrade of 9.0-current

2011-01-22 Thread Thiemo Nordenholz
The following reply was made to PR usb/154192; it has been noted by GNATS.

From: Thiemo Nordenholz list+lg3hxa01jll9p...@thiemo.net
To: Hans Petter Selasky hsela...@c2i.net
Cc: freebsd-usb@freebsd.org, freebsd-gnats-sub...@freebsd.org
Subject: Re: usb/154192: In Garmin Oregon GPS, only the first umass device is 
visible since upgrade of 9.0-current
Date: Sat, 22 Jan 2011 13:17:04 +0100

  Try to upgrade USB code to the latest. There I a know issue affecting device 
  enumeration.
 
 Just cvsup'ed and tested again with the same result:
 
  uname -a
 FreeBSD feynman 9.0-CURRENT FreeBSD 9.0-CURRENT #1: Sat Jan 22 12:53:38 CET 
2011 thiemo@feynman:/usr/obj/usr/src.new/sys/FEYNMAN  i386
 
 Jan 22 13:10:59 feynman root: Unknown USB device: vendor 0x091e product 0x231b 
bus uhub0
 Jan 22 13:10:59 feynman kernel: ugen0.2: vendor 0x091e at usbus0
 Jan 22 13:10:59 feynman kernel: umass0: vendor 0x091e product 0x231b, class 
0/0, rev 1.10/5.09, addr 2 on usbus0
 Jan 22 13:11:00 feynman kernel: da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
 Jan 22 13:11:00 feynman kernel: da0: Garmin GARMIN Flash 1.00 Removable 
Direct Access SCSI-5 device 
 Jan 22 13:11:00 feynman kernel: da0: 1.000MB/s transfers
 Jan 22 13:11:00 feynman kernel: da0: 3906MB (7999488 512 byte sectors: 255H 
63S/T 497C)
 [ unplugging device here ]
 Jan 22 13:11:34 feynman kernel: ugen0.2: vendor 0x091e at usbus0 
(disconnected)
 Jan 22 13:11:34 feynman kernel: umass0: at uhub0, port 1, addr 2 (disconnected)
 Jan 22 13:11:34 feynman kernel: (da0:umass-sim0:0:0:0): lost device
 Jan 22 13:11:34 feynman kernel: (da0:umass-sim0:0:0:0): removing device entry
 
  camcontrol reportluns da0
 2 LUNs found
 0
 0
 
 Cheers,
   Thiemo
 
 -- 
 Query a PGP key server (e.g. http://www.pgp.net/) for my public key 41068629.
 Strange sender address? Please see http://www.thiemo.net/misc/list-mail.shtml
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: libusb performance on 8.1

2011-01-22 Thread Hans Petter Selasky
On Thursday 20 January 2011 07:37:32 Daniel O'Connor wrote:
 [re-sent from the correct address]
 
 Hi,
 I am building a USB interface to a radar data acquisition chassis based on
 the Cypress CY7C68013A.
 
 While doing some speed testing I find that FreeBSD does ~4Mb/sec, but Linux
 does 17Mb/sec  OS X does 8-10Mb/sec.

Hi,

You need to change the way you buffer the data. FreeBSD does not queue more 
than 2 URB's at any time, and the turnaround time varies from 1ms to 125us due 
to hardware IRQ restrictions. Linux queues up all it can get, which leads to 
other kind of problems. The current internal buffer limit is 16Kbyte 8000 
times per second which gives a MAX of 128 MByte/second.

In general during hardware design:

1) Avoid short packets.
2) Make sure transfer buffers are matched between host and device.

From my experience it is very possible to reach +30Mbyte/second with LibUSB 
under FreeBSD 8.2+, given the buffering is optimal for the kernel.

Hint: The libusb20 API has features to transfer multi-short packets in a more 
optimised way, which are not exposed in the libusb10 API.

 
 It is using libusb-1.0 with the async API in a threaded app. I spawn a
 thread which sites in the following loop:
 

--HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/154192: In Garmin Oregon GPS, only the first umass device is visible since upgrade of 9.0-current

2011-01-22 Thread Hans Petter Selasky
The following reply was made to PR usb/154192; it has been noted by GNATS.

From: Hans Petter Selasky hsela...@c2i.net
To: Thiemo Nordenholz list+lg3hxa01jll9p...@thiemo.net
Cc: freebsd-usb@freebsd.org,
 freebsd-gnats-sub...@freebsd.org
Subject: Re: usb/154192: In Garmin Oregon GPS, only the first umass device is 
visible since upgrade of 9.0-current
Date: Sat, 22 Jan 2011 14:36:47 +0100

 On Saturday 22 January 2011 13:17:04 Thiemo Nordenholz wrote:
   Try to upgrade USB code to the latest. There I a know issue affecting
   device enumeration.
  
  Just cvsup'ed and tested again with the same result:
   uname -a
  
  FreeBSD feynman 9.0-CURRENT FreeBSD 9.0-CURRENT #1: Sat Jan 22 12:53:38 CET
  2011 thiemo@feynman:/usr/obj/usr/src.new/sys/FEYNMAN  i386
  
  Jan 22 13:10:59 feynman root: Unknown USB device: vendor 0x091e product
  0x231b bus uhub0 Jan 22 13:10:59 feynman kernel: ugen0.2: vendor 0x091e
  at usbus0 Jan 22 13:10:59 feynman kernel: umass0: vendor 0x091e product
  0x231b, class 0/0, rev 1.10/5.09, addr 2 on usbus0 Jan 22 13:11:00
  feynman kernel: da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 Jan 22
  13:11:00 feynman kernel: da0: Garmin GARMIN Flash 1.00 Removable Direct
  Access SCSI-5 device Jan 22 13:11:00 feynman kernel: da0: 1.000MB/s
  transfers
  Jan 22 13:11:00 feynman kernel: da0: 3906MB (7999488 512 byte sectors: 255H
  63S/T 497C) [ unplugging device here ]
  Jan 22 13:11:34 feynman kernel: ugen0.2: vendor 0x091e at usbus0
  (disconnected) Jan 22 13:11:34 feynman kernel: umass0: at uhub0, port 1,
  addr 2 (disconnected) Jan 22 13:11:34 feynman kernel:
  (da0:umass-sim0:0:0:0): lost device Jan 22 13:11:34 feynman kernel:
  (da0:umass-sim0:0:0:0): removing device entry
  
   camcontrol reportluns da0
  
 
 Can you build the kernel with options USB_DEBUG and post new dmesg? Maybe 
 your device is quirked while it should not.
 
 --HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/154192: In Garmin Oregon GPS, only the first umass device is visible since upgrade of 9.0-current

2011-01-22 Thread Thiemo Nordenholz
The following reply was made to PR usb/154192; it has been noted by GNATS.

From: Thiemo Nordenholz list+lg3hxa01jll9p...@thiemo.net
To: Hans Petter Selasky hsela...@c2i.net
Cc: freebsd-usb@freebsd.org, freebsd-gnats-sub...@freebsd.org
Subject: Re: usb/154192: In Garmin Oregon GPS, only the first umass device is 
visible since upgrade of 9.0-current
Date: Sat, 22 Jan 2011 15:43:27 +0100

  Can you build the kernel with options USB_DEBUG and post new dmesg? Maybe 
  your device is quirked while it should not.
 
 It says quirks=0:
 
 ugen0.2: vendor 0x091e at usbus0
 umass0: vendor 0x091e product 0x231b, class 0/0, rev 1.10/5.09, addr 2 on 
usbus0
 umass0:  SCSI over Bulk-Only; quirks = 0x
 umass0:2:0:-1: Attached to scbus2
 da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
 da0: Garmin GARMIN Flash 1.00 Removable Direct Access SCSI-5 device 
 da0: 1.000MB/s transfers
 da0: 3906MB (7999488 512 byte sectors: 255H 63S/T 497C)
 
 Regards,
   Thiemo
   
 -- 
 Query a PGP key server (e.g. http://www.pgp.net/) for my public key 41068629.
 Strange sender address? Please see http://www.thiemo.net/misc/list-mail.shtml
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: da(4) not attaching to USB drive

2011-01-22 Thread Matthias Apitz
El día Saturday, January 22, 2011 a las 02:49:36PM +0100, Hans Petter Selasky 
escribió:

 On Saturday 22 January 2011 11:42:39 Matthias Apitz wrote:

  Drive XS 1.00 Fixed Direct Access SCSI-2 device Jan 22 09:23:11
  tinyCurrent kernel: da0: 40.000MB/s transfers
  Jan 22 09:23:11 tinyCurrent kernel: da0: 1430799MB (2930277168 512 byte
  sectors: 255H 63S/T 182401C)
  
  The kernel is 9-CURRENT r21 (October 2010). Any ideas?
  
  matthias
 
 Is the HDD supplied with external power?

Yes.

matthias

-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e g...@unixarea.de - w http://www.unixarea.de/
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: da(4) not attaching to USB drive

2011-01-22 Thread Matthias Apitz

and if I pull out the USB cable and plug it into my EeePC sitting next
to the Acer, da(4) attaches fine ... but all the other laptops are
running a 8.x version;

matthias
-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e g...@unixarea.de - w http://www.unixarea.de/
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: libusb performance on 8.1

2011-01-22 Thread Daniel O'Connor

On 23/01/2011, at 24:03, Hans Petter Selasky wrote:
 While doing some speed testing I find that FreeBSD does ~4Mb/sec, but Linux
 does 17Mb/sec  OS X does 8-10Mb/sec.
 
 You need to change the way you buffer the data. FreeBSD does not queue more 
 than 2 URB's at any time, and the turnaround time varies from 1ms to 125us 
 due 
 to hardware IRQ restrictions. Linux queues up all it can get, which leads to 
 other kind of problems. The current internal buffer limit is 16Kbyte 8000 
 times per second which gives a MAX of 128 MByte/second.
 
 In general during hardware design:
 
 1) Avoid short packets.
 2) Make sure transfer buffers are matched between host and device.
 
 From my experience it is very possible to reach +30Mbyte/second with LibUSB 
 under FreeBSD 8.2+, given the buffering is optimal for the kernel.
 

Hmm... I am transferring fixed size packets of 512 bytes, so there shouldn't be 
any short packets (unless I misunderstand what you mean).

Ahh, I I see what you mean now.. I was transferring a single packet at a time 
because I didn't realise you could transfer more at once.

If I switch to transferring 2k at once it goes up to 16Mb/sec.

Thanks :)

--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
The nice thing about standards is that there
are so many of them to choose from.
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C






___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: page fault on device disconnect

2011-01-22 Thread Marcin Wisnicki
On Sat, Jan 22, 2011 at 16:01, Hans Petter Selasky hsela...@c2i.net wrote:
 On Wednesday 19 January 2011 21:44:01 Marcin Wisnicki wrote:
 I've accidentally cut power to my self-powered USB hdd enclosure with
 UFS+gjournal on GELI.
 [snip]
 Could you show more dmesg?

Full dmesg captured after restart is in attachment to this message [dmesg.log].
What I've pasted however is everything that happened after
disconnection until kernel dump, previous messages are from many hours
or days earlier.

 Also try to build a kernel with the following options:


Unfortunately that panic is not reproducible, it's the first time I've seen it.

Trying to reproduce it I get the usual UFS panic:

# brace for impact
 sync;sync;sync

# cut the power for 1s
ugen3.2: vendor 0x058f at usbus3 (disconnected)
uhub4: at uhub3, port 1, addr 2 (disconnected)
ugen3.3: Sunplus Technology Inc. at usbus3 (disconnected)
umass0: at uhub4, port 1, addr 3 (disconnected)
(da0:umass-sim0:0:0:0): lost device
(da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0xa, scsi
status == 0x0
(da0:umass-sim0:0:0:0): removing device entry
GEOM_JOURNAL: Lost provider label/ghost_tank2_enc.eli.
ugen3.4: Imation at usbus3 (disconnected)
umass1: at uhub4, port 3, addr 4 (disconnected)
GEOM_JOURNAL: Cannot destroy journal label/ghost_tank2_enc.eli
(error=16). Destroy it manually after last close.
(da1:umass-sim1:1:0:0): lost device
(da1:umass-sim1:1:0:0): removing device entry
ugen3.2: vendor 0x058f at usbus3
uhub4: vendor 0x058f product 0x6254, class 9/0, rev 2.00/1.00, addr
2 on usbus3
uhub4: 4 ports with 4 removable, self powered
ugen3.3: Sunplus Technology Inc. at usbus3
umass0: Bulk Only Interface on usbus3
ugen3.4: Imation at usbus3
umass1: Imation Atom, class 0/0, rev 2.00/1.10, addr 4 on usbus3
da0 at umass-sim1 bus 1 scbus3 target 0 lun 0
da0: Imation Atom PMAP Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: 3872MB (7929856 512 byte sectors: 255H 63S/T 493C)
da1 at umass-sim0 bus 0 scbus2 target 0 lun 0
da1: WDC WD10 EADS-00L5B1  Fixed Direct Access SCSI-2 device
da1: 40.000MB/s transfers
da1: 953869MB (1953525168 512 byte sectors: 255H 63S/T 121601C)

 ls /dev/label/
boot0   boot0g
boot0a  boot0h
boot0b  ghost_tank2_enc
boot0d  ghost_tank2_enc.eli.journal
boot0e  ghost_tank2_key
boot0f

# couple of minutes later
GEOM_JOURNAL: Error while reading data from label/ghost_tank2_enc.eli (error=6).
panic: ufs_dirbad: /vol/store/tank2: bad dir ino 2 at offset 0: mangled entry
cpuid = 0
KDB: stack backtrace:
db_trace_self_wrapper(c076c1d5,a0d79,e678f848,c0576f82,d7f2bc20,...)
at db_trace_self_wrapper+0x26
kdb_backtrace(c078804a,0,c077fb99,e678f89c,0,...) at kdb_backtrace+0x2a
panic(c077fb99,c46a3464,2,0,c077fc57,...) at panic+0x117
ufs_dirbad(c46843a0,0,c077fc57,0,e678f948,...) at ufs_dirbad+0x46
ufs_lookup_(0,e678f970,c0748612,e678f990,e678f9b0,...) at ufs_lookup_+0x37a
ufs_lookup(e678f990,e678f9b0,c0578ea2,c07b8c00,e678f990,...) at ufs_lookup+0x1e
VOP_CACHEDLOOKUP_APV(c07b8c00,e678f990,e678fb58,e678fb44,c8818b80,...)
at VOP_CACHEDLOOKUP_APV+0x42
vfs_cache_lookup(e678fa18,e678f9c8,20,e678fb58,e678fa38,...) at
vfs_cache_lookup+0xd2
VOP_LOOKUP_APV(c07b8c00,e678fa18,e678fb58,1f6,848,...) at VOP_LOOKUP_APV+0x46
lookup(e678fb2c,c4ed7400,400,e678fb4c,e678fa60,...) at lookup+0x6be
namei(e678fb2c,c04e85fd,0,1000,e678fae0,...) at namei+0x633
kern_statat_vnhook(c4f29870,0,ff9c,21c6d430,0,...) at
kern_statat_vnhook+0x72
kern_statat(c4f29870,0,ff9c,21c6d430,0,...) at kern_statat+0x3c
kern_stat(c4f29870,21c6d430,0,e678fbe8,c46bd754,...) at kern_stat+0x36
stat(c4f29870,e678fcec,e678fd28,b,21c93000,...) at stat+0x2f
syscallenter(c4f29870,e678fce4,e678fce4,0,c4f29870,...) at syscallenter+0x329
syscall(e678fd28) at syscall+0x34
Xint0x80_syscall() at Xint0x80_syscall+0x21
--- syscall (188, FreeBSD ELF32, stat), eip = 0x21bb0e43, esp =
0xbfbfdf9c, ebp = 0xbfbfdfb8 ---
Uptime: 3d5h10m44s
Physical memory: 1007 MB
Dumping 201 MB: 186 170 154 138 122 106 90 74 58 42 26 10
Dump complete
Automatic reboot in 15 seconds - press a key on the console to abort
Rebooting...

But that's expected :(


dmesg.log
Description: Binary data
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org