handling multiple sorts of data from device
From: Capstar (spam0_at_deleg.homeip.net)
Date: 04/22/04
- Next message: Tuukka Toivonen: "Re: [Q] vmalloc and interrupt handler"
- Previous message: Josef Möllers: "Re: Help - SCSI passthrough ioctl calls vs. sd/sg devices"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 22 Apr 2004 09:42:33 +0200
Hi NG,
I'm writing a device driver for a PCI-device, which contains an embedded
processor. Nothing fancy or anything, but this processor can on occasion
send messages or some data over the bus. The real functionality of the
device is to proces data. So the read and write operations are used to
read and write the data, which needs to be processed.
So what I want is to have an extra thread (not a kernel thread) that
wait's for data from the embedded processor, and fetches it. The waiting
is not a problem, I'll just use a blocking ioctl-call, since select only
works for the (to-be-)processed data. But I'm quite lost on how to fetch
the data. The driver already takes care of retreiving the buffer over
the bus and storing it in kernel memory, so I just need to get it to
userspace.
I can probably mmap the page I use for storing the buffer, but that
means I need to also lock that page so I don't write and read it at the
same time. And I don't realy like the idea of accessing kernel space
direcly altough it would probably be handled from a library.
Another approach would be to register to devices in the /dev/filesystem,
one for the (to-be-)processed data, and one for the stuff from this
embedded processor. But I'm not quite sure how to do that.
Any suggestions are welcome.
Mark
-- <<Remove the del for email>>
- Next message: Tuukka Toivonen: "Re: [Q] vmalloc and interrupt handler"
- Previous message: Josef Möllers: "Re: Help - SCSI passthrough ioctl calls vs. sd/sg devices"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|