Hi folks,

This patch is against a local copy of Greg's usb-2.4 tree and is for 
the ftdi_sio driver.

The patch tidies up the write bulk callback function a little bit - 
removing some unnecessary paranoid checks and scheduling a soft 
interrupt regardless of the port's open count (for consistency with 
other usb serial drivers).

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <[EMAIL PROTECTED]>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
# This is a BitKeeper generated patch for the following project:
# Project Name: greg k-h's linux 2.4 USB kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1108  -> 1.1109 
#	drivers/usb/serial/ftdi_sio.c	1.47    -> 1.48   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/08/19	[EMAIL PROTECTED]	1.1109
# Small clean-up of ftdi_sio's write bulk callback function.  Omitted paranoid checks that don't
# matter and queued task regardless of port's open count for consistency with other usb serial
# drivers.
# --------------------------------------------
#
diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
--- a/drivers/usb/serial/ftdi_sio.c	Tue Aug 19 12:33:36 2003
+++ b/drivers/usb/serial/ftdi_sio.c	Tue Aug 19 12:33:36 2003
@@ -17,6 +17,10 @@
  * See http://ftdi-usb-sio.sourceforge.net for upto date testing info
  *	and extra documentation
  *
+ * (19/Aug/2003) Ian Abbott
+ *      Omitted some paranoid checks in write bulk callback that don't matter.
+ *      Queued task in write bulk callback regardless of port's open count.
+ *
  * (05/Aug/2003) Ian Abbott
  *      Added VID/PID for ID TECH IDT1221U USB to RS-232 adapter.
  *      VID/PID provided by Steve Briggs.
@@ -1451,33 +1455,19 @@
 static void ftdi_write_bulk_callback (struct urb *urb)
 {
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
-	struct usb_serial *serial;
-
-	dbg("%s", __FUNCTION__);
 
 	if (port_paranoia_check (port, __FUNCTION__))
 		return;
 	
+	dbg("%s - port %d", __FUNCTION__, port->number);
+	
 	if (urb->status) {
 		dbg("nonzero write bulk status received: %d", urb->status);
 		return;
 	}
 
-	serial = get_usb_serial (port, __FUNCTION__);
-	if (!serial) {
-		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
-		return;
-	}
-
-	/* Have to check for validity of queueing up the tasks */
-	dbg("%s - port->open_count = %d", __FUNCTION__, port->open_count);
-
- 	if (port->open_count > 0){
-		queue_task(&port->tqueue, &tq_immediate);
-		mark_bh(IMMEDIATE_BH);
-	} 
-
-	return;
+	queue_task(&port->tqueue, &tq_immediate);
+	mark_bh(IMMEDIATE_BH);
 } /* ftdi_write_bulk_callback */
 
 

Reply via email to