Patch against 2.6.9.18-rc7 + gregkh-all-2.6.18-rc7.patch applied to
add support for Alcor Micro Corp. USB 2.0 TO RS-232 converter. This
patch adds VID and PID to pl2303.[ch], adds it to the "HORRIBLE HACK
FOR PL2303" in usb-serial.c and also prevents cdc-acm to claim driving
this device by blacklisting it in hid-core.

Signed-off-by: Johannes Steingraeber <[EMAIL PROTECTED]>

---

Stephen HippisleyCox ( s.d.hippisley-cox <at> ntlworld <dot> com ) first
discovered and mentioned that this device has a pl2303 inside.
http://www.qbik.ch/usb/devices/showdev.php?id=3846
I first had trouble with a similar device but then made it working
with this patch.

This is my second try with this patch. If something is wrong with
format or form please let me know. I have CC'ed Vojtech Pavlik because
he is responsible for hid-core. I'm not sure if I have to split this
patch to get the blacklist in hid-core updated.

--- linux-2.6.18-rc7/drivers/usb/input/hid-core.c.orig  2006-09-16 
15:29:56.000000000 +0200
+++ linux-2.6.18-rc7/drivers/usb/input/hid-core.c       2006-09-16 
15:31:58.000000000 +0200
@@ -1595,6 +1595,10 @@ void hid_init_reports(struct hid_device 
 
 #define USB_VENDOR_ID_YEALINK          0x6993
 #define USB_DEVICE_ID_YEALINK_P1K_P4K_B2K      0xb001
+
+#define USB_VENDOR_ID_ALCOR            0x058f
+#define USB_DEVICE_ID_ALCOR_USBRS232   0x9720
+
 /*
  * Alphabetically sorted blacklist by quirk type.
  */
@@ -1612,6 +1616,7 @@ static const struct hid_blacklist {
        { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_22, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_23, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, 
HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW40, 
HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24, 
HID_QUIRK_IGNORE },
--- linux-2.6.18-rc7/drivers/usb/serial/usb-serial.c.orig       2006-09-16 
15:29:56.000000000 +0200
+++ linux-2.6.18-rc7/drivers/usb/serial/usb-serial.c    2006-09-16 
15:31:58.000000000 +0200
@@ -743,7 +743,9 @@ int usb_serial_probe(struct usb_interfac
        if (((le16_to_cpu(dev->descriptor.idVendor) == PL2303_VENDOR_ID) &&
             (le16_to_cpu(dev->descriptor.idProduct) == PL2303_PRODUCT_ID)) ||
            ((le16_to_cpu(dev->descriptor.idVendor) == ATEN_VENDOR_ID) &&
-            (le16_to_cpu(dev->descriptor.idProduct) == ATEN_PRODUCT_ID))) {
+            (le16_to_cpu(dev->descriptor.idProduct) == ATEN_PRODUCT_ID)) ||
+           ((le16_to_cpu(dev->descriptor.idVendor) == ALCOR_VENDOR_ID) &&
+            (le16_to_cpu(dev->descriptor.idProduct) == ALCOR_PRODUCT_ID))) {
                if (interface != dev->actconfig->interface[0]) {
                        /* check out the endpoints of the other interface*/
                        iface_desc = 
dev->actconfig->interface[0]->cur_altsetting;
--- linux-2.6.18-rc7/drivers/usb/serial/pl2303.h.orig   2006-09-13 
03:41:36.000000000 +0200
+++ linux-2.6.18-rc7/drivers/usb/serial/pl2303.h        2006-09-16 
15:31:58.000000000 +0200
@@ -89,3 +89,7 @@
 /* Belkin "F5U257" Serial Adapter */
 #define BELKIN_VENDOR_ID       0x050d
 #define BELKIN_PRODUCT_ID      0x0257
+
+/* Alcor Micro Corp. USB 2.0 TO RS-232 */
+#define ALCOR_VENDOR_ID                0x058F
+#define ALCOR_PRODUCT_ID       0x9720
--- linux-2.6.18-rc7/drivers/usb/serial/pl2303.c.orig   2006-09-16 
15:29:56.000000000 +0200
+++ linux-2.6.18-rc7/drivers/usb/serial/pl2303.c        2006-09-16 
15:31:58.000000000 +0200
@@ -81,6 +81,7 @@ static struct usb_device_id id_table [] 
        { USB_DEVICE(SPEEDDRAGON_VENDOR_ID, SPEEDDRAGON_PRODUCT_ID) },
        { USB_DEVICE(DATAPILOT_U2_VENDOR_ID, DATAPILOT_U2_PRODUCT_ID) },
        { USB_DEVICE(BELKIN_VENDOR_ID, BELKIN_PRODUCT_ID) },
+       { USB_DEVICE(ALCOR_VENDOR_ID, ALCOR_PRODUCT_ID) },
        { }                                     /* Terminating entry */
 };
 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to