Re: Hard Drive light

2005-01-24 Thread Cedric Pradalier
According to Benjamin Herrenschmidt, on Mon, 24 Jan 2005 09:19:13 +1100, > >> >> Hi ben, >> >> Did you have time to have a look at that ? As far as I can see, I actually >> attached to >the> only struct device in the hwif. So it might be what you wanted. > >No, sorry I've been a bit too busy.

Re: Hard Drive light

2005-01-23 Thread Benjamin Herrenschmidt
> > Hi ben, > > Did you have time to have a look at that ? As far as I can see, I actually > attached to the > only struct device in the hwif. So it might be what you wanted. No, sorry I've been a bit too busy. Please, re-send me your latest patch. Ben. -- To UNSUBSCRIBE, email to [EMAIL

Re: Hard Drive light

2005-01-23 Thread Cedric Pradalier
According to Benjamin Herrenschmidt, on Thu, 23 Dec 2004 14:57:03 +0100, > > >> >> Thanks for your help. >> >> I could not find how to attach the sys entry to the ide interface, >> but now, it is attached to the bus owning the IDE, either macio or pci >> according >> to which 'attach' function

Re: Hard Drive light

2004-12-23 Thread Benjamin Herrenschmidt
> > Thanks for your help. > > I could not find how to attach the sys entry to the ide interface, > but now, it is attached to the bus owning the IDE, either macio or pci > according > to which 'attach' function is called. On my ibook, it is macio and I have no > way to test > if the pci entr

Re: Hard Drive light

