From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
To: linux-wireless@vger.kernel.org
Cc: Daniel Drake <dsd@gentoo.org>, Ulrich Kunitz <kune@deine-taler.de>
Subject: [RFC PATCH 14/17] zd1211rw: lower hw command timeouts
Date: Wed, 05 Jan 2011 01:49:44 +0200 [thread overview]
Message-ID: <20110104234944.25309.65071.stgit@fate.lan> (raw)
In-Reply-To: <20110104234745.25309.72030.stgit@fate.lan>
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>
---
drivers/net/wireless/zd1211rw/zd_usb.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index 13a089b..b709a9d 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -1397,7 +1397,7 @@ int zd_usb_ioread16v(struct zd_usb *usb, u16 *values,
udev = zd_usb_to_usbdev(usb);
prepare_read_regs_int(usb);
r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT),
- req, req_len, &actual_req_len, 1000 /* ms */);
+ req, req_len, &actual_req_len, 50 /* ms */);
if (r) {
dev_dbg_f(zd_usb_dev(usb),
"error in usb_bulk_msg(). Error number %d\n", r);
@@ -1411,7 +1411,7 @@ int zd_usb_ioread16v(struct zd_usb *usb, u16 *values,
}
timeout = wait_for_completion_timeout(&usb->intr.read_regs.completion,
- msecs_to_jiffies(1000));
+ msecs_to_jiffies(50));
if (!timeout) {
disable_read_regs_int(usb);
dev_dbg_f(zd_usb_dev(usb), "read timed out\n");
@@ -1458,7 +1458,7 @@ int zd_usb_iowrite16v(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs,
udev = zd_usb_to_usbdev(usb);
r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT),
- req, req_len, &actual_req_len, 1000 /* ms */);
+ req, req_len, &actual_req_len, 50 /* ms */);
if (r) {
dev_dbg_f(zd_usb_dev(usb),
"error in usb_bulk_msg(). Error number %d\n", r);
@@ -1539,7 +1539,7 @@ int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits)
udev = zd_usb_to_usbdev(usb);
r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT),
- req, req_len, &actual_req_len, 1000 /* ms */);
+ req, req_len, &actual_req_len, 50 /* ms */);
if (r) {
dev_dbg_f(zd_usb_dev(usb),
"error in usb_bulk_msg(). Error number %d\n", r);
@@ -1554,3 +1554,4 @@ int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits)
return 0;
}
+
next prev parent reply other threads:[~2011-01-04 23:49 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-04 23:47 [RFC PATCH 0/17] zd1211rw: add support for AP mode Jussi Kivilinna
2011-01-04 23:47 ` [RFC PATCH 01/17] zd1211rw: fix tx-queue disabling Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 02/17] zd1211rw: cancel process_intr work on zd_chip_disable_int() Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 03/17] zd1211rw: fix beacon interval setup Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 04/17] zd1211rw: move set_multicast_hash and set_rx_filter from workers to configure_filter Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 05/17] zd1211rw: move set_rts_cts_work to bss_info_changed Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 06/17] zd1211rw: support setting BSSID for AP mode Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 07/17] zd1211rw: fix ack_pending in filter_ack causing tx-packet ordering problem on monitor Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 08/17] zd1211rw: let zd_set_beacon_interval() set dtim_period and add AP-beacon flag Jussi Kivilinna
2011-01-04 23:49 ` [RFC PATCH 09/17] zd1211rw: implement seq_num for IEEE80211_TX_CTL_ASSIGN_SEQ Jussi Kivilinna
2011-01-04 23:49 ` [RFC PATCH 10/17] zd1211rw: implement beacon fetching and handling ieee80211_get_buffered_bc() Jussi Kivilinna
2011-01-06 21:46 ` Christian Lamparter
2011-01-06 21:55 ` Johannes Berg
2011-01-09 15:46 ` Jussi Kivilinna
2011-01-09 20:33 ` Christian Lamparter
2011-01-19 18:49 ` Jussi Kivilinna
2011-01-19 20:22 ` Christian Lamparter
2011-01-20 8:16 ` Jussi Kivilinna
2011-01-20 9:13 ` Helmut Schaa
2011-01-20 17:43 ` Christian Lamparter
2011-01-04 23:49 ` [RFC PATCH 11/17] zd1211rw: add beacon watchdog and setting HW beacon more failsafe Jussi Kivilinna
2011-01-04 23:49 ` [RFC PATCH 12/17] zd1211rw: batch beacon config commands together Jussi Kivilinna
2011-01-04 23:49 ` [RFC PATCH 13/17] zd1211rw: use stack for small cmd-buffers Jussi Kivilinna
2011-01-05 9:27 ` Johannes Berg
2011-01-06 18:55 ` Dan Williams
2011-01-06 21:53 ` Jussi Kivilinna
2011-01-04 23:49 ` Jussi Kivilinna [this message]
2011-01-04 23:49 ` [RFC PATCH 15/17] zd1211rw: collect driver settings and add function to restore theim Jussi Kivilinna
2011-01-04 23:50 ` [RFC PATCH 16/17] zd1211rw: add tx watchdog Jussi Kivilinna
2011-01-04 23:50 ` [RFC PATCH 17/17] zd1211rw: enable NL80211_IFTYPE_AP Jussi Kivilinna
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=20110104234944.25309.65071.stgit@fate.lan \
--to=jussi.kivilinna@mbnet.fi \
--cc=dsd@gentoo.org \
--cc=kune@deine-taler.de \
--cc=linux-wireless@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).