Transfer size limits

2009-09-17 Thread Trevor Blackwell


What's the largest practical bulk transfer size in the -8 USB stack?  
I'm currently transferring frames through a UE_BULK  pipe from a  
Mightex camera (it uses bulk, not isochronous.)


Currently, I'm setting usbd_xfer_max_len(xfer)==32768. If I could set  
it large enough for a complete frame (5 MB), it would simplify the  
logic of my driver. Large transfers didn't work reliably with the -7  
USB stack, because of some obscure problem with setting up DMA  
transfers in the ehci driver with more than a few separate physical  
regions.


--
Trevor Blackwell650 776 7870t...@tlb.org





___
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: CFT: axe(4) performance patch

2009-09-17 Thread Norikatsu Shigemura
Hi pyun!

On Thu, 17 Sep 2009 10:08:49 -0700
Pyun YongHyeon  wrote:
> > patched:AX88178, AX88172, AX88772 <-> bge
> >  60Mbps,  60Mbps,  25Mbps
> > patched:AX88178, AX88172, AX88772 <-> rl
> >  90Mbps,  60Mbps,  40Mbps
> > old:AX88178, AX88172, AX88772 <-> bge
> > 180Mbps,  90Mbps,  95Mbps
> > old:AX88178, AX88172, AX88772 <-> re
> > 180Mbps,  90Mbps,  95Mbps
> I'm not sure I understood the test environment.
> But it looks un-patched axe(4) performs better, right?

Yes.  I think that these are strange.

> One odd thing is performance differences for AX88172. My patch does
> not touch AX88172 controller but your benchmark shows big
> differences for AX88172. Are you sure you didn't apply other
> patches for axe(4)/USB stack? Ehh, I was wrong, there was a change

No I don't apply any patch to axe/usb.

> for AX88172. The bufsize was changed to 16KB from 2KB for AX88172,
> that was not my intention. It seems new USB stack has no easy way
> to configure this parameter in attach phase so I used 16KB. Would
> you try changing the value to MCLBYTES(aorund line number 208 in
> patched if_axe.c) and test it on AX88172?

I'll try, please wait a while.

> Also please let me know what netperf parameters were used in the
> test.

Simple-fully, it's all default.

Server: netserver
Client: netperf -H Server

> > U, I'll try to update old(rl) machine to pached, and re-test.
> > Thank you.
> It seems you have all three variants that axe(4) supports, so would
> you test "http://p4db.freebsd.org/chv.cgi?CH=168602";?

Yes, too!

Thank you.
___
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"


usb/138915: [patch] add support for SheevaPlug serial interface to uftdi driver

2009-09-17 Thread Maks Verver

>Number: 138915
>Category:   usb
>Synopsis:   [patch] add support for SheevaPlug serial interface to uftdi 
>driver
>Confidential:   no
>Severity:   non-critical
>Priority:   low
>Responsible:freebsd-usb
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 17 21:20:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Maks Verver
>Release:FreeBSD 9.0-CURRENT i386
>Organization:
>Environment:
>Description:
I have a Marvell SheevaPlug that I tried to interface with FreeBSD. It has an 
FTDI based USB-to-serial adapter for this purpose, and the existing uftdi 
driver seems to work fine, except that the USB device is currently not 
recognized by the driver.
>How-To-Repeat:

>Fix:
I've attached a patch to add the vendor and product id for the Marvell
SheevaPlug to the USB device list, add it to the uftdi source, and update the
uftdi man page accordingly.

Patch attached with submission follows:

diff -ur sys.bak/dev/usb/serial/uftdi.c sys/dev/usb/serial/uftdi.c
--- sys.bak/dev/usb/serial/uftdi.c  2009-09-17 22:36:04.0 +0200
+++ sys/dev/usb/serial/uftdi.c  2009-09-17 21:55:11.0 +0200
@@ -246,6 +246,7 @@
{USB_VPI(USB_VENDOR_INTREPIDCS, USB_PRODUCT_INTREPIDCS_NEOVI, 
UFTDI_TYPE_8U232AM)},
{USB_VPI(USB_VENDOR_BBELECTRONICS, USB_PRODUCT_BBELECTRONICS_USOTL4, 
UFTDI_TYPE_8U232AM)},
{USB_VPI(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_PCOPRS1, 
UFTDI_TYPE_8U232AM)},
+   {USB_VPI(USB_VENDOR_MARVELL, USB_PRODUCT_MARVELL_SHEEVAPLUG, 
UFTDI_TYPE_8U232AM)},
 };
 
 static int
