Subject: mmap() from kernel to user
To: None <tech-kern@netbsd.org>
From: Kamal R. Prasad <kamalp@acm.org>
List: tech-kern
Date: 11/22/2004 01:34:52
Hello,

I have a device driver in the works for a usb device. I want to 
mmap(ANON_MAP) and pass the fd to userspace and have it read the fd for 
the bulk data obtained by the kernel. Is that possible? Or do I have 
mmap() named files and pass the name only?
Secondly, it looks like the USB framework  mandates something like 1024 
bytes [or maybe slightly more] that can be read from a bulk pipe. My usb 
device generates a lot more data possibly a 1024x1024 image. So, do I 
need to  do something besides reading it at my own pace? Will there be 
an overflow or lost data? Forgive me if the questions are a bit naive.

thanks
-kamal