Hi,
Here's a patch against 2.5.1-pre7 that adds a new device to the usb
serial mct_u232 driver, and removes any usage of the active variable in
the serial port structure.
thanks,
greg k-h
diff -Nru a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
--- a/drivers/usb/serial/mct_u232.c Fri Dec 7 21:30:08 2001
+++ b/drivers/usb/serial/mct_u232.c Fri Dec 7 21:30:08 2001
@@ -27,6 +27,9 @@
* 10-Nov-2001 Wolfgang Grandegger
* - Fixed an endianess problem with the baudrate selection for PowerPC.
*
+ * 06-Dec-2001 Martin Hamilton <[EMAIL PROTECTED]>
+ * Added support for the Belkin F5U109 DB9 adaptor
+ *
* 30-May-2001 Greg Kroah-Hartman
* switched from using spinlock to a semaphore, which fixes lots of problems.
*
@@ -133,6 +136,7 @@
{ USB_DEVICE(MCT_U232_VID, MCT_U232_PID) },
{ USB_DEVICE(MCT_U232_VID, MCT_U232_SITECOM_PID) },
{ USB_DEVICE(MCT_U232_VID, MCT_U232_DU_H3SP_PID) },
+ { USB_DEVICE(MCT_U232_BELKIN_F5U109_VID, MCT_U232_BELKIN_F5U109_PID) },
{ } /* Terminating entry */
};
@@ -175,7 +179,8 @@
#define WDR_TIMEOUT (HZ * 5 ) /* default urb timeout */
static int mct_u232_calculate_baud_rate(struct usb_serial *serial, int value) {
- if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID) {
+ if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID
+ || serial->dev->descriptor.idProduct == MCT_U232_BELKIN_F5U109_PID) {
switch (value) {
case 300: return 0x01;
case 600: return 0x02; /* this one not tested */
@@ -340,9 +345,7 @@
++port->open_count;
MOD_INC_USE_COUNT;
- if (!port->active) {
- port->active = 1;
-
+ if (port->open_count == 1) {
/* Compensate for a hardware bug: although the Sitecom U232-P25
* device reports a maximum output packet size of 32 bytes,
* it seems to be able to accept only 16 bytes (and that's what
@@ -416,7 +419,7 @@
usb_unlink_urb (port->read_urb);
usb_unlink_urb (port->interrupt_in_urb);
}
- port->active = 0;
+ port->open_count = 0;
}
up (&port->sem);
diff -Nru a/drivers/usb/serial/mct_u232.h b/drivers/usb/serial/mct_u232.h
--- a/drivers/usb/serial/mct_u232.h Fri Dec 7 21:30:06 2001
+++ b/drivers/usb/serial/mct_u232.h Fri Dec 7 21:30:06 2001
@@ -30,9 +30,12 @@
#define MCT_U232_SITECOM_PID 0x0230 /* Sitecom Product Id */
/* DU-H3SP USB BAY hub */
-
#define MCT_U232_DU_H3SP_PID 0x0200 /* D-Link DU-H3SP USB BAY */
+/* Belkin badge the MCT U232-P9 as the F5U109 */
+#define MCT_U232_BELKIN_F5U109_VID 0x050d /* Vendor Id */
+#define MCT_U232_BELKIN_F5U109_PID 0x0109 /* Product Id */
+
/*
* Vendor Request Interface
*/
@@ -363,6 +366,25 @@
* bmAttributes = 03 (Interrupt)
* wMaxPacketSize = 0002
* bInterval = 02
+ *
+ *
+ * Hardware details (added by Martin Hamilton, 2001/12/06)
+ * -----------------------------------------------------------------
+ *
+ * This info was gleaned from opening a Belkin F5U109 DB9 USB serial
+ * adaptor, which turns out to simply be a re-badged U232-P9. We
+ * know this because there is a sticky label on the circuit board
+ * which says "U232-P9" ;-)
+ *
+ * The circuit board inside the adaptor contains a Philips PDIUSBD12
+ * USB endpoint chip and a Phillips P87C52UBAA microcontroller with
+ * embedded UART. Exhaustive documentation for these is available at:
+ *
+ * http://www.semiconductors.philips.com/pip/p87c52ubaa
+ * http://www.semiconductors.philips.com/pip/pdiusbd12
+ *
+ * Thanks to Julian Highfield for the pointer to the Philips database.
+ *
*/
#endif /* __LINUX_USB_SERIAL_MCT_U232_H */
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel