diff -urN linux-2.3.99-pre5.orig/drivers/usb/serial/ftdi_sio.c linux-2.3.99-pre5/drivers/usb/serial/ftdi_sio.c
--- linux-2.3.99-pre5.orig/drivers/usb/serial/ftdi_sio.c	Wed Apr  5 16:58:38 2000
+++ linux-2.3.99-pre5/drivers/usb/serial/ftdi_sio.c	Wed Apr 12 01:11:16 2000
@@ -153,7 +153,7 @@
 /* do some startup allocations not currently performed by usb_serial_probe() */
 static int ftdi_sio_startup (struct usb_serial *serial)
 {
-	init_waitqueue_head(&serial->write_wait);
+	init_waitqueue_head(&serial->port[0].write_wait);
 	
 	return (0);
 }
@@ -291,7 +291,7 @@
 		/* Was seeing a race here, got a read callback, then write callback before
 		   hitting interuptible_sleep_on  - so wrapping in add_wait_queue stuff */
 
-		add_wait_queue(&serial->write_wait, &wait);
+		add_wait_queue(&port->write_wait, &wait);
 		set_current_state (TASK_INTERRUPTIBLE);
 		while (port->write_urb->status == -EINPROGRESS) {
 			dbg("ftdi_sio - write in progress - retrying");
@@ -301,13 +301,13 @@
 			}
 			if (signal_pending(current)) {
 				current->state = TASK_RUNNING;
-				remove_wait_queue(&serial->write_wait, &wait);				
+				remove_wait_queue(&port->write_wait, &wait);
 				rc = -ERESTARTSYS;
 				goto err;
 			}
 			schedule();
 		}		
-		remove_wait_queue(&serial->write_wait, &wait);
+		remove_wait_queue(&port->write_wait, &wait);
 		set_current_state(TASK_RUNNING);
 
 		count += data_offset;
@@ -388,7 +388,7 @@
 		return;
 	}
 
-	wake_up_interruptible(&serial->write_wait);
+	wake_up_interruptible(&port->write_wait);
 	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
 		(tty->ldisc.write_wakeup)(tty);
 
diff -urN linux-2.3.99-pre5.orig/drivers/usb/serial/keyspan_pda.c linux-2.3.99-pre5/drivers/usb/serial/keyspan_pda.c
--- linux-2.3.99-pre5.orig/drivers/usb/serial/keyspan_pda.c	Mon Mar 27 14:25:28 2000
+++ linux-2.3.99-pre5/drivers/usb/serial/keyspan_pda.c	Wed Apr 12 02:43:08 2000
@@ -52,78 +52,20 @@
 
 #include "usb-serial.h"
 
+struct keyspan_pda_private {
+	int			tx_room;
+	int			tx_throttled;
+};
+
 #define KEYSPAN_VENDOR_ID		0x06cd
 #define KEYSPAN_PDA_FAKE_ID		0x0103
 #define KEYSPAN_PDA_ID			0x0104 /* no clue */
 
-/* function prototypes for a Keyspan PDA serial converter */
-static int  keyspan_pda_open		(struct usb_serial_port *port,
-					 struct file *filp);
-static void keyspan_pda_close		(struct usb_serial_port *port,
-					 struct file *filp);
-static int  keyspan_pda_startup		(struct usb_serial *serial);
-static void keyspan_pda_rx_throttle	(struct usb_serial_port *port);
-static void keyspan_pda_rx_unthrottle	(struct usb_serial_port *port);
-static int  keyspan_pda_setbaud		(struct usb_serial *serial, int baud);
-static int  keyspan_pda_write_room	(struct usb_serial_port *port);
-static int  keyspan_pda_write		(struct usb_serial_port *port,
-					 int from_user,
-					 const unsigned char *buf,
-					 int count);
-static void keyspan_pda_write_bulk_callback (struct urb *urb);
-static int  keyspan_pda_chars_in_buffer (struct usb_serial_port *port);
-static int  keyspan_pda_ioctl		(struct usb_serial_port *port,
-					 struct file *file,
-					 unsigned int cmd,
-					 unsigned long arg);
-static void keyspan_pda_set_termios	(struct usb_serial_port *port,
-					 struct termios *old);
-static void keyspan_pda_break_ctl	(struct usb_serial_port *port,
-					 int break_state);
-static int  keyspan_pda_fake_startup	(struct usb_serial *serial);
-
-
 /* All of the device info needed for the Keyspan PDA serial converter */
 static __u16	keyspan_vendor_id		= KEYSPAN_VENDOR_ID;
 static __u16	keyspan_pda_fake_product_id	= KEYSPAN_PDA_FAKE_ID;
 static __u16	keyspan_pda_product_id		= KEYSPAN_PDA_ID;
