ChangeSet 1.855.9.5, 2002/10/31 19:01:51-08:00, ddstreet@ieee.org [PATCH] [patch] set interrupt interval in usbfs This patch sets up the URB interval correctly when using interrupts via usbfs. This is finally possible since the automagic resubmission is gone. diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c --- a/drivers/usb/core/devio.c Tue Nov 5 16:10:43 2002 +++ b/drivers/usb/core/devio.c Tue Nov 5 16:10:43 2002 @@ -751,7 +751,7 @@ struct async *as; struct usb_ctrlrequest *dr = NULL; unsigned int u, totlen, isofrmlen; - int ret; + int ret, interval = 0; if (copy_from_user(&uurb, arg, sizeof(uurb))) return -EFAULT; @@ -838,6 +838,9 @@ case USBDEVFS_URB_TYPE_INTERRUPT: uurb.number_of_packets = 0; + if (!(ep_desc = usb_epnum_to_ep_desc(ps->dev, uurb.endpoint))) + return -ENOENT; + interval = ep_desc->bInterval; if (uurb.buffer_length > 16384) return -EINVAL; if (!access_ok((uurb.endpoint & USB_DIR_IN) ? VERIFY_WRITE : VERIFY_READ, uurb.buffer, uurb.buffer_length)) @@ -869,6 +872,7 @@ as->urb->setup_packet = (unsigned char*)dr; as->urb->start_frame = uurb.start_frame; as->urb->number_of_packets = uurb.number_of_packets; + as->urb->interval = interval; as->urb->context = as; as->urb->complete = async_completed; for (totlen = u = 0; u < uurb.number_of_packets; u++) {