Re: 2.5.61/usb: ioctl control transfer

From: Andreas Jellinghaus (
Date: Sat Feb 15 2003 - 17:01:22 EST

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

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 &

        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",
        syslog(LOG_DEBUG, "ioctl rc %hx size %hx length %hx",
                        rc, size, ctrl.length);
        if (type & 0x80) debug_hexdump("Received:", buf, size);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Feb 15 2003 - 22:01:04 EST