summaryrefslogtreecommitdiff
path: root/packages/linux/linux-mtx-2-2.4.27/43-usbserial-27-32-backport.diff
diff options
context:
space:
mode:
authorMartin Dietze <di@fh-wedel.de>2006-09-08 12:41:48 +0000
committerMartin Dietze <di@fh-wedel.de>2006-09-08 12:41:48 +0000
commit03b3579813b72ea73f9961105c598581e3f073e0 (patch)
treed58b298506103cc591fb4fd1c51bea9f88ee3f61 /packages/linux/linux-mtx-2-2.4.27/43-usbserial-27-32-backport.diff
parent6f4455ad4fe9f67a9b2cc316663b69f085af4031 (diff)
linux kernels: updated kernels plus patches for nylon/mtx
* linux-mtx-1-2.4.27: the standard kernel used for the 4G access cube * linux-mtx-1u-2.4.27: the customized kernel for the 4G Surfbox I * linux-mtx-2-2.4.27: the customized kernel for the 4G Surfbox II
Diffstat (limited to 'packages/linux/linux-mtx-2-2.4.27/43-usbserial-27-32-backport.diff')
-rw-r--r--packages/linux/linux-mtx-2-2.4.27/43-usbserial-27-32-backport.diff33
1 files changed, 33 insertions, 0 deletions
diff --git a/packages/linux/linux-mtx-2-2.4.27/43-usbserial-27-32-backport.diff b/packages/linux/linux-mtx-2-2.4.27/43-usbserial-27-32-backport.diff
new file mode 100644
index 0000000000..6a98f76c7a
--- /dev/null
+++ b/packages/linux/linux-mtx-2-2.4.27/43-usbserial-27-32-backport.diff
@@ -0,0 +1,33 @@
+--- linux/drivers/usb/serial/usbserial.c-27 2006-06-27 10:26:06.294476250 +0200
++++ linux/drivers/usb/serial/usbserial.c 2006-06-27 10:30:31.011020000 +0200
+@@ -528,8 +528,18 @@
+ down(&port->sem);
+ dbg("%s - port %d len %d backlog %d", __FUNCTION__,
+ port->number, job->len, port->write_backlog);
+- if (port->tty != NULL)
+- __serial_write(port, 0, job->buff, job->len);
++ if (port->tty != NULL) {
++ int rc;
++ int sent = 0;
++ while (sent < job->len) {
++ rc = __serial_write(port, 0, job->buff + sent, job->len - sent);
++ if ((rc < 0) || signal_pending(current))
++ break;
++ sent += rc;
++ if ((sent < job->len) && current->need_resched)
++ schedule();
++ }
++ }
+ up(&port->sem);
+
+ spin_lock_irqsave(&post_lock, flags);
+@@ -725,6 +735,9 @@
+ struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
+ int rc;
+
++ if (!port)
++ return -ENODEV;
++
+ if (!in_interrupt()) {
+ /*
+ * Run post_list to reduce a possiblity of reordered writes.