Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 252591 - hdapsd patch 2.6.28
Summary: hdapsd patch 2.6.28
Status: RESOLVED DUPLICATE of bug 166166
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-26 12:28 UTC by Safak Oekmen
Modified: 2009-02-23 06:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Safak Oekmen 2008-12-26 12:28:02 UTC
running kernel 2.6.28

emerge hdapsd
....
....
Your kernel has NOT been patched for blk_freeze
The ebuild can attempt to patch your kernel like so 

emerge --config =hdapsd-20060409-r3


emerge --config =hdapsd-20060409-r3

Configuring pgk...

We don't have a patch for kernel 2.6.28 yet


dmesg | grep libata

libata version 3.00 loaded.

boot message: no protect entry for sda ! Make sure your kernel is patched with the blk_freeze path

How do I resolve the boot message ?

Thanks

Reproducible: Always
Comment 1 Thomas Pani 2008-12-26 12:46:31 UTC
Disk protection has been included in mainline kernel 2.6.28. You don't need to patch anything.
Please see Documentation/laptops/disk-shock-protection.txt in the kernel src dir and bug #166166


wranglers, please mark as a dup wrt to bug #166166.
Comment 2 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-12-26 12:59:23 UTC
*** Bug 252593 has been marked as a duplicate of this bug. ***
Comment 3 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-12-26 13:11:21 UTC

*** This bug has been marked as a duplicate of bug 166166 ***
Comment 4 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-12-26 13:16:57 UTC
Comment  #1 From Safak Oekmen  2008-12-26 12:50:33 0000  [reply] -------

There is no instruction how to enable disk protection in kernel 2.6.28 - and no
way to get rid of blk_freeze boot message. So please give instructions to
solve. This is no duplicate.

Comment  #3 From Safak Oekmen  2008-12-26 13:05:03 0000  [reply] -------

I have been struggling with this the whole night ! Can you tell me please what
kernel config options need to be enabled for the patch? Thanks.
Comment 5 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-12-26 13:49:44 UTC
Safak, I understand your problem, but if you check bug 166166 , it seems that hdapsd's main tree versions are very old, and we need someone to take care of a new  version for hdapsd. Checkout the work which has been done in that bug, and you may find a working ebuid there. Roy Marples <uberlord[at]gentoo.org> , who ported the package to the main tree, has retired, and the mobile team seems to be a little understaffed. Lets give them some time, and I believe that we will soon have a new shiny version of hdapsd(if there isn't one already, in a external of official overlay). I'm sorry for not being able to support you more. 
Comment 6 Thomas Pani 2008-12-26 18:20:17 UTC
(In reply to comment #4)
Safak, disk protection is built into libata since 2.6.28, there is no need to patch anything or to enable anything.
However, the in-portage version of hdaspd is utterly outdated, and doesn't recognize 2.6.28 as "already patched". Also, with 2.6.28 the sysfs interface for disk protection changed. Your outdated hdapsd version doesn't know about the new interface. This is exactly what bug #166166 is about. Get tp_smapi and hdapsd from there (or the sectools overlay) and disk protection will work.
Please remember that these are unsupported, 3rd party ebuilds. Also, currently there isn't a GUI monitoring app supporting the new interface [although I'm working on it :) ]. Also have a look at http://www.thinkwiki.org/wiki/HDAPS .
Comment 7 Benjamin Schulz 2009-02-23 06:49:03 UTC
With kernel 2.6.28. I had the same problem. 

It is a wrong error message that comes from /etc/init.d/hdapsd

There, I could find the lines:

    if [[ ! -e /sys/block/${DISK}/queue/protect ]] ; then
   	eerror "No protect entry for ${DISK}!"
   	eerror "Make sure your kernel is patched with the blk_freeze patch"
   	return 1
    fi

Obviously, Kernel 2.6.28 doesn't neet that check.

So I just commented out those lines. This can be done, by adding a # before every line.

Maybe, one also want to write
echo -1 > /sys/block/sda/device/unload_heads

instead of these lines, to force the disk to enable unloading. 

Then everything works.