From: "Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br>
To: Frank Gevaerts <frank.gevaerts@fks.be>
Cc: linux-kernel@vger.kernel.org, Greg KH <greg@kroah.com>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [RESEND] [PATCH 2/2] ipaq.c timing parameters
Date: Mon, 19 Jun 2006 15:27:42 -0300 [thread overview]
Message-ID: <20060619152742.79e51c67@doriath.conectiva> (raw)
In-Reply-To: <20060619173428.GD32484@fks.be>
On Mon, 19 Jun 2006 19:34:28 +0200
Frank Gevaerts <frank.gevaerts@fks.be> wrote:
| On Mon, Jun 19, 2006 at 01:42:40PM -0300, Luiz Fernando N. Capitulino wrote:
| > On Mon, 19 Jun 2006 10:46:19 +0200
| > Frank Gevaerts <frank.gevaerts@fks.be> wrote:
| >
| > | Adds configurable waiting periods to the ipaq connection code. These are
| > | not needed when the pocketpc device is running normally when plugged in,
| > | but they need extra delays if they are physically connected while
| > | rebooting.
| > | There are two parameters :
| > | * initial_wait : this is the delay before the driver attemts to start the
| > | connection. This is needed because the pocktpc device takes much
| > | longer to boot if the driver starts sending control packets too soon.
| > | * connect_retries : this is the number of times the control urb is
| > | retried before finally giving up. The patch also adds a 1 second delay
| > | between retries.
| > | I'm not sure if the cases where this patch is useful are general enough
| > | to include this in the kernel.
| > |
| > | Signed-off-by: Frank Gevaerts <frank.gevaerts@fks.be>
| > |
| > | diff -urp linux-2.6.17-rc6.a/drivers/usb/serial/ipaq.c linux-2.6.17-rc6.b/drivers/usb/serial/ipaq.c
| > | --- linux-2.6.17-rc6.a/drivers/usb/serial/ipaq.c 2006-06-14 16:02:03.000000000 +0200
| > | +++ linux-2.6.17-rc6.b/drivers/usb/serial/ipaq.c 2006-06-14 16:06:44.000000000 +0200
| > | @@ -71,6 +71,8 @@
| > |
| > | static __u16 product, vendor;
| > | static int debug;
| > | +static int connect_retries = KP_RETRIES;
| > | +static int initial_wait;
| > |
| > | /* Function prototypes for an ipaq */
| > | static int ipaq_open (struct usb_serial_port *port, struct file *filp);
| > | @@ -583,7 +585,7 @@ static int ipaq_open(struct usb_serial_p
| > | struct ipaq_private *priv;
| > | struct ipaq_packet *pkt;
| > | int i, result = 0;
| > | - int retries = KP_RETRIES;
| > | + int retries = connect_retries;
| > |
| > | dbg("%s - port %d", __FUNCTION__, port->number);
| > |
| > | @@ -647,6 +649,7 @@ static int ipaq_open(struct usb_serial_p
| > | port->read_urb->transfer_buffer_length = URBDATA_SIZE;
| > | port->bulk_out_size = port->write_urb->transfer_buffer_length = URBDATA_SIZE;
| > |
| > | + msleep(1000*initial_wait);
| >
| > I was going to say you should use ssleep() here, but I can't find a
| > ssleep_interruptible(). Then either: use msleep_interruptible() or
| > creates a new ssleep_interruptible().
|
| I wasn't sure if that was safe here, so I used the non-interruptible
| version. I'll change it when I redo the patch.
| Is it worth it creating ssleep_interruptible() just for this one call?
You could grep around to check it.
--
Luiz Fernando N. Capitulino
next prev parent reply other threads:[~2006-06-19 18:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-19 8:44 [RESEND] [PATCH 1/2] ipaq.c bugfixes Frank Gevaerts
2006-06-19 8:46 ` [RESEND] [PATCH 2/2] ipaq.c timing parameters Frank Gevaerts
2006-06-19 16:42 ` Luiz Fernando N. Capitulino
2006-06-19 17:34 ` Frank Gevaerts
2006-06-19 18:27 ` Luiz Fernando N. Capitulino [this message]
2006-06-20 6:54 ` Andrew Morton
2006-06-19 16:35 ` [RESEND] [PATCH 1/2] ipaq.c bugfixes Luiz Fernando N. Capitulino
2006-06-19 17:25 ` Frank Gevaerts
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=20060619152742.79e51c67@doriath.conectiva \
--to=lcapitulino@mandriva.com.br \
--cc=akpm@osdl.org \
--cc=frank.gevaerts@fks.be \
--cc=greg@kroah.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®