All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Murray J. Root" <murrayr@brain.org>
To: linux-kernel@vger.kernel.org
Subject: Re: 2.5.61/usb: ioctl control transfer
Date: Sat, 15 Feb 2003 18:42:54 -0500	[thread overview]
Message-ID: <20030215234254.GD1183@Master.Wizards> (raw)
In-Reply-To: <20030215220122.B536020D1F@dungeon.inka.de>

On Sat, Feb 15, 2003 at 11:01:22PM +0100, Andreas Jellinghaus wrote:
> I'm using the devfs from a userspace application.
> the ioctl USBDEVFS_CONTROL is supposed to return
> the number of bytes actualy read from a control
> transfer.
> 
> but the return code i get is always what i specified
> as length of the buffer.
> 
> since i'm using the same usb control transfers
> as the windows drivers and get the same result
> back (but return code is always wLength),
> i wonder if there is a bug in the kernel. Anyone
> has similiar problems?
> 
> Regards, Andreas
> (userspace code ...)
>         syslog(LOG_DEBUG, "usb xmit %02hx %02hx %02hx %02hx 00 00 %02hx %02hx\n"
> ,
>                 type, req, value >> 8, value&0xff, size >> 8, size &
> 0xff);
> 
>         if (! (type & 0x80)) debug_hexdump("Sending:", buf, size);
> 
>         rc = ioctl(fd, USBDEVFS_CONTROL, &ctrl);
>         if (rc == -1) {
>                 syslog(LOG_ERR, "usb ioctl control transfer failed:%s\n",
>                        strerror(errno));
>         }
>         syslog(LOG_DEBUG, "ioctl rc %hx size %hx length %hx",
>                         rc, size, ctrl.length);
>         if (type & 0x80) debug_hexdump("Received:", buf, size);
> 
> 

I seem to be seeing the same thing with USB-storage devices - usb-storage
sees an error because it got back the same value it sent.
It makes mounting usb-storage devices take a LONG time as each send is
followed by a device reset since the returned value is unexpected.

-- 
Murray J. Root


      reply	other threads:[~2003-02-15 23:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-15 22:01 2.5.61/usb: ioctl control transfer Andreas Jellinghaus
2003-02-15 23:42 ` Murray J. Root [this message]

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=20030215234254.GD1183@Master.Wizards \
    --to=murrayr@brain.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.