diff -ur sys.bak/dev/usb/usbdevs sys/dev/usb/usbdevs
--- sys.bak/dev/usb/usbdevs 2009-09-17 22:36:05.0 +0200
+++ sys/dev/usb/usbdevs 2009-09-17 21:54:03.0 +0200
@@ -659,6 +659,7 @@
 vendor INTEL   0x8086  Intel
 vendor SITECOM20x9016  Sitecom
 vendor MOSCHIP 0x9710  MosChip Semiconductor
+vendor MARVELL 0x9e88  Marvell Technology Group Ltd.
 vendor 3COM3   0xa727  3Com
 vendor HP2 0xf003  Hewlett Packard
 vendor USRP0xfffe  GNU Radio USRP
@@ -1691,6 +1692,9 @@
 /* Macally products */
 product MACALLY MOUSE1 0x0101  mouse
 
+/* Marvell Technology Group, Ltd. products */
+product MARVELL SHEEVAPLUG 0x9e8f  SheevaPlug serial interface
+
 /* MCT Corp. */
 product MCT HUB01000x0100  Hub
 product MCT DU_H3SP_USB232 0x0200  D-Link DU-H3SP USB BAY Hub
diff -r share.bak/man/man4/uftdi.4 share/man/man4/uftdi.4
89a90,91
> .It
> Marvell SheevaPlug serial interface 


>Release-Note:
>Audit-Trail:
>Unformatted:
___
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: CFT: axe(4) performance patch

2009-09-17 Thread Pyun YongHyeon
On Fri, Sep 18, 2009 at 12:06:57AM +0900, Norikatsu Shigemura wrote:
> Hi pyun!
> 
> On Mon, 14 Sep 2009 12:37:22 -0700
> Pyun YongHyeon  wrote:
> > I submitted axe(4) performance patch to Hans and he committed the
> > patch to P4.
> > http://perforce.freebsd.org/chv.cgi?CH=168457
> 
>   I tested following environments:
> 
Thanks a lot nork@ !

>   AX88178(GbE), AX88172(100), AX88772(100), bge(GbE), re(GbE), rl(100)
> 
>   patched:AX88178, AX88172, AX88772 <-> bge
>   old:AX88178, AX88172, AX88772 <-> bge
>   patched:AX88178, AX88172, AX88772 <-> rl
>   old:AX88178, AX88172, AX88772 <-> re
> 
>   My environment, there are 3 machines:
>   +--++-++ (All port GbE L2SW)
>  || |
>bge  re  rl
>(patched)   (old)
> 
>bge: FreeBSD 7.2-stable
> re: FreeBSD 9-current
> rl: FreeBSD 8.0-beta4
> 
> 
>   For test environments:
>   +--++---+---+---+ +--+-+--+--+---+
>  ||   |||  |
>bge  re  rl-axebge  re-axerl
>  (old)(patched)
> 
> 
>   According to netperf,
> 
>   patched:AX88178, AX88172, AX88772 <-> bge
>60Mbps,  60Mbps,  25Mbps
>   patched:AX88178, AX88172, AX88772 <-> rl
>90Mbps,  60Mbps,  40Mbps
> 
>   old:AX88178, AX88172, AX88772 <-> bge
>   180Mbps,  90Mbps,  95Mbps
>   old:AX88178, AX88172, AX88772 <-> re
>   180Mbps,  90Mbps,  95Mbps
> 

I'm not sure I understood the test environment.
But it looks un-patched axe(4) performs better, right?
One odd thing is performance differences for AX88172. My patch does
not touch AX88172 controller but your benchmark shows big
differences for AX88172. Are you sure you didn't apply other
patches for axe(4)/USB stack? Ehh, I was wrong, there was a change
for AX88172. The bufsize was changed to 16KB from 2KB for AX88172,
that was not my intention. It seems new USB stack has no easy way
to configure this parameter in attach phase so I used 16KB. Would
you try changing the value to MCLBYTES(aorund line number 208 in
patched if_axe.c) and test it on AX88172?

Also please let me know what netperf parameters were used in the
test.

>   U, I'll try to update old(rl) machine to pached, and re-test.
> 
>   Thank you.

