On Wed, May 21, 2003 at 01:07:36PM -0700, Greg KH wrote: > On Wed, May 21, 2003 at 08:52:12PM +0200, Manuel Estrada Sainz wrote: > > On Wed, May 21, 2003 at 12:23:18AM -0700, Greg KH wrote: > > > Oops, forgot to respond to this, sorry... > > > > > > On Sun, May 18, 2003 at 12:19:22AM +0200, Manuel Estrada Sainz wrote: > > [snip] > > > > - There is a timeout, changeable from userspace. Feedback on a > > > > reasonable default value appreciated. > > > > > > Is this really needed? Especially as you now have: > > > > There is currently no way to know if hotplug couldn't be called at all > > or if it failed because it didn't have firmware load support. > > > > If that happens, we would be waiting for ever. And I'd rather make that > > a countable number of seconds :) > > > > I'll make '0' mean no timeout at all. > > Ok, that's fine with me. A bit of documentation for all of this might > be nice. Just add some kerneldoc comments to your public functions, and > you should be fine. Done. I am not a good documentation writer, but the attached patches should include enough documentation to understand how things work. > > I am not sure on how to implement "if a driver that uses it is > > selected" and not sure on where to add the Kconfig entries to make it > > available to out-of-kernel modules. > > You could do something like what has been done for the mii module. Look > at lib/Makefile and drivers/usb/net/Makefile.mii for an example. > > I'm not saying that this is the best way, but it could be one solution. > Ideally, the user would never have to select the firmware core option, > it would just get automatically built if a driver that needs it is also > selected. But if a driver not in the kernel tree needs it, the user should be able to enable it unconditionally, like the CRC32 stuff. And currently there is no in-kernel driver that uses it, so the only way to enable it is manually. Once Atmel PCMCIA driver (which will use it) gets in, the new 'enable' kconfig keyword should be already available and no makefile tricks will be needed. [snip] > Add a bit of documentation, and some build integration, Until drivers start using it, there is not much build integration to do. > and I'd think you are finished. Unless anyone else has any > objections? Simon Kelley had an objection, it was badly corrupting kernel memory :-/. It was a bug in the sysfs pieces which is now fixed. So I am finished :-) What do I do now? Should I send it to Linus or you take care of that? > Very nice job, thanks again for doing this. No problem. News: - Fixed the sysfs corruption problem. - Use refcounting with class_device instances. - I had to add support for 'release forwarding' to the class subsystem. - Removed firmware_sample_firmware_class.c - It is ugly, if found interesting, it should get polished first. - Removed FW_LOADER_SAMPLE Kconfig/Makefile stuff. - Some more formatting changes. Patches: incremental.diff: For easier reading as usual. firmware-class.diff.bz2: The code itself firmware-class-sample-driver.diff.bz2: The sample driver, for easier ignoring :) class-casts+release.diff.bz2: to_class_dev/to_class_dev_attr and 'release forwarding' changes. sysfs-bin-header.diff.bz2 sysfs-bin-lost-dget.diff.bz2 sysfs-bin-flexible-size.diff.bz2: sysfs bits. This time, they don't corrupt kernel memory :-/ (I'll send them to Patrick Mochel in a few moments.) Have a nice day Manuel -- --- Manuel Estrada Sainz ------------------------ ------------------- Let us have the serenity to accept the things we cannot change, courage to change the things we can, and wisdom to know the difference.