Bug#603981: initramfs-tools: Load PowerMac G5 thermal modules

2010-11-23 Thread maximilian attems
On Sat, 20 Nov 2010, Milan Kupcevic wrote:

 
 New patch is attached.

thank you very much, merged for review in maks/hook_thermal
http://git.debian.org/?p=kernel/initramfs-tools.git;a=summary

-- 
maks



-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20101123100253.gb30...@stro.at



Bug#603981: initramfs-tools: Load PowerMac G5 thermal modules

2010-11-23 Thread maximilian attems
On Tue, Nov 23, 2010 at 11:30:21AM +0100, Mattia Tristo wrote:
 I have installed Debian 5.0 PPC testing on my PowerMac 7,3
 tomorrow in the afternoon i will test the patch
 Thanks

how *often* do I have to repeat that, no private mails!

if you have to say something in public, do so.
No private support, thank you.




-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20101123105110.gd8...@vostochny.stro.at



Bug#603981: initramfs-tools: Load PowerMac G5 thermal modules

2010-11-19 Thread maximilian attems
On Thu, Nov 18, 2010 at 10:09:59PM -0500, Milan Kupcevic wrote:
 The first patch did not include PowerMac9,1. Corrected patch is attached
 to this message.

oh fun, thought that linux-2.6 was fixed to autoload those modules.
 

 diff -Nru ./hooks/thermal ../initramfs-tools-0.98.5/hooks/thermal
 --- ./hooks/thermal   2010-09-23 14:43:51.0 -0400
 +++ ../initramfs-tools-0.98.5/hooks/thermal   2010-11-18 21:54:21.0 
 -0500
 @@ -22,19 +22,36 @@
  case $DPKG_ARCH in
  # copy the right modules
  powerpc|ppc64)
 - if [ -e /sys/bus/ps3_system_bus/ ]; then
 - exit 0
 - fi
why do you remove the ps3 check??

 - manual_add_modules therm_pm72
 +
 + # Only PowerMac G5 machines need these modules
 +
 + MODEL=`grep model /proc/cpuinfo 2/dev/null`; MODEL=${MODEL##*: }
please 2 lines and a check that /proc/cpuinfo is readable
(think of chroots)
 +
 + case $MODEL in
 +   RackMac3,1|PowerMac7,2|PowerMac7,3)
 + force_load therm_pm72
 + ;;
 +   PowerMac8,1|PowerMac8,2)
 + force_load windfarm_pm81
 + ;;
 +   PowerMac9,1)
 + force_load windfarm_pm91
 + ;;
 +   PowerMac11,2)
 + force_load windfarm_pm112
 + ;;
 +   PowerMac12,1)
 + force_load windfarm_pm121
 + ;;
 +   *)
 + exit 0
hmm why this exit, seems bad for any other box?
 + ;;
 + esac
   manual_add_modules windfarm_core
   manual_add_modules windfarm_cpufreq_clamp
   manual_add_modules windfarm_lm75_sensor
   manual_add_modules windfarm_max6690_sensor
   manual_add_modules windfarm_pid
 - manual_add_modules windfarm_pm121
 - manual_add_modules windfarm_pm112
 - manual_add_modules windfarm_pm81
 - manual_add_modules windfarm_pm91
   manual_add_modules windfarm_smu_controls
   manual_add_modules windfarm_smu_sat
   manual_add_modules windfarm_smu_sensors

otherwise this looks like a good workaround for this kernel bug.
please repost fixed patch.






-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20101119090912.gj27...@vostochny.stro.at



Bug#603981: initramfs-tools: Load PowerMac G5 thermal modules

2010-11-19 Thread Milan Kupcevic
On 11/19/2010 04:09 AM, maximilian attems wrote:

 oh fun, thought that linux-2.6 was fixed to autoload those modules.

Only i2c_powermac gets included/loaded without manual intervention. I
removed it from this hook.


 -if [ -e /sys/bus/ps3_system_bus/ ]; then
 -exit 0
 -fi
 why do you remove the ps3 check??