It seems you have all three variants that axe(4) supports, so would
you test "http://p4db.freebsd.org/chv.cgi?CH=168602";?
___
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"


usb/138904: unpluging USB wifi card panics system

2009-09-17 Thread Radim Kolar SF.NET

>Number: 138904
>Category:   usb
>Synopsis:   unpluging USB wifi card panics system
>Confidential:   no
>Severity:   serious
>Priority:   medium
>Responsible:freebsd-usb
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 17 16:40:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Radim Kolar
>Release:FreeBSD 6.4-RELEASE-p4 i386
>Organization:
>Environment:
System: FreeBSD 7.2
wifi Card is USB asus, freebsd identifies it as
RT2573 rev 0x2573a RF RT2528 , using rum0

>Description:
fatal trap 12, supervisor read page not presenT
current process wpa_suppliciant

>How-To-Repeat:

it can be repeated everytime, run wpa_sup to connect to wifi network,
uplug card. system panics after few seconds

bt
#4  0xc0ae4180 in trap_pfault (frame=0xcdc0fa6c, usermode=0, eva=3264947216)
at /usr/src/sys/i386/i386/trap.c:852
#5  0xc0ae4b2c in trap (frame=0xcdc0fa6c) at /usr/src/sys/i386/i386/trap.c:530
#6  0xc0ac923b in calltrap () at /usr/src/sys/i386/i386/exception.s:159
#7  0xc072ff97 in rum_write_multi (sc=0xc29b1000, reg=Variable "reg" is not avai
lable.
)
at /usr/src/sys/dev/usb/if_rum.c:1581
#8  0xc072ffdb in rum_write (sc=Variable "sc" is not available.
) at /usr/src/sys/dev/usb/if_rum.c:1564
#9  0xc07305ce in rum_stop (priv=Variable "priv" is not available.
) at /usr/src/sys/dev/usb/if_rum.c:2229
#10 0xc0732049 in rum_init (priv=0xc29b1000)
at /usr/src/sys/dev/usb/if_rum.c:2086
#11 0xc07331b8 in rum_ioctl (ifp=0xc2652000, cmd=2149607696,
data=0xc2775300 "rum0") at /usr/src/sys/dev/usb/if_rum.c:1488
#12 0xc087b17e in ifhwioctl (cmd=2149607696, ifp=0xc2652000,
data=0xc2775300 "rum0", td=0xc26308c0) at /usr/src/sys/net/if.c:1719
#13 0xc087dc3d in ifioctl (so=0xc299a680, cmd=2149607696,
data=0xc2775300 "rum0", td=0xc26308c0) at /usr/src/sys/net/if.c:2009
#14 0xc082263a in soo_ioctl (fp=0xc2789000, cmd=2149607696, data=0xc2775300,
active_cred=0xc29a2300, td=0xc26308c0)
at /usr/src/sys/kern/sys_socket.c:191
#15 0xc081b3e5 in kern_ioctl (td=0xc26308c0, fd=3, com=2149607696,
data=0xc2775300 "rum0") at file.h:269
#16 0xc081b544 in ioctl (td=0xc26308c0, uap=0xcdc0fcfc)
at /usr/src/sys/kern/sys_generic.c:571
#17 0xc0ae44d5 in syscall (frame=0xcdc0fd38)
at /usr/src/sys/i386/i386/trap.c:1090
#18 0xc0ac92a0 in Xint0x80_syscall ()
at /usr/src/sys/i386/i386/exception.s:255
#19 0x0033 in ?? ()
Previous frame inner to this frame (corrupt stack?)
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
___
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"


How to get /dev/uscanner0 to use ehci at USB2 speed, not uhci ?

2009-09-17 Thread Julian H. Stacey
Hi FreeBSD-USB@ people,
With 7.2-RELEASE, how should I get
/dev/uscanner0 to use ehci at USB2 speed, not uhci at USB1 ?
(Please feel free to reply RTFM ... URL= )

Logs & My config & what I've tried / looked at:

My USB scanner works, but its agoning slow in high res.

devd:
Processing event '+uscanner0 vendor=0x04b8 product=0x011d devclass=0xff
  devsubclass=0x00 release=0x0100 sernum="" intclass=0xff intsubclass=0x00
  at port=0 interface=0 vendor=0x04b8 product=0x011d devclass=0xff
  devsubclass=0x00 release=0x0100 sernum="" intclass=0xff intsubclass=0x00
  on uhub1'

dmesg extract:
  --
  uhci0:  port 0xd400-0xd41f irq 21 at device 16.0 
on pci0
  uhci0: [GIANT-LOCKED]
  uhci0: [ITHREAD]
  usb0:  on uhci0
  usb0: USB revision 1.0
  uhub0:  on usb0
  uhub0: 2 ports with 2 removable, self powered
  
  uhci1:  port 0xd800-0xd81f irq 21 at device 16.1 
on pci0
  uhci1: [GIANT-LOCKED]
  uhci1: [ITHREAD]
  usb1:  on uhci1
  usb1: USB revision 1.0
  uhub1:  on usb1
  uhub1: 2 ports with 2 removable, self powered
  
  uhci2:  port 0xe000-0xe01f irq 21 at device 16.2 
on pci0
  uhci2: [GIANT-LOCKED]
  uhci2: [ITHREAD]
  usb2:  on uhci2
  usb2: USB revision 1.0
  uhub2:  on usb2
  uhub2: 2 ports with 2 removable, self powered
  
  uhci3:  port 0xe400-0xe41f irq 21 at device 16.3 
on pci0
  uhci3: [GIANT-LOCKED]
  uhci3: [ITHREAD]
  usb3:  on uhci3
  usb3: USB revision 1.0
  uhub3:  on usb3
  uhub3: 2 ports with 2 removable, self powered
  
  ehci0:  mem 0xfae0-0xfae000ff irq 21 at 
device 16.4 on pci0
  ehci0: [GIANT-LOCKED]
  ehci0: [ITHREAD]
  usb4: EHCI version 1.0
  usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3
  usb4:  on ehci0
  usb4: USB revision 2.0
  uhub4:  on usb4
  uhub4: 8 ports with 8 removable, self powered
  
  uscanner0:  on uhub1
  uscanner0: at uhub1 port 1 (addr 2) disconnected
  uscanner0: detached
  uscanner0:  on uhub1
  uscanner0: at uhub1 port 1 (addr 2) disconnected
  uscanner0: detached
  uscanner0:  on uhub1
  --

config -x /boot/kernel/kernel   # includes all of
device  uhci
device  ehci
device  uscanner

uname -a
  FreeBSD john.js.berklix.net 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Tue May  5 
00:41:36 CEST 2009 
jhs@@@john.js.berklix.net:/usr1/src/sys/amd64/compile/JOHN64.small  amd64

sane-find-scanner -q
found USB scanner (vendor=0x04b8, product=0x011d) at /dev/uscanner0

PS I had a quick look at
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/scanners.html
but nothing I noticed.

cd /usr/src ; find . -name \*devctl\*
./share/man/man4/devctl.4
# no binary just the manual.

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
  Mail ASCII plain text not HTML & Base64.  http://asciiribbon.org
  Virused Microsoft PCs cause spam. http://berklix.com/free/ 
___
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: CFT: axe(4) performance patch

2009-09-17 Thread Norikatsu Shigemura
Hi pyun!

On Mon, 14 Sep 2009 12:37:22 -0700
Pyun YongHyeon  wrote:
> I submitted axe(4) performance patch to Hans and he committed the
> patch to P4.
> http://perforce.freebsd.org/chv.cgi?CH=168457

I tested following environments:

AX88178(GbE), AX88172(100), AX88772(100), bge(GbE), re(GbE), rl(100)

patched:AX88178, AX88172, AX88772 <-> bge
old:AX88178, AX88172, AX88772 <-> bge
patched:AX88178, AX88172, AX88772 <-> rl
old:AX88178, AX88172, AX88772 <-> re

My environment, there are 3 machines:
+--++-++ (All port GbE L2SW)
   || |
 bge  re  rl
 (patched)   (old)

 bge: FreeBSD 7.2-stable
  re: FreeBSD 9-current
  rl: FreeBSD 8.0-beta4


For test environments:
+--++---+---+---+ +--+-+--+--+---+
   ||   |||  |
 bge  re  rl-axebge  re-axerl
   (old)(patched)


According to netperf,

patched:AX88178, AX88172, AX88772 <-> bge
 60Mbps,  60Mbps,  25Mbps