-struct usb_serial_device_type keyspan_pda_fake_device = {
-	name:			"Keyspan PDA - (prerenumeration)",
-	idVendor:		&keyspan_vendor_id,		/* the Keyspan PDA vendor ID */
-	idProduct:		&keyspan_pda_fake_product_id,	/* the Keyspan PDA initial product id */
-	needs_interrupt_in:	DONT_CARE,			/* don't have to have an interrupt in endpoint */
-	needs_bulk_in:		DONT_CARE,			/* don't have to have a bulk in endpoint */
-	needs_bulk_out:		DONT_CARE,			/* don't have to have a bulk out endpoint */
-	num_interrupt_in:	NUM_DONT_CARE,
-	num_bulk_in:		NUM_DONT_CARE,
-	num_bulk_out:		NUM_DONT_CARE,
-	num_ports:		1,
-	startup:		keyspan_pda_fake_startup
-};
-struct usb_serial_device_type keyspan_pda_device = {
-	name:			"Keyspan PDA",
-	idVendor:		&keyspan_vendor_id,		/* the Keyspan PDA vendor ID */
-	idProduct:		&keyspan_pda_product_id,	/* the Keyspan PDA product id */
-	needs_interrupt_in:	MUST_HAVE,
-	needs_bulk_in:		DONT_CARE,
-	needs_bulk_out:		MUST_HAVE,
-	num_interrupt_in:	1,
-	num_bulk_in:		0,
-	num_bulk_out:		1,
-	num_ports:		1,
-	open:			keyspan_pda_open,
-	close:			keyspan_pda_close,
-	write:			keyspan_pda_write,
-	write_room:		keyspan_pda_write_room,
-	write_bulk_callback: 	keyspan_pda_write_bulk_callback,
-	chars_in_buffer:	keyspan_pda_chars_in_buffer,
-	throttle:		keyspan_pda_rx_throttle,
-	unthrottle:		keyspan_pda_rx_unthrottle,
-	startup:		keyspan_pda_startup,
-	ioctl:			keyspan_pda_ioctl,
-	set_termios:		keyspan_pda_set_termios,
-	break_ctl:		keyspan_pda_break_ctl,
-};
+
 
 
 static void keyspan_pda_rx_interrupt (struct urb *urb)
@@ -133,6 +75,8 @@
        	struct tty_struct *tty;
 	unsigned char *data = urb->transfer_buffer;
 	int i;
+	struct keyspan_pda_private *priv;
+	priv = (struct keyspan_pda_private *)(port->private);
 
 	/* the urb might have been killed. */
 	if (urb->status)
@@ -167,8 +111,8 @@
 			break;
 		case 2: /* tx unthrottle interrupt */
 			tty = serial->port[0].tty;
-			serial->tx_throttled = 0;
-			wake_up(&serial->write_wait); /* wake up writer */
+			priv->tx_throttled = 0;
+			wake_up(&port->write_wait); /* wake up writer */
 			wake_up(&tty->write_wait); /* them too */
 			break;
 		default:
@@ -193,7 +137,7 @@
 	   upon the device too. */
 
 	dbg("keyspan_pda_rx_throttle port %d", port->number);
-	usb_unlink_urb(port->read_urb);
+	usb_unlink_urb(port->interrupt_in_urb);
 }
 
 
@@ -201,7 +145,7 @@
 {
 	/* just restart the receive interrupt URB */
 	dbg("keyspan_pda_rx_unthrottle port %d", port->number);
-	if (usb_submit_urb(port->read_urb))
+	if (usb_submit_urb(port->interrupt_in_urb))
 		dbg(" usb_submit_urb(read urb) failed");
 	return;
 }
@@ -409,8 +353,10 @@
 	struct usb_serial *serial = port->serial;
 	int request_unthrottle = 0;
 	int rc = 0;
+	struct keyspan_pda_private *priv;
 	DECLARE_WAITQUEUE(wait, current);
 
+	priv = (struct keyspan_pda_private *)(port->private);
 	/* guess how much room is left in the device's ring buffer, and if we
 	   want to send more than that, check first, updating our notion of
 	   what is left. If our write will result in no room left, ask the
@@ -419,7 +365,7 @@
 	   select() or poll() too) until we receive that unthrottle interrupt.
 	   Block if we can't write anything at all, otherwise write as much as
 	   we can. */
-
+	dbg("keyspan_pda_write(%d)",count);
 	if (count == 0) {
 		dbg(" write request of 0 bytes");
 		return (0);
@@ -434,7 +380,7 @@
 			rc = -EAGAIN;
 			goto err;
 		}
