Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=147c5a17338fc72a89452f0a6c14ae6fcf853919
Commit:     147c5a17338fc72a89452f0a6c14ae6fcf853919
Parent:     a03c6facf84a51a04958d75ceef443108c44872d
Author:     Eberhard Fahle <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 5 11:13:21 2007 +0200
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 13:28:43 2007 -0700

    USB: iowarrior.c: timeouts too small in usb_control_msg calls
    
    The driver uses usb_control_msg() for exchanging data with the device.
    When the driver lived freeley _outside_ the kernel tree (pre 2.6.21) the
    timeouts for these calls where set to 5*HZ for reading, 1HZ for writing.
    (These timeouts seemed to work fine for all users of the driver, at
    least nobody complained in the last 2 years.
    
    The current code (2.6.21-rc5) removed the 'HZ' from the timeouts and
    left the driver with 5 jiffies for reading and 1 jiffy for writing. My
    new machine is fast, but not that fast.
    
    The patch also removes a useless debug statement, which was left over
    from testing a broken firmware version
    
    From: Eberhard Fahle <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/misc/iowarrior.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index de97ed7..fc51207 100644
--- a/drivers/usb/misc/iowarrior.c
+++ b/drivers/usb/misc/iowarrior.c
@@ -118,7 +118,7 @@ static int usb_get_report(struct usb_device *dev,
                               USB_DIR_IN | USB_TYPE_CLASS |
                               USB_RECIP_INTERFACE, (type << 8) + id,
                               inter->desc.bInterfaceNumber, buf, size,
-                              GET_TIMEOUT);
+                              GET_TIMEOUT*HZ);
 }
 //#endif
 
@@ -133,7 +133,7 @@ static int usb_set_report(struct usb_interface *intf, 
unsigned char type,
                               USB_TYPE_CLASS | USB_RECIP_INTERFACE,
                               (type << 8) + id,
                               intf->cur_altsetting->desc.bInterfaceNumber, buf,
-                              size, 1);
+                              size, HZ);
 }
 
 /*---------------------*/
@@ -750,7 +750,6 @@ static int iowarrior_probe(struct usb_interface *interface,
        struct usb_endpoint_descriptor *endpoint;
        int i;
        int retval = -ENOMEM;
-       int idele = 0;
 
        /* allocate memory for our device state and intialize it */
        dev = kzalloc(sizeof(struct iowarrior), GFP_KERNEL);
@@ -826,11 +825,10 @@ static int iowarrior_probe(struct usb_interface 
*interface,
 
        /* Set the idle timeout to 0, if this is interface 0 */
        if (dev->interface->cur_altsetting->desc.bInterfaceNumber == 0) {
-               idele = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
-                                       0x0A,
-                                       USB_TYPE_CLASS | USB_RECIP_INTERFACE, 0,
-                                       0, NULL, 0, USB_CTRL_SET_TIMEOUT);
-               dbg("idele = %d", idele);
+           usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
+                           0x0A,
+                           USB_TYPE_CLASS | USB_RECIP_INTERFACE, 0,
+                           0, NULL, 0, USB_CTRL_SET_TIMEOUT);
        }
        /* allow device read and ioctl */
        dev->present = 1;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to