Hi,
This patch against 2.4.3-pre3 adds support for the GoHubs GO-COM232 USB
to serial converter which works the same as the Peracom device.
thanks,
greg k-h
--
greg@(kroah|wirex).com
diff -Naur -X /home/greg/linux/dontdiff
linux-2.4.3-pre3/drivers/usb/serial/belkin_sa.c
linux-2.4.3-pre3-greg/drivers/usb/serial/belkin_sa.c
--- linux-2.4.3-pre3/drivers/usb/serial/belkin_sa.c Mon Feb 26 16:05:34 2001
+++ linux-2.4.3-pre3-greg/drivers/usb/serial/belkin_sa.c Mon Mar 12 15:08:13
+2001
@@ -24,7 +24,11 @@
* -- Add support for flush commands
* -- Add everything that is missing :)
*
- * (11/06/2000) gkh
+ * 12-Mar-2001 gkh
+ * - Added support for the GoHubs GO-COM232 device which is the same as the
+ * Peracom device.
+ *
+ * 06-Nov-2000 gkh
* - Added support for the old Belkin and Peracom devices.
* - Made the port able to be opened multiple times.
* - Added some defaults incase the line settings are things these devices
@@ -90,6 +94,7 @@
{ USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) },
{ USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) },
{ USB_DEVICE(PERACOM_VID, PERACOM_PID) },
+ { USB_DEVICE(GOHUBS_VID, GOHUBS_PID) },
{ } /* Terminating entry */
};
@@ -108,6 +113,11 @@
{ } /* Terminating entry */
};
+static __devinitdata struct usb_device_id gocom232_table [] = {
+ { USB_DEVICE(GOHUBS_VID, GOHUBS_PID) },
+ { } /* Terminating entry */
+};
+
MODULE_DEVICE_TABLE (usb, id_table_combined);
/* All of the device info needed for the Belkin serial converter */
@@ -174,6 +184,27 @@
shutdown: belkin_sa_shutdown,
};
+/* the GoHubs Go-COM232 device is the same as the Peracom single port adapter */
+struct usb_serial_device_type gocom232_device = {
+ name: "GO-COM232 USB Serial Converter",
+ id_table: gocom232_table, /* the GO-COM232
+device */
+ needs_interrupt_in: MUST_HAVE, /* this device must
+have an interrupt in endpoint */
+ needs_bulk_in: MUST_HAVE, /* this device must
+have a bulk in endpoint */
+ needs_bulk_out: MUST_HAVE, /* this device must
+have a bulk out endpoint */
+ num_interrupt_in: 1,
+ num_bulk_in: 1,
+ num_bulk_out: 1,
+ num_ports: 1,
+ open: belkin_sa_open,
+ close: belkin_sa_close,
+ read_int_callback: belkin_sa_read_int_callback, /* How we get the
+status info */
+ ioctl: belkin_sa_ioctl,
+ set_termios: belkin_sa_set_termios,
+ break_ctl: belkin_sa_break_ctl,
+ startup: belkin_sa_startup,
+ shutdown: belkin_sa_shutdown,
+};
+
struct belkin_sa_private {
unsigned long control_state;
@@ -558,6 +589,7 @@
usb_serial_register (&belkin_sa_device);
usb_serial_register (&belkin_old_device);
usb_serial_register (&peracom_device);
+ usb_serial_register (&gocom232_device);
return 0;
}
@@ -567,6 +599,7 @@
usb_serial_deregister (&belkin_sa_device);
usb_serial_deregister (&belkin_old_device);
usb_serial_deregister (&peracom_device);
+ usb_serial_deregister (&gocom232_device);
}
diff -Naur -X /home/greg/linux/dontdiff
linux-2.4.3-pre3/drivers/usb/serial/belkin_sa.h
linux-2.4.3-pre3-greg/drivers/usb/serial/belkin_sa.h
--- linux-2.4.3-pre3/drivers/usb/serial/belkin_sa.h Sat Nov 11 18:51:18 2000
+++ linux-2.4.3-pre3-greg/drivers/usb/serial/belkin_sa.h Mon Mar 12 15:08:10
+2001
@@ -15,7 +15,10 @@
*
* See Documentation/usb/usb-serial.txt for more information on using this driver
*
- * (11/06/2000) gkh
+ * 12-Mar-2001 gkh
+ * Added GoHubs GO-COM232 device id.
+ *
+ * 06-Nov-2000 gkh
* Added old Belkin and Peracom device ids, which this driver supports
*
* 12-Oct-2000 William Greathouse
@@ -38,6 +41,9 @@
#define PERACOM_VID 0x0565 /* Peracom's vendor id */
#define PERACOM_PID 0x0001 /* Peracom's single port serial converter's id */
+
+#define GOHUBS_VID 0x0921 /* GoHubs vendor id */
+#define GOHUBS_PID 0x0100 /* GoHubs single port serial converter's id (identical
+to the Peracom device) */
/* Vendor Request Interface */
#define BELKIN_SA_SET_BAUDRATE_REQUEST 0 /* Set baud rate */