Re: USB driver locking

2011-05-25 Thread Julian Elischer

On 5/25/11 12:54 AM, Daniel O'Connor wrote:

On 25/05/2011, at 9:51, Hans Petter Selasky wrote:

current. There is also a new utility called usbdump, which can be used to
figure out what is going on.

I am running 9-current (in production for my sins..)

usbdump is useful but consumes too much CPU at my data rate :(

You probably need an USB analyzer to figure out the real problem. Have you
tried to start usbdump only once the problem happens?

I'll try and cook something up to run it when the problem happens.

hans and Daniel,
I suggest you put some KTR points into the driver and trace some 
crucial information using that.

it is capable of keeping up with very fast stuff with small disturbance.
Just the basic info.. you get 5 x 64 bit arguments.  (or is it 6?)
which is enough space for quite a bit of stuff to be logged.


--
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"



___
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 driver locking

2011-05-25 Thread Daniel O'Connor

On 25/05/2011, at 9:51, Hans Petter Selasky wrote:
>>> current. There is also a new utility called usbdump, which can be used to
>>> figure out what is going on.
>> 
>> I am running 9-current (in production for my sins..)
>> 
>> usbdump is useful but consumes too much CPU at my data rate :(
> 
> You probably need an USB analyzer to figure out the real problem. Have you 
> tried to start usbdump only once the problem happens?

I'll try and cook something up to run it when the problem happens.

--
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: USB driver locking

2011-05-25 Thread Hans Petter Selasky
On Wednesday 25 May 2011 09:47:50 Daniel O'Connor wrote:
> On 25/05/2011, at 9:33, Hans Petter Selasky wrote:
> > On Tuesday 24 May 2011 23:48:30 Daniel O'Connor wrote:
> >> I find that my application has rare problems where it does not get a
> >> reply from the micro to a control bus packet, or perhaps the micro
> >> doesn't receive it (I need to add a sequence number or similar to my
> >> protocol to try and detect it I think).
> > 
> > There was a data toggle issue fixed with the EHCI recently, which
> > triggers depending on hardware timing. Are you running the latest
> > 8-stable or 9-
> 
> This one?
> http://svnweb.freebsd.org/base?view=revision&revision=219845

Yes.

> I have that as I am running 219926
> 
> > current. There is also a new utility called usbdump, which can be used to
> > figure out what is going on.
> 
> I am running 9-current (in production for my sins..)
> 
> usbdump is useful but consumes too much CPU at my data rate :(

You probably need an USB analyzer to figure out the real problem. Have you 
tried to start usbdump only once the problem happens?

--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 driver locking

2011-05-25 Thread Daniel O'Connor

On 25/05/2011, at 9:33, Hans Petter Selasky wrote:
> On Tuesday 24 May 2011 23:48:30 Daniel O'Connor wrote:
>> I find that my application has rare problems where it does not get a reply
>> from the micro to a control bus packet, or perhaps the micro doesn't
>> receive it (I need to add a sequence number or similar to my protocol to
>> try and detect it I think).
> 
> There was a data toggle issue fixed with the EHCI recently, which triggers 
> depending on hardware timing. Are you running the latest 8-stable or 9-

This one?
http://svnweb.freebsd.org/base?view=revision&revision=219845

I have that as I am running 219926

> current. There is also a new utility called usbdump, which can be used to 
> figure out what is going on.

I am running 9-current (in production for my sins..)

usbdump is useful but consumes too much CPU at my data rate :(

--
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: USB driver locking

2011-05-25 Thread Hans Petter Selasky
On Tuesday 24 May 2011 23:48:30 Daniel O'Connor wrote:
> I find that my application has rare problems where it does not get a reply
> from the micro to a control bus packet, or perhaps the micro doesn't
> receive it (I need to add a sequence number or similar to my protocol to
> try and detect it I think).

There was a data toggle issue fixed with the EHCI recently, which triggers 
depending on hardware timing. Are you running the latest 8-stable or 9-
current. There is also a new utility called usbdump, which can be used to 
figure out what is going on.

--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"


USB driver locking

2011-05-24 Thread Daniel O'Connor
Hi,
I have a Cypress FX2 based USB interface board connected to our radar data 
acquisition chassis. It is used for configuring the hardware and getting data 
back to the PC.

I wrote a driver which is a very skinny wrapper around the (very handy) 
usb_fifo device node code.

I have several end points, all bulk. 2 are for serial comms, 2 for a low speed 
control bus and 1 for high speed data back to the PC.

The PC sends 10-250 byte packets out to modules on the serial bus and gets 
replies (after a 10-500 msec) of a similar size.

The low speed control bus is driven by the FX2 and the PC sends it 3 byte 
packets which is processes to read/write on the control bus, then sends a 3 
byte packet back.

I find that my application has rare problems where it does not get a reply from 
the micro to a control bus packet, or perhaps the micro doesn't receive it (I 
need to add a sequence number or similar to my protocol to try and detect it I 
think).

I found that this problem happens much less rarely (less than once a day) on a 
UP machine than on an SMP one.

Given that I am wondering if it is some sort of locking issue, and if anyone 
has seen anything similar?

I can supply the driver code if anyone is interested :)

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"