No need to exit here on PS3 because this patch includes/loads therm_pm72
and windfarm_* modules on G5 Mac machines only.

 
 -manual_add_modules therm_pm72
 +
 +# Only PowerMac G5 machines need these modules
 +
 +MODEL=`grep model /proc/cpuinfo 2/dev/null`; MODEL=${MODEL##*: }
 please 2 lines and a check that /proc/cpuinfo is readable

OK. Fixed.

 +
 +case $MODEL in
 +  RackMac3,1|PowerMac7,2|PowerMac7,3)
 +force_load therm_pm72
 +;;
 +  PowerMac8,1|PowerMac8,2)
 +force_load windfarm_pm81
 +;;
 +  PowerMac9,1)
 +force_load windfarm_pm91
 +;;
 +  PowerMac11,2)
 +force_load windfarm_pm112
 +;;
 +  PowerMac12,1)
 +force_load windfarm_pm121
 +;;
 +  *)
 +exit 0
 hmm why this exit, seems bad for any other box?

Every G5 Mac model [1] is covered. We can safely exit here because no
other box is using windfarm_* modules.

 +;;
 +esac
  manual_add_modules windfarm_core
  manual_add_modules windfarm_cpufreq_clamp
  manual_add_modules windfarm_lm75_sensor
  manual_add_modules windfarm_max6690_sensor
  manual_add_modules windfarm_pid
 -manual_add_modules windfarm_pm121
 -manual_add_modules windfarm_pm112
 -manual_add_modules windfarm_pm81
 -manual_add_modules windfarm_pm91
  manual_add_modules windfarm_smu_controls
  manual_add_modules windfarm_smu_sat
  manual_add_modules windfarm_smu_sensors
 
 otherwise this looks like a good workaround for this kernel bug.
 please repost fixed patch.

New patch is attached.


[1]
http://www.everymac.com/systems/by_capability/mac-specs-by-machine-model-machine-id.html
diff -Nru ./hooks/thermal ../initramfs-tools-0.98.5/hooks/thermal
--- ./hooks/thermal	2010-09-23 14:43:51.0 -0400
+++ ../initramfs-tools-0.98.5/hooks/thermal	2010-11-19 16:08:33.0 -0500
@@ -22,23 +22,44 @@
 case $DPKG_ARCH in
 # copy the right modules
 powerpc|ppc64)
-	if [ -e /sys/bus/ps3_system_bus/ ]; then
-		exit 0
-	fi
-	manual_add_modules therm_pm72
+
+	# Only G5 Mac machines need to load 
+	# therm_pm72 or one of the windfarm_pm* modules.
+
+	[ -r /proc/cpuinfo ] || exit 0
+
+	MODEL=`grep model /proc/cpuinfo`
+	MODEL=${MODEL##*: }
+
+	case $MODEL in
+	  RackMac3,1|PowerMac7,2|PowerMac7,3)
+	force_load therm_pm72
+	;;
+	  PowerMac8,1|PowerMac8,2)
+	force_load windfarm_pm81
+	;;
+	  PowerMac9,1)
+	force_load windfarm_pm91
+	;;
+	  PowerMac11,2)
+	force_load windfarm_pm112
+	;;
+	  PowerMac12,1)
+	force_load windfarm_pm121
+	;;
+	  *)
+	# No other machine needs windfarm_* modules on initrd.
+	exit 0
+	;;
+	esac
 	manual_add_modules windfarm_core
 	manual_add_modules windfarm_cpufreq_clamp
 	manual_add_modules windfarm_lm75_sensor
 	manual_add_modules windfarm_max6690_sensor
 	manual_add_modules windfarm_pid
-	manual_add_modules windfarm_pm121
-	manual_add_modules windfarm_pm112
-	manual_add_modules windfarm_pm81
-	manual_add_modules windfarm_pm91
 	manual_add_modules windfarm_smu_controls
 	manual_add_modules windfarm_smu_sat
 	manual_add_modules windfarm_smu_sensors
-	manual_add_modules i2c-powermac
 	;;
 i386|amd64|ia64)
 	manual_add_modules fan


signature.asc
Description: OpenPGP digital signature


Bug#603981: initramfs-tools: Load PowerMac G5 thermal modules

2010-11-18 Thread Milan Kupcevic
Package: initramfs-tools
Version: 0.98.5
Severity: important
Tags: patch