-		interruptible_sleep_on(&serial->write_wait);
+		interruptible_sleep_on(&port->write_wait);
 		if (signal_pending(current)) {
 			rc = -ERESTARTSYS;
 			goto err;
@@ -451,16 +397,16 @@
 	   have to be careful to avoid a race that would cause us to sleep
 	   forever. */
 
-	add_wait_queue(&serial->write_wait, &wait);
+	add_wait_queue(&port->write_wait, &wait);
 	set_current_state(TASK_INTERRUPTIBLE);
-	while (serial->tx_throttled) {
+	while (priv->tx_throttled) {
 		/* device can't accomodate any more characters. Sleep until it
 		   can. Woken up by an Rx interrupt message, which clears
 		   tx_throttled first. */
 		dbg(" tx_throttled, going to sleep");
 		if (signal_pending(current)) {
 			current->state = TASK_RUNNING;
-			remove_wait_queue(&serial->write_wait, &wait);
+			remove_wait_queue(&port->write_wait, &wait);
 			dbg(" woke up because of signal");
 			rc = -ERESTARTSYS;
 			goto err;
@@ -468,11 +414,11 @@
 		schedule();
 		dbg(" woke up");
 	}
-	remove_wait_queue(&serial->write_wait, &wait);
+	remove_wait_queue(&port->write_wait, &wait);
 	set_current_state(TASK_RUNNING);
 
 	count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
-	if (count > serial->tx_room) {
+	if (count > priv->tx_room) {
 		unsigned char room;
 		/* Looks like we might overrun the Tx buffer. Ask the device
 		   how much room it really has */
@@ -495,15 +441,15 @@
 			return -EIO; /* device didn't return any data */
 		}
 		dbg(" roomquery says %d", room);
-		serial->tx_room = room;
-		if (count > serial->tx_room) {
+		priv->tx_room = room;
+		if (count > priv->tx_room) {
 			/* we're about to completely fill the Tx buffer, so
 			   we'll be throttled afterwards. */
-			count = serial->tx_room;
+			count = priv->tx_room;
 			request_unthrottle = 1;
 		}
 	}
-	serial->tx_room -= count;
+	priv->tx_room -= count;
 
 	if (count) {
 		/* now transfer data */
@@ -529,7 +475,7 @@
 		dbg(" request_unthrottle");
 		/* ask the device to tell us when the tx buffer becomes
 		   sufficiently empty */
-		serial->tx_throttled = 1; /* block writers */
+		priv->tx_throttled = 1; /* block writers */
 		rc = usb_control_msg(serial->dev, 
 				     usb_sndctrlpipe(serial->dev, 0),
 				     7, /* request_unthrottle */
@@ -563,7 +509,7 @@
 		return;
 	}
 	
-	wake_up_interruptible(&serial->write_wait);
+	wake_up_interruptible(&port->write_wait);
 
 	tty = port->tty;
 	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && 
@@ -576,23 +522,25 @@
 
 static int keyspan_pda_write_room (struct usb_serial_port *port)
 {
-	struct usb_serial *serial = port->serial;
+	struct keyspan_pda_private *priv;
+	priv = (struct keyspan_pda_private *)(port->private);
 
 	/* used by n_tty.c for processing of tabs and such. Giving it our
 	   conservative guess is probably good enough, but needs testing by
 	   running a console through the device. */
 
-	return (serial->tx_room);
+	return (priv->tx_room);
 }
 
 
 static int keyspan_pda_chars_in_buffer (struct usb_serial_port *port)
 {
-	struct usb_serial *serial = port->serial;
+	struct keyspan_pda_private *priv;
+	priv = (struct keyspan_pda_private *)(port->private);
 	
 	/* when throttled, return at least WAKEUP_CHARS to tell select() (via
 	   n_tty.c:normal_poll() ) that we're not writeable. */
-	if (serial->tx_throttled)
+	if (priv->tx_throttled)
 		return 256;
 	return 0;
 }
@@ -603,6 +551,8 @@
 	struct usb_serial *serial = port->serial;
 	unsigned char room;
 	int rc;
+	struct keyspan_pda_private *priv;
+	priv = (struct keyspan_pda_private *)(port->private);
 
 	if (port->active) {
 		return -EINVAL;
@@ -627,8 +577,8 @@
 		dbg(" roomquery returned 0 bytes");
 		return -EIO; /* device didn't return any data */
 	}
-	serial->tx_room = room;
-	serial->tx_throttled = room ? 0 : 1;
+	priv->tx_room = room;
+	priv->tx_throttled = room ? 0 : 1;
 
 	/* the normal serial device seems to always turn on DTR and RTS here,
 	   so do the same */
@@ -638,7 +588,7 @@
 		keyspan_pda_set_modem_info(serial, 0);
 
 	/*Start reading from the device*/
-	if (usb_submit_urb(port->read_urb))
+	if (usb_submit_urb(port->interrupt_in_urb))
 		dbg(" usb_submit_urb(read int) failed");
 
 	return (0);
@@ -655,7 +605,7 @@
 
 	/* shutdown our bulk reads and writes */
 	usb_unlink_urb (port->write_urb);
-	usb_unlink_urb (port->read_urb);
+	usb_unlink_urb (port->interrupt_in_urb);
 	port->active = 0;
 }
 
@@ -691,27 +641,63 @@
 	return (1);
 }
 
-
-/* do some startup allocations not currently performed by usb_serial_probe() */
 static int keyspan_pda_startup (struct usb_serial *serial)
 {
-	struct usb_endpoint_descriptor *intin;
-	intin = serial->port[0].interrupt_in_endpoint;
+	/* allocate the private data structures for all ports. Well, for all
+	   one ports. */
 
-	/* set up the receive interrupt urb */
-	FILL_INT_URB(serial->port[0].read_urb, serial->dev,
-		     usb_rcvintpipe(serial->dev, intin->bEndpointAddress),
-		     serial->port[0].interrupt_in_buffer,
-		     intin->wMaxPacketSize,
-		     keyspan_pda_rx_interrupt,
-		     serial,
-		     intin->bInterval);
-
-	init_waitqueue_head(&serial->write_wait);
-	
+	serial->port[0].private = kmalloc(sizeof(struct keyspan_pda_private),
+					   GFP_KERNEL);
+	if (!serial->port[0].private)
+		return (1); /* error */
+	init_waitqueue_head(&serial->port[0].write_wait);
 	return (0);
 }
 
-#endif	/* CONFIG_USB_SERIAL_KEYSPAN_PDA */
+static void keyspan_pda_shutdown (struct usb_serial *serial)
+{
+	kfree(serial->port[0].private);
+}
 
+struct usb_serial_device_type keyspan_pda_fake_device = {
+	name:			"Keyspan PDA - (prerenumeration)",
+	idVendor:		&keyspan_vendor_id,
+	idProduct:		&keyspan_pda_fake_product_id,
+	needs_interrupt_in:	DONT_CARE,
+	needs_bulk_in:		DONT_CARE,
+	needs_bulk_out:		DONT_CARE,
+	num_interrupt_in:	NUM_DONT_CARE,
+	num_bulk_in:		NUM_DONT_CARE,
+	num_bulk_out:		NUM_DONT_CARE,
+	num_ports:		1,
+	startup:		keyspan_pda_fake_startup,
+};
 
+struct usb_serial_device_type keyspan_pda_device = {
+	name:			"Keyspan PDA",
+	idVendor:		&keyspan_vendor_id,
+	idProduct:		&keyspan_pda_product_id,
+	needs_interrupt_in:	MUST_HAVE,
+	needs_bulk_in:		DONT_CARE,
+	needs_bulk_out:		MUST_HAVE,
+	num_interrupt_in:	1,
+	num_bulk_in:		0,
+	num_bulk_out:		1,
+	num_ports:		1,
+	open:			keyspan_pda_open,
+	close:			keyspan_pda_close,
+	write:			keyspan_pda_write,
+	write_room:		keyspan_pda_write_room,
+	write_bulk_callback: 	keyspan_pda_write_bulk_callback,
+	read_int_callback:	keyspan_pda_rx_interrupt,
+	chars_in_buffer:	keyspan_pda_chars_in_buffer,
+	throttle:		keyspan_pda_rx_throttle,
+	unthrottle:		keyspan_pda_rx_unthrottle,
+	ioctl:			keyspan_pda_ioctl,
+	set_termios:		keyspan_pda_set_termios,
+	break_ctl:		keyspan_pda_break_ctl,
+	startup:		keyspan_pda_startup,
+	shutdown:		keyspan_pda_shutdown,
+};
+
+#endif	/* CONFIG_USB_SERIAL_KEYSPAN_PDA */
diff -urN linux-2.3.99-pre5.orig/drivers/usb/serial/usb-serial.h linux-2.3.99-pre5/drivers/usb/serial/usb-serial.h
--- linux-2.3.99-pre5.orig/drivers/usb/serial/usb-serial.h	Wed Apr  5 16:58:38 2000
+++ linux-2.3.99-pre5/drivers/usb/serial/usb-serial.h	Wed Apr 12 01:32:48 2000
@@ -39,10 +39,8 @@
 	unsigned char		number;
 	char			active;		/* someone has this device open */
 
-	struct usb_endpoint_descriptor * interrupt_in_endpoint;
-	__u8			interrupt_in_interval;
 	unsigned char *		interrupt_in_buffer;
-	struct urb *		control_urb;
+	struct urb *		interrupt_in_urb;
 
 	unsigned char *		bulk_in_buffer;
 	struct urb *		read_urb;
@@ -50,7 +48,10 @@
 	unsigned char *		bulk_out_buffer;
 	int			bulk_out_size;
 	struct urb *		write_urb;
-	void *			private;	/* data private to the specific driver */
+
+	wait_queue_head_t	write_wait;
+
+	void *			private;	/* data private to the specific port */
 };
 
 struct usb_serial {
@@ -65,11 +66,6 @@
 	char				num_bulk_out;		/* number of bulk out endpoints we have */
 	struct usb_serial_port		port[MAX_NUM_PORTS];
 
-	/* FIXME! These should move to the private area of the keyspan driver */
-	int			tx_room;
-	int			tx_throttled;
-	wait_queue_head_t 	write_wait;
-
 	void *			private;		/* data private to the specific driver */
 };
 
@@ -99,7 +95,8 @@
 
 	/* function call to make before accepting driver */
 	int (*startup) (struct usb_serial *serial);	/* return 0 to continue initialization, anything else to abort */
-	
+	void (*shutdown) (struct usb_serial *serial);
+
 	/* serial function calls */
 	int  (*open)		(struct usb_serial_port *port, struct file * filp);
 	void (*close)		(struct usb_serial_port *port, struct file * filp);
@@ -111,7 +108,8 @@
 	int  (*chars_in_buffer)	(struct usb_serial_port *port);
 	void (*throttle)	(struct usb_serial_port *port);
 	void (*unthrottle)	(struct usb_serial_port *port);
-	
+
+	void (*read_int_callback)(struct urb *urb);
 	void (*read_bulk_callback)(struct urb *urb);
 	void (*write_bulk_callback)(struct urb *urb);
 };
diff -urN linux-2.3.99-pre5.orig/drivers/usb/serial/usbserial.c linux-2.3.99-pre5/drivers/usb/serial/usbserial.c
--- linux-2.3.99-pre5.orig/drivers/usb/serial/usbserial.c	Wed Apr  5 16:58:38 2000
+++ linux-2.3.99-pre5/drivers/usb/serial/usbserial.c	Wed Apr 12 02:35:41 2000
@@ -997,235 +997,231 @@
 	int num_bulk_out = 0;
 	int num_ports;
 	
-	/* loop through our list of known serial converters, and see if this device matches */
-	device_num = 0;
-	while (usb_serial_devices[device_num] != NULL) {
+	/* loop through our list of known serial converters, and see if this
+           device matches. */
+	for (device_num = 0; usb_serial_devices[device_num]; device_num++) {
 		type = usb_serial_devices[device_num];
-		dbg ("Looking at %s Vendor id=%.4x Product id=%.4x", type->name, *(type->idVendor), *(type->idProduct));
+		dbg ("Looking at %s Vendor id=%.4x Product id=%.4x", 
+		     type->name, *(type->idVendor), *(type->idProduct));
 
 		/* look at the device descriptor */
 		if ((dev->descriptor.idVendor == *(type->idVendor)) &&
 		    (dev->descriptor.idProduct == *(type->idProduct))) {
+			dbg("descriptor matches");
+			break;
+		}
+	}
+	if (!usb_serial_devices[device_num]) {
+		/* no match */
+		dbg("none matched");
+		return(NULL);
+	}
 
-			dbg("descriptor matches...looking at the endpoints");
-
-			/* descriptor matches, let's try to find the endpoints needed */
-			interrupt_pipe = bulk_in_pipe = bulk_out_pipe = HAS_NOT;
+	/* descriptor matches, let's find the endpoints needed */
+	interrupt_pipe = bulk_in_pipe = bulk_out_pipe = HAS_NOT;
 			
-			/* check out the endpoints */
-			interface = &dev->actconfig->interface[ifnum].altsetting[0];
-			for (i = 0; i < interface->bNumEndpoints; ++i) {
-				endpoint = &interface->endpoint[i];
+	/* check out the endpoints */
+	interface = &dev->actconfig->interface[ifnum].altsetting[0];
+	for (i = 0; i < interface->bNumEndpoints; ++i) {
+		endpoint = &interface->endpoint[i];
 		
-				if ((endpoint->bEndpointAddress & 0x80) &&
-				    ((endpoint->bmAttributes & 3) == 0x02)) {
-					/* we found a bulk in endpoint */
-					dbg("found bulk in");
-					bulk_in_pipe = HAS;
-					bulk_in_endpoint[num_bulk_in] = endpoint;
-					++num_bulk_in;
-				}
-
-				if (((endpoint->bEndpointAddress & 0x80) == 0x00) &&
-				    ((endpoint->bmAttributes & 3) == 0x02)) {
-					/* we found a bulk out endpoint */
-					dbg("found bulk out");
-					bulk_out_pipe = HAS;
-					bulk_out_endpoint[num_bulk_out] = endpoint;
-					++num_bulk_out;
-				}
-		
-				if ((endpoint->bEndpointAddress & 0x80) &&
-				    ((endpoint->bmAttributes & 3) == 0x03)) {
-					/* we found a interrupt in endpoint */
-					dbg("found interrupt in");
-					interrupt_pipe = HAS;
-					interrupt_in_endpoint[num_interrupt_in] = endpoint;
-					++num_interrupt_in;
-				}
+		if ((endpoint->bEndpointAddress & 0x80) &&
+		    ((endpoint->bmAttributes & 3) == 0x02)) {
+			/* we found a bulk in endpoint */
+			dbg("found bulk in");
+			bulk_in_pipe = HAS;
+			bulk_in_endpoint[num_bulk_in] = endpoint;
+			++num_bulk_in;
+		}
 
-			}
+		if (((endpoint->bEndpointAddress & 0x80) == 0x00) &&
+		    ((endpoint->bmAttributes & 3) == 0x02)) {
+			/* we found a bulk out endpoint */
+			dbg("found bulk out");
+			bulk_out_pipe = HAS;
+			bulk_out_endpoint[num_bulk_out] = endpoint;
+			++num_bulk_out;
+		}
+		
+		if ((endpoint->bEndpointAddress & 0x80) &&
+		    ((endpoint->bmAttributes & 3) == 0x03)) {
+			/* we found a interrupt in endpoint */
+			dbg("found interrupt in");
+			interrupt_pipe = HAS;
+			interrupt_in_endpoint[num_interrupt_in] = endpoint;
+			++num_interrupt_in;
+		}
+	}
 	
-			/* verify that we found all of the endpoints that we need */
-			if ((interrupt_pipe & type->needs_interrupt_in) &&
-			    (bulk_in_pipe & type->needs_bulk_in) &&
-			    (bulk_out_pipe & type->needs_bulk_out)) {
-				/* found all that we need */
-				MOD_INC_USE_COUNT;
-				info("%s converter detected", type->name);
+	/* verify that we found all of the endpoints that we need */
+	if (!((interrupt_pipe & type->needs_interrupt_in) &&
+	      (bulk_in_pipe & type->needs_bulk_in) &&
+	      (bulk_out_pipe & type->needs_bulk_out))) {
+		/* nope, they don't match what we expected */
+		info("descriptors matched, but endpoints did not");
+		return NULL;
+	}
+
+	/* found all that we need */
+	MOD_INC_USE_COUNT;
+	info("%s converter detected", type->name);
 
 #ifdef CONFIG_USB_SERIAL_GENERIC
-				if (type == &generic_device)
-					num_ports = num_bulk_out;
-				else
+	if (type == &generic_device)
+		num_ports = num_bulk_out;
+	else
 #endif
-					num_ports = type->num_ports;
+		num_ports = type->num_ports;
 
-				serial = get_free_serial (num_ports, &minor);
-				if (serial == NULL) {
-					err("No more free serial devices");
-					MOD_DEC_USE_COUNT;
-					return NULL;
-				}
+	serial = get_free_serial (num_ports, &minor);
+	if (serial == NULL) {
+		err("No more free serial devices");
+		MOD_DEC_USE_COUNT;
+		return NULL;
+	}
 	
-			       	serial->dev = dev;
-				serial->type = type;
-				serial->minor = minor;
-				serial->num_ports = num_ports;
-				serial->num_bulk_in = num_bulk_in;
-				serial->num_bulk_out = num_bulk_out;
-				serial->num_interrupt_in = num_interrupt_in;
-
-				/* initialize a tty_driver for this device */
-				serial->tty_driver = usb_serial_tty_driver_init (serial);
-				if (serial->tty_driver == NULL) {
-					err("Can't create a tty_serial_driver");
-					goto probe_error;
-				}
-
-				if (tty_register_driver (serial->tty_driver)) {
-					err("failed to register tty driver");
-					goto probe_error;
-				}
-
-				/* collect interrupt_in endpoints now, because
-				   the keyspan_pda startup function needs
-				   to know about them */
-				for (i = 0; i < num_interrupt_in; ++i) {
-					port = &serial->port[i];
-					buffer_size = interrupt_in_endpoint[i]->wMaxPacketSize;
-					port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
-					if (!port->interrupt_in_buffer) {
-						err("Couldn't allocate interrupt_in_buffer");
-						goto probe_error;
-					}
-					port->interrupt_in_endpoint = interrupt_in_endpoint[i];
-				}
-
-				/* if this device type has a startup function, call it */
-				if (type->startup) {
-					if (type->startup (serial)) {
-						goto probe_error;
-					}
-				}
-
-				/* set up the endpoint information */
-				for (i = 0; i < num_bulk_in; ++i) {
-					port = &serial->port[i];
-					port->read_urb = usb_alloc_urb (0);
-					if (!port->read_urb) {
-						err("No free urbs available");
-						goto probe_error;
-					}
-					buffer_size = bulk_in_endpoint[i]->wMaxPacketSize;
-					port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
-					if (!port->bulk_in_buffer) {
-						err("Couldn't allocate bulk_in_buffer");
-						goto probe_error;
-					}
-					if (serial->type->read_bulk_callback) {
-						FILL_BULK_URB(port->read_urb, dev, usb_rcvbulkpipe (dev, bulk_in_endpoint[i]->bEndpointAddress),
-								port->bulk_in_buffer, buffer_size, serial->type->read_bulk_callback, port);
-					} else {
-						FILL_BULK_URB(port->read_urb, dev, usb_rcvbulkpipe (dev, bulk_in_endpoint[i]->bEndpointAddress),
-								port->bulk_in_buffer, buffer_size, generic_read_bulk_callback, port);
-					}
-				}
-
-				for (i = 0; i < num_bulk_out; ++i) {
-					port = &serial->port[i];
-					port->write_urb = usb_alloc_urb(0);
-					if (!port->write_urb) {
-						err("No free urbs available");
-						goto probe_error;
-					}
-					port->bulk_out_size = bulk_out_endpoint[i]->wMaxPacketSize;
-					port->bulk_out_buffer = kmalloc (port->bulk_out_size, GFP_KERNEL);
-					if (!port->bulk_out_buffer) {
-						err("Couldn't allocate bulk_out_buffer");
-						goto probe_error;
-					}
-					if (serial->type->write_bulk_callback) {
-						FILL_BULK_URB(port->write_urb, dev, usb_sndbulkpipe (dev, bulk_out_endpoint[i]->bEndpointAddress),
-								port->bulk_out_buffer, port->bulk_out_size, serial->type->write_bulk_callback, port);
-					} else {
-						FILL_BULK_URB(port->write_urb, dev, usb_sndbulkpipe (dev, bulk_out_endpoint[i]->bEndpointAddress),
-								port->bulk_out_buffer, port->bulk_out_size, generic_write_bulk_callback, port);
-					}
-				}
-
-#if 0 /* use this code when WhiteHEAT is up and running */
-				for (i = 0; i < num_interrupt_in; ++i) {
-					port = &serial->port[i];
-					port->control_urb = usb_alloc_urb(0);
-					if (!port->control_urb) {
-						err("No free urbs available");
-						goto probe_error;
-					}
-					buffer_size = interrupt_in_endpoint[i]->wMaxPacketSize;
-					port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
-					if (!port->interrupt_in_buffer) {
-						err("Couldn't allocate interrupt_in_buffer");
-						goto probe_error;
-					}
-					FILL_INT_URB(port->control_urb, dev, usb_rcvintpipe (dev, interrupt_in_endpoint[i]->bEndpointAddress),
-							port->interrupt_in_buffer, buffer_size, serial_control_irq,
-							port, interrupt_in_endpoint[i]->bInterval);
-				}
-#endif
+	serial->dev = dev;
+	serial->type = type;
+	serial->minor = minor;
+	serial->num_ports = num_ports;
+	serial->num_bulk_in = num_bulk_in;
+	serial->num_bulk_out = num_bulk_out;
+	serial->num_interrupt_in = num_interrupt_in;
+
+	/* initialize a tty_driver for this device */
+	serial->tty_driver = usb_serial_tty_driver_init (serial);
+	if (serial->tty_driver == NULL) {
+		err("Can't create a tty_serial_driver");
+		goto probe_error;
+	}
 
-				for (i = 0; i < serial->num_ports; ++i) {
-					info("%s converter now attached to ttyUSB%d", type->name, serial->minor + i);
-				}
-
-				return serial;
-			} else {
-				info("descriptors matched, but endpoints did not");
-			}
+	if (tty_register_driver (serial->tty_driver)) {
+		err("failed to register tty driver");
+		goto probe_error;
+	}
+	
+	/* if this device type has a startup function, call it */
+	if (type->startup) {
+		if (type->startup (serial)) {
+			goto probe_error;
 		}
-
-		/* look at the next type in our list */
-		++device_num;
 	}
 
-probe_error:
-	if (serial) {
-		for (i = 0; i < num_bulk_in; ++i) {
-			port = &serial->port[i];
-			if (port->read_urb)
-				usb_free_urb (port->read_urb);
-			if (serial->port[i].bulk_in_buffer[i])
-				kfree (serial->port[i].bulk_in_buffer);
+	/* set up the endpoint information */
+	for (i = 0; i < num_bulk_in; ++i) {
+		endpoint = bulk_in_endpoint[i];
+		port = &serial->port[i];
+		port->read_urb = usb_alloc_urb (0);
+		if (!port->read_urb) {
+			err("No free urbs available");
+			goto probe_error;
 		}
-		for (i = 0; i < num_bulk_out; ++i) {
-			port = &serial->port[i];
-			if (port->write_urb)
-				usb_free_urb (port->write_urb);
-			if (serial->port[i].bulk_out_buffer)
-				kfree (serial->port[i].bulk_out_buffer);
+		buffer_size = endpoint->wMaxPacketSize;
+		port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
+		if (!port->bulk_in_buffer) {
+			err("Couldn't allocate bulk_in_buffer");
+			goto probe_error;
 		}
-		for (i = 0; i < num_interrupt_in; ++i) {
-			port = &serial->port[i];
-			if (port->control_urb)
-				usb_free_urb (port->control_urb);
-			if (serial->port[i].interrupt_in_buffer)
-				kfree (serial->port[i].interrupt_in_buffer);
+		FILL_BULK_URB(port->read_urb, dev, 
+			      usb_rcvbulkpipe(dev, endpoint->bEndpointAddress),
+			      port->bulk_in_buffer, buffer_size, 
+			      ((serial->type->read_bulk_callback) ?
+			       serial->type->read_bulk_callback :
+			       generic_read_bulk_callback), 
+			      port);
+	}
+
+	for (i = 0; i < num_bulk_out; ++i) {
+		endpoint = bulk_out_endpoint[i];
+		port = &serial->port[i];
+		port->write_urb = usb_alloc_urb(0);
+		if (!port->write_urb) {
+			err("No free urbs available");
+			goto probe_error;
 		}
-		
-		/* return the minor range that this device had */
-		return_serial (serial);
+		buffer_size = endpoint->wMaxPacketSize;
+		port->bulk_out_size = buffer_size;
+		port->bulk_out_buffer = kmalloc (buffer_size, GFP_KERNEL);
+		if (!port->bulk_out_buffer) {
+			err("Couldn't allocate bulk_out_buffer");
+			goto probe_error;
+		}
+		FILL_BULK_URB(port->write_urb, dev, 
+			      usb_sndbulkpipe(dev, endpoint->bEndpointAddress),
+			      port->bulk_out_buffer, buffer_size,
+			      ((serial->type->write_bulk_callback) ? 
+			       serial->type->write_bulk_callback : 
+			       generic_write_bulk_callback), 
+			      port);
+	}
 
-		/* if this device has a tty_driver, then unregister it and free it */
-		if (serial->tty_driver) {
-			tty_unregister_driver (serial->tty_driver);
-			kfree (serial->tty_driver);
-			serial->tty_driver = NULL;
+	for (i = 0; i < num_interrupt_in; ++i) {
+		endpoint = interrupt_in_endpoint[i];
+		port = &serial->port[i];
+		port->interrupt_in_urb = usb_alloc_urb(0);
+		if (!port->interrupt_in_urb) {
+			err("No free urbs available");
+			goto probe_error;
+		}
+		buffer_size = endpoint->wMaxPacketSize;
+		port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
+		if (!port->interrupt_in_buffer) {
+			err("Couldn't allocate interrupt_in_buffer");
+			goto probe_error;
 		}
+		FILL_INT_URB(port->interrupt_in_urb, dev, 
+			     usb_rcvintpipe(dev, endpoint->bEndpointAddress),
+			     port->interrupt_in_buffer, buffer_size, 
+			     serial->type->read_int_callback,
+			     port, 
+			     endpoint->bInterval);
+	}
 
-		/* free up any memory that we allocated */
-		kfree (serial);
-		MOD_DEC_USE_COUNT;
+
+	for (i = 0; i < serial->num_ports; ++i) {
+		info("%s converter now attached to ttyUSB%d", 
+		     type->name, serial->minor + i);
 	}
+	
+	return serial; /* success */
+
+
+probe_error:
+	for (i = 0; i < num_bulk_in; ++i) {
+		port = &serial->port[i];
+		if (port->read_urb)
+			usb_free_urb (port->read_urb);
+		if (port->bulk_in_buffer)
+			kfree (port->bulk_in_buffer);
+	}
+	for (i = 0; i < num_bulk_out; ++i) {
+		port = &serial->port[i];
+		if (port->write_urb)
+			usb_free_urb (port->write_urb);
+		if (port->bulk_out_buffer)
+			kfree (port->bulk_out_buffer);
+	}
+	for (i = 0; i < num_interrupt_in; ++i) {
+		port = &serial->port[i];
+		if (port->interrupt_in_urb)
+			usb_free_urb (port->interrupt_in_urb);
+		if (port->interrupt_in_buffer)
+			kfree (port->interrupt_in_buffer);
+	}
+		
+	/* return the minor range that this device had */
+	return_serial (serial);
+
+	/* if this device has a tty_driver, then unregister it and free it */
+	if (serial->tty_driver) {
+		tty_unregister_driver (serial->tty_driver);
+		kfree (serial->tty_driver);
+		serial->tty_driver = NULL;
+	}
+
+	/* free up any memory that we allocated */
+	kfree (serial);
+	MOD_DEC_USE_COUNT;
 	return NULL;
 }
 
@@ -1237,6 +1233,9 @@
 	int i;
 
 	if (serial) {
+		if (serial->type->shutdown)
+			serial->type->shutdown(serial);
+
 		for (i = 0; i < serial->num_ports; ++i)
 			serial->port[i].active = 0;
 
@@ -1260,9 +1259,9 @@
 		}
 		for (i = 0; i < serial->num_interrupt_in; ++i) {
 			port = &serial->port[i];
-			if (port->control_urb) {
-				usb_unlink_urb (port->control_urb);
-				usb_free_urb (port->control_urb);
+			if (port->interrupt_in_urb) {
+				usb_unlink_urb (port->interrupt_in_urb);
+				usb_free_urb (port->interrupt_in_urb);
 			}
 			if (port->interrupt_in_buffer)
 				kfree (port->interrupt_in_buffer);

