On Tue, Jan 03, 2012 at 06:00:18PM +0000, Nuno Santos wrote: > Hi Greg, > > This is my packet process function. This is a multitouch controller. > In every frame I need to get touch data and if any touch is > available to be inject into the system, that is done in this method. > > static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch, > unsigned char *pkt, int len) > { > int touch=0,currentTouch=0,transferedBytes=0; > PDPX_TOUCH Touch; > > struct usbtouch_device_info *type = usbtouch->type; > struct dpx_priv *priv = usbtouch->priv; > struct usb_device *usbdev = interface_to_usbdev(usbtouch->interface); > > if (!type->read_data(usbtouch, pkt)) > return; > > tCurrent = jiffies; > elapsed = tCurrent-tInitial; > elapsed = elapsed * 1000 / HZ; > > if (elapsed>1000) > { I'm guessing this code isn't in the kernel tree, right? :) Why not? > priv->context->State.Acquisition.FrameRate = > priv->context->Data.Acquisition.Frames; > priv->context->Data.Acquisition.Frames = 0; > > tInitial = tCurrent; > } > > priv->context->State.Acquisition.FrameCounter++; > > if (usbdev) > { > if (priv->context->State.Acquisition.FrameCounter>DPX_INTERVAL_FRAMES_BETWEEN_AUTO_SETUP) > { > usb_bulk_msg(usbdev, usb_sndbulkpipe(usbdev, (int)0x02), > 0x00, 8, &transferedBytes, 1000); What's wrong with just firing off a urb for this here? That should work just fine, have you tried it? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html