Workaround for devices that crash on GET_REPORT.

diff -ur -X dontdiff linux-2.4.18-pre7/drivers/usb/hid-core.c linux-2.4.18-pre7-hid/drivers/usb/hid-core.c
--- linux-2.4.18-pre7/drivers/usb/hid-core.c	Fri Dec 21 09:41:55 2001
+++ linux-2.4.18-pre7-hid/drivers/usb/hid-core.c	Wed Feb  6 14:50:25 2002
@@ -63,6 +63,12 @@
 				"Gamepad", "Keyboard", "Keypad", "Multi-Axis Controller"};
 
 /*
+ * The module parameter is used to investigate if a particular device
+ * is to be added to the blacklist for broken GET_REPORT.
+ */
+static int no_get = 0;
+
+/*
  * Register a new report for a device.
  */
 
@@ -1025,6 +1031,7 @@
 	if (hid->outhead == hid->outtail)
 		hid->outtail = (hid->outtail + 1) & (HID_CONTROL_FIFO_SIZE - 1);
 
+	/* P3 XXX buggy - use separate flag. */
 	if (hid->urbout.status != -EINPROGRESS)
 		hid_submit_out(hid);
 }
@@ -1065,7 +1072,8 @@
 			while (list != &report_enum->report_list) {
 				report = (struct hid_report *) list;
 				usb_set_idle(hid->dev, hid->ifnum, 0, report->id);
-				hid_read_report(hid, report);
+				if ((hid->quirks & HID_QUIRK_NOGET) == 0 && !no_get)
+					hid_read_report(hid, report);
 				list = list->next;
 			}
 		}
@@ -1089,22 +1097,41 @@
 	{ 0, 0 }
 };
 
+#define USB_VENDOR_ID_ATEN		0x0557
+#define USB_DEVICE_ID_ATEN_UC100KM	0x2004
+
+static struct hid_blacklist hid_blst_noget[] = {
+	{ USB_VENDOR_ID_ATEN,	USB_DEVICE_ID_ATEN_UC100KM },
+	{ 0, 0 }
+};
+
 static struct hid_device *usb_hid_configure(struct usb_device *dev, int ifnum)
 {
 	struct usb_interface_descriptor *interface = dev->actconfig->interface[ifnum].altsetting + 0;
 	struct hid_descriptor *hdesc;
 	struct hid_device *hid;
 	unsigned rsize = 0;
+	int noget = 0;
 	char *buf;
 	int n;
 
 	for (n = 0; hid_blacklist[n].idVendor; n++)
 		if ((hid_blacklist[n].idVendor == dev->descriptor.idVendor) &&
-			(hid_blacklist[n].idProduct == dev->descriptor.idProduct)) return NULL;
+			(hid_blacklist[n].idProduct == dev->descriptor.idProduct)) {
+		return NULL;
+	}
+
+	for (n = 0; hid_blst_noget[n].idVendor; n++) {
+		if ((hid_blst_noget[n].idVendor == dev->descriptor.idVendor) &&
+		    (hid_blst_noget[n].idProduct == dev->descriptor.idProduct))
+		{
+			noget = 1;
+		}
+	}
 
 	if (usb_get_extra_descriptor(interface, USB_DT_HID, &hdesc) && ((!interface->bNumEndpoints) ||
 		usb_get_extra_descriptor(&interface->endpoint[0], USB_DT_HID, &hdesc))) {
-			dbg("class descriptor not present\n");
+			dbg("class descriptor not present");
 			return NULL;
 	}
 
@@ -1176,6 +1203,9 @@
 
 	hid->name[0] = 0;
 
+	if (noget)
+		hid->quirks |= HID_QUIRK_NOGET;
+
 	if (!(buf = kmalloc(63, GFP_KERNEL)))
 		return NULL;
 
@@ -1302,6 +1332,7 @@
 module_init(hid_init);
 module_exit(hid_exit);
 
+MODULE_PARM(no_get, "i");
 MODULE_AUTHOR( DRIVER_AUTHOR );
 MODULE_DESCRIPTION( DRIVER_DESC );
 MODULE_LICENSE("GPL");
diff -ur -X dontdiff linux-2.4.18-pre7/drivers/usb/hid.h linux-2.4.18-pre7-hid/drivers/usb/hid.h
--- linux-2.4.18-pre7/drivers/usb/hid.h	Tue Nov 13 17:45:27 2001
+++ linux-2.4.18-pre7-hid/drivers/usb/hid.h	Wed Feb  6 13:35:02 2002
@@ -184,6 +184,7 @@
 
 #define HID_QUIRK_INVERT	0x01
 #define HID_QUIRK_NOTOUCH	0x02
+#define HID_QUIRK_NOGET		0x04
 
 /*
  * This is the global enviroment of the parser. This information is
