Re: Hard Drive light
On Mon, Dec 20, 2004 at 10:04:03PM +1100, Cedric Pradalier wrote:
> According to Benjamin Herrenschmidt, on Mon, 20 Dec 2004 07:59:49 +0100,
> >> You mean in /sys/bus/macio/drivers/ide-pmac ?
> >That's the driver entry, but the devices themselves have entries as
> >well, I'd rather put a per-device switch in them (either through the
> >actual device path, either PCI or macio, or the ide interface proper).
> >> The main reason is that I could not find how to add my sysfs in this directory since it
> >is> not created in the ide-pmac.c file (still a lot to learn :)). So I convinced myself
> >that a> platform device was not so irrelevant.
> >It's totally irrelevant actually :)
> Ok I believe you. It is now attached to the macio device
> Is this what you suggested?
> I chose macio since I had the struct device pointer easily accessible in pmac.c.
> >> Other thing strange to me is that I have to use the saved command line to know if there
> >> is a boot time argument. According to the comments around MODULE_PARM, a module
> >parameter> should be enough. I tried that, but the boot parameter never had any influence
> >on the > parameter.
> >You must have typed it wrong ... One problem with ide-pmac though is
> >that the module name is confusing since the file name itself is just
> >"pmac". I'm not too familiar with the module params thing tho, it may be
> >possible to "override" the module name.
> I don't think so. Module parameters do not depend of the module name (as far as I
> understand from the doc). What I guess is that ide-pmac module is initialized too early to
> have correct boot parameters. For instance, I tried to had a dummy module_init function,
> and it is called much later than ide_pmac_setup_device (where blinking is initialized).
> Anybody can confirm or infirm this guess ?
I was able to parse kernel command line parameters in the pci setup code
(chrp_pci.c) which i believe happens *well* before what you are trying to do.
It was some time back though, but was rather straigthforward.
Cedric and Ben, please tell me when this is ready for inclusion in the debian
powerpc kernels :)