On Sun, Apr 06, 2003 at 11:43:05AM +0200, Jan Hegner wrote: > Hi folks, > > we program a usb driver (2.4.20 kernel) for our usb (1.1 & 2.0) devices. The > io should be done asynchronously, which works fine for transfers smaller than > 128kB. The driver copies the data into a buffer allocated by kmalloc and > creates a (bulk) urb pointing to that buffer (and then returns to the user > program) > But problems occur when the transfer size exceeds 128kB because kmalloc can > not allocate a buffer bigger than 128kB. vmalloc doesn't do the job neither > because the hcd driver complains when it gets a buffer allocated by vmalloc. > > Our prefered way would be to directly pass the user space pointer down with > the urb without copying the data but the hcd doesn't like it this way. > I know that there still remains the kiobuf interface but kiobuf does not > support async transfers and we achieved a big performance boost (under > windows) by getting rid of user io threads and do asynchrounous io (what is > called overlapped io in the windows world). > > How is it done under Linux?? Is there some way to make user space or vmalloc > allocated buffers valid for usb transfers?? Or must I create more than one > urb, copy the data to kmalloc buffers and then link all the urbs?? Or do you > think that kiobuf with a user thread is the best (= fastest io) way to > achieve it?? Or is there any way to create a big kernel buffer at driver load > and then make this space visible to the user program??
Can you use a scatterlist for your device and then use the usb_buffer_map_sg() and associated functions in your driver? These functions are in the 2.5 kernel, but if necessary should be able to be backported to 2.4. What kind of USB devices is this driver for? Hope this helps, greg k-h ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
