From: John Adams <johna@onevista.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Module read a file?
Date: Thu, 11 Oct 2001 17:57:25 -0400 [thread overview]
Message-ID: <01101117572500.01036@flash> (raw)
In-Reply-To: <m38zehucml.fsf@flash.localdomain> <3BC60CCB.4F525A02@nortelnetworks.com> <m3zo6xswcq.fsf@flash.localdomain>
In-Reply-To: <m3zo6xswcq.fsf@flash.localdomain>
On Thursday 11 October 2001 17:25, Mark Atwood wrote:
> "Christopher Friesen" <cfriesen@nortelnetworks.com> writes:
> > Mark Atwood wrote:
> > > I'm modifying a PCMCIA driver module so that it can load new firmware
> > > into the card when it's inserted.
> > > Are their any good examples of kernel code or kernel modules reading
> > > a file out of the filesystem that I could copy or at least look to
> > > for inspiration?
> >
> > What about adding an ioctl() and making a userspace tool to pass the
> > new firmware down in a buffer? This lets you do more complicated
> > error-checking and maybe some sort of validation of the firmware in
> > userspace, saving on kernel size.
>
> Because the firmware is stored in volitile memory on the card, and
> vanishes on a card reset or removal, and I would like to have it Just
> Work with the pcmcia-cs package with minimal changes.
>
> Having to remember "run this userspace tool after every card reset"
> (which includes power suspends and so forth) would be a major pain.
>
Have a userspace job which
1) sleeps in the kernel
2) when woken, delivers the data from the filesystem via ioctl to the driver
3) goes back to sleep
Have a driver which
1) wakes the user space job
2) receives the data via ioctl
3) reloads the card
The userspace job is started at boot and lives forever.
Its probably easiest to build the driver into the kernel.
johna
next prev parent reply other threads:[~2001-10-11 21:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-11 20:48 Module read a file? Mark Atwood
2001-10-11 21:19 ` Christopher Friesen
2001-10-11 21:25 ` Mark Atwood
2001-10-11 21:39 ` Christopher Friesen
2001-10-11 21:46 ` Greg KH
2001-10-12 8:12 ` Ian Stirling
2001-10-11 21:57 ` John Adams [this message]
2001-10-11 22:18 ` Alan Cox
2001-10-11 22:29 ` Mark Atwood
2001-10-12 4:43 ` T. A.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01101117572500.01036@flash \
--to=johna@onevista.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox