--- linux/include/linux/usbdevice_fs.h~	Tue Jul  4 11:03:12 2000
+++ linux/include/linux/usbdevice_fs.h	Tue Jul  4 20:52:00 2000
@@ -140,6 +140,7 @@
 #define USBDEVFS_IOCTL             _IOWR('U', 18, struct usbdevfs_ioctl)
 #define USBDEVFS_HUB_PORTINFO      _IOR('U', 19, struct usbdevfs_hub_portinfo)
 #define USBDEVFS_RESET             _IO('U', 20)
+#define USBDEVFS_CLEAR_HALT        _IOR('U', 21, unsigned int)
 
 /* --------------------------------------------------------------------- */
 
--- linux/drivers/usb/devio.c~	Tue Jul  4 11:03:12 2000
+++ linux/drivers/usb/devio.c	Tue Jul  4 21:57:36 2000
@@ -715,6 +715,26 @@
 	return 0;
 }
 
+static int proc_clearhalt(struct dev_state *ps, void *arg)
+{
+	unsigned int ep;
+	int pipe;
+	int ret;
+
+	get_user_ret(ep, (unsigned int *)arg, -EFAULT);
+	if ((ret = findintfep(ps->dev, ep)) < 0)
+		return ret;
+	if ((ret = checkintf(ps, ret)))
+		return ret;
+	if (ep & USB_DIR_IN)
+                pipe = usb_rcvbulkpipe(ps->dev, ep & 0x7f);
+        else
+                pipe = usb_sndbulkpipe(ps->dev, ep & 0x7f);
+
+	return usb_clear_halt(ps->dev, pipe);
+}
+		
+
 static int proc_getdriver(struct dev_state *ps, void *arg)
 {
 	struct usbdevfs_getdriver gd;
@@ -1119,6 +1140,12 @@
 
 	case USBDEVFS_RESET:
 		ret = proc_resetdevice(ps);
+		break;
+	
+	case USBDEVFS_CLEAR_HALT:
+		ret = proc_clearhalt(ps, (void *)arg);
+		if (ret >= 0)
+			inode->i_mtime = CURRENT_TIME;
 		break;
 
 	case USBDEVFS_GETDRIVER:
