Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 148423

Summary: app-laptop/hdapsd kernel patch doesn't apply to 2.6.18
Product: Gentoo Linux Reporter: Ed Catmur <ed>
Component: Current packagesAssignee: Roy Marples (RETIRED) <uberlord>
Status: RESOLVED FIXED    
Severity: normal CC: andreas.thalhammer, anton.bugs, mobile+disabled, rl03
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 148429    
Attachments: hdaps_protect-2.6.18.patch
hdaps_protect-2.6.18.patch

Description Ed Catmur 2006-09-20 15:23:40 UTC
Kernel patch for 2.6.17 in app-laptop/hdaps doesn't apply to 2.6.18; ebuild --config doesn't try to apply it.
Comment 1 Ed Catmur 2006-09-20 15:24:50 UTC
Created attachment 97581 [details, diff]
hdaps_protect-2.6.18.patch

Current patch massaged to apply to 2.6.18. No idea if it's correct or not; haven't even compiled it yet.
Comment 2 Roy Marples (RETIRED) gentoo-dev 2006-09-21 09:03:43 UTC
Fails to compile.
RQ_SCSI_DONE and RQ_SCSI_BUSY are no longer defined. We can easily redefine them, but there are other issues with struct changes.

I'll monitor the hdaps lists for new patches, as I don't have the time for this right now.

BTW, thanks for your effort :)
Comment 3 Roy Marples (RETIRED) gentoo-dev 2006-09-21 09:10:50 UTC
http://sourceforge.net/mailarchive/forum.php?thread_id=30578933&forum_id=45521

Heh, way beyond my scope. We probably won't see a 2.6.18 patch for some time :(
Comment 4 Ed Catmur 2006-09-24 14:55:20 UTC
Created attachment 97981 [details, diff]
hdaps_protect-2.6.18.patch

Ugh. Here's a patch with the scsi stuff disabled, so it will only work on ide disks.
Comment 5 Roy Marples (RETIRED) gentoo-dev 2006-09-24 23:57:30 UTC
Ed, you so are going to hate me ..... I cannot test this as my laptop disks have to go through the SCSI interface to work correctly with DVD's and burning CD's :(

Hopefully some other thinkpad user with IDE disks can test and comment here.
Comment 6 Daniel Drake (RETIRED) gentoo-dev 2006-10-15 13:49:43 UTC
removing block on 148429: hdapsd is not in stable tree
Comment 7 Andreas Thalhammer 2006-11-16 02:44:12 UTC
Hi!
It really is a pain in the ass that the hard park patch is not in the official kernel. Why? Isn't it to be considered as "generally a good idea"?

Anyway, there is also a newer hdapsd out there (look at http://www.thinkwiki.org/wiki/HDAPS).
You can find it at: ftp://rohrmoser-engineering.de/pub/hdapsd-20061007.c

So, I applied your patch to the stable gentoo kernel: 2.6.18-gentoo-r2 and compiled it. No errors so far, I will boot it and find out if the HDD is actually parking on axis movement.

My system is a IBM ThinkPad R51 1830-DG4 (http://www.thinkwiki.org/wiki/1830-DG4) which is an IDE-only system.

Will reboot into 2.6.18-gentoo-r2-hdaps_patch soon...
Comment 8 Andreas Thalhammer 2006-11-16 03:00:36 UTC
I'm now running 2.6.18-gentoo-r2-hdaps_patch and it works fine so far. tp_smapi compiled with USE="hdaps", hdaps modules loaded, hdapsd started, everything looks good.

When I flip the entire notebook backwards (in direction to the display) I can hear the HDD parking. It does that IMHO a little less often than it used to with the 2.6.17 kernel.

Is there any other way to check this?

I hope that helped. BTW, keep up the great work! And thanks, Andreas.
Comment 9 Ed Catmur 2006-11-16 04:49:24 UTC
(In reply to comment #8)
> When I flip the entire notebook backwards (in direction to the display) I can
> hear the HDD parking. It does that IMHO a little less often than it used to
> with the 2.6.17 kernel.
> 
> Is there any other way to check this?

If you're in KDE or GNOME, use khdapsmonitor, khdapsmon or gnome-hdaps-applet. (An ebuild for the latter is in my overlay; see http://sources.catmur.co.uk/viewcvs/svn/gentoo/tree/app-laptop/gnome-hdaps-applet/ .) Alternatively, just watch cat /sys/block/hda/queue/protect.
Comment 10 Andreas Thalhammer 2006-11-16 06:17:25 UTC
Oh, I almost forgot about that... I used khdapsmon. I just didn't think about it anymore because I normally don't want the taskbar area filled up with icons. 

The HDD heads get parked when they should, so it is working.

Any idea if or when this patch will be available through "ebuild hdapsd --config"?
Comment 11 Roy Marples (RETIRED) gentoo-dev 2006-11-16 06:21:36 UTC
(In reply to comment #10)
> Any idea if or when this patch will be available through "ebuild hdapsd
> --config"?

I won't put it in as I can only test with SCSI, which doesn't work anymore in 2.6.18. Only IDE works.

I don't have the time or the knowledge to make SCSI work as they seem to be changing the SCSI subsystem a fair bit atm.
Comment 12 Andreas Thalhammer 2006-11-23 21:49:50 UTC
Ok, so now there is an _experimental_ patch for 2.6.18.3 that supports SCSI/SATA as well as IDE.
My source of information: http://www.thinkwiki.org/wiki/HDAPS

The patch: http://article.gmane.org/gmane.linux.drivers.hdaps.devel/943

Hopefully that works for you all! (I'm very happy with the IDE-only version right now...)
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2006-11-25 00:29:34 UTC
*** Bug 156171 has been marked as a duplicate of this bug. ***
Comment 14 Roy Marples (RETIRED) gentoo-dev 2006-12-05 03:41:02 UTC
-r1 added with patches for 2.6.18 (untested by me) and 2.6.19 (confirmed working)