2.4 sleep power consumption patch; final buttons patch
Subsystems (2)
Attached is a patch that addresses sleep-time fan activation on wallstreets, and probably other pre-UMA systems. The code existed in 2.2, and removed in 2.4 for some reason I am unaware of. The patch is the missing 2.2 code almost verbatim.
the gist:
- mediabay IOBUS_enable/disable at sleep (not sure if its related to the fan)
- sleep notification to control power of MESH SCSI chip's host (most likely cause)
This works on my system. This should be reviewed and merged at next convenience. If some system crashes in sleep from it, then just don't have it map mio_base for that system. Shouldn't affect pismo and later as they shouldn't have MESH.
Not sure about the mediabay mod tho. It was in 2.2. <shrug>
I wonder if Darwin forgot about MESH also.. OSX has the fan problem too.
=====
the second attachment is the volume/eject powerbook button NIL support posted a while ago, now in a final form. Since nobody has had any negative feedback or comments, that too can be merged. It doesn't break anything. I promise. Thanks to Bastien for helping out with this.
--
Joseph P. Garcia
http://www.lycestra.com/
drivers/macintosh/mediabay.c +2 -0
@@ -599,6 +599,7 @@ bay = &media_bays[i];set_mb_power (i,0 );mdelay (10 ); +feature_clear (bay->dev_node, FEATURE_IOBUS_enable); }break ;case PBOOK_WAKE :
@@ -609,6 +610,7 @@they seem to help the 3400 get it right. */ /* Force MB power to 0 */ +feature_set (bay->dev_node, FEATURE_IOBUS_enable);set_mb_power (i,0 );mdelay (MB_POWER_DELAY );if (!bay->pismo)
drivers/scsi/mesh.c +97 -4
149 lines not on this page · raw message
drivers/macintosh/adbhid.c +44 -14
120 lines not on this page · raw message
drivers/macintosh/mac_hid.c +4 -4
@@ -200,15 +200,15 @@0 ,0 ,0 ,KEY_KPCOMMA ,0 ,KEY_INTL3 ,0 ,0 ,/* 0x00-0x07 */ 0 ,0 ,0 ,0 ,KEY_LANG1 ,KEY_LANG2 ,0 ,0 ,/* 0x08-0x0f */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 0x10-0x17 */ -0 ,0 ,0 ,0 ,KEY_KPENTER ,KEY_RIGHTCTRL ,0 ,0 ,/* 0x18-0x1f */ -0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 0x20-0x27 */ +0 ,0 ,0 ,0 ,KEY_KPENTER ,KEY_RIGHTCTRL ,KEY_VOLUMEUP ,0 ,/* 0x18-0x1f */ +0 ,0 ,0 ,0 ,0 ,KEY_VOLUMEDOWN ,KEY_MUTE ,0 ,/* 0x20-0x27 */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 0x28-0x2f */ 0 ,0 ,0 ,0 ,0 ,KEY_KPSLASH ,0 ,KEY_SYSRQ ,/* 0x30-0x37 */ -KEY_RIGHTALT ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 0x38-0x3f */ +KEY_RIGHTALT ,0 ,0 ,KEY_EJECTCD ,0 ,0 ,0 ,0 ,/* 0x38-0x3f */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,KEY_HOME ,/* 0x40-0x47 */ KEY_UP ,KEY_PAGEUP ,0 ,KEY_LEFT ,0 ,KEY_RIGHT ,0 ,KEY_END ,/* 0x48-0x4f */ KEY_DOWN ,KEY_PAGEDOWN ,KEY_INSERT ,KEY_DELETE ,0 ,0 ,0 ,0 ,/* 0x50-0x57 */ -0 ,0 ,0 ,KEY_LEFTMETA ,KEY_RIGHTMETA ,KEY_COMPOSE ,0 ,0 ,/* 0x58-0x5f */ +0 ,0 ,0 ,KEY_LEFTMETA ,KEY_RIGHTMETA ,KEY_COMPOSE ,KEY_POWER ,0 ,/* 0x58-0x5f */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 0x60-0x67 */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,KEY_MACRO ,/* 0x68-0x6f */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70-0x77 */
Quoted 5 lines
Attached is a patch that addresses sleep-time fan activation on wallstreets, and probably other pre-UMA systems. The code existed in 2.2, and removed in 2.4 for some reason I am unaware of. The patch is the missing 2.2 code almost verbatim.
Thanks !
Quoted 2 lines
the gist:
- mediabay IOBUS_enable/disable at sleep (not sure if its related to the fan)
That one should be now done in feature.c, no need to duplicate the code in mediabay.c (in fact, doing it twice may even be a problem).
Quoted 2 lines
- sleep notification to control power of MESH SCSI chip's host (most likely cause)
Ok, that's interesting, it probably got "lost" when I merged all of the sleep stuff to 2.4, and since I no longer have a MESH-based box ...
Quoted 8 lines
This works on my system. This should be reviewed and merged at next convenience. If some system crashes in sleep from it, then just don't have it map
mio_basefor that system. Shouldn't affect pismo and later as they shouldn't have MESH.Not sure about the mediabay mod tho. It was in 2.2. <shrug>
I wonder if Darwin forgot about MESH also.. OSX has the fan problem too.
Darwin has a weird MESH driver, dunno if it changed much since the last time I looked at it (at that time, it didn't work properly on wallstreet).
I'll take card of merging those.
Quoted 6 lines
=====
the second attachment is the volume/eject powerbook button NIL support posted a while ago, now in a final form. Since nobody has had any negative feedback or comments, that too can be merged. It doesn't break anything. I promise. Thanks to Bastien for helping out with this.
Ok, Will be in asap.
Thanks !
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 4 lines · On Thu, 16 Aug 2001 11:43:24 +0200 Benjamin Herrenschmidt…
Quoted 1 line
- mediabay IOBUS_enable/disable at sleep (not sure if its related to the fan)
That one should be now done in
feature.c, no need to duplicate the code inmediabay.c(in fact, doing it twice may even be a problem).
I just tested without the mediabay patch segment on my system, and the fan issue returned. feature.c doesn't seem to be handling this properly at the moment.
Thanks!
--
Joseph P. Garcia
http://www.lycestra.com/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 8 lines
Quoted 4 lines
That one should be now done in
feature.c, no need to duplicate the code inmediabay.c(in fact, doing it twice may even be a problem).I just tested without the mediabay patch segment on my system, and the fan issue returned.
feature.cdoesn't seem to be handling this properly at the moment.
The code in feature.c appear to have been broken for the wallstreet when I split the wallstreet features from desktop heathrow features.
I'll push a fix tonight.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/