From: Frank Gevaerts <frank.gevaerts@fks.be>
To: Greg KH <gregkh@suse.de>
Cc: Frank Gevaerts <frank.gevaerts@fks.be>,
linux-kernel@vger.kernel.org,
linux-usb-devel@lists.sourceforge.net
Subject: [PATCH] Re: usb-serial ipaq kernel problem
Date: Tue, 23 May 2006 00:04:59 +0200 [thread overview]
Message-ID: <20060522220459.GA1910@fks.be> (raw)
In-Reply-To: <20060522214403.GA7044@suse.de>
On Mon, May 22, 2006 at 02:44:03PM -0700, Greg KH wrote:
> On Mon, May 22, 2006 at 04:30:48PM +0200, Frank Gevaerts wrote:
> > Hi,
> >
> > We are having problems with the usb-serial ipaq driver in 2.6.16 (debian
> > backports 2.6.16-1-686, but also reproducible with self-compiled
> > kernel.org kernel)
> >
> > Sometimes, we get the following on disconnect:
>
> <snip>
>
> Can you duplicate this on 2.6.17-rc4? A number of tty changes went into
> that release that should have fixed this issue.
I'll try it in the morning. In the meantime, we found some other
problems in ipaq.c : apparently pocketpc accepts usb enumeration long
before it accepts usb-serial commands (sometimes 50 or more seconds),
which makes ipaq_open fail. When it fails, the read urb is not killed,
while the associated structures are freed, which gives a panic when
the urb completes. The following patch solves that :
Since changing this, I also have not seen the original problem anymore,
but I will do some more testing tomorrow.
Signed-off-by: Frank Gevaerts <frank.gevaerts@fks.be>
--- linux-2.6.16/drivers/usb/serial/ipaq.c 2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6.16.ipaq/drivers/usb/serial/ipaq.c 2006-05-23 00:00:33.000000000 +0200
@@ -59,7 +59,7 @@
#include "usb-serial.h"
#include "ipaq.h"
-#define KP_RETRIES 100
+#define KP_RETRIES 1000
/*
* Version Information
@@ -652,12 +652,6 @@
usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
ipaq_read_bulk_callback, port);
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
- if (result) {
- err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
- goto error;
- }
-
/*
* Send out control message observed in win98 sniffs. Not sure what
* it does, but from empirical observations, it seems that the device
@@ -671,8 +665,15 @@
usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
0x1, 0, NULL, 0, 100);
if (result == 0) {
+ result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ if (result) {
+ err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
+ goto error;
+ }
+
return 0;
}
+ msleep(100);
}
err("%s - failed doing control urb, error %d", __FUNCTION__, result);
goto error;
>
> thanks,
>
> greg k-h
>
--
Frank Gevaerts frank.gevaerts@fks.be
fks bvba - Formal and Knowledge Systems http://www.fks.be/
Stationsstraat 108 Tel: ++32-(0)11-21 49 11
B-3570 ALKEN Fax: ++32-(0)11-22 04 19
next prev parent reply other threads:[~2006-05-22 22:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-22 14:30 usb-serial ipaq kernel problem Frank Gevaerts
2006-05-22 21:44 ` Greg KH
2006-05-22 22:04 ` Frank Gevaerts [this message]
2006-05-23 13:31 ` [PATCH] " 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=20060522220459.GA1910@fks.be \
--to=frank.gevaerts@fks.be \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/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