lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cb0375e10908031501w610d1e27ya69d7c2011f93555@mail.gmail.com>
Date:	Mon, 3 Aug 2009 18:01:24 -0400
From:	Andrew Lutomirski <luto@....edu>
To:	Greg KH <greg@...ah.com>
Cc:	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
	gregkh@...e.de
Subject: Re: Is anyone maintaining (or even using) usbtmc?

On Mon, Aug 3, 2009 at 5:49 PM, Andrew Lutomirski<luto@....edu> wrote:
> On Mon, Aug 3, 2009 at 5:20 PM, Greg KH<greg@...ah.com> wrote:
>> On Mon, Aug 03, 2009 at 05:14:56PM -0400, Andrew Lutomirski wrote:
>>> Hi all-
>>>
>>> I'm trying to use usbtmc on an Aglient N9310A (The only TMC device I
>>> have), and it sort of works, but it seems to be both extremely buggy
>>> and missing a good deal of rather important functionality.  Is there
>>> anyone maintaining it?
>>
>> Yes, me.
>>
>>> If the answer is yes, I can describe the bugs (logspam, spurious
>>> errors, delayed messages, inability to read status, etc.) in greater
>>> detail.
>>
>> Please do, but also please use the latest version, in 2.6.30.3, we fixed
>> some bad problems in it recently.
>
> I am.
>
> Almost anything I do triggers this:
>
> usbtmc 3-1:1.0: Unable to read data, error -110
>
> The easiest way is to write something that wasn't a query and then try
> to read.  Of course, the read should fail, but there's no reason it
> should spam the logs.

Here's more details, in the form of an strace log:

open("/dev/usbtmc0", O_RDWR|O_EXCL)     = 3
ioctl(3, 0x5b07, 0)                     = 0  // CLEAR_OUT_HALT
ioctl(3, 0x5b06, 0)                     = 0  // CLEAR_IN_HALT
ioctl(3, 0x5b02, 0)                     = 0  // CLEAR
write(3, "*IDN?\n", 6)                  = 6
read(3, 0x2078554, 4096)                = -1 ETIMEDOUT (Connection timed out)

Removing the \n makes no difference.  This happens over and over.

Then I used a different program that opened the device, read and
discarded some ETIMEDOUTs, and made a successful query (not quite sure
what did the trick), and the original program starts working again.

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