mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Whitis <whitis@freelabs.com>
To: linux-kernel@vger.kernel.org
Subject: Re: usbtmc makes Rigol DS1052E oscilloscope crash
Date: Mon, 23 Aug 2010 16:49:32 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1008231624260.19912@cervantes> (raw)
In-Reply-To: <alpine.DEB.2.00.1007290906210.25904@cervantes>


On Thu, 29 Jul 2010, Mark Whitis wrote:

> On my system, I have a similar problem but with somewhat different symptoms.
>
> I only get 2018 bytes back, whether the scope sends 8192 or 524288 bytes. 
> 610 bytes and 1210 bytes read ok.
>
> ...

Another data point: 
The author of one libusb based driver for this scope, after corresponding 
with rigol, found it necessary to limit the first usb read from the bulk 
endpoint to 64 bytes.   After that continuation requests were allowed to 
be full size.    It is possible this is what is causing the symptoms, 
though it is a bit odd that the error doesn't show up until 2K later.

If this is the source of the problem (and if it isn't, it is apparently 
still the source of other problems), it could be worked around by having 
an IOCTL to limit the size of the first low level read and to optionally 
limit the sizes of other reads   This can't be fixed at the application level by changing the size passed to read() 
because of the nature of the usbtmc api in which read() returns entire 
messages rather than being stream oriented.

The DS1052E uses the same firmware as some other models.    The company 
makes other test equipment that may share the offending code and knockoffs 
of older models are sold under a couple brand names.   Thus the number of 
devices which might be affected could be in the dozens.    Other unrelated 
devices may also have similar problems with USBs very limiting timing 
constraints.    The DS1052E, in particular, is popular with linux users 
due to its price/performance ratio, its hackability, and the fact that 
more technical info and discussion has been posted on forums than for 
other DSOs. Thus, incorporating some defensive programming into the 
usbtmc driver would seem warranted.


  reply	other threads:[~2010-08-23 20:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 14:41 Mark Whitis
2010-08-23 20:49 ` Mark Whitis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-25 17:34 Johannes Bauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.00.1008231624260.19912@cervantes \
    --to=whitis@freelabs.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®