aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-01-31 13:49:33 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-02-04 16:29:50 -0500
commit8f2d8f869af5088d4e4866c8286f0599e83cc963 (patch)
tree8e3cbabc3db32a0182c7576de29509ffdda671c1 /drivers/net/wireless/zd1211rw
parent4a3b0874a481573bfd95d54c883248b4c4622572 (diff)
zd1211rw: lower hw command timeouts
Device command timeouts are set up very high (1 sec) and this causes AP beacon to lock up for long for example. Checking timeouts on device it's easy to see that 1 sec timeout is not needed, when device fails to response longer timeout doesn't help: [ 473.074419] zd1211rw 1-1:1.0: print_times() Read times: [ 473.175163] zd1211rw 1-1:1.0: print_time() 0 - 10 msec: 1506 [ 473.176429] zd1211rw 1-1:1.0: print_time() 11 - 50 msec: 0 [ 473.177955] zd1211rw 1-1:1.0: print_time() 51 - 100 msec: 0 [ 473.180703] zd1211rw 1-1:1.0: print_time() 101 - 250 msec: 0 [ 473.182101] zd1211rw 1-1:1.0: print_time() 251 - 500 msec: 0 [ 473.183221] zd1211rw 1-1:1.0: print_time() 500 - 1000 msec: 20 [ 473.184381] zd1211rw 1-1:1.0: print_time() 1000 - ... msec: 18 Also vendor driver doesn't use this long timeout. Therefore change timeout to 50msec. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index ccdf81ebc4f5..861dad192871 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -1392,7 +1392,7 @@ int zd_usb_ioread16v(struct zd_usb *usb, u16 *values,
1392 udev = zd_usb_to_usbdev(usb); 1392 udev = zd_usb_to_usbdev(usb);
1393 prepare_read_regs_int(usb); 1393 prepare_read_regs_int(usb);
1394 r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT), 1394 r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT),
1395 req, req_len, &actual_req_len, 1000 /* ms */); 1395 req, req_len, &actual_req_len, 50 /* ms */);
1396 if (r) { 1396 if (r) {
1397 dev_dbg_f(zd_usb_dev(usb), 1397 dev_dbg_f(zd_usb_dev(usb),
1398 "error in usb_bulk_msg(). Error number %d\n", r); 1398 "error in usb_bulk_msg(). Error number %d\n", r);
@@ -1407,7 +1407,7 @@ int zd_usb_ioread16v(struct zd_usb *usb, u16 *values,
1407 } 1407 }
1408 1408
1409 timeout = wait_for_completion_timeout(&usb->intr.read_regs.completion, 1409 timeout = wait_for_completion_timeout(&usb->intr.read_regs.completion,
1410 msecs_to_jiffies(1000)); 1410 msecs_to_jiffies(50));
1411 if (!timeout) { 1411 if (!timeout) {
1412 disable_read_regs_int(usb); 1412 disable_read_regs_int(usb);
1413 dev_dbg_f(zd_usb_dev(usb), "read timed out\n"); 1413 dev_dbg_f(zd_usb_dev(usb), "read timed out\n");
@@ -1463,7 +1463,7 @@ int zd_usb_iowrite16v(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs,
1463 1463
1464 udev = zd_usb_to_usbdev(usb); 1464 udev = zd_usb_to_usbdev(usb);
1465 r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT), 1465 r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT),
1466 req, req_len, &actual_req_len, 1000 /* ms */); 1466 req, req_len, &actual_req_len, 50 /* ms */);
1467 if (r) { 1467 if (r) {
1468 dev_dbg_f(zd_usb_dev(usb), 1468 dev_dbg_f(zd_usb_dev(usb),
1469 "error in usb_bulk_msg(). Error number %d\n", r); 1469 "error in usb_bulk_msg(). Error number %d\n", r);
@@ -1552,7 +1552,7 @@ int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits)
1552 1552
1553 udev = zd_usb_to_usbdev(usb); 1553 udev = zd_usb_to_usbdev(usb);
1554 r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT), 1554 r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT),
1555 req, req_len, &actual_req_len, 1000 /* ms */); 1555 req, req_len, &actual_req_len, 50 /* ms */);
1556 if (r) { 1556 if (r) {
1557 dev_dbg_f(zd_usb_dev(usb), 1557 dev_dbg_f(zd_usb_dev(usb),
1558 "error in usb_bulk_msg(). Error number %d\n", r); 1558 "error in usb_bulk_msg(). Error number %d\n", r);