wimax/i2400m: Fix USB timeout specifications (to ms from HZ)
authorInaky Perez-Gonzalez <inaky@linux.intel.com>
Tue, 20 Oct 2009 02:09:25 +0000 (11:09 +0900)
committerInaky Perez-Gonzalez <inaky@linux.intel.com>
Tue, 3 Nov 2009 20:49:37 +0000 (12:49 -0800)
The USB code was incorrectly specifiying timeouts to be in jiffies vs
msecs. On top of that, lower it to 200ms, as 1s is really too long
(doesn't allow the watchdog to trip a reset if the device timesout too
often).

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
drivers/net/wimax/i2400m/usb-fw.c
drivers/net/wimax/i2400m/usb-rx.c
drivers/net/wimax/i2400m/usb-tx.c
drivers/net/wimax/i2400m/usb.c

index b59aee0ee64963c4d2700d12913acdb0183a8403..8ec8b6d56a1352dd7c8d01a6c0b134338d2e42c5 100644 (file)
@@ -102,7 +102,7 @@ ssize_t i2400mu_tx_bulk_out(struct i2400mu *i2400mu, void *buf, size_t buf_size)
        epd = usb_get_epd(i2400mu->usb_iface, i2400mu->endpoint_cfg.bulk_out);
        pipe = usb_sndbulkpipe(i2400mu->usb_dev, epd->bEndpointAddress);
 retry:
-       result = usb_bulk_msg(i2400mu->usb_dev, pipe, buf, buf_size, &len, HZ);
+       result = usb_bulk_msg(i2400mu->usb_dev, pipe, buf, buf_size, &len, 200);
        switch (result) {
        case 0:
                if (len != buf_size) {
index 245587feb8c8f22ae5a05455567c83f0d734ecb6..22d127bf79e12503523ca281f5079fcff1a261fe 100644 (file)
@@ -214,7 +214,7 @@ retry:
        }
        result = usb_bulk_msg(
                i2400mu->usb_dev, usb_pipe, rx_skb->data + rx_skb->len,
-               rx_size, &read_size, HZ);
+               rx_size, &read_size, 200);
        usb_mark_last_busy(i2400mu->usb_dev);
        switch (result) {
        case 0:
index a3c46e99c8040dffe0a2fcc40a8f4308f24d7763..6cdf0036a14605d37004d0125630964f7994a354 100644 (file)
@@ -105,7 +105,7 @@ int i2400mu_tx(struct i2400mu *i2400mu, struct i2400m_msg_hdr *tx_msg,
        usb_pipe = usb_sndbulkpipe(i2400mu->usb_dev, epd->bEndpointAddress);
 retry:
        result = usb_bulk_msg(i2400mu->usb_dev, usb_pipe,
-                             tx_msg, tx_msg_size, &sent_size, HZ);
+                             tx_msg, tx_msg_size, &sent_size, 200);
        usb_mark_last_busy(i2400mu->usb_dev);
        switch (result) {
        case 0:
index 5e079408f16e279633d28617cb776bb4c345854e..34df0906caaec1ec3583bdf01ecbf5a272cd58e1 100644 (file)
@@ -173,7 +173,7 @@ int __i2400mu_send_barker(struct i2400mu *i2400mu,
        pipe = usb_sndbulkpipe(i2400mu->usb_dev, epd->bEndpointAddress);
        memcpy(buffer, barker, barker_size);
        ret = usb_bulk_msg(i2400mu->usb_dev, pipe, buffer, barker_size,
-                          &actual_len, HZ);
+                          &actual_len, 200);
        if (ret < 0) {
                if (ret != -EINVAL)
                        dev_err(dev, "E: barker error: %d\n", ret);