diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index f8c6d7e..1e86baa 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -72,8 +72,9 @@
 #include <linux/serial_core.h>
 #include <linux/serial.h>
 
-
-#define DRIVER_VERSION			"1.2"
+#ifndef MOD_PACKAGE_VERSION
+#define MOD_PACKAGE_VERSION		"1.8.0"
+#endif
 #define MOD_AUTHOR			"Option Wireless"
 #define MOD_DESCRIPTION			"USB High Speed Option driver"
 #define MOD_LICENSE			"GPL"
@@ -286,6 +287,7 @@ struct hso_device {
 	u8 usb_gone;
 	struct work_struct async_get_intf;
 	struct work_struct async_put_intf;
+	struct work_struct reset_device;
 
 	struct usb_device *usb;
 	struct usb_interface *interface;
@@ -295,6 +297,10 @@ struct hso_device {
 	struct mutex mutex;
 };
 
+/* Device type */
+#define HSO_DEV_STATIC  	1
+#define HSO_DEV_DYNAMIC 	2
+
 /* Type of interface */
 #define HSO_INTF_MASK		0xFF00
 #define	HSO_INTF_MUX		0x0100
@@ -315,6 +321,7 @@ struct hso_device {
 #define	HSO_PORT_DIAG		0x10
 #define	HSO_PORT_MODEM		0x11
 #define	HSO_PORT_NETWORK	0x12
+#define HSO_PORT_LOADER		0x13
 
 /* Additional device info */
 #define HSO_INFO_MASK		0xFF000000
@@ -332,7 +339,8 @@ static void hso_kick_transmit(struct hso_serial *serial);
 /* Helper functions */
 static int hso_mux_submit_intr_urb(struct hso_shared_int *mux_int,
 				   struct usb_device *usb, gfp_t gfp);
-static void log_usb_status(int status, const char *function);
+static void handle_usb_error(int status, const char *function,
+			     struct hso_device *hso_dev);
 static struct usb_endpoint_descriptor *hso_get_ep(struct usb_interface *intf,
 						  int type, int dir);
 static int hso_get_mux_ports(struct usb_interface *intf, unsigned char *ports);
@@ -350,6 +358,7 @@ static void async_put_intf(struct work_struct *data);
 static int hso_put_activity(struct hso_device *hso_dev);
 static int hso_get_activity(struct hso_device *hso_dev);
 static void tiocmget_intr_callback(struct urb *urb);
+static void reset_device(struct work_struct *data);
 /*****************************************************************************/
 /* Helping functions                                                         */
 /*****************************************************************************/
@@ -378,7 +387,7 @@ static void dbg_dump(int line_count, const char *func_name, unsigned char *buf,
 }
 
 #define DUMP(buf_, len_)	\
-	dbg_dump(__LINE__, __func__, buf_, len_)
+	dbg_dump(__LINE__, __func__, (unsigned char *)buf_, len_)
 
 #define DUMP1(buf_, len_)			\
 	do {					\
@@ -398,7 +407,7 @@ static int disable_net;
 /* driver info */
 static const char driver_name[] = "hso";
 static const char tty_filename[] = "ttyHS";
-static const char *version = __FILE__ ": " DRIVER_VERSION " " MOD_AUTHOR;
+static const char *version = __FILE__ ": " MOD_AUTHOR;
 /* the usb driver itself (registered in hso_init) */
 static struct usb_driver hso_driver;
 /* serial structures */
@@ -407,11 +416,23 @@ static struct hso_device *serial_table[HSO_SERIAL_TTY_MINORS];
 static struct hso_device *network_table[HSO_MAX_NET_DEVICES];
 static spinlock_t serial_table_lock;
 
+struct hso_dev_config {
+	u8 dev_type;
+	s16 num_entries;
+	const s32 *entries;
+};
+
+
 static const s32 default_port_spec[] = {
 	HSO_INTF_MUX | HSO_PORT_NETWORK,
 	HSO_INTF_BULK | HSO_PORT_DIAG,
-	HSO_INTF_BULK | HSO_PORT_MODEM,
-	0
+	HSO_INTF_BULK | HSO_PORT_MODEM
+};
+
+static const struct hso_dev_config default_config = {
+	HSO_DEV_STATIC,
+	sizeof(default_port_spec)/sizeof(default_port_spec[0]),
+	default_port_spec
 };
 
 static const s32 icon321_port_spec[] = {
@@ -419,16 +440,67 @@ static const s32 icon321_port_spec[] = {
 	HSO_INTF_BULK | HSO_PORT_DIAG2,
 	HSO_INTF_BULK | HSO_PORT_MODEM,
 	HSO_INTF_BULK | HSO_PORT_DIAG,
-	0
+};
+
+static const struct hso_dev_config icon321_config = {
+	HSO_DEV_STATIC,
+	sizeof(icon321_port_spec)/sizeof(icon321_port_spec[0]),
+	icon321_port_spec
+};
+
+static const s32 gi65x_1_port_spec[] = {
+	0,
+	0,
+	0,
+	HSO_INTF_BULK | HSO_PORT_MODEM,
+	HSO_INTF_BULK | HSO_PORT_APP,
+	HSO_INTF_BULK | HSO_PORT_DIAG,
+};
+
+static const struct hso_dev_config gi65x_1_config = {
+	HSO_DEV_STATIC,
+	sizeof(gi65x_1_port_spec)/sizeof(gi65x_1_port_spec[0]),
+	gi65x_1_port_spec
+};
+
+static const s32 gi65x_2_port_spec[] = {
+	0,
+	0,
+	0,
+	0,
+	HSO_INTF_BULK | HSO_PORT_MODEM,
+	HSO_INTF_BULK | HSO_PORT_APP,
+	HSO_INTF_BULK | HSO_PORT_DIAG,
+};
+
+
+static const struct hso_dev_config gi65x_2_config = {
+	HSO_DEV_STATIC,
+	sizeof(gi65x_2_port_spec)/sizeof(gi65x_2_port_spec[0]),
+	gi65x_2_port_spec
+};
+
+static const struct hso_dev_config dynamic_config = {
+	HSO_DEV_DYNAMIC,
+	0,
+	NULL
 };
 
 #define default_port_device(vendor, product)	\
 	USB_DEVICE(vendor, product),	\
-		.driver_info = (kernel_ulong_t)default_port_spec
+		.driver_info = (kernel_ulong_t)&default_config
 
 #define icon321_port_device(vendor, product)	\
 	USB_DEVICE(vendor, product),	\
-		.driver_info = (kernel_ulong_t)icon321_port_spec
+		.driver_info = (kernel_ulong_t)&icon321_config
+
+#define dynamic_port_device(vendor, product)	\
+	USB_DEVICE(vendor, product),	\
+		.driver_info = (kernel_ulong_t)&dynamic_config
+
+#define gi65x_port_device(vendor, product, subtype) \
+	USB_DEVICE(vendor, product),	\
+		.driver_info = (kernel_ulong_t)&gi65x_ ##subtype##_config
 
 /* list of devices we support */
 static const struct usb_device_id hso_ids[] = {
@@ -454,25 +526,45 @@ static const struct usb_device_id hso_ids[] = {
 	{icon321_port_device(0x0af0, 0xd013)},	/* Module HSxPA */
 	{icon321_port_device(0x0af0, 0xd031)},	/* Icon-321 */
 	{icon321_port_device(0x0af0, 0xd033)},	/* Icon-322 */
-	{USB_DEVICE(0x0af0, 0x7301)},		/* GE40x */
-	{USB_DEVICE(0x0af0, 0x7361)},		/* GE40x */
-	{USB_DEVICE(0x0af0, 0x7381)},		/* GE40x */
-	{USB_DEVICE(0x0af0, 0x7401)},		/* GI 0401 */
-	{USB_DEVICE(0x0af0, 0x7501)},		/* GTM 382 */
-	{USB_DEVICE(0x0af0, 0x7601)},		/* GE40x */
-	{USB_DEVICE(0x0af0, 0x7701)},
-	{USB_DEVICE(0x0af0, 0x7801)},
-	{USB_DEVICE(0x0af0, 0x7901)},
-	{USB_DEVICE(0x0af0, 0x8200)},
-	{USB_DEVICE(0x0af0, 0x8201)},
-	{USB_DEVICE(0x0af0, 0xd035)},
-	{USB_DEVICE(0x0af0, 0xd055)},
-	{USB_DEVICE(0x0af0, 0xd155)},
-	{USB_DEVICE(0x0af0, 0xd255)},
-	{USB_DEVICE(0x0af0, 0xd057)},
-	{USB_DEVICE(0x0af0, 0xd157)},
-	{USB_DEVICE(0x0af0, 0xd257)},
-	{USB_DEVICE(0x0af0, 0xd357)},
+	{dynamic_port_device(0x0af0, 0x7301)},          /* GE40x */
+	{dynamic_port_device(0x0af0, 0x7361)},          /* GE40x */
+	{dynamic_port_device(0x0af0, 0x7381)},          /* GE40x */
+	{dynamic_port_device(0x0af0, 0x7401)},          /* GI 0401 */
+	{dynamic_port_device(0x0af0, 0x7501)},          /* GTM 382 */
+	{dynamic_port_device(0x0af0, 0x7601)},          /* GE40x */
+	{dynamic_port_device(0x0af0, 0x7701)},
+	{dynamic_port_device(0x0af0, 0x7706)},
+	{dynamic_port_device(0x0af0, 0x7801)},
+	{dynamic_port_device(0x0af0, 0x7901)},
+	{dynamic_port_device(0x0af0, 0x7A01)},
+	{dynamic_port_device(0x0af0, 0x7A05)},
+	{dynamic_port_device(0x0af0, 0x8006)},
+	{dynamic_port_device(0x0af0, 0x8200)},
+	{dynamic_port_device(0x0af0, 0x8201)},
+	{dynamic_port_device(0x0af0, 0x8300)},
+	{dynamic_port_device(0x0af0, 0x8302)},
+	{dynamic_port_device(0x0af0, 0x8304)},
+	{dynamic_port_device(0x0af0, 0x8400)},
+	{dynamic_port_device(0x0af0, 0x8600)},
+	{dynamic_port_device(0x0af0, 0x8701)},
+	{dynamic_port_device(0x0af0, 0x8800)},
+	{dynamic_port_device(0x0af0, 0x8900)},
+	{dynamic_port_device(0x0af0, 0x9000)},
+	{dynamic_port_device(0x0af0, 0x9100)},
+	{dynamic_port_device(0x0af0, 0x9200)},
+	{dynamic_port_device(0x0af0, 0x9300)},
+	{dynamic_port_device(0x0af0, 0xd035)},
+	{dynamic_port_device(0x0af0, 0xd055)},
+	{dynamic_port_device(0x0af0, 0xd155)},
+	{dynamic_port_device(0x0af0, 0xd255)},
+	{dynamic_port_device(0x0af0, 0xd057)},
+	{dynamic_port_device(0x0af0, 0xd157)},
+	{dynamic_port_device(0x0af0, 0xd257)},
+	{dynamic_port_device(0x0af0, 0xd357)},
+	{dynamic_port_device(0x0af0, 0xd058)},
+	{dynamic_port_device(0x0af0, 0xc100)},
+	{gi65x_port_device(0x0d46, 0x45a9, 1)},
+	{gi65x_port_device(0x0d46, 0x45ad, 2)},
 	{}
 };
 MODULE_DEVICE_TABLE(usb, hso_ids);
@@ -519,6 +611,9 @@ static ssize_t hso_sysfs_show_porttype(struct device *dev,
 	case HSO_PORT_NETWORK:
 		port_name = "Network";
 		break;
+	case HSO_PORT_LOADER:
+		port_name = "Loader";
+		break;
 	default:
 		port_name = "Unknown";
 		break;
@@ -655,8 +750,8 @@ static void set_serial_by_index(unsigned index, struct hso_serial *serial)
 	spin_unlock_irqrestore(&serial_table_lock, flags);
 }
 
-/* log a meaningful explanation of an USB status */
-static void log_usb_status(int status, const char *function)
+static void handle_usb_error(int status, const char *function,
+			     struct hso_device *hso_dev)
 {
 	char *explanation;
 
@@ -685,10 +780,20 @@ static void log_usb_status(int status, const char *function)
 	case -EMSGSIZE:
 		explanation = "internal error";
 		break;
+	case -EILSEQ:
+	case -EPROTO:
+	case -ETIME:
+	case -ETIMEDOUT:
+		explanation = "protocol error";
+		if (hso_dev)
+			schedule_work(&hso_dev->reset_device);
+		break;
 	default:
 		explanation = "unknown status";
 		break;
 	}
+
+	/* log a meaningful explanation of an USB status */
 	D1("%s: received USB status - %s (%d)", function, explanation, status);
 }
 
@@ -762,7 +867,7 @@ static void write_bulk_callback(struct urb *urb)
 	/* log status, but don't act on it, we don't need to resubmit anything
 	 * anyhow */
 	if (status)
-		log_usb_status(status, __func__);
+		handle_usb_error(status, __func__, odev->parent);
 
 	hso_put_activity(odev->parent);
 
@@ -805,7 +910,7 @@ static int hso_net_start_xmit(struct sk_buff *skb, struct net_device *net)
 	result = usb_submit_urb(odev->mux_bulk_tx_urb, GFP_ATOMIC);
 	if (result) {
 		dev_warn(&odev->parent->interface->dev,
-			"failed mux_bulk_tx_urb %d", result);
+			"failed mux_bulk_tx_urb %d\n", result);
 		net->stats.tx_errors++;
 		netif_start_queue(net);
 	} else {
@@ -824,7 +929,6 @@ static void hso_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info
 	struct hso_net *odev = netdev_priv(net);
 
 	strncpy(info->driver, driver_name, ETHTOOL_BUSINFO_LEN);
-	strncpy(info->version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
 	usb_make_path(odev->parent->usb, info->bus_info, sizeof info->bus_info);
 }
 
@@ -944,10 +1048,6 @@ static void packetizeRx(struct hso_net *odev, unsigned char *ip_pkt,
 				/* Packet is complete. Inject into stack. */
 				/* We have IP packet here */
 				odev->skb_rx_buf->protocol = cpu_to_be16(ETH_P_IP);
-				/* don't check it */
-				odev->skb_rx_buf->ip_summed =
-					CHECKSUM_UNNECESSARY;
-
 				skb_reset_mac_header(odev->skb_rx_buf);
 
 				/* Ship it off to the kernel */
@@ -987,6 +1087,18 @@ static void packetizeRx(struct hso_net *odev, unsigned char *ip_pkt,
 	}
 }
 
+static void fix_crc_bug(struct urb *urb, __le16 max_packet_size)
+{
+	static const u8 crc_check[4] = { 0xDE, 0xAD, 0xBE, 0xEF };
+	u32 rest = urb->actual_length % le16_to_cpu(max_packet_size);
+
+	if (((rest == 5) || (rest == 6)) &&
+	    !memcmp(((u8 *)urb->transfer_buffer) + urb->actual_length - 4,
+		    crc_check, 4)) {
+		urb->actual_length -= 4;
+	}
+}
+
 /* Moving data from usb to kernel (in interrupt state) */
 static void read_bulk_callback(struct urb *urb)
 {
@@ -997,7 +1109,7 @@ static void read_bulk_callback(struct urb *urb)
 
 	/* is al ok?  (Filip: Who's Al ?) */
 	if (status) {
-		log_usb_status(status, __func__);
+		handle_usb_error(status, __func__, odev->parent);
 		return;
 	}
 
@@ -1015,16 +1127,8 @@ static void read_bulk_callback(struct urb *urb)
 		return;
 	}
 
-	if (odev->parent->port_spec & HSO_INFO_CRC_BUG) {
-		u32 rest;
-		u8 crc_check[4] = { 0xDE, 0xAD, 0xBE, 0xEF };
-		rest = urb->actual_length % odev->in_endp->wMaxPacketSize;
-		if (((rest == 5) || (rest == 6))
-		    && !memcmp(((u8 *) urb->transfer_buffer) +
-			       urb->actual_length - 4, crc_check, 4)) {
-			urb->actual_length -= 4;
-		}
-	}
+	if (odev->parent->port_spec & HSO_INFO_CRC_BUG)
+		fix_crc_bug(urb, odev->in_endp->wMaxPacketSize);
 
 	/* do we even have a packet? */
 	if (urb->actual_length) {
@@ -1052,7 +1156,7 @@ static void read_bulk_callback(struct urb *urb)
 	result = usb_submit_urb(urb, GFP_ATOMIC);
 	if (result)
 		dev_warn(&odev->parent->interface->dev,
-			 "%s failed submit mux_bulk_rx_urb %d", __func__,
+			 "%s failed submit mux_bulk_rx_urb %d\n", __func__,
 			 result);
 }
 
@@ -1131,9 +1235,6 @@ static void _hso_serial_set_termios(struct tty_struct *tty,
 static void hso_resubmit_rx_bulk_urb(struct hso_serial *serial, struct urb *urb)
 {
 	int result;
-#ifdef CONFIG_HSO_AUTOPM
-	usb_mark_last_busy(urb->dev);
-#endif
 	/* We are done with this URB, resubmit it. Prep the USB to wait for
 	 * another frame */
 	usb_fill_bulk_urb(urb, serial->parent->usb,
@@ -1206,7 +1307,7 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb)
 		D1("serial == NULL");
 		return;
 	} else if (status) {
-		log_usb_status(status, __func__);
+		handle_usb_error(status, __func__, serial->parent);
 		return;
 	}
 
@@ -1219,18 +1320,8 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb)
 		return;
 
 	if (status == 0) {
-		if (serial->parent->port_spec & HSO_INFO_CRC_BUG) {
-			u32 rest;
-			u8 crc_check[4] = { 0xDE, 0xAD, 0xBE, 0xEF };
-			rest =
-			    urb->actual_length %
-			    serial->in_endp->wMaxPacketSize;
-			if (((rest == 5) || (rest == 6))
-			    && !memcmp(((u8 *) urb->transfer_buffer) +
-				       urb->actual_length - 4, crc_check, 4)) {
-				urb->actual_length -= 4;
-			}
-		}
+		if (serial->parent->port_spec & HSO_INFO_CRC_BUG)
+			fix_crc_bug(urb, serial->in_endp->wMaxPacketSize);
 		/* Valid data, handle RX data */
 		spin_lock(&serial->serial_lock);
 		serial->rx_urb_filled[hso_urb_to_index(serial, urb)] = 1;
@@ -1312,7 +1403,6 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
 	/* check for port already opened, if not set the termios */
 	serial->open_count++;
 	if (serial->open_count == 1) {
-		tty->low_latency = 1;
 		serial->rx_state = RX_IDLE;
 		/* Force default termio settings */
 		_hso_serial_set_termios(tty, NULL);
@@ -1362,7 +1452,7 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
 	/* reset the rts and dtr */
 	/* do the actual close */
 	serial->open_count--;
-	kref_put(&serial->parent->ref, hso_serial_ref_free);
+
 	if (serial->open_count <= 0) {
 		serial->open_count = 0;
 		spin_lock_irq(&serial->serial_lock);
@@ -1382,6 +1472,8 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
 		usb_autopm_put_interface(serial->parent->interface);
 
 	mutex_unlock(&serial->parent->mutex);
+
+	kref_put(&serial->parent->ref, hso_serial_ref_free);
 }
 
 /* close the requested serial port */
@@ -1510,7 +1602,7 @@ static void tiocmget_intr_callback(struct urb *urb)
 	if (!serial)
 		return;
 	if (status) {
-		log_usb_status(status, __func__);
+		handle_usb_error(status, __func__, serial->parent);
 		return;
 	}
 	tiocmget = serial->tiocmget;
@@ -1526,7 +1618,7 @@ static void tiocmget_intr_callback(struct urb *urb)
 		dev_warn(&usb->dev,
 			 "hso received invalid serial state notification\n");
 		DUMP(serial_state_notification,
-		     sizeof(hso_serial_state_notifation))
+		     sizeof(struct hso_serial_state_notification));
 	} else {
 
 		UART_state_bitmap = le16_to_cpu(serial_state_notification->
@@ -1631,6 +1723,8 @@ static int hso_get_count(struct hso_serial *serial,
 	struct uart_icount cnow;
 	struct hso_tiocmget  *tiocmget = serial->tiocmget;
 
+	memset(&icount, 0, sizeof(struct serial_icounter_struct));
+
 	if (!tiocmget)
 		 return -ENOENT;
 	spin_lock_irq(&serial->serial_lock);
@@ -1697,6 +1791,10 @@ static int hso_serial_tiocmset(struct tty_struct *tty, struct file *file,
 		D1("no tty structures");
 		return -EINVAL;
 	}
+
+	if ((serial->parent->port_spec & HSO_PORT_MASK) != HSO_PORT_MODEM)
+		return -EINVAL;
+
 	if_num = serial->parent->interface->altsetting->desc.bInterfaceNumber;
 
 	spin_lock_irqsave(&serial->serial_lock, flags);
@@ -1835,7 +1933,7 @@ static int mux_device_request(struct hso_serial *serial, u8 type, u16 port,
 	result = usb_submit_urb(ctrl_urb, GFP_ATOMIC);
 	if (result) {
 		dev_err(&ctrl_urb->dev->dev,
-			"%s failed submit ctrl_urb %d type %d", __func__,
+			"%s failed submit ctrl_urb %d type %d\n", __func__,
 			result, type);
 		return result;
 	}
@@ -1885,7 +1983,7 @@ static void intr_callback(struct urb *urb)
 
 	/* status check */
 	if (status) {
-		log_usb_status(status, __func__);
+		handle_usb_error(status, __func__, NULL);
 		return;
 	}
 	D4("\n--- Got intr callback 0x%02X ---", status);
@@ -1902,18 +2000,18 @@ static void intr_callback(struct urb *urb)
 			if (serial != NULL) {
 				D1("Pending read interrupt on port %d\n", i);
 				spin_lock(&serial->serial_lock);
-				if (serial->rx_state == RX_IDLE) {
+				if (serial->rx_state == RX_IDLE &&
+					serial->open_count > 0) {
 					/* Setup and send a ctrl req read on
 					 * port i */
-				if (!serial->rx_urb_filled[0]) {
+					if (!serial->rx_urb_filled[0]) {
 						serial->rx_state = RX_SENT;
 						hso_mux_serial_read(serial);
 					} else
 						serial->rx_state = RX_PENDING;
-
 				} else {
-					D1("Already pending a read on "
-					   "port %d\n", i);
+					D1("Already a read pending on "
+					   "port %d or port not open\n", i);
 				}
 				spin_unlock(&serial->serial_lock);
 			}
@@ -1955,7 +2053,7 @@ static void hso_std_serial_write_bulk_callback(struct urb *urb)
 	tty = tty_kref_get(serial->tty);
 	spin_unlock(&serial->serial_lock);
 	if (status) {
-		log_usb_status(status, __func__);
+		handle_usb_error(status, __func__, serial->parent);
 		tty_kref_put(tty);
 		return;
 	}
@@ -2011,7 +2109,7 @@ static void ctrl_callback(struct urb *urb)
 	tty = tty_kref_get(serial->tty);
 	spin_unlock(&serial->serial_lock);
 	if (status) {
-		log_usb_status(status, __func__);
+		handle_usb_error(status, __func__, serial->parent);
 		tty_kref_put(tty);
 		return;
 	}
@@ -2121,6 +2219,9 @@ static void hso_log_port(struct hso_device *hso_dev)
 	case HSO_PORT_NETWORK:
 		port_type = "Network";
 		break;
+	case HSO_PORT_LOADER:
+		port_type = "Loader";
+		break;
 	default:
 		port_type = "Unknown";
 		break;
@@ -2355,12 +2456,12 @@ static int hso_serial_common_create(struct hso_serial *serial, int num_urbs,
 	serial->tx_data_length = tx_size;
 	serial->tx_data = kzalloc(serial->tx_data_length, GFP_KERNEL);
 	if (!serial->tx_data) {
-		dev_err(dev, "%s - Out of memory", __func__);
+		dev_err(dev, "%s - Out of memory\n", __func__);
 		goto exit;
 	}
 	serial->tx_buffer = kzalloc(serial->tx_data_length, GFP_KERNEL);
 	if (!serial->tx_buffer) {
-		dev_err(dev, "%s - Out of memory", __func__);
+		dev_err(dev, "%s - Out of memory\n", __func__);
 		goto exit;
 	}
 
@@ -2388,6 +2489,7 @@ static struct hso_device *hso_create_device(struct usb_interface *intf,
 
 	INIT_WORK(&hso_dev->async_get_intf, async_get_intf);
 	INIT_WORK(&hso_dev->async_put_intf, async_put_intf);
+	INIT_WORK(&hso_dev->reset_device, reset_device);
 
 	return hso_dev;
 }
@@ -2621,15 +2723,15 @@ exit:
 
 static void hso_free_tiomget(struct hso_serial *serial)
 {
-	struct hso_tiocmget *tiocmget = serial->tiocmget;
+	struct hso_tiocmget *tiocmget;
+	if (!serial)
+		return;
+	tiocmget = serial->tiocmget;
 	if (tiocmget) {
-		if (tiocmget->urb) {
-			usb_free_urb(tiocmget->urb);
-			tiocmget->urb = NULL;
-		}
+		usb_free_urb(tiocmget->urb);
+		tiocmget->urb = NULL;
 		serial->tiocmget = NULL;
 		kfree(tiocmget);
-
 	}
 }
 
@@ -2823,13 +2925,14 @@ struct hso_shared_int *hso_create_shared_int(struct usb_interface *interface)
 
 	mux->shared_intr_urb = usb_alloc_urb(0, GFP_KERNEL);
 	if (!mux->shared_intr_urb) {
-		dev_err(&interface->dev, "Could not allocate intr urb?");
+		dev_err(&interface->dev, "Could not allocate intr urb?\n");
 		goto exit;
 	}
-	mux->shared_intr_buf = kzalloc(mux->intr_endp->wMaxPacketSize,
-				       GFP_KERNEL);
+	mux->shared_intr_buf =
+		kzalloc(le16_to_cpu(mux->intr_endp->wMaxPacketSize),
+			GFP_KERNEL);
 	if (!mux->shared_intr_buf) {
-		dev_err(&interface->dev, "Could not allocate intr buf?");
+		dev_err(&interface->dev, "Could not allocate intr buf?\n");
 		goto exit;
 	}
 
@@ -2895,6 +2998,9 @@ static int hso_get_config_data(struct usb_interface *interface)
 	case 0xb:
 		result = HSO_PORT_VOICE;
 		break;
+	case 0xc:
+		result = HSO_PORT_LOADER;
+		break;
 	default:
 		result = 0;
 	}
@@ -2912,23 +3018,35 @@ static int hso_get_config_data(struct usb_interface *interface)
 static int hso_probe(struct usb_interface *interface,
 		     const struct usb_device_id *id)
 {
-	int mux, i, if_num, port_spec;
+	int mux, i, if_num, port_spec=0;
 	unsigned char port_mask;
 	struct hso_device *hso_dev = NULL;
 	struct hso_shared_int *shared_int;
 	struct hso_device *tmp_dev = NULL;
+	const struct hso_dev_config *cnf;
 
 	if_num = interface->altsetting->desc.bInterfaceNumber;
 
-	/* Get the interface/port specification from either driver_info or from
-	 * the device itself */
-	if (id->driver_info)
-		port_spec = ((u32 *)(id->driver_info))[if_num];
-	else
-		port_spec = hso_get_config_data(interface);
+	/* Get the device configuration from driver_info */
+	if(likely(id->driver_info)) {
+		cnf = (struct hso_dev_config *)id->driver_info;
+		switch(cnf->dev_type) {
+		case HSO_DEV_STATIC:
+			if(if_num <= cnf->num_entries)
+				port_spec = (s32)cnf->entries[if_num];
+		break;
+		case HSO_DEV_DYNAMIC:
+			port_spec = hso_get_config_data(interface);
+		break;
+		default:
+			return -ENODEV;
+		break;
+		}
+	} else
+		return -ENODEV;
 
 	if (interface->cur_altsetting->desc.bInterfaceClass != 0xFF) {
-		dev_err(&interface->dev, "Not our interface\n");
+		dev_info(&interface->dev, "Not our interface\n");
 		return -ENODEV;
 	}
 	/* Check if we need to switch to alt interfaces prior to port
@@ -2974,12 +3092,14 @@ static int hso_probe(struct usb_interface *interface,
 
 	case HSO_INTF_BULK:
 		/* It's a regular bulk interface */
-		if (((port_spec & HSO_PORT_MASK) == HSO_PORT_NETWORK)
-		    && !disable_net)
-			hso_dev = hso_create_net_device(interface, port_spec);
-		else
+		if ((port_spec & HSO_PORT_MASK) == HSO_PORT_NETWORK) {
+			if (!disable_net)
+				hso_dev =
+					hso_create_net_device(interface, port_spec);
+		} else {
 			hso_dev =
 			    hso_create_bulk_serial_device(interface, port_spec);
+		}
 		if (!hso_dev)
 			goto exit;
 		break;
@@ -3124,6 +3244,26 @@ out:
 	return result;
 }
 
+static void reset_device(struct work_struct *data)
+{
+	struct hso_device *hso_dev =
+	    container_of(data, struct hso_device, reset_device);
+	struct usb_device *usb = hso_dev->usb;
+	int result;
+
+	if (hso_dev->usb_gone) {
+		D1("No reset during disconnect\n");
+	} else {
+		result = usb_lock_device_for_reset(usb, hso_dev->interface);
+		if (result < 0)
+			D1("unable to lock device for reset: %d\n", result);
+		else {
+			usb_reset_device(usb);
+			usb_unlock_device(usb);
+		}
+	}
+}
+
 static void hso_serial_ref_free(struct kref *ref)
 {
 	struct hso_device *hso_dev = container_of(ref, struct hso_device, ref);
@@ -3224,13 +3364,13 @@ static int hso_mux_submit_intr_urb(struct hso_shared_int *shared_int,
 			 usb_rcvintpipe(usb,
 				shared_int->intr_endp->bEndpointAddress & 0x7F),
 			 shared_int->shared_intr_buf,
-			 shared_int->intr_endp->wMaxPacketSize,
+			 1,
 			 intr_callback, shared_int,
 			 shared_int->intr_endp->bInterval);
 
 	result = usb_submit_urb(shared_int->shared_intr_urb, gfp);
 	if (result)
-		dev_warn(&usb->dev, "%s failed mux_intr_urb %d", __func__,
+		dev_warn(&usb->dev, "%s failed mux_intr_urb %d\n", __func__,
 			result);
 
 	return result;
@@ -3336,7 +3476,7 @@ module_exit(hso_exit);
 MODULE_AUTHOR(MOD_AUTHOR);
 MODULE_DESCRIPTION(MOD_DESCRIPTION);
 MODULE_LICENSE(MOD_LICENSE);
-MODULE_INFO(Version, DRIVER_VERSION);
+MODULE_INFO(PackageVersion, MOD_PACKAGE_VERSION);
 
 /* change the debug level (eg: insmod hso.ko debug=0x04) */
 MODULE_PARM_DESC(debug, "Level of debug [0x01 | 0x02 | 0x04 | 0x08 | 0x10]");
