Title: [9800] trunk/drivers/usb/gadget/u_serial.c: USB: gadget: g_serial: drop our custom solution to low_latency crash
Revision
9800
Author
vapier
Date
2011-03-28 05:17:43 -0400 (Mon, 28 Mar 2011)

Log Message

USB: gadget: g_serial: drop our custom solution to low_latency crash

Upstream merged a fix for the low_latency crash [#5813] with commit
44a0c0190b500ee6bcfc0976fe540f65dee2cd67, so no need for our local
conversion from a tasklet to a workqueue anymore.

Modified Paths

Diff

Modified: trunk/drivers/usb/gadget/u_serial.c (9799 => 9800)


--- trunk/drivers/usb/gadget/u_serial.c	2011-03-28 08:39:15 UTC (rev 9799)
+++ trunk/drivers/usb/gadget/u_serial.c	2011-03-28 09:17:43 UTC (rev 9800)
@@ -109,7 +109,7 @@
 	int read_allocated;
 	struct list_head	read_queue;
 	unsigned		n_read;
-	struct work_struct	push;
+	struct tasklet_struct	push;
 
 	struct list_head	write_pool;
 	int write_started;
@@ -477,9 +477,9 @@
  * So QUEUE_SIZE packets plus however many the FIFO holds (usually two)
  * can be buffered before the TTY layer's buffers (currently 64 KB).
  */
-static void gs_rx_push(struct work_struct *work)
+static void gs_rx_push(unsigned long _port)
 {
-	struct gs_port		*port = container_of(work, struct gs_port, push);
+	struct gs_port		*port = (void *)_port;
 	struct tty_struct	*tty;
 	struct list_head	*queue = &port->read_queue;
 	bool			disconnect = false;
@@ -568,7 +568,7 @@
 	if (!list_empty(queue) && tty) {
 		if (!test_bit(TTY_THROTTLED, &tty->flags)) {
 			if (do_push)
-				schedule_work(&port->push);
+				tasklet_schedule(&port->push);
 			else
 				pr_warning(PREFIX "%d: RX not scheduled?\n",
 					port->port_num);
@@ -589,7 +589,7 @@
 	/* Queue all received data until the tty layer is ready for it. */
 	spin_lock(&port->port_lock);
 	list_add_tail(&req->list, &port->read_queue);
-	schedule_work(&port->push);
+	tasklet_schedule(&port->push);
 	spin_unlock(&port->port_lock);
 }
 
@@ -988,7 +988,7 @@
 		 * rts/cts, or other handshaking with the host, but if the
 		 * read queue backs up enough we'll be NAKing OUT packets.
 		 */
-		schedule_work(&port->push);
+		tasklet_schedule(&port->push);
 		pr_vdebug(PREFIX "%d: unthrottle\n", port->port_num);
 	}
 	spin_unlock_irqrestore(&port->port_lock, flags);
@@ -1041,7 +1041,7 @@
 	init_waitqueue_head(&port->close_wait);
 	init_waitqueue_head(&port->drain_wait);
 
-	INIT_WORK(&port->push, gs_rx_push);
+	tasklet_init(&port->push, gs_rx_push, (unsigned long) port);
 
 	INIT_LIST_HEAD(&port->read_pool);
 	INIT_LIST_HEAD(&port->read_queue);
@@ -1195,7 +1195,7 @@
 		ports[i].port = NULL;
 		mutex_unlock(&ports[i].lock);
 
-		flush_scheduled_work();
+		tasklet_kill(&port->push);
 
 		/* wait for old opens to finish */
 		wait_event(port->close_wait, gs_closed(port));
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to