2004-12-23 Thread Cedric Pradalier
According to Benjamin Herrenschmidt, on Mon, 20 Dec 2004 17:00:43 +0100, > >> I chose macio since I had the struct device pointer easily accessible in >> pmac.c. > >Not all laptops have the IDE under macio though ... some have it under a >PCI node. It should be per-controller ideally... (some mac

Re: Hard Drive light

2004-12-22 Thread Jesus Climent
On Wed, Dec 22, 2004 at 05:12:22PM +0100, Colin Leroy wrote: > On 22 Dec 2004 at 17h12, Benjamin Herrenschmidt wrote: > > > Oh, and to add to this ... I prefer having it ON by default so users > > avoid moving their laptop around while the HD is busy... > > Is it dangerous? It will always be a b

Re: Hard Drive light

2004-12-22 Thread Colin Leroy
On 22 Dec 2004 at 17h12, Benjamin Herrenschmidt wrote: Hi, > > Having it enabled by default will let people know that it exists. I > > know too many Mac users that badly want a LED to show them when > > "it's working and I should wait"... > > Oh, and to add to this ... I prefer having it ON by

Re: Hard Drive light

2004-12-22 Thread Benjamin Herrenschmidt
On Tue, 2004-12-21 at 14:21 +0100, Colin Leroy wrote: > On 22 Dec 2004 at 00h12, Cedric Pradalier wrote: > > Hi, > > > >No, not at this point. Beside, i'd like to have it enabled by > > >default, not disabled by default :) > > > > > > > I don't really agree with that. Blinking led is not really

Re: Hard Drive light

2004-12-22 Thread Benjamin Herrenschmidt
On Tue, 2004-12-21 at 14:21 +0100, Colin Leroy wrote: > On 22 Dec 2004 at 00h12, Cedric Pradalier wrote: > > Hi, > > > >No, not at this point. Beside, i'd like to have it enabled by > > >default, not disabled by default :) > > > > > > > I don't really agree with that. Blinking led is not really

Re: Hard Drive light

2004-12-21 Thread Colin Leroy
On 22 Dec 2004 at 00h12, Cedric Pradalier wrote: Hi, > >No, not at this point. Beside, i'd like to have it enabled by > >default, not disabled by default :) > > > > I don't really agree with that. Blinking led is not really relevant > for default user. I would say that if someone feels geek eno

Re: Hard Drive light

2004-12-21 Thread Cedric Pradalier
According to Benjamin Herrenschmidt, on Mon, 20 Dec 2004 17:01:40 +0100, >On Mon, 2004-12-20 at 14:04 +0100, Sven Luther wrote: > >> >> 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 w

Re: Hard Drive light

2004-12-20 Thread Sven Luther
On Mon, Dec 20, 2004 at 05:01:40PM +0100, Benjamin Herrenschmidt wrote: > On Mon, 2004-12-20 at 14:04 +0100, Sven Luther wrote: > > > > > 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.

Re: Hard Drive light

2004-12-20 Thread Benjamin Herrenschmidt
On Mon, 2004-12-20 at 14:04 +0100, Sven Luther wrote: > > 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, p

Re: Hard Drive light

2004-12-20 Thread Benjamin Herrenschmidt
> I chose macio since I had the struct device pointer easily accessible in > pmac.c. Not all laptops have the IDE under macio though ... some have it under a PCI node. It should be per-controller ideally... (some machines have both the macio one and the PCI one). > I don't think so. Module para

Re: Hard Drive light

2004-12-20 Thread Sven Luther
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 p

Re: Hard Drive light

2004-12-20 Thread Cedric Pradalier
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 o

Re: [Patch #3] Re: Hard Drive light

2004-12-20 Thread Cedric Pradalier
According to marco giusti, on Mon, 20 Dec 2004 09:37:49 +0100, >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA1 > >Cedric Pradalier wrote: >| >| You're right. So this is a version with the strings updated. >| Please excuse my english... >| >| Cheers, >| >| > >a stupid question: how i shall apply th

Re: [Patch #3] Re: Hard Drive light

2004-12-20 Thread marco giusti
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Cedric Pradalier wrote: | | You're right. So this is a version with the strings updated. | Please excuse my english... | | Cheers, | | a stupid question: how i shall apply this patch? patch -p1 < patch is right? thanks ciao -BEGIN PGP SIGNATURE

Re: Hard Drive light

2004-12-20 Thread Benjamin Herrenschmidt
> 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 fi

Re: Hard Drive light

2004-12-19 Thread Cedric Pradalier
According to Benjamin Herrenschmidt, on Sun, 19 Dec 2004 15:48:07 +0100, > >> I attach a very small patch doing that. This a patch only for >> drivers/ide/ppc/pmac.c >file,> with respect to a pure kernel 2.6.9 from kernel.org >> >> It adds an entry in /sys/devices/ide-pmac/blinking_led >> echo 1

Re: Hard Drive light

2004-12-19 Thread Benjamin Herrenschmidt
> I attach a very small patch doing that. This a patch only for > drivers/ide/ppc/pmac.c file, > with respect to a pure kernel 2.6.9 from kernel.org > > It adds an entry in /sys/devices/ide-pmac/blinking_led > echo 1 > /sys/devices/ide-pmac/blinking_led > activates the led > > echo 0 > /sys/dev

Re: [Patch #3] Re: Hard Drive light

2004-12-07 Thread Colin Leroy
On 07 Dec 2004 at 23h12, Cedric Pradalier wrote: Hi, > + return sprintf(buf, "%c\n", blinking_led?'1':'0'); Really, this is useless and ugly :) -- Colin

[Patch #3] Re: Hard Drive light

2004-12-07 Thread Cedric Pradalier
According to David Pye, on Mon, 6 Dec 2004 20:46:15 +, >On Monday 06 December 2004 13:31, Cedric Pradalier wrote: >+   printk (KERN_INFO "pmac blinking led has been %sactivated\n", >+   blinking_led?"":"dis"); > >You never get an easy life around here ;) > >I think tha

Re: [Patch] Re: Hard Drive light

2004-12-06 Thread David Pye
On Monday 06 December 2004 13:31, Cedric Pradalier wrote: +   printk (KERN_INFO "pmac blinking led has been %sactivated\n", +   blinking_led?"":"dis"); You never get an easy life around here ;) I think that should be "de", not "dis" :) Though would "%s", blinking_led?"e

[Patch] Re: Hard Drive light

2004-12-06 Thread Cedric Pradalier
According to Jesus Climent, on Mon, 6 Dec 2004 01:44:17 +0100, >On Mon, Dec 06, 2004 at 12:28:24AM +1100, Cedric Pradalier wrote: >> >> I attach a very small patch doing that. This a patch only for >> drivers/ide/ppc/pmac.c >> file, with respect to a pure kernel 2.6.9 from kernel.org >> >> It a

Re: Hard Drive light

2004-12-05 Thread Jesus Climent
On Mon, Dec 06, 2004 at 12:28:24AM +1100, Cedric Pradalier wrote: > > I attach a very small patch doing that. This a patch only for > drivers/ide/ppc/pmac.c file, > with respect to a pure kernel 2.6.9 from kernel.org > > It adds an entry in /sys/devices/ide-pmac/blinking_led > echo 1 > /sys/devi

Re: Hard Drive light

2004-12-05 Thread David Pye
On Sunday 05 December 2004 20:44, Cedric Pradalier wrote: > >> +pmu_blink_led_activated = newact?1:0; > > > >pmu_blink_led_activated = (newact != 0); > >is enough and more nice imho. > > I wanted to have either 1 or 0 in this boolean, not whatever int sent in > the buffer. Hi, (newact != 0) r

Re: Hard Drive light

2004-12-05 Thread Cedric Pradalier
According to Colin Leroy, on Sun, 5 Dec 2004 14:42:33 +0100, >On 06 Dec 2004 at 00h12, Cedric Pradalier wrote: > >Hi Cedric, > >> +return sprintf(buf, "%c\n", pmu_blink_led_activated?'1':'0'); > >why not simply sprintf(buf, "%d\n", pmu_blink_led_activated) ? I like to ensure that whatever t

Re: Hard Drive light

2004-12-05 Thread Colin Leroy
On 06 Dec 2004 at 00h12, Cedric Pradalier wrote: Hi Cedric, > + return sprintf(buf, "%c\n", pmu_blink_led_activated?'1':'0'); why not simply sprintf(buf, "%d\n", pmu_blink_led_activated) ? > + pmu_blink_led_activated = newact?1:0; pmu_blink_led_activated = (newact != 0); is enough an

Re: Hard Drive light

2004-12-05 Thread Cedric Pradalier
According to Benjamin Herrenschmidt, on Sat, 04 Dec 2004 09:22:36 +1100, >On Fri, 2004-12-03 at 10:53 +0100, Jens Schmalzing wrote: >> Hi, >> >> Benjamin Herrenschmidt writes: >> >> > Any reason why it's disabled ? >> >> When it was off, people asked for it to be on. When it was on, others >>

Re: Hard Drive light

2004-12-03 Thread Benjamin Herrenschmidt
On Fri, 2004-12-03 at 10:53 +0100, Jens Schmalzing wrote: > Hi, > > Benjamin Herrenschmidt writes: > > > Any reason why it's disabled ? > > When it was off, people asked for it to be on. When it was on, others > asked for it to be off. Eventually, we even got a bug report and then > turned it

Re: Hard Drive light

2004-12-03 Thread Sven Luther
On Thu, Dec 02, 2004 at 08:04:48AM +0100, Jens Schmalzing wrote: > Hi, > > Andrea Giusto writes: > > > nice feature: the suspend light located on the display opening > > button (I own a PB12'') acted as a Hard Drive light, just as on my > > old 586!

Re: Hard Drive light

2004-12-03 Thread Cedric Pradalier
According to Jens Schmalzing, on 03 Dec 2004 10:53:31 +0100, >Hi, > >Benjamin Herrenschmidt writes: > >> Any reason why it's disabled ? > >When it was off, people asked for it to be on. When it was on, others >asked for it to be off. Eventually, we even got a bug report and then >turned it off f

Re: Hard Drive light

2004-12-03 Thread Jens Schmalzing
Hi, Benjamin Herrenschmidt writes: > Any reason why it's disabled ? When it was off, people asked for it to be on. When it was on, others asked for it to be off. Eventually, we even got a bug report and then turned it off for good and put an entry into the changelog. Regards, Jens. -- J'qbp

Re: Hard Drive light

2004-12-02 Thread Rogério Brito
On Dec 03 2004, Benjamin Herrenschmidt wrote: > On Thu, 2004-12-02 at 08:04 +0100, Jens Schmalzing wrote: > > It is disabled in the official kernel. You can roll your own kernel > > of course, which in Debian is very easy thanks to kernel-package, and > > include the feature. > > Any reason why i

Re: Hard Drive light

2004-12-02 Thread Benjamin Herrenschmidt
On Thu, 2004-12-02 at 08:04 +0100, Jens Schmalzing wrote: > Hi, > > Andrea Giusto writes: > > > nice feature: the suspend light located on the display opening > > button (I own a PB12'') acted as a Hard Drive light, just as on my > > old 586! Do we ha

Re: Hard Drive light

2004-12-02 Thread Colin Leroy
On 02 Dec 2004 at 17h12, Jesus Climent wrote: Hi, > > There have been several people asking for it when it was removed, or > > asking for removal when it was included. I should be able to make > > this kind of patch if needed. > > That would be great, if such an interface existed... Sometimes i

Re: Hard Drive light

2004-12-02 Thread Jesus Climent
On Thu, Dec 02, 2004 at 06:41:39PM +1100, Cedric Pradalier wrote: > > There have been several people asking for it when it was removed, or asking > for removal when it was included. I should be able to make this kind of > patch if needed. That would be great, if such an interface existed... Somet

Re: Hard Drive light

2004-12-02 Thread Cedric Pradalier
According to Jens Schmalzing, on 02 Dec 2004 08:04:48 +0100, >Hi, > >Andrea Giusto writes: > >> nice feature: the suspend light located on the display opening >> button (I own a PB12'') acted as a Hard Drive light, just as on my >> old 586! Do we have some

Re: Hard Drive light

2004-12-02 Thread Jens Schmalzing
Hi, Andrea Giusto writes: > nice feature: the suspend light located on the display opening > button (I own a PB12'') acted as a Hard Drive light, just as on my > old 586! Do we have something like that in Debian kernels? It is disabled in the official kernel. You can roll

Hard Drive light

2004-12-01 Thread Andrea Giusto
Before switching to Debian I was a Gentoo user, and I got a kernel (2.6.7 or .8 I don't remember exactly) that had a nice feature: the suspend light located on the display opening button (I own a PB12'') acted as a Hard Drive light, just as on my old 586! Do we have somethi