From: Simon Arlott <simon@fire.lp0.eu>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 2/3] cxacru: Reduce initialisation delay
Date: Sun, 23 Sep 2007 16:34:50 +0100 [thread overview]
Message-ID: <46F6879A.8040408@simon.arlott.org.uk> (raw)
In-Reply-To: <46F68708.6070409@simon.arlott.org.uk>
Since card status updates appear to only occur every second, a delay
of 1000ms on startup may not be sufficient - change to 1500ms.
The long delay of 4000ms is likely to be related to the time required
for the ADSL line to come up - the driver should not need to do this.
Overall delay when loading firmware will change from 5000ms to 1500ms.
Signed-Off-By: Simon Arlott <simon@fire.lp0.eu>
---
drivers/usb/atm/cxacru.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 8d8a107..35308a8 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -931,9 +931,10 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
usb_err(usbatm, "Passing control to firmware failed: %d\n", ret);
return;
}
+ usb_info(usbatm, "started firmware\n");
/* Delay to allow firmware to start up. */
- msleep_interruptible(1000);
+ msleep(1500);
usb_clear_halt(usb_dev, usb_sndbulkpipe(usb_dev, CXACRU_EP_CMD));
usb_clear_halt(usb_dev, usb_rcvbulkpipe(usb_dev, CXACRU_EP_CMD));
@@ -947,7 +948,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
}
/* Load config data (le32), doing one packet at a time */
- if (cf)
+ if (cf) {
for (off = 0; off < cf->size / 4; ) {
u32 buf[CMD_PACKET_SIZE / 4 - 1];
int i, len = min_t(int, cf->size / 4 - off, CMD_PACKET_SIZE / 4 / 2 - 1);
@@ -963,8 +964,8 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
return;
}
}
-
- msleep_interruptible(4000);
+ usb_info(usbatm, "loaded config data\n");
+ }
}
static int cxacru_find_firmware(struct cxacru_data *instance,
--
1.5.0.1
--
Simon Arlott
next prev parent reply other threads:[~2007-09-23 15:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-23 15:32 [PATCH 1/2] cxacru: Use appropriate logging for errors Simon Arlott
2007-09-23 15:34 ` Simon Arlott [this message]
2007-09-23 16:23 ` [PATCH 2/3] cxacru: Reduce initialisation delay Duncan Sands
2007-09-23 18:33 ` Simon Arlott
2007-09-23 15:36 ` [PATCH 3/3] cxacru: Cleanup code by removing "ret = ret;" assignments Simon Arlott
2007-09-23 16:20 ` Duncan Sands
2007-09-23 18:36 ` Simon Arlott
2007-09-24 18:32 ` Greg KH
2007-09-25 19:20 ` [PATCH] cxacru: Use appropriate logging for errors Simon Arlott
2007-09-23 16:17 ` [PATCH 1/2] " Duncan Sands
2007-09-23 18:44 ` [PATCH 1/2 (v2)] " Simon Arlott
2007-09-23 19:26 ` Duncan Sands
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=46F6879A.8040408@simon.arlott.org.uk \
--to=simon@fire.lp0.eu \
--cc=gregkh@suse.de \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.