diff options
author | eisnerd <eisnerd@localhost> | 2007-11-25 15:13:35 +0000 |
---|---|---|
committer | eisnerd <eisnerd@localhost> | 2007-11-25 15:13:35 +0000 |
commit | 4faae3ddb51b3b7a726ee691adee539057dee212 (patch) | |
tree | 9f7234bd63fe128eb021eadf395e4577154a302c /sys-kernel | |
parent | new USE flags 'sco_flowcontrol' sys-kernel/thinkpad-sources (diff) | |
download | jokey-4faae3ddb51b3b7a726ee691adee539057dee212.tar.gz jokey-4faae3ddb51b3b7a726ee691adee539057dee212.tar.bz2 jokey-4faae3ddb51b3b7a726ee691adee539057dee212.zip |
sys-kernel/thinkpad-sources: update to thinkpad-sources-2.6.23-r2
svn path=/trunk/; revision=306
Diffstat (limited to 'sys-kernel')
6 files changed, 1043 insertions, 1 deletions
diff --git a/sys-kernel/thinkpad-sources/ChangeLog b/sys-kernel/thinkpad-sources/ChangeLog index a7fb6e2..119f5d5 100644 --- a/sys-kernel/thinkpad-sources/ChangeLog +++ b/sys-kernel/thinkpad-sources/ChangeLog @@ -1,5 +1,10 @@ + 25 Nov 2007; Florian Manschwetus <florianmanschwetus@gmx.de> + +files/2.6.23-r2, +thinkpad-sources-2.6.23-r2.ebuild, + +files/2.6.23-r2/disk-protect-for-2.6.23.8.patch: + update to thinkpad-sources-2.6.23-r2 + 08 Nov 2007; Florian Manschwetus (EisNerd) <florianmanschwetus@gmx.de> -files/config: deleted files/config diff --git a/sys-kernel/thinkpad-sources/Manifest b/sys-kernel/thinkpad-sources/Manifest index 467f823..ad42bb5 100644 --- a/sys-kernel/thinkpad-sources/Manifest +++ b/sys-kernel/thinkpad-sources/Manifest @@ -1,15 +1,56 @@ +AUX 2.6.23-r2/disk-protect-for-2.6.23.8.patch 27503 RMD160 6738ad87cdc93ba4fa978fae4298a6c11715c373 SHA1 d9075068e360c64fca98248b91c7fab662f4d0dd SHA256 a9cc91134b131b8f09d483b8c16392b8b03649b9b7b41bb09abd27d455e23552 +MD5 f3d9af2d46c4a180bc78152726570cc0 files/2.6.23-r2/disk-protect-for-2.6.23.8.patch 27503 +RMD160 6738ad87cdc93ba4fa978fae4298a6c11715c373 files/2.6.23-r2/disk-protect-for-2.6.23.8.patch 27503 +SHA256 a9cc91134b131b8f09d483b8c16392b8b03649b9b7b41bb09abd27d455e23552 files/2.6.23-r2/disk-protect-for-2.6.23.8.patch 27503 AUX 2.6.23/combined-2.6.23-cph.patch 19257 RMD160 18be73760b068e279319a73149a2321b01c9a1e6 SHA1 3b76e942e517799d88a1586d0334dbebdc09fccd SHA256 e89db0e631aae0890efa578b45120bacaf404ba235a6b1c268ba32472f6fa1e6 +MD5 5ebd59ff058c6e513297d5933ed14df7 files/2.6.23/combined-2.6.23-cph.patch 19257 +RMD160 18be73760b068e279319a73149a2321b01c9a1e6 files/2.6.23/combined-2.6.23-cph.patch 19257 +SHA256 e89db0e631aae0890efa578b45120bacaf404ba235a6b1c268ba32472f6fa1e6 files/2.6.23/combined-2.6.23-cph.patch 19257 AUX 2.6.23/disk-protect-for-2.6.23.patch 26537 RMD160 e9d1df866316d10ee7bc2d6967b9858173302de9 SHA1 8ff2eac2cfb635ac14ad742218e0b44224c2a42a SHA256 201d4bc70ebe1cd3d083f4c0d4702df7cc3c2c8f5d02335e2d5e5ba5d6a0af70 +MD5 f2d5efb16326150620023d4880b64aa7 files/2.6.23/disk-protect-for-2.6.23.patch 26537 +RMD160 e9d1df866316d10ee7bc2d6967b9858173302de9 files/2.6.23/disk-protect-for-2.6.23.patch 26537 +SHA256 201d4bc70ebe1cd3d083f4c0d4702df7cc3c2c8f5d02335e2d5e5ba5d6a0af70 files/2.6.23/disk-protect-for-2.6.23.patch 26537 AUX 2.6.23/input-unknown_keycodes-for-2.6.23.patch 367 RMD160 16564310a1007b173da528d71e358b5a73abf962 SHA1 2b1cc17a7b2b3bb87c53fdf5930bdc8ad2030302 SHA256 ab965750c853f193c248abe53bd73327a5aec608e092fbfa89c3aa06a2751122 +MD5 fb3483cdcd1d3a74ff51656c3f06e3bf files/2.6.23/input-unknown_keycodes-for-2.6.23.patch 367 +RMD160 16564310a1007b173da528d71e358b5a73abf962 files/2.6.23/input-unknown_keycodes-for-2.6.23.patch 367 +SHA256 ab965750c853f193c248abe53bd73327a5aec608e092fbfa89c3aa06a2751122 files/2.6.23/input-unknown_keycodes-for-2.6.23.patch 367 AUX 2.6.23/linux-phc-0.3.1-for-2.6.23.patch 15430 RMD160 7cc1ecb9168e255ffc366c2ea2dcbce081ec05c3 SHA1 b1bcedc872636588e3e078196d70dd8f41ade405 SHA256 862bb7eecfd02f71ab0a2b3f093f17a071b59d1c82184dbbeccfc744df543c70 +MD5 e0c06375cf563024ea550399d231c4a1 files/2.6.23/linux-phc-0.3.1-for-2.6.23.patch 15430 +RMD160 7cc1ecb9168e255ffc366c2ea2dcbce081ec05c3 files/2.6.23/linux-phc-0.3.1-for-2.6.23.patch 15430 +SHA256 862bb7eecfd02f71ab0a2b3f093f17a071b59d1c82184dbbeccfc744df543c70 files/2.6.23/linux-phc-0.3.1-for-2.6.23.patch 15430 AUX configs/config-for-core-or-core2 47142 RMD160 78adf8841a9b88e7532da689eb512189df69241f SHA1 40e9afdbec772f86f6a731e44438641e2f7e283d SHA256 755fbbcf216b51754c18a53a04f052594a916326f5b3dec2017c613be060e6c9 +MD5 e5518542c19d6c27704b174ada9a2854 files/configs/config-for-core-or-core2 47142 +RMD160 78adf8841a9b88e7532da689eb512189df69241f files/configs/config-for-core-or-core2 47142 +SHA256 755fbbcf216b51754c18a53a04f052594a916326f5b3dec2017c613be060e6c9 files/configs/config-for-core-or-core2 47142 DIST genpatches-2.6.23-2.base.tar.bz2 6134 RMD160 b4d459e06a1a482fb4cfe51e8b693f9c95a6254b SHA1 b851ef449ec34d4331aba47774fe915cc2408e13 SHA256 fa6c34455470c4d57df1d51829a444343f7cbfca44d726843382baeec5ccbaec DIST genpatches-2.6.23-2.extras.tar.bz2 148061 RMD160 ea133cf3c10e061e3c979a8d12c31e320aa48873 SHA1 4c2318276573133374fb66bbd8f358af1ec1c32c SHA256 9fb3221a449cd8c078b327830111e1fb3af1f289e362c98718289d943834d0a9 +DIST genpatches-2.6.23-3.base.tar.bz2 56369 RMD160 1b2b09c8042f39536acfb32398c71d4094250225 SHA1 234a45afda75bb11e24a42397ce6dd2b2562cfbe SHA256 a6cdb742cddfde72ef64a2c5dcd2c034f52a897e63d108f06201a1e8fe065f88 +DIST genpatches-2.6.23-3.extras.tar.bz2 147992 RMD160 bb9cfc7687944b677799b2386bc4b36d95676cea SHA1 fc7f24df398033cdf8e0ff444020c58407aa9925 SHA256 9d272384be06e00ecfdfa1795262a0859e86acd09aa95c531ff311e210d87db6 DIST linux-2.6.23.tar.bz2 45488158 RMD160 755690e80751d5de86d260fe05c6eeadde116c4e SHA1 3a186adf13e44415796ab6381aa8979b16a5d5ca SHA256 d4e67c0935ffb2a4158234bff92cc791b83177866009fc9b2214104e0038dbdb DIST patch-2.6.23-hrt3.patch.bz2 43556 RMD160 3234c8eeb3435e3db1690a2913a6c4daab867292 SHA1 d62cc99e3892af99a4f6b8f975e44846b69a5b51 SHA256 ac64d9423a14d78f9929c885fd499f2308fb2d14e96a37d3da16c35bcee40a59 DIST sco-flowcontrol-v4.3.diff 14993 RMD160 aa6f41adbe8e6093b251731f107acd5ec6612bde SHA1 166135888810f7327c09ac5af20669ac7773467f SHA256 cacd624768bfd60c75843de625f16342f74e25dfe4a0794d79e1a6e14645c5d4 DIST thinkpad-acpi-0.18-20071013_v2.6.23.1.patch.gz 16176 RMD160 67b55a21934c8d0b7305024a6a1996dec8da7000 SHA1 892aeacc3ca11830e2c5322d6d3b3d33e914b246 SHA256 b7cd7f1e12a6666d2c591c7fd9f7e81de4a93bdd3e4e6be04f56f05685e0d205 +DIST thinkpad-acpi-0.18-20071112_v2.6.23.1.gz 36875 RMD160 428d9305482b560beb98165aa370618d449c63c4 SHA1 6a7e34bc87ec214543542bb408f4ea42568ee67c SHA256 0428995ed00088622111f6a9174a0e985230175280ef5b5dd5968c38810452ae DIST tuxonice-3.0-rc2-for-2.6.23.1.patch.bz2 104787 RMD160 c6483adbcfa54582f077781884a4d0a0ccf9b858 SHA1 7b2eba961f29d4cba129648a89789cfb11485221 SHA256 ef86267b6f3d7e309221f5173a881afae1dfa57418be5b3963f2380b0633ca1a EBUILD thinkpad-sources-2.6.23-r1.ebuild 2964 RMD160 cf334363f8d5c9835e6b17f02f172bbcfda3dc45 SHA1 25b2117846c2ea260610813e162133db062c8271 SHA256 597ab1ea5d1d148bc111ef5831667fbcf24597469a1c4241ef9f3a5c1a2e9905 -MISC ChangeLog 839 RMD160 b4e774d8897c5cd57496e92d999398277f85c256 SHA1 acd44925b34b29b8749530c6da8c44714ecf6b54 SHA256 917d071a5fb1e90d34f5361dde4c9563df5f7ea778603540bd8605b63f5546a0 +MD5 b2b6de357d96980dad80022de0ec6b41 thinkpad-sources-2.6.23-r1.ebuild 2964 +RMD160 cf334363f8d5c9835e6b17f02f172bbcfda3dc45 thinkpad-sources-2.6.23-r1.ebuild 2964 +SHA256 597ab1ea5d1d148bc111ef5831667fbcf24597469a1c4241ef9f3a5c1a2e9905 thinkpad-sources-2.6.23-r1.ebuild 2964 +EBUILD thinkpad-sources-2.6.23-r2.ebuild 2963 RMD160 f22def2e6afab943fcfe46c0c2e1af866a386d81 SHA1 3a224f484c0439e4a200312ebb9ad191d87304fd SHA256 562a1c1a5ded6699bfc3736bef837dfc91aec27c16937517273f9914d81bbf16 +MD5 9851ae91472467ecb9f1a9b7f28246c3 thinkpad-sources-2.6.23-r2.ebuild 2963 +RMD160 f22def2e6afab943fcfe46c0c2e1af866a386d81 thinkpad-sources-2.6.23-r2.ebuild 2963 +SHA256 562a1c1a5ded6699bfc3736bef837dfc91aec27c16937517273f9914d81bbf16 thinkpad-sources-2.6.23-r2.ebuild 2963 +MISC ChangeLog 1050 RMD160 d8cc888d25f533cbb5d85ccca5b915a1aba0cf0c SHA1 102ed7a0528aeba687cb6fd4e5935069ce066b02 SHA256 1a599adb59e93caeb964b9f31e9a3fde64259925ce7f76c383683dc7b63ccbfa +MD5 73269132093b260122b713ad60f5a3df ChangeLog 1050 +RMD160 d8cc888d25f533cbb5d85ccca5b915a1aba0cf0c ChangeLog 1050 +SHA256 1a599adb59e93caeb964b9f31e9a3fde64259925ce7f76c383683dc7b63ccbfa ChangeLog 1050 MISC metadata.xml 284 RMD160 5062b08f804b7eaf9e1765c0d38b7fc95bc467e4 SHA1 687ba9103e597aad8a7231ff9a470d841f7121df SHA256 6ca83c8927bd3516baac49bc9ea82ddbeeddbe38a5a98b637d6eb1f1d436c84a +MD5 18420ded8684f1ce0703f5a981b9cce7 metadata.xml 284 +RMD160 5062b08f804b7eaf9e1765c0d38b7fc95bc467e4 metadata.xml 284 +SHA256 6ca83c8927bd3516baac49bc9ea82ddbeeddbe38a5a98b637d6eb1f1d436c84a metadata.xml 284 +MD5 6965ecc335a6c3d81a9f19344bb752a7 files/digest-thinkpad-sources-2.6.23-r1 1683 +RMD160 8d158b7ff12f109a488ee17be56eb7f7d0acd7b6 files/digest-thinkpad-sources-2.6.23-r1 1683 +SHA256 152dcc7c116006ce57ed51c30704a05e3a19a7af52d7309912fbc7a8049a63c3 files/digest-thinkpad-sources-2.6.23-r1 1683 +MD5 44776056a7e757b4f1f466c08784ea7d files/digest-thinkpad-sources-2.6.23-r2 1912 +RMD160 90fb940fd362ed45b879e2fccd76218475268bdb files/digest-thinkpad-sources-2.6.23-r2 1912 +SHA256 9180d84431fa9b69eabea4d5959267b6f945bffa3d5fe512ddf05950829b8504 files/digest-thinkpad-sources-2.6.23-r2 1912 diff --git a/sys-kernel/thinkpad-sources/files/2.6.23-r2/disk-protect-for-2.6.23.8.patch b/sys-kernel/thinkpad-sources/files/2.6.23-r2/disk-protect-for-2.6.23.8.patch new file mode 100644 index 0000000..66f168f --- /dev/null +++ b/sys-kernel/thinkpad-sources/files/2.6.23-r2/disk-protect-for-2.6.23.8.patch @@ -0,0 +1,877 @@ + + Documentation/block/disk-protection.txt | 79 +++++++++++ + block/ll_rw_blk.c | 224 +++++++++++++++++++++++++++++++ + drivers/ata/libata-scsi.c | 36 +++++ + drivers/ide/ide-disk.c | 142 ++++++++++++++++++++ + drivers/ide/ide-io.c | 14 ++ + drivers/scsi/scsi_lib.c | 169 +++++++++++++++++++++++ + include/linux/ata.h | 1 + include/linux/blkdev.h | 14 ++ + include/linux/ide.h | 1 + 9 files changed, 680 insertions(+), 0 deletions(-) + +diff --git a/Documentation/block/disk-protection.txt b/Documentation/block/disk-protection.txt +new file mode 100644 +index 0000000..508cc5b +--- /dev/null ++++ b/Documentation/block/disk-protection.txt +@@ -0,0 +1,79 @@ ++Hard disk protection ++==================== ++ ++ ++Intro ++----- ++ATA/ATAPI-7 specifies the IDLE IMMEDIATE command with UNLOAD FEATURE. ++Issuing this command should cause the drive to switch to idle mode and ++unload disk heads. This feature is being used in modern laptops in ++conjunction with accelerometers and appropriate software to implement ++a shock protection facility. The idea is to stop all I/O operations on ++the internal hard drive and park its heads on the ramp when critical ++situations are anticipated. The desire to have such a feature ++available on GNU/Linux systems has been the original motivation to ++implement a generic disk parking interface in the Linux kernel. ++ ++ ++The interface ++------------- ++The interface works as follows: Writing an integer value to ++/sys/block/*/queue/protect will park the respective drive and freeze ++the block layer queue for the specified number of seconds. When the ++timeout expires and no further disk park request has been issued in ++the meantime, the queue is unfrozen and accumulated I/O operations are ++performed. ++ ++IMPORTANT NOTE: ++Not all ATA drives implement IDLE IMMEDIATE with UNLOAD FEATURE and ++quite a few of those that do so, don't report this capability as ++described in the specs. When a disk park has been requested through ++sysfs as described above, the kernel will try to determine if the ++drive supports the UNLOAD FEATURE by default. The kernel will only ++rely on the IDLE IMMEDIATE with UNLOAD FEATURE command if it is ++convinced that this command is actually supported by the disk drive; ++otherwise, it will fall back to STANDBY IMMEDIATE. Resuming from the ++latter will take much longer and it is generally more likely to have a ++negative impact on the drive's lifetime due to the inclease of spin ++down and up cycles. If you want to use this interface in a shock ++protection framework and you know that your drive does indeed support ++the IDLE IMMEDIATE with UNLOAD FEATURE command despite not saying so, ++you can force the kernel to issue that command by doing the following ++on the command line: ++# echo -n unload > /sys/block/sda/queue/protect_method ++(replace sda by the drive identifier as appropriate). ++ ++/sys/block/*/queue/protect_method accepts auto, unload and standby ++respectively. Reading from protect_method shows the available options ++surrounding the active one with brackets. When auto is active, this ++will change to whatever the kernel sees fit after the next disk park ++command has been issued. ++ ++ ++References ++---------- ++ ++There are several laptops from different brands featuring shock ++protection capabilities. As manufacturers have refused to support open ++source development of the required software components so far, Linux ++support for shock protection varies considerably between different ++hardware implementations. Ideally, this section should contain a list ++of poiters at different projects aiming at an implementation of shock ++protection on different systeems. Unfortunately, I only know of a ++single project which, although still considered experimental, is fit ++for use. Please feel free to add projects that have been the victims ++of my ignorance. ++ ++- http://www.thinkwiki.org/wiki/HDAPS ++ See this page for information about Linux support of the hard disk ++ active protection syystem as implemented in IBM/Lenovo Thinkpads. ++ ++ ++CREDITS ++------- ++ ++The patch to implement the interface described in this file has ++originally been published by Jon Escombe <lists-Xbpc2PeERmvQXOPxS62xeg@public.gmane.org>. ++ ++ ++05 Dec 2006, Elias Oltmanns <eo-oA28OIkTjSVZXbeN9DUtxg@public.gmane.org> +diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c +index 026cf24..3a3afd8 100644 +--- a/block/ll_rw_blk.c ++++ b/block/ll_rw_blk.c +@@ -38,10 +38,14 @@ #include <scsi/scsi_cmnd.h> + + static void blk_unplug_work(struct work_struct *work); + static void blk_unplug_timeout(unsigned long data); ++static void blk_unfreeze_work(struct work_struct *work); ++static void blk_unfreeze_timeout(unsigned long data); + static void drive_stat_acct(struct request *rq, int nr_sectors, int new_io); + static void init_request_from_bio(struct request *req, struct bio *bio); + static int __make_request(struct request_queue *q, struct bio *bio); + static struct io_context *current_io_context(gfp_t gfp_flags, int node); ++static int blk_protect_register(struct request_queue *q); ++static void blk_protect_unregister(struct request_queue *q); + + /* + * For the allocated request tables +@@ -227,6 +231,16 @@ void blk_queue_make_request(struct reque + q->unplug_timer.function = blk_unplug_timeout; + q->unplug_timer.data = (unsigned long)q; + ++ q->max_unfreeze = 30; ++ ++ INIT_WORK(&q->unfreeze_work, blk_unfreeze_work); ++ ++ q->unfreeze_timer.function = blk_unfreeze_timeout; ++ q->unfreeze_timer.data = (unsigned long)q; ++ ++ /* Set protect_method to auto detection initially */ ++ q->protect_method = 2; ++ + /* + * by default assume old behaviour and bounce for any highmem page + */ +@@ -318,6 +332,18 @@ void blk_queue_issue_flush_fn(struct req + + EXPORT_SYMBOL(blk_queue_issue_flush_fn); + ++void blk_queue_issue_protect_fn(struct request_queue *q, issue_protect_fn *ipf) ++{ ++ q->issue_protect_fn = ipf; ++} ++EXPORT_SYMBOL(blk_queue_issue_protect_fn); ++ ++void blk_queue_issue_unprotect_fn(struct request_queue *q, issue_unprotect_fn *iuf) ++{ ++ q->issue_unprotect_fn = iuf; ++} ++EXPORT_SYMBOL(blk_queue_issue_unprotect_fn); ++ + /* + * Cache flushing for ordered writes handling + */ +@@ -1849,6 +1875,7 @@ struct request_queue *blk_alloc_queue_no + return NULL; + + init_timer(&q->unplug_timer); ++ init_timer(&q->unfreeze_timer); + + snprintf(q->kobj.name, KOBJ_NAME_LEN, "%s", "queue"); + q->kobj.ktype = &queue_ktype; +@@ -4114,6 +4141,7 @@ int blk_register_queue(struct gendisk *d + return ret; + } + ++ blk_protect_register(q); + return 0; + } + +@@ -4122,6 +4150,7 @@ void blk_unregister_queue(struct gendisk + struct request_queue *q = disk->queue; + + if (q && q->request_fn) { ++ blk_protect_unregister(q); + elv_unregister_queue(q); + + kobject_uevent(&q->kobj, KOBJ_REMOVE); +@@ -4129,3 +4158,198 @@ void blk_unregister_queue(struct gendisk + kobject_put(&disk->kobj); + } + } ++ ++/* ++ * Issue lower level unprotect function if no timers are pending. ++ */ ++static void blk_unfreeze_work(struct work_struct *work) ++{ ++ struct request_queue *q = container_of(work, struct request_queue, unfreeze_work); ++ int pending; ++ unsigned long flags; ++ ++ spin_lock_irqsave(q->queue_lock, flags); ++ pending = timer_pending(&q->unfreeze_timer); ++ spin_unlock_irqrestore(q->queue_lock, flags); ++ if (!pending) ++ q->issue_unprotect_fn(q); ++} ++ ++/* ++ * Called when the queue freeze timeout expires... ++ */ ++static void blk_unfreeze_timeout(unsigned long data) ++{ ++ struct request_queue *q = (struct request_queue *) data; ++ ++ kblockd_schedule_work(&q->unfreeze_work); ++} ++ ++/* ++ * The lower level driver parks and freezes the queue, and this block layer ++ * function sets up the freeze timeout timer on return. If the queue is ++ * already frozen then this is called to extend the timer... ++ */ ++void blk_freeze_queue(struct request_queue *q, int seconds) ++{ ++ /* Don't accept arbitrarily long freezes */ ++ if (seconds >= q->max_unfreeze) ++ seconds = q->max_unfreeze; ++ /* set/reset the timer */ ++ mod_timer(&q->unfreeze_timer, msecs_to_jiffies(seconds*1000) + jiffies); ++} ++ ++/* ++ * When reading the 'protect' attribute, we return seconds remaining ++ * before unfreeze timeout expires ++ */ ++static ssize_t queue_protect_show(struct request_queue *q, char *page) ++{ ++ unsigned int seconds = 0; ++ ++ spin_lock_irq(q->queue_lock); ++ if (blk_queue_stopped(q) && timer_pending(&q->unfreeze_timer)) ++ /* ++ * Adding 1 in order to guarantee nonzero value until timer ++ * has actually expired. ++ */ ++ seconds = jiffies_to_msecs(q->unfreeze_timer.expires ++ - jiffies) / 1000 + 1; ++ spin_unlock_irq(q->queue_lock); ++ return queue_var_show(seconds, (page)); ++} ++ ++/* ++ * When writing the 'protect' attribute, input is the number of seconds ++ * to freeze the queue for. We call a lower level helper function to ++ * park the heads and freeze/block the queue, then we make a block layer ++ * call to setup the thaw timeout. If input is 0, then we thaw the queue. ++ */ ++static ssize_t queue_protect_store(struct request_queue *q, ++ const char *page, size_t count) ++{ ++ unsigned long freeze = 0; ++ ++ queue_var_store(&freeze, page, count); ++ ++ if (freeze>0) { ++ /* Park and freeze */ ++ if (!blk_queue_stopped(q)) ++ q->issue_protect_fn(q); ++ /* set / reset the thaw timer */ ++ spin_lock_irq(q->queue_lock); ++ blk_freeze_queue(q, freeze); ++ spin_unlock_irq(q->queue_lock); ++ } else { ++ spin_lock_irq(q->queue_lock); ++ freeze = del_timer(&q->unfreeze_timer); ++ spin_unlock_irq(q->queue_lock); ++ if (freeze) ++ q->issue_unprotect_fn(q); ++ } ++ ++ return count; ++} ++ ++static ssize_t ++queue_str_show(char *page, char *str, int status) ++{ ++ ssize_t len; ++ ++ if (status & 1) ++ len = sprintf(page, "[%s]", str); ++ else ++ len = sprintf(page, "%s", str); ++ if (status & 2) ++ len += sprintf(page+len, "\n"); ++ else ++ len += sprintf(page+len, " "); ++ return len; ++} ++ ++/* ++ * Returns current protect_method. ++ */ ++static ssize_t queue_protect_method_show(struct request_queue *q, char *page) ++{ ++ int len = 0; ++ int unload = q->protect_method; ++ ++ len += queue_str_show(page+len, "auto", (unload & 2) >> 1); ++ len += queue_str_show(page+len, "unload", unload & 1); ++ len += queue_str_show(page+len, "standby", !unload ? 3 : 2); ++ return len; ++} ++ ++/* ++ * Stores the device protect method. ++ */ ++static ssize_t queue_protect_method_store(struct request_queue *q, ++ const char *page, size_t count) ++{ ++ spin_lock_irq(q->queue_lock); ++ if (!strcmp(page, "auto") || !strcmp(page, "auto\n")) ++ q->protect_method = 2; ++ else if (!strcmp(page, "unload") || !strcmp(page, "unload\n")) ++ q->protect_method = 1; ++ else if (!strcmp(page, "standby") || !strcmp(page, "standby\n")) ++ q->protect_method = 0; ++ else { ++ spin_unlock_irq(q->queue_lock); ++ return -EINVAL; ++ } ++ spin_unlock_irq(q->queue_lock); ++ return count; ++} ++ ++static struct queue_sysfs_entry queue_protect_entry = { ++ .attr = { .name = "protect", .mode = S_IRUGO | S_IWUSR }, ++ .show = queue_protect_show, ++ .store = queue_protect_store, ++}; ++static struct queue_sysfs_entry queue_protect_method_entry = { ++ .attr = { .name = "protect_method", .mode = S_IRUGO | S_IWUSR }, ++ .show = queue_protect_method_show, ++ .store = queue_protect_method_store, ++}; ++ ++static int blk_protect_register(struct request_queue *q) ++{ ++ int error = 0; ++ ++ /* check that the lower level driver has a protect handler */ ++ if (!q->issue_protect_fn) ++ return 1; ++ ++ /* create the attributes */ ++ error = sysfs_create_file(&q->kobj, &queue_protect_entry.attr); ++ if (error) { ++ printk(KERN_ERR ++ "blk_protect_register(): failed to create protect queue attribute!\n"); ++ return error; ++ } ++ kobject_get(&q->kobj); ++ ++ error = sysfs_create_file(&q->kobj, &queue_protect_method_entry.attr); ++ if (error) { ++ printk(KERN_ERR ++ "blk_protect_register(): failed to create protect_method attribute!\n"); ++ return error; ++ } ++ kobject_get(&q->kobj); ++ ++ return 0; ++} ++ ++static void blk_protect_unregister(struct request_queue *q) ++{ ++ /* check that the lower level driver has a protect handler */ ++ if (!q->issue_protect_fn) ++ return; ++ ++ /* remove the attributes */ ++ sysfs_remove_file(&q->kobj, &queue_protect_method_entry.attr); ++ kobject_put(&q->kobj); ++ sysfs_remove_file(&q->kobj, &queue_protect_entry.attr); ++ kobject_put(&q->kobj); ++} +diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c +index e836476..c587bf1 100644 +--- a/drivers/ata/libata-scsi.c ++++ b/drivers/ata/libata-scsi.c +@@ -781,6 +781,38 @@ static void ata_scsi_dev_config(struct s + } + } + ++extern int scsi_protect_queue(struct request_queue *q, int unload); ++extern int scsi_unprotect_queue(struct request_queue *q); ++ ++static int ata_scsi_issue_protect_fn(struct request_queue *q) ++{ ++ struct scsi_device *sdev = q->queuedata; ++ struct ata_port *ap = ata_shost_to_port(sdev->host); ++ struct ata_device *dev = ata_scsi_find_dev(ap, sdev); ++ int unload = q->protect_method; ++ unsigned long flags; ++ ++ if (!dev) { ++ printk(KERN_DEBUG "ata_scsi_issue_protect_fn(): Couldn't find ATA device to be parked.\n"); ++ return -ENXIO; ++ } ++ ++ if (unload == 2) { ++ unload = ata_id_has_unload(dev->id) ? 1 : 0; ++ spin_lock_irqsave(q->queue_lock, flags); ++ q->protect_method = unload; ++ spin_unlock_irqrestore(q->queue_lock, flags); ++ } ++ ++ /* call scsi_protect_queue, requesting either unload or standby */ ++ return scsi_protect_queue(q, unload); ++} ++ ++static int ata_scsi_issue_unprotect_fn(struct request_queue *q) ++{ ++ return scsi_unprotect_queue(q); ++} ++ + /** + * ata_scsi_slave_config - Set SCSI device attributes + * @sdev: SCSI device to examine +@@ -806,6 +838,10 @@ int ata_scsi_slave_config(struct scsi_de + + if (dev) + ata_scsi_dev_config(sdev, dev); ++ blk_queue_issue_protect_fn(sdev->request_queue, ++ ata_scsi_issue_protect_fn); ++ blk_queue_issue_unprotect_fn(sdev->request_queue, ++ ata_scsi_issue_unprotect_fn); + + return 0; /* scsi layer doesn't check return value, sigh */ + } +diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c +index 4754769..938408d 100644 +--- a/drivers/ide/ide-disk.c ++++ b/drivers/ide/ide-disk.c +@@ -743,6 +743,145 @@ static int idedisk_issue_flush(struct re + } + + /* ++ * todo: ++ * - we freeze the queue regardless of success and rely on the ++ * ide_protect_queue function to thaw immediately if the command ++ * failed (to be consistent with the libata handler)... should ++ * we also inspect here? ++ */ ++void ide_end_protect_rq(struct request *rq, int error) ++{ ++ struct completion *waiting = rq->end_io_data; ++ ++ rq->end_io_data = NULL; ++ /* spin lock already accquired */ ++ if (!blk_queue_stopped(rq->q)) ++ blk_stop_queue(rq->q); ++ ++ complete(waiting); ++} ++ ++int ide_unprotect_queue(struct request_queue *q) ++{ ++ struct request rq; ++ unsigned long flags; ++ int pending = 0, rc = 0; ++ ide_drive_t *drive = q->queuedata; ++ u8 args[7], *argbuf = args; ++ ++ if (!blk_queue_stopped(q)) ++ return -EIO; ++ ++ /* Are there any pending jobs on the queue? */ ++ pending = ((q->rq.count[READ] > 0) || (q->rq.count[WRITE] > 0)) ? 1 : 0; ++ ++ spin_lock_irqsave(q->queue_lock, flags); ++ blk_start_queue(q); ++ spin_unlock_irqrestore(q->queue_lock, flags); ++ ++ /* The unload feature of the IDLE_IMMEDIATE command ++ temporarily disables HD power management from spinning down ++ the disk. Any other command will reenable HD pm, so, if ++ there are no pending jobs on the queue, another ++ CHECK_POWER_MODE1 command without the unload feature should do ++ just fine. */ ++ if (!pending) { ++ printk(KERN_DEBUG "ide_unprotect_queue(): No pending I/O, re-enabling power management..\n"); ++ memset(args, 0, sizeof(args)); ++ argbuf[0] = 0xe5; /* CHECK_POWER_MODE1 */ ++ ide_init_drive_cmd(&rq); ++ rq.cmd_type = REQ_TYPE_ATA_TASK; ++ rq.buffer = argbuf; ++ rc = ide_do_drive_cmd(drive, &rq, ide_head_wait); ++ } ++ ++ return rc; ++} ++ ++int ide_protect_queue(struct request_queue *q, int unload) ++{ ++ ide_drive_t *drive = q->queuedata; ++ struct request rq; ++ u8 args[7], *argbuf = args; ++ int ret = 0; ++ DECLARE_COMPLETION(wait); ++ ++ memset(&rq, 0, sizeof(rq)); ++ memset(args, 0, sizeof(args)); ++ ++ if (blk_queue_stopped(q)) ++ return -EIO; ++ ++ if (unload) { ++ argbuf[0] = 0xe1; ++ argbuf[1] = 0x44; ++ argbuf[3] = 0x4c; ++ argbuf[4] = 0x4e; ++ argbuf[5] = 0x55; ++ } else ++ argbuf[0] = 0xe0; ++ ++ /* Issue the park command & freeze */ ++ ide_init_drive_cmd(&rq); ++ ++ rq.cmd_type = REQ_TYPE_ATA_TASK; ++ rq.buffer = argbuf; ++ rq.end_io_data = &wait; ++ rq.end_io = ide_end_protect_rq; ++ ++ ret = ide_do_drive_cmd(drive, &rq, ide_next); ++ wait_for_completion(&wait); ++ ++ if (ret) ++ { ++ printk(KERN_DEBUG "ide_protect_queue(): Warning: head NOT parked!..\n"); ++ ide_unprotect_queue(q); ++ return ret; ++ } ++ ++ if (unload) { ++ if (args[3] == 0xc4) ++ printk(KERN_DEBUG "ide_protect_queue(): head parked..\n"); ++ else { ++ /* error parking the head */ ++ printk(KERN_DEBUG "ide_protect_queue(): head NOT parked!..\n"); ++ ret = -EIO; ++ ide_unprotect_queue(q); ++ } ++ } else ++ printk(KERN_DEBUG "ide_protect_queue(): head park not requested, used standby!..\n"); ++ ++ return ret; ++} ++ ++int idedisk_issue_protect_fn(struct request_queue *q) ++{ ++ ide_drive_t *drive = q->queuedata; ++ int unload = q->protect_method; ++ unsigned long flags; ++ ++ /* ++ * Check capability of the device - ++ * - if "idle immediate with unload" is supported we use that, else ++ * we use "standby immediate" and live with spinning down the drive.. ++ * (Word 84, bit 13 of IDENTIFY DEVICE data) ++ */ ++ if (unload == 2) { ++ unload = drive->id->cfsse & (1 << 13) ? 1 : 0; ++ spin_lock_irqsave(q->queue_lock, flags); ++ q->protect_method = unload; ++ spin_unlock_irqrestore(q->queue_lock, flags); ++ } ++ ++ return ide_protect_queue(q, unload); ++} ++ ++int idedisk_issue_unprotect_fn(struct request_queue *q) ++{ ++ return ide_unprotect_queue(q); ++} ++ ++/* + * This is tightly woven into the driver->do_special can not touch. + * DON'T do it again until a total personality rewrite is committed. + */ +@@ -1017,6 +1156,9 @@ static void idedisk_setup (ide_drive_t * + drive->wcache = 1; + + write_cache(drive, 1); ++ ++ blk_queue_issue_protect_fn(drive->queue, idedisk_issue_protect_fn); ++ blk_queue_issue_unprotect_fn(drive->queue, idedisk_issue_unprotect_fn); + } + + static void ide_cacheflush_p(ide_drive_t *drive) +diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c +index aa9f5f0..e664f5c 100644 +--- a/drivers/ide/ide-io.c ++++ b/drivers/ide/ide-io.c +@@ -1276,6 +1276,17 @@ #endif + } + + /* ++ * Don't accept a request when the queue is stopped (unless we ++ * are resuming from suspend). Prevents existing queue entries ++ * being processed after queue is stopped by the hard disk ++ * protection mechanism... ++ */ ++ if (test_bit(QUEUE_FLAG_STOPPED, &drive->queue->queue_flags) && !blk_pm_resume_request(rq)) { ++ hwgroup->busy = 0; ++ break; ++ } ++ ++ /* + * Sanity: don't accept a request that isn't a PM request + * if we are currently power managed. This is very important as + * blk_stop_queue() doesn't prevent the elv_next_request() +@@ -1773,6 +1784,9 @@ int ide_do_drive_cmd (ide_drive_t *drive + where = ELEVATOR_INSERT_FRONT; + rq->cmd_flags |= REQ_PREEMPT; + } ++ if (action == ide_next) ++ where = ELEVATOR_INSERT_FRONT; ++ + __elv_add_request(drive->queue, rq, where, 0); + ide_do_request(hwgroup, IDE_NO_IRQ); + spin_unlock_irqrestore(&ide_lock, flags); +diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c +index a417a6f..ac5cd9c 100644 +--- a/drivers/scsi/scsi_lib.c ++++ b/drivers/scsi/scsi_lib.c +@@ -2024,7 +2024,13 @@ EXPORT_SYMBOL(scsi_device_set_state); + int + scsi_device_quiesce(struct scsi_device *sdev) + { ++ int i; + int err = scsi_device_set_state(sdev, SDEV_QUIESCE); ++ for (i = 0; err && (sdev->sdev_state == SDEV_BLOCK) && (i < 100); ++ i++) { ++ msleep_interruptible(200); ++ err = scsi_device_set_state(sdev, SDEV_QUIESCE); ++ } + if (err) + return err; + +@@ -2273,3 +2279,166 @@ void scsi_kunmap_atomic_sg(void *virt) + kunmap_atomic(virt, KM_BIO_SRC_IRQ); + } + EXPORT_SYMBOL(scsi_kunmap_atomic_sg); ++ ++/* ++ * Structure required for synchronous io completion after queue freezing ++ */ ++struct scsi_protect_io_context_sync { ++ struct scsi_device *sdev; ++ int result; ++ char *sense; ++ struct completion *waiting; ++}; ++ ++/* ++ * scsi_protect_wait_done() ++ * Command completion handler for scsi_protect_queue(). ++ * ++ * Unable to call scsi_internal_device_block() as ++ * scsi_end_request() already has the spinlock. So, ++ * we put the necessary functionality inline. ++ * ++ * todo: ++ * - we block the queue regardless of success and rely on the ++ * scsi_protect_queue function to unblock if the command ++ * failed... should we also inspect here? ++ */ ++static void scsi_protect_wait_done(void *data, char *sense, int result, int resid) ++{ ++ struct scsi_protect_io_context_sync *siocs = data; ++ struct completion *waiting = siocs->waiting; ++ struct request_queue *q = siocs->sdev->request_queue; ++ ++ siocs->waiting = NULL; ++ siocs->result = result; ++ memcpy(siocs->sense, sense, SCSI_SENSE_BUFFERSIZE); ++ ++ if (!scsi_device_set_state(siocs->sdev, SDEV_BLOCK)) ++ blk_stop_queue(q); ++ ++ complete(waiting); ++} ++ ++/* ++ * scsi_unprotect_queue() ++ * - release the queue that was previously blocked ++ */ ++int scsi_unprotect_queue(struct request_queue *q) ++{ ++ struct scsi_device *sdev = q->queuedata; ++ int rc = 0, pending = 0; ++ u8 scsi_cmd[MAX_COMMAND_SIZE]; ++ struct scsi_sense_hdr sshdr; ++ ++ if (sdev->sdev_state != SDEV_BLOCK) ++ return -ENXIO; ++ ++ /* Are there any pending jobs on the queue? */ ++ pending = ((q->rq.count[READ] > 0) || (q->rq.count[WRITE] > 0)) ? 1 : 0; ++ ++ rc = scsi_internal_device_unblock(sdev); ++ if (rc) ++ return rc; ++ ++ if (!pending) { ++ printk(KERN_DEBUG "scsi_unprotect_queue(): No pending I/O, re-enabling power management..\n"); ++ ++ memset(scsi_cmd, 0, sizeof(scsi_cmd)); ++ scsi_cmd[0] = ATA_16; ++ scsi_cmd[1] = (3 << 1); /* Non-data */ ++ /* scsi_cmd[2] is already 0 -- no off.line, cc, or data xfer */ ++ scsi_cmd[14] = 0xe5; /* CHECK_POWER_MODE1 */ ++ ++ /* Good values for timeout and retries? Values below ++ from scsi_ioctl_send_command() for default case... */ ++ if (scsi_execute_req(sdev, scsi_cmd, DMA_NONE, NULL, 0, &sshdr, ++ (10*HZ), 5)) ++ rc = -EIO; ++ } ++ return rc; ++} ++EXPORT_SYMBOL_GPL(scsi_unprotect_queue); ++ ++/* ++ * scsi_protect_queue() ++ * - build and issue the park/standby command.. ++ * - queue is blocked during command completion handler ++ */ ++int scsi_protect_queue(struct request_queue *q, int unload) ++{ ++ struct scsi_protect_io_context_sync siocs; ++ struct scsi_device *sdev = q->queuedata; ++ int rc = 0; ++ u8 args[7]; ++ u8 scsi_cmd[MAX_COMMAND_SIZE]; ++ unsigned char sense[SCSI_SENSE_BUFFERSIZE]; ++ unsigned char *desc; ++ DECLARE_COMPLETION_ONSTACK(wait); ++ ++ if (sdev->sdev_state != SDEV_RUNNING) ++ return -ENXIO; ++ ++ memset(args, 0, sizeof(args)); ++ memset(sense, 0, sizeof(sense)); ++ ++ if (unload) { ++ args[0] = 0xe1; ++ args[1] = 0x44; ++ args[3] = 0x4c; ++ args[4] = 0x4e; ++ args[5] = 0x55; ++ } else ++ args[0] = 0xe0; ++ ++ memset(scsi_cmd, 0, sizeof(scsi_cmd)); ++ scsi_cmd[0] = ATA_16; ++ scsi_cmd[1] = (3 << 1); /* Non-data */ ++ scsi_cmd[2] = 0x20; /* no off.line, or data xfer, request cc */ ++ scsi_cmd[4] = args[1]; ++ scsi_cmd[6] = args[2]; ++ scsi_cmd[8] = args[3]; ++ scsi_cmd[10] = args[4]; ++ scsi_cmd[12] = args[5]; ++ scsi_cmd[14] = args[0]; ++ siocs.sdev = sdev; ++ siocs.sense = sense; ++ siocs.waiting = &wait; ++ ++ scsi_execute_async(sdev, scsi_cmd, COMMAND_SIZE(scsi_cmd[0]), ++ DMA_NONE, NULL, 0, 0, (10*HZ), 5, ++ &siocs, &scsi_protect_wait_done, GFP_NOWAIT); ++ wait_for_completion(&wait); ++ ++ if (siocs.result != ((DRIVER_SENSE << 24) + SAM_STAT_CHECK_CONDITION)) { ++ printk(KERN_DEBUG "scsi_protect_queue(): head NOT parked!..\n"); ++ scsi_unprotect_queue(q); /* just in case we still managed to block */ ++ rc = -EIO; ++ goto out; ++ } ++ ++ desc = sense + 8; ++ ++ /* Retrieve data from check condition */ ++ args[1] = desc[3]; ++ args[2] = desc[5]; ++ args[3] = desc[7]; ++ args[4] = desc[9]; ++ args[5] = desc[11]; ++ args[0] = desc[13]; ++ ++ if (unload) { ++ if (args[3] == 0xc4) ++ printk(KERN_DEBUG "scsi_protect_queue(): head parked..\n"); ++ else { ++ /* error parking the head */ ++ printk(KERN_DEBUG "scsi_protect_queue(): head NOT parked!..\n"); ++ rc = -EIO; ++ scsi_unprotect_queue(q); ++ } ++ } else ++ printk(KERN_DEBUG "scsi_protect_queue(): head park not requested, used standby!..\n"); ++ ++out: ++ return rc; ++} ++EXPORT_SYMBOL_GPL(scsi_protect_queue); +diff --git a/include/linux/ata.h b/include/linux/ata.h +index c043c1c..618906f 100644 +--- a/include/linux/ata.h ++++ b/include/linux/ata.h +@@ -344,6 +344,7 @@ #define ata_id_is_ata(id) (((id)[0] & (1 + #define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) + #define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) + #define ata_id_hpa_enabled(id) ((id)[85] & (1 << 10)) ++#define ata_id_has_unload(id) ((id)[84] & (1 << 13)) + #define ata_id_has_fua(id) ((id)[84] & (1 << 6)) + #define ata_id_has_flush(id) ((id)[83] & (1 << 12)) + #define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13)) +diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h +index d26bbb0..2fa892d 100644 +--- a/include/linux/blkdev.h ++++ b/include/linux/blkdev.h +@@ -347,6 +347,8 @@ typedef int (merge_bvec_fn) (struct requ + typedef int (issue_flush_fn) (struct request_queue *, struct gendisk *, sector_t *); + typedef void (prepare_flush_fn) (struct request_queue *, struct request *); + typedef void (softirq_done_fn)(struct request *); ++typedef int (issue_protect_fn) (struct request_queue *); ++typedef int (issue_unprotect_fn) (struct request_queue *); + + enum blk_queue_state { + Queue_down, +@@ -384,6 +386,8 @@ struct request_queue + issue_flush_fn *issue_flush_fn; + prepare_flush_fn *prepare_flush_fn; + softirq_done_fn *softirq_done_fn; ++ issue_protect_fn *issue_protect_fn; ++ issue_unprotect_fn *issue_unprotect_fn; + + /* + * Dispatch queue sorting +@@ -399,6 +403,14 @@ struct request_queue + unsigned long unplug_delay; /* After this many jiffies */ + struct work_struct unplug_work; + ++ /* ++ * Auto-unfreeze state ++ */ ++ struct timer_list unfreeze_timer; ++ int max_unfreeze; /* At most this many seconds */ ++ struct work_struct unfreeze_work; ++ int protect_method; ++ + struct backing_dev_info backing_dev_info; + + /* +@@ -774,6 +786,8 @@ extern int blk_do_ordered(struct request + extern unsigned blk_ordered_cur_seq(struct request_queue *); + extern unsigned blk_ordered_req_seq(struct request *); + extern void blk_ordered_complete_seq(struct request_queue *, unsigned, int); ++extern void blk_queue_issue_protect_fn(struct request_queue *, issue_protect_fn *); ++extern void blk_queue_issue_unprotect_fn(struct request_queue *, issue_unprotect_fn *); + + extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); + extern void blk_dump_rq_flags(struct request *, char *); +diff --git a/include/linux/ide.h b/include/linux/ide.h +index 20528c0..ee846d5 100644 +--- a/include/linux/ide.h ++++ b/include/linux/ide.h +@@ -1110,6 +1110,7 @@ extern u64 ide_get_error_location(ide_dr + */ + typedef enum { + ide_wait, /* insert rq at end of list, and wait for it */ ++ ide_next, /* insert rq immediately after current request */ + ide_preempt, /* insert rq in front of current request */ + ide_head_wait, /* insert rq in front of current request and wait for it */ + ide_end /* insert rq at end of list, but don't wait for it */ + diff --git a/sys-kernel/thinkpad-sources/files/digest-thinkpad-sources-2.6.23-r1 b/sys-kernel/thinkpad-sources/files/digest-thinkpad-sources-2.6.23-r1 new file mode 100644 index 0000000..e34866f --- /dev/null +++ b/sys-kernel/thinkpad-sources/files/digest-thinkpad-sources-2.6.23-r1 @@ -0,0 +1,18 @@ +RMD160 b4d459e06a1a482fb4cfe51e8b693f9c95a6254b genpatches-2.6.23-2.base.tar.bz2 6134 +SHA256 fa6c34455470c4d57df1d51829a444343f7cbfca44d726843382baeec5ccbaec genpatches-2.6.23-2.base.tar.bz2 6134 +RMD160 ea133cf3c10e061e3c979a8d12c31e320aa48873 genpatches-2.6.23-2.extras.tar.bz2 148061 +SHA256 9fb3221a449cd8c078b327830111e1fb3af1f289e362c98718289d943834d0a9 genpatches-2.6.23-2.extras.tar.bz2 148061 +MD5 2cc2fd4d521dc5d7cfce0d8a9d1b3472 linux-2.6.23.tar.bz2 45488158 +RMD160 755690e80751d5de86d260fe05c6eeadde116c4e linux-2.6.23.tar.bz2 45488158 +SHA256 d4e67c0935ffb2a4158234bff92cc791b83177866009fc9b2214104e0038dbdb linux-2.6.23.tar.bz2 45488158 +MD5 fe38e769137bf5ffc3b138ee874901ca patch-2.6.23-hrt3.patch.bz2 43556 +RMD160 3234c8eeb3435e3db1690a2913a6c4daab867292 patch-2.6.23-hrt3.patch.bz2 43556 +SHA256 ac64d9423a14d78f9929c885fd499f2308fb2d14e96a37d3da16c35bcee40a59 patch-2.6.23-hrt3.patch.bz2 43556 +MD5 47e988ac858c44d11239d770d7814b98 sco-flowcontrol-v4.3.diff 14993 +RMD160 aa6f41adbe8e6093b251731f107acd5ec6612bde sco-flowcontrol-v4.3.diff 14993 +SHA256 cacd624768bfd60c75843de625f16342f74e25dfe4a0794d79e1a6e14645c5d4 sco-flowcontrol-v4.3.diff 14993 +RMD160 67b55a21934c8d0b7305024a6a1996dec8da7000 thinkpad-acpi-0.18-20071013_v2.6.23.1.patch.gz 16176 +SHA256 b7cd7f1e12a6666d2c591c7fd9f7e81de4a93bdd3e4e6be04f56f05685e0d205 thinkpad-acpi-0.18-20071013_v2.6.23.1.patch.gz 16176 +MD5 2241806942ddebdae5254ece310ae5a4 tuxonice-3.0-rc2-for-2.6.23.1.patch.bz2 104787 +RMD160 c6483adbcfa54582f077781884a4d0a0ccf9b858 tuxonice-3.0-rc2-for-2.6.23.1.patch.bz2 104787 +SHA256 ef86267b6f3d7e309221f5173a881afae1dfa57418be5b3963f2380b0633ca1a tuxonice-3.0-rc2-for-2.6.23.1.patch.bz2 104787 diff --git a/sys-kernel/thinkpad-sources/files/digest-thinkpad-sources-2.6.23-r2 b/sys-kernel/thinkpad-sources/files/digest-thinkpad-sources-2.6.23-r2 new file mode 100644 index 0000000..663e67d --- /dev/null +++ b/sys-kernel/thinkpad-sources/files/digest-thinkpad-sources-2.6.23-r2 @@ -0,0 +1,21 @@ +MD5 3a93a33be8493cb4c534a55865493c48 genpatches-2.6.23-3.base.tar.bz2 56369 +RMD160 1b2b09c8042f39536acfb32398c71d4094250225 genpatches-2.6.23-3.base.tar.bz2 56369 +SHA256 a6cdb742cddfde72ef64a2c5dcd2c034f52a897e63d108f06201a1e8fe065f88 genpatches-2.6.23-3.base.tar.bz2 56369 +MD5 df2ea06b7452990fd75f3b4f55c2feaf genpatches-2.6.23-3.extras.tar.bz2 147992 +RMD160 bb9cfc7687944b677799b2386bc4b36d95676cea genpatches-2.6.23-3.extras.tar.bz2 147992 +SHA256 9d272384be06e00ecfdfa1795262a0859e86acd09aa95c531ff311e210d87db6 genpatches-2.6.23-3.extras.tar.bz2 147992 +MD5 2cc2fd4d521dc5d7cfce0d8a9d1b3472 linux-2.6.23.tar.bz2 45488158 +RMD160 755690e80751d5de86d260fe05c6eeadde116c4e linux-2.6.23.tar.bz2 45488158 +SHA256 d4e67c0935ffb2a4158234bff92cc791b83177866009fc9b2214104e0038dbdb linux-2.6.23.tar.bz2 45488158 +MD5 fe38e769137bf5ffc3b138ee874901ca patch-2.6.23-hrt3.patch.bz2 43556 +RMD160 3234c8eeb3435e3db1690a2913a6c4daab867292 patch-2.6.23-hrt3.patch.bz2 43556 +SHA256 ac64d9423a14d78f9929c885fd499f2308fb2d14e96a37d3da16c35bcee40a59 patch-2.6.23-hrt3.patch.bz2 43556 +MD5 47e988ac858c44d11239d770d7814b98 sco-flowcontrol-v4.3.diff 14993 +RMD160 aa6f41adbe8e6093b251731f107acd5ec6612bde sco-flowcontrol-v4.3.diff 14993 +SHA256 cacd624768bfd60c75843de625f16342f74e25dfe4a0794d79e1a6e14645c5d4 sco-flowcontrol-v4.3.diff 14993 +MD5 6d61f8f34c6fc194f19f0f135b982621 thinkpad-acpi-0.18-20071112_v2.6.23.1.gz 36875 +RMD160 428d9305482b560beb98165aa370618d449c63c4 thinkpad-acpi-0.18-20071112_v2.6.23.1.gz 36875 +SHA256 0428995ed00088622111f6a9174a0e985230175280ef5b5dd5968c38810452ae thinkpad-acpi-0.18-20071112_v2.6.23.1.gz 36875 +MD5 2241806942ddebdae5254ece310ae5a4 tuxonice-3.0-rc2-for-2.6.23.1.patch.bz2 104787 +RMD160 c6483adbcfa54582f077781884a4d0a0ccf9b858 tuxonice-3.0-rc2-for-2.6.23.1.patch.bz2 104787 +SHA256 ef86267b6f3d7e309221f5173a881afae1dfa57418be5b3963f2380b0633ca1a tuxonice-3.0-rc2-for-2.6.23.1.patch.bz2 104787 diff --git a/sys-kernel/thinkpad-sources/thinkpad-sources-2.6.23-r2.ebuild b/sys-kernel/thinkpad-sources/thinkpad-sources-2.6.23-r2.ebuild new file mode 100644 index 0000000..5735282 --- /dev/null +++ b/sys-kernel/thinkpad-sources/thinkpad-sources-2.6.23-r2.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: sys-kernel/thinkpad-sources/thinkpad-sources-2.6.23-r2.ebuild 2007 04 12 + +ETYPE="sources" +K_WANT_GENPATCHES="base extras" +K_GENPATCHES_VER="3" + +inherit kernel-2 +detect_version +detect_arch + +DESCRIPTION="Software Suspend 2 + Gentoo patchset sources + SCO Flowcontrol + Latest THINKPAD-Acpi" +HOMEPAGE="http://dev.gentoo.org/~dsd/genpatches http://www.tuxonice.net http://bluetooth-alsa.sourceforge.net/ http://ibm-acpi.sourceforge.net/" + +IUSE="sco_flowcontrol" + +HRT_VERSION="3" +HRT_TARGET="2.6.23" +HRT_SRC="patch-${HRT_TARGET}-hrt${HRT_VERSION}" +HRT_URI="http://www.kernel.org/pub/linux/kernel/people/tglx/hrtimers/2.6.23/${HRT_SRC}.patch.bz2" + +TUXONICE_VERSION="3.0-rc2" +TUXONICE_TARGET="2.6.23.1" +TUXONICE_SRC="tuxonice-${TUXONICE_VERSION}-for-${TUXONICE_TARGET}" +TUXONICE_URI="http://www.tuxonice.net/downloads/all/${TUXONICE_SRC}.patch.bz2" + +SCO_FLOWCONTROL_VERSION="4.3" +SCO_FLOWCONTROL_SRC="sco-flowcontrol-v${SCO_FLOWCONTROL_VERSION}" +SCO_FLOWCONTROL_URI="http://bluetooth-alsa.cvs.sourceforge.net/*checkout*/bluetooth-alsa/plugz/patches/${SCO_FLOWCONTROL_SRC}.diff" + +THINKPAD_ACPI_VERSION="0.18-20071112" +THINKPAD_ACPI_TARGET="2.6.23.1" +THINKPAD_ACPI_SRC="thinkpad-acpi-${THINKPAD_ACPI_VERSION}_v${THINKPAD_ACPI_TARGET}.gz" +THINKPAD_ACPI_URI="mirror://sourceforge/ibm-acpi/${THINKPAD_ACPI_SRC}" + + + +#IEEE80211_VERSION="1.2.17" +#IEEE80211_TARGET="2.6.20" +#IEEE80211_SRC="05-ieee80211-${IEEE80211_VERSION}-for-${IEEE80211_TARGET}.patch" +#IEEE80211_URI="http://whoopie.gmxhome.de/linux/patches/2.6.20/${IEEE80211_SRC}" + +UNIPATCH_LIST="" + +if use sco_flowcontrol; then + UNIPATCH_LIST="${UNIPATCH_LIST} ${DISTDIR}/${SCO_FLOWCONTROL_SRC}.diff" +fi +UNIPATCH_LIST="${UNIPATCH_LIST} + ${FILESDIR}/2.6.23-r2/disk-protect-for-2.6.23.8.patch + ${DISTDIR}/${THINKPAD_ACPI_SRC} + ${DISTDIR}/${IEEE80211_SRC} + ${FILESDIR}/2.6.23/input-unknown_keycodes-for-2.6.23.patch + ${FILESDIR}/2.6.23/linux-phc-0.3.1-for-2.6.23.patch + ${DISTDIR}/${TUXONICE_SRC}.patch.bz2 + ${FILESDIR}/2.6.23/combined-2.6.23-cph.patch + ${DISTDIR}/${HRT_SRC}.patch.bz2" + + +UNIPATCH_STRICTORDER="yes" +SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ${TUXONICE_URI} ${THINKPAD_ACPI_URI} sco_flowcontrol? ( ${SCO_FLOWCONTROL_URI} ) ${IEEE80211_URI} ${HRT_URI}" + +KEYWORDS="~amd64 ~x86" + +RDEPEND="${RDEPEND} + >=sys-apps/tuxonice-userui-0.7.2 + >=sys-power/hibernate-script-1.97" + +#K_EXTRAEINFO="If there are issues with this kernel, please direct any +#queries to the linux-thinkpad mailing list:" + +pkg_postinst() { + kernel-2_pkg_postinst + einfo "For more info on this patchset, and how to report problems, see:" + einfo "${HOMEPAGE}" + einfo "In files dir is an example config suitable for T60" + einfo "and hopefully all pci-express driven Thinkpads" + einfo "but at all you should try for all Thinkpads" + einfo "to NOT alter the given storage device controller configuration" +} |