On iMac and PowerMac G5 machines, about a minute after boot, fans run at
full speed producing jet engine noise. Thermal modules do not get loaded
as they were in Lenny.
diff -Nru ./hooks/thermal ../initramfs-tools-0.98.5/hooks/thermal
--- ./hooks/thermal	2010-09-23 14:43:51.0 -0400
+++ ../initramfs-tools-0.98.5/hooks/thermal	2010-11-18 10:55:47.0 -0500
@@ -22,19 +22,33 @@
 case $DPKG_ARCH in
 # copy the right modules
 powerpc|ppc64)
-	if [ -e /sys/bus/ps3_system_bus/ ]; then
-		exit 0
-	fi
-	manual_add_modules therm_pm72
+
+	# Only PowerMac G5 machines need these modules
+
+	MODEL=`grep model /proc/cpuinfo 2/dev/null`; MODEL=${MODEL##*: }
+
+	case $MODEL in
+	  RackMac3,1|PowerMac7,2|PowerMac7,3)
+	force_load therm_pm72
+	;;
+	  PowerMac8,1|PowerMac8,2)
+	force_load windfarm_pm81
+	;;
+	  PowerMac11,2)
+	force_load windfarm_pm112
+	;;
+	  PowerMac12,1)
+	force_load windfarm_pm121
+	;;
+	  *)
+	exit 0
+	;;
+	esac
 	manual_add_modules windfarm_core
 	manual_add_modules windfarm_cpufreq_clamp
 	manual_add_modules windfarm_lm75_sensor
 	manual_add_modules windfarm_max6690_sensor
 	manual_add_modules windfarm_pid
-	manual_add_modules windfarm_pm121
-	manual_add_modules windfarm_pm112
-	manual_add_modules windfarm_pm81
-	manual_add_modules windfarm_pm91
 	manual_add_modules windfarm_smu_controls
 	manual_add_modules windfarm_smu_sat
 	manual_add_modules windfarm_smu_sensors


signature.asc
Description: OpenPGP digital signature


Bug#603981: initramfs-tools: Load PowerMac G5 thermal modules

2010-11-18 Thread Milan Kupcevic
The first patch did not include PowerMac9,1. Corrected patch is attached
to this message.

Thanks,

Milan
diff -Nru ./hooks/thermal ../initramfs-tools-0.98.5/hooks/thermal
--- ./hooks/thermal	2010-09-23 14:43:51.0 -0400
+++ ../initramfs-tools-0.98.5/hooks/thermal	2010-11-18 21:54:21.0 -0500
@@ -22,19 +22,36 @@
 case $DPKG_ARCH in
 # copy the right modules
 powerpc|ppc64)
-	if [ -e /sys/bus/ps3_system_bus/ ]; then
-		exit 0
-	fi
-	manual_add_modules therm_pm72
+
+	# Only PowerMac G5 machines need these modules
+
+	MODEL=`grep model /proc/cpuinfo 2/dev/null`; MODEL=${MODEL##*: }
+
+	case $MODEL in
+	  RackMac3,1|PowerMac7,2|PowerMac7,3)
+	force_load therm_pm72
+	;;
+	  PowerMac8,1|PowerMac8,2)
+	force_load windfarm_pm81
+	;;
+	  PowerMac9,1)
+	force_load windfarm_pm91
+	;;
+	  PowerMac11,2)
+	force_load windfarm_pm112
+	;;
+	  PowerMac12,1)
+	force_load windfarm_pm121
+	;;
+	  *)
+	exit 0
+	;;
+	esac
 	manual_add_modules windfarm_core
 	manual_add_modules windfarm_cpufreq_clamp
 	manual_add_modules windfarm_lm75_sensor
 	manual_add_modules windfarm_max6690_sensor
 	manual_add_modules windfarm_pid
-	manual_add_modules windfarm_pm121
-	manual_add_modules windfarm_pm112
-	manual_add_modules windfarm_pm81
-	manual_add_modules windfarm_pm91
 	manual_add_modules windfarm_smu_controls
 	manual_add_modules windfarm_smu_sat
 	manual_add_modules windfarm_smu_sensors


signature.asc
Description: OpenPGP digital signature