patched:AX88178, AX88172, AX88772 <-> rl
 90Mbps,  60Mbps,  40Mbps

old:AX88178, AX88172, AX88772 <-> bge
180Mbps,  90Mbps,  95Mbps
old:AX88178, AX88172, AX88772 <-> re
180Mbps,  90Mbps,  95Mbps

U, I'll try to update old(rl) machine to pached, and re-test.

Thank you.
___
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: Porting USB stack into BlackFin

2009-09-17 Thread Hans Petter Selasky
On Thursday 17 September 2009 08:50:18 balabharathi d wrote:
> Hi,
>
> I am working on a project requiring a USB Host stack which will run on
> anblackFin using VDK kernel. I would like to explore the possibility of
> using the USB stack from FreeBSD. Please share the link for source files
> and documentation.

src/sys/dev/usb

In FreeBSD 8 and 9-current.

--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/138879: [uftdi] [patch] Patch to add support for CTI USB-Mini 485 and USB-Nano 485

2009-09-17 Thread Hans Petter Selasky
The following reply was made to PR usb/138879; it has been noted by GNATS.

From: Hans Petter Selasky 
To: freebsd-usb@freebsd.org
Cc: Arrigo Marchiori ,
 freebsd-gnats-sub...@freebsd.org
Subject: Re: usb/138879: [uftdi] [patch] Patch to add support for CTI USB-Mini 
485 and USB-Nano 485
Date: Thu, 17 Sep 2009 12:48:20 +0200

 Hi,
 
 Your patch has been committed into FreeBSD's USB P4 repository for FreeBSD 9-
 current.
 
 http://perforce.freebsd.org/chv.cgi?CH=168603
 
 --HPS @ Eurbsdcon2009
___
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/138879: [uftdi] [patch] Patch to add support for CTI USB-Mini 485 and USB-Nano 485

2009-09-17 Thread Hans Petter Selasky
Hi,

Your patch has been committed into FreeBSD's USB P4 repository for FreeBSD 9-
current.

http://perforce.freebsd.org/chv.cgi?CH=168603

--HPS @ Eurbsdcon2009
___
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/138879: [uftdi] [patch] Patch to add support for CTI USB-Mini 485 and USB-Nano 485

2009-09-17 Thread Arrigo Marchiori
The following reply was made to PR usb/138879; it has been noted by GNATS.

From: Arrigo Marchiori 
To: Hans Petter Selasky 
Cc: freebsd-usb@freebsd.org, freebsd-gnats-sub...@freebsd.org
Subject: Re: usb/138879: [uftdi] [patch] Patch to add support for CTI
 USB-Mini 485 and USB-Nano 485
Date: Thu, 17 Sep 2009 10:30:47 +0200

 On Wed, Sep 16, 2009 at 11:53:58PM +0200, Hans Petter Selasky wrote:
 
 > Hi,
 > 
 > Is this patched in 9-current?
 
 My patch is against the sources of 7-STABLE, cvsupp'ed on September
 16, 2009. I don't know if it also fits the -CURRENT sources -- it
 should be quite easy to adapt, though.
 
 What the patch does, in fact, is just adding the product IDs to the
 supported chips, treating them the same as (for instance)
 USB_PRODUCT_FTDI_EMCU2H.
 
 -- 
 rigo
 
 http://rigo.altervista.org
___
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/138879: [uftdi] [patch] Patch to add support for CTI USB-Mini 485 and USB-Nano 485

2009-09-17 Thread Arrigo Marchiori
On Wed, Sep 16, 2009 at 11:53:58PM +0200, Hans Petter Selasky wrote:

> Hi,
> 
> Is this patched in 9-current?

My patch is against the sources of 7-STABLE, cvsupp'ed on September
16, 2009. I don't know if it also fits the -CURRENT sources -- it
should be quite easy to adapt, though.

What the patch does, in fact, is just adding the product IDs to the
supported chips, treating them the same as (for instance)
USB_PRODUCT_FTDI_EMCU2H.

-- 
rigo

http://rigo.altervista.org
___
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"


Porting USB stack into BlackFin

2009-09-17 Thread balabharathi d
Hi,

I am working on a project requiring a USB Host stack which will run on
anblackFin using VDK kernel. I would like to explore the possibility of
using the USB stack from FreeBSD. Please share the link for source files and
documentation.

Thanks
bala
___
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"