diff options
author | Tim Yamin <plasmaroo@gentoo.org> | 2004-01-06 15:18:03 +0000 |
---|---|---|
committer | Tim Yamin <plasmaroo@gentoo.org> | 2004-01-06 15:18:03 +0000 |
commit | 8be50094f83a315f2c3d206330bceed2e7b21f7e (patch) | |
tree | 315a07c2a86ff65b057b98f47255c8709532eb3a /sys-kernel | |
parent | New testing release. (Manifest recommit) (diff) | |
download | gentoo-2-8be50094f83a315f2c3d206330bceed2e7b21f7e.tar.gz gentoo-2-8be50094f83a315f2c3d206330bceed2e7b21f7e.tar.bz2 gentoo-2-8be50094f83a315f2c3d206330bceed2e7b21f7e.zip |
Fixed headers, added patches for the recent security vulnerabilities at bugs #37317 and #37292 for 2.4.20-r10 and 2.4.22-r2, and also added the HPT372/HPT374 patch to 2.4.20-r10; closes bug #20986.
Diffstat (limited to 'sys-kernel')
17 files changed, 1616 insertions, 51 deletions
diff --git a/sys-kernel/gentoo-sources/ChangeLog b/sys-kernel/gentoo-sources/ChangeLog index d90c9ecb1897..c0ff50cacd0e 100644 --- a/sys-kernel/gentoo-sources/ChangeLog +++ b/sys-kernel/gentoo-sources/ChangeLog @@ -1,16 +1,27 @@ # ChangeLog for sys-kernel/gentoo-sources # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/ChangeLog,v 1.49 2003/12/21 06:45:59 iggy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/ChangeLog,v 1.50 2004/01/06 15:17:52 plasmaroo Exp $ + +*gentoo-sources-2.4.20-r10 (06 Jan 2004) + + 06 Jan 2004; <plasmaroo@gentoo.org> gentoo-sources-2.4.20-r10.ebuild, + gentoo-sources-2.4.22-r2.ebuild, gentoo-sources-2.4.22.ebuild, + files/gentoo-sources-2.4.20-hpt372.patch, + files/gentoo-sources-2.4.20-rtc_fix.patch, + files/gentoo-sources-2.4.22-rtc_fix.patch, + files/gentoo-sources-2.4.CAN-2003-0985.patch: + Version bump - addresses the security vulnerabilities in bugs #37292 and + #37317. 2.4.20-r10 also includes the patch for HPT372/HPT374 controllers + from bug #20986. 21 Dec 2003; Brian Jackson <iggy@gentoo.org> - gentoo-sources-2.4.22-r2.ebuild: - oh yeah, also bumped to stable + gentoo-sources-2.4.22-r2.ebuild: Bumped to stable. *gentoo-sources-2.4.22-r2 (21 Dec 2003) 21 Dec 2003; Brian Jackson <iggy@gentoo.org> gentoo-sources-2.4.22-r2.ebuild: - new version, fixes bug 35045, acpi update, updated forcedeth, etc. + New version, fixes bug #35045, ACPI update, updated forcedeth, etc. 05 Dec 2003; <plasmaroo@gentoo.org> gentoo-sources-2.4.22-r1.ebuild, files/gentoo-sources-2.4.22-kmsgdump.patch: diff --git a/sys-kernel/gentoo-sources/Manifest b/sys-kernel/gentoo-sources/Manifest index 1615c998cc09..b27477c15a66 100644 --- a/sys-kernel/gentoo-sources/Manifest +++ b/sys-kernel/gentoo-sources/Manifest @@ -1,37 +1,43 @@ -MD5 3bfdc614f72eebc20ba4c92712ff1b84 gentoo-sources-2.4.19-r10.ebuild 2361 -MD5 48d4543d5b1affb9395a7ab655b72655 gentoo-sources-2.4.20-r9.ebuild 5593 -MD5 1af785c8a3f44b880753f316bb4970f3 gentoo-sources-2.4.22.ebuild 1911 -MD5 7288efba37e71ffde0785010a2d2433f gentoo-sources-2.4.20-r6.ebuild 4955 -MD5 5ce2f30116519eae40d9f3ae9613eda8 gentoo-sources-2.4.22-r2.ebuild 1887 -MD5 32c2163cad1c7253c80be7b369602b92 gentoo-sources-2.4.20-r8.ebuild 5557 -MD5 688100a8740a8219b8cb91cb4b235abb gentoo-sources-2.4.20-r5.ebuild 4802 -MD5 51d342166d91ae444e1a22c0319bb5ae gentoo-sources-2.4.22-r1.ebuild 1944 -MD5 9288ea119de8cd1db719f60051394526 ChangeLog 12798 +MD5 075ceb98401a3c96e2ed330019ab84f7 ChangeLog 13321 +MD5 7ab7f149680cce6b30ff17af69734b68 gentoo-sources-2.4.22.ebuild 1916 +MD5 abc9def4a3706816d4266d238a6140fa gentoo-sources-2.4.20-r10.ebuild 5849 +MD5 af9b58d2bed47ce662b476c293b05cef gentoo-sources-2.4.22-r1.ebuild 1944 MD5 9eaf2835f8242a58af89b897f1ee9438 metadata.xml 350 -MD5 e762158a2758ae895aa519f6d3ccda00 gentoo-sources-2.4.20-r7.ebuild 5377 -MD5 2ac4fd77e067652901ccf234c9687bb1 files/i810_drm.patch 1247 -MD5 2be721ee04aa311a89ddfe1f3eab2cc0 files/digest-gentoo-sources-2.4.22 149 +MD5 d0e88bf43d91974ea00e11e1735e6a20 gentoo-sources-2.4.22-r2.ebuild 2081 +MD5 fd1cc2562183c95cdfe250ebfdce6baa gentoo-sources-2.4.20-r8.ebuild 5562 +MD5 8c84f431821d6416e8aa2232c50de31c gentoo-sources-2.4.19-r10.ebuild 2361 +MD5 397a339a869f3af170b1faeaf0c25bcb gentoo-sources-2.4.20-r7.ebuild 5383 +MD5 507076d3bfb081951a2b1e562566ee11 gentoo-sources-2.4.20-r5.ebuild 4807 +MD5 95665f15aceacbc10aabf126564683b2 gentoo-sources-2.4.20-r6.ebuild 4960 +MD5 1423fdf92a29fa0b57bb29fff3de712d gentoo-sources-2.4.20-r9.ebuild 5598 +MD5 6450fd1b19f30aa33866e5e467c0d828 files/gentoo-sources-2.4.20-cs46xx-gcc33.patch 374 +MD5 b40c150e8529876064e1ec409a47984e files/security.patch4 783 +MD5 e06e41c29580142ad40709e369084b22 files/digest-gentoo-sources-2.4.22-r2 147 +MD5 d641cd49ae63ca2989672d2209691bb5 files/gentoo-sources-2.4.CAN-2003-0985.patch 414 MD5 9601c35f96d297ed0d13753875fb3068 files/gentoo-sources-2.4.20-gcc33.patch 13455 -MD5 1326d31d343f60512dfb1376bfe134a2 files/gentoo-sources-2.4.20-sched-interrupt.patch 400 +MD5 2be721ee04aa311a89ddfe1f3eab2cc0 files/digest-gentoo-sources-2.4.22 149 +MD5 3d5e2a43da16dfc6f02d249ab4d03eb7 files/digest-gentoo-sources-2.4.22-r1 147 +MD5 7b306c2be9db38aeb8e0dbfea6dea17a files/gentoo-sources-2.4.20-hpt372.patch 31675 +MD5 849223b7d8e6c9c2a22f84b571aa516c files/digest-gentoo-sources-2.4.20-r9 145 MD5 9f412f3083cdd87db058dd2f5fbcd103 files/gentoo-sources-2.4.20-ipt-realm.patch 1028 MD5 d96fe98630a0a160723a67e4ca93dcff files/gentoo-sources-2.4.20-grsec-datasize_fix.patch 1421 -MD5 394bae02a20af95fc9d320f6cea3834e files/gentoo-sources-2.4.22-kmsgdump.patch 887 -MD5 02b1f745c441693b1558b2b6d3f28c45 files/gentoo-sources-2.4.20-mdcount.patch 1345 -MD5 cbd2a33f15a8d2e7ab700a0b45fac377 files/gentoo-sources-2.4.20-grsec-disabled.patch 562 -MD5 3bf2f78421fe7eb5babc154d4ad4dbbd files/security.patch1 14328 +MD5 849223b7d8e6c9c2a22f84b571aa516c files/digest-gentoo-sources-2.4.20-r6 145 MD5 f308aef282ea75ea55d5c6035dafa100 files/security.patch2 4014 -MD5 0d1cdff97252338dc5acc37c5f84d7c6 files/security.patch3 3333 -MD5 b40c150e8529876064e1ec409a47984e files/security.patch4 783 +MD5 1326d31d343f60512dfb1376bfe134a2 files/gentoo-sources-2.4.20-sched-interrupt.patch 400 +MD5 a61e57d5483a06f20da339d91f98fbb8 files/gentoo-sources-2.4.20-rtc_fix.patch 6769 MD5 6bd1b3d66aca4f2ae0cfd964caa28cc9 files/gentoo-sources-2.4.20-devfs-snd-fix.patch 1973 -MD5 857ff623313f874e811763a2db96e831 files/lcall-DoS.patch 885 -MD5 a580e6b8c602c2e13fb5de7cc2de65a0 files/do_brk_fix.patch 242 -MD5 8c31359a134b927f7038539e7dd896d4 files/digest-gentoo-sources-2.4.19-r10 146 -MD5 849223b7d8e6c9c2a22f84b571aa516c files/digest-gentoo-sources-2.4.20-r5 145 -MD5 849223b7d8e6c9c2a22f84b571aa516c files/digest-gentoo-sources-2.4.20-r6 145 MD5 849223b7d8e6c9c2a22f84b571aa516c files/digest-gentoo-sources-2.4.20-r7 145 -MD5 849223b7d8e6c9c2a22f84b571aa516c files/digest-gentoo-sources-2.4.20-r8 145 -MD5 849223b7d8e6c9c2a22f84b571aa516c files/digest-gentoo-sources-2.4.20-r9 145 -MD5 3d5e2a43da16dfc6f02d249ab4d03eb7 files/digest-gentoo-sources-2.4.22-r1 147 -MD5 e06e41c29580142ad40709e369084b22 files/digest-gentoo-sources-2.4.22-r2 147 -MD5 6450fd1b19f30aa33866e5e467c0d828 files/gentoo-sources-2.4.20-cs46xx-gcc33.patch 374 +MD5 e2e2b545b6fcdcecf49e33798efa5b84 files/gentoo-sources-2.4.22-rtc_fix.patch 7073 +MD5 849223b7d8e6c9c2a22f84b571aa516c files/digest-gentoo-sources-2.4.20-r10 145 +MD5 3bf2f78421fe7eb5babc154d4ad4dbbd files/security.patch1 14328 +MD5 857ff623313f874e811763a2db96e831 files/lcall-DoS.patch 885 MD5 012e8ba5d18dbb8d508ac4955e143e3a files/gentoo-sources-2.4.20-ipt-route.patch 13307 +MD5 cbd2a33f15a8d2e7ab700a0b45fac377 files/gentoo-sources-2.4.20-grsec-disabled.patch 562 +MD5 849223b7d8e6c9c2a22f84b571aa516c files/digest-gentoo-sources-2.4.20-r8 145 +MD5 849223b7d8e6c9c2a22f84b571aa516c files/digest-gentoo-sources-2.4.20-r5 145 +MD5 2ac4fd77e067652901ccf234c9687bb1 files/i810_drm.patch 1247 +MD5 0d1cdff97252338dc5acc37c5f84d7c6 files/security.patch3 3333 +MD5 394bae02a20af95fc9d320f6cea3834e files/gentoo-sources-2.4.22-kmsgdump.patch 887 +MD5 8c31359a134b927f7038539e7dd896d4 files/digest-gentoo-sources-2.4.19-r10 146 +MD5 a580e6b8c602c2e13fb5de7cc2de65a0 files/do_brk_fix.patch 242 +MD5 02b1f745c441693b1558b2b6d3f28c45 files/gentoo-sources-2.4.20-mdcount.patch 1345 diff --git a/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.20-r10 b/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.20-r10 new file mode 100644 index 000000000000..ba471a1c8d80 --- /dev/null +++ b/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.20-r10 @@ -0,0 +1,2 @@ +MD5 c439d5c93d7fc9a1480a90842465bb97 linux-2.4.20.tar.bz2 27421046 +MD5 197e927b5fc04c754b039998895b3039 patches-2.4.20-gentoo-r5.tar.bz2 4134962 diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-hpt372.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-hpt372.patch new file mode 100644 index 000000000000..9eb8440bfa1e --- /dev/null +++ b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-hpt372.patch @@ -0,0 +1,1026 @@ +--- linux-2.4.20-gentoo-r5/drivers/ide/ide-pci.c.original 2003-05-13 18:29:31.000000000 -0400 ++++ linux-2.4.20-gentoo-r5/drivers/ide/ide-pci.c 2003-05-14 00:14:36.000000000 -0400 +@@ -79,6 +79,8 @@ + #define DEVID_UM8886BF ((ide_pci_devid_t){PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF}) + #define DEVID_HPT34X ((ide_pci_devid_t){PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT343}) + #define DEVID_HPT366 ((ide_pci_devid_t){PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366}) ++#define DEVID_HPT372 ((ide_pci_devid_t){PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT372}) ++#define DEVID_HPT374 ((ide_pci_devid_t){PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT374}) + #define DEVID_ALI15X3 ((ide_pci_devid_t){PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229}) + #define DEVID_CY82C693 ((ide_pci_devid_t){PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693}) + #define DEVID_HINT ((ide_pci_devid_t){0x3388, 0x8013}) +@@ -452,6 +454,8 @@ + {DEVID_UM8886BF,"UM8886BF", NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }, + {DEVID_HPT34X, "HPT34X", PCI_HPT34X, NULL, INIT_HPT34X, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, NEVER_BOARD, 16 }, + {DEVID_HPT366, "HPT366", PCI_HPT366, ATA66_HPT366, INIT_HPT366, DMA_HPT366, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 240 }, ++ {DEVID_HPT372, "HPT372", PCI_HPT366, ATA66_HPT366, INIT_HPT366, DMA_HPT366, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 240 }, ++ {DEVID_HPT374, "HPT374", PCI_HPT366, ATA66_HPT366, INIT_HPT366, DMA_HPT366, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 240 }, + {DEVID_ALI15X3, "ALI15X3", PCI_ALI15X3, ATA66_ALI15X3, INIT_ALI15X3, DMA_ALI15X3, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }, + {DEVID_CY82C693,"CY82C693", PCI_CY82C693, NULL, INIT_CY82C693, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }, + {DEVID_HINT, "HINT_IDE", NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }, +@@ -478,6 +482,7 @@ + { + switch(dev->device) { + case PCI_DEVICE_ID_TTI_HPT366: ++ case PCI_DEVICE_ID_TTI_HPT374: + case PCI_DEVICE_ID_PROMISE_20246: + case PCI_DEVICE_ID_PROMISE_20262: + case PCI_DEVICE_ID_PROMISE_20265: +@@ -828,6 +833,7 @@ + IDE_PCI_DEVID_EQ(d->devid, DEVID_AEC6260R) || + IDE_PCI_DEVID_EQ(d->devid, DEVID_HPT34X) || + IDE_PCI_DEVID_EQ(d->devid, DEVID_HPT366) || ++ IDE_PCI_DEVID_EQ(d->devid, DEVID_HPT374) || + IDE_PCI_DEVID_EQ(d->devid, DEVID_CS5530) || + IDE_PCI_DEVID_EQ(d->devid, DEVID_CY82C693) || + IDE_PCI_DEVID_EQ(d->devid, DEVID_CMD646) || +@@ -910,6 +916,44 @@ + ide_setup_pci_device(dev2, d2); + } + ++static void __init hpt374_device_order_fixup (struct pci_dev *dev, ide_pci_device_t *d) ++{ ++ struct pci_dev *dev2 = NULL, *findev; ++ ide_pci_device_t *d2; ++ ++ if (PCI_FUNC(dev->devfn) & 1) ++ return; ++ ++ pci_for_each_dev(findev) { ++ if ((findev->vendor == dev->vendor) && ++ (findev->device == dev->device) && ++ ((findev->devfn - dev->devfn) == 1) && ++ (PCI_FUNC(findev->devfn) & 1)) { ++ dev2 = findev; ++ break; ++ } ++ } ++ ++ printk("%s: IDE controller on PCI bus %02x dev %02x\n", d->name, dev->bus->number, dev->devfn); ++ ide_setup_pci_device(dev, d); ++ if (!dev2) { ++ return; ++ } else { ++ byte irq = 0, irq2 = 0; ++ pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); ++ pci_read_config_byte(dev2, PCI_INTERRUPT_LINE, &irq2); ++ if (irq != irq2) { ++ pci_write_config_byte(dev2, PCI_INTERRUPT_LINE, irq); ++ dev2->irq = dev->irq; ++ printk("%s: pci-config space interrupt fixed.\n", d->name); ++ } ++ } ++ d2 = d; ++ printk("%s: IDE controller on PCI bus %02x dev %02x\n", d2->name, dev2->bus->number, dev2->devfn); ++ ide_setup_pci_device(dev2, d2); ++ ++} ++ + static void __init hpt366_device_order_fixup (struct pci_dev *dev, ide_pci_device_t *d) + { + struct pci_dev *dev2 = NULL, *findev; +@@ -992,6 +1036,8 @@ + return; /* UM8886A/BF pair */ + else if (IDE_PCI_DEVID_EQ(d->devid, DEVID_HPT366)) + hpt366_device_order_fixup(dev, d); ++ else if (IDE_PCI_DEVID_EQ(d->devid, DEVID_HPT374)) ++ hpt374_device_order_fixup(dev, d); + else if (IDE_PCI_DEVID_EQ(d->devid, DEVID_PDC20270)) + pdc20270_device_order_fixup(dev, d); + else if (!IDE_PCI_DEVID_EQ(d->devid, IDE_PCI_DEVID_NULL) || (dev->class >> 8) == PCI_CLASS_STORAGE_IDE) { +--- linux-2.4.20-gentoo-r5/drivers/ide/hpt366.c.original 2003-05-13 18:29:31.000000000 -0400 ++++ linux-2.4.20-gentoo-r5/drivers/ide/hpt366.c 2003-03-22 14:30:06.000000000 -0500 +@@ -67,8 +67,8 @@ + + /* various tuning parameters */ + #define HPT_RESET_STATE_ENGINE +-/*#define HPT_DELAY_INTERRUPT*/ +-/*#define HPT_SERIALIZE_IO*/ ++#undef HPT_DELAY_INTERRUPT ++#undef HPT_SERIALIZE_IO + + #if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) + #include <linux/stat.h> +@@ -166,8 +166,7 @@ + * PIO. + * 31 FIFO enable. + */ +-struct chipset_bus_clock_list_entry forty_base [] = { +- ++struct chipset_bus_clock_list_entry forty_base_hpt366[] = { + { XFER_UDMA_4, 0x900fd943 }, + { XFER_UDMA_3, 0x900ad943 }, + { XFER_UDMA_2, 0x900bd943 }, +@@ -186,7 +185,7 @@ + { 0, 0x0120d9d9 } + }; + +-struct chipset_bus_clock_list_entry thirty_three_base [] = { ++struct chipset_bus_clock_list_entry thirty_three_base_hpt366[] = { + + { XFER_UDMA_4, 0x90c9a731 }, + { XFER_UDMA_3, 0x90cfa731 }, +@@ -206,8 +205,7 @@ + { 0, 0x0120a7a7 } + }; + +-struct chipset_bus_clock_list_entry twenty_five_base [] = { +- ++struct chipset_bus_clock_list_entry twenty_five_base_hpt366[] = { + { XFER_UDMA_4, 0x90c98521 }, + { XFER_UDMA_3, 0x90cf8521 }, + { XFER_UDMA_2, 0x90cf8521 }, +@@ -226,7 +224,6 @@ + { 0, 0x01208585 } + }; + +-#if 1 + /* these are the current (4 sep 2001) timings from highpoint */ + struct chipset_bus_clock_list_entry thirty_three_base_hpt370[] = { + { XFER_UDMA_5, 0x12446231 }, +@@ -268,9 +265,9 @@ + { XFER_PIO_0, 0x0d02bf5f }, + { 0, 0x0d02bf5f } + }; +-#else ++ + /* from highpoint documentation. these are old values */ +-struct chipset_bus_clock_list_entry thirty_three_base_hpt370[] = { ++struct chipset_bus_clock_list_entry thirty_three_base_old_hpt370[] = { + { XFER_UDMA_5, 0x16454e31 }, + { XFER_UDMA_4, 0x16454e31 }, + { XFER_UDMA_3, 0x166d4e31 }, +@@ -290,7 +287,7 @@ + { 0, 0x06514e57 } + }; + +-struct chipset_bus_clock_list_entry sixty_six_base_hpt370[] = { ++struct chipset_bus_clock_list_entry sixty_six_base_old_hpt370[] = { + { XFER_UDMA_5, 0x14846231 }, + { XFER_UDMA_4, 0x14886231 }, + { XFER_UDMA_3, 0x148c6231 }, +@@ -309,7 +306,6 @@ + { XFER_PIO_0, 0x06914e57 }, + { 0, 0x06514e57 } + }; +-#endif + + struct chipset_bus_clock_list_entry fifty_base_hpt370[] = { + { XFER_UDMA_5, 0x12848242 }, +@@ -331,6 +327,144 @@ + { 0, 0x0ac1f48a } + }; + ++struct chipset_bus_clock_list_entry thirty_three_base_hpt372[] = { ++ { XFER_UDMA_6, 0x1c81dc62 }, ++ { XFER_UDMA_5, 0x1c6ddc62 }, ++ { XFER_UDMA_4, 0x1c8ddc62 }, ++ { XFER_UDMA_3, 0x1c8edc62 }, /* checkme */ ++ { XFER_UDMA_2, 0x1c91dc62 }, ++ { XFER_UDMA_1, 0x1c9adc62 }, /* checkme */ ++ { XFER_UDMA_0, 0x1c82dc62 }, /* checkme */ ++ ++ { XFER_MW_DMA_2, 0x2c829262 }, ++ { XFER_MW_DMA_1, 0x2c829266 }, /* checkme */ ++ { XFER_MW_DMA_0, 0x2c82922e }, /* checkme */ ++ ++ { XFER_PIO_4, 0x0c829c62 }, ++ { XFER_PIO_3, 0x0c829c84 }, ++ { XFER_PIO_2, 0x0c829ca6 }, ++ { XFER_PIO_1, 0x0d029d26 }, ++ { XFER_PIO_0, 0x0d029d5e }, ++ { 0, 0x0d029d5e } ++}; ++ ++struct chipset_bus_clock_list_entry fifty_base_hpt372[] = { ++ { XFER_UDMA_5, 0x12848242 }, ++ { XFER_UDMA_4, 0x12ac8242 }, ++ { XFER_UDMA_3, 0x128c8242 }, ++ { XFER_UDMA_2, 0x120c8242 }, ++ { XFER_UDMA_1, 0x12148254 }, ++ { XFER_UDMA_0, 0x121882ea }, ++ ++ { XFER_MW_DMA_2, 0x22808242 }, ++ { XFER_MW_DMA_1, 0x22808254 }, ++ { XFER_MW_DMA_0, 0x228082ea }, ++ ++ { XFER_PIO_4, 0x0a81f442 }, ++ { XFER_PIO_3, 0x0a81f443 }, ++ { XFER_PIO_2, 0x0a81f454 }, ++ { XFER_PIO_1, 0x0ac1f465 }, ++ { XFER_PIO_0, 0x0ac1f48a }, ++ { 0, 0x0a81f443 } ++}; ++ ++struct chipset_bus_clock_list_entry sixty_six_base_hpt372[] = { ++ { XFER_UDMA_6, 0x1c869c62 }, ++ { XFER_UDMA_5, 0x1cae9c62 }, ++ { XFER_UDMA_4, 0x1c8a9c62 }, ++ { XFER_UDMA_3, 0x1c8e9c62 }, ++ { XFER_UDMA_2, 0x1c929c62 }, ++ { XFER_UDMA_1, 0x1c9a9c62 }, ++ { XFER_UDMA_0, 0x1c829c62 }, ++ ++ { XFER_MW_DMA_2, 0x2c829c62 }, ++ { XFER_MW_DMA_1, 0x2c829c66 }, ++ { XFER_MW_DMA_0, 0x2c829d2e }, ++ ++ { XFER_PIO_4, 0x0c829c62 }, ++ { XFER_PIO_3, 0x0c829c84 }, ++ { XFER_PIO_2, 0x0c829ca6 }, ++ { XFER_PIO_1, 0x0d029d26 }, ++ { XFER_PIO_0, 0x0d029d5e }, ++ { 0, 0x0d029d26 } ++}; ++ ++struct chipset_bus_clock_list_entry thirty_three_base_hpt374[] = { ++ { XFER_UDMA_6, 0x12808242 }, ++ { XFER_UDMA_5, 0x12848242 }, ++ { XFER_UDMA_4, 0x12ac8242 }, ++ { XFER_UDMA_3, 0x128c8242 }, ++ { XFER_UDMA_2, 0x120c8242 }, ++ { XFER_UDMA_1, 0x12148254 }, ++ { XFER_UDMA_0, 0x121882ea }, ++ ++ { XFER_MW_DMA_2, 0x22808242 }, ++ { XFER_MW_DMA_1, 0x22808254 }, ++ { XFER_MW_DMA_0, 0x228082ea }, ++ ++ { XFER_PIO_4, 0x0a81f442 }, ++ { XFER_PIO_3, 0x0a81f443 }, ++ { XFER_PIO_2, 0x0a81f454 }, ++ { XFER_PIO_1, 0x0ac1f465 }, ++ { XFER_PIO_0, 0x0ac1f48a }, ++ { 0, 0x06814e93 } ++}; ++ ++#if 0 ++struct chipset_bus_clock_list_entry fifty_base_hpt374[] = { ++ { XFER_UDMA_6, }, ++ { XFER_UDMA_5, }, ++ { XFER_UDMA_4, }, ++ { XFER_UDMA_3, }, ++ { XFER_UDMA_2, }, ++ { XFER_UDMA_1, }, ++ { XFER_UDMA_0, }, ++ { XFER_MW_DMA_2, }, ++ { XFER_MW_DMA_1, }, ++ { XFER_MW_DMA_0, }, ++ { XFER_PIO_4, }, ++ { XFER_PIO_3, }, ++ { XFER_PIO_2, }, ++ { XFER_PIO_1, }, ++ { XFER_PIO_0, }, ++ { 0, } ++}; ++#endif ++#if 0 ++struct chipset_bus_clock_list_entry sixty_six_base_hpt374[] = { ++ { XFER_UDMA_6, 0x12406231 }, /* checkme */ ++ { XFER_UDMA_5, 0x12446231 }, ++ 0x14846231 ++ { XFER_UDMA_4, 0x16814ea7 }, ++ 0x14886231 ++ { XFER_UDMA_3, 0x16814ea7 }, ++ 0x148c6231 ++ { XFER_UDMA_2, 0x16814ea7 }, ++ 0x148c6231 ++ { XFER_UDMA_1, 0x16814ea7 }, ++ 0x14906231 ++ { XFER_UDMA_0, 0x16814ea7 }, ++ 0x14986231 ++ { XFER_MW_DMA_2, 0x16814ea7 }, ++ 0x26514e21 ++ { XFER_MW_DMA_1, 0x16814ea7 }, ++ 0x26514e97 ++ { XFER_MW_DMA_0, 0x16814ea7 }, ++ 0x26514e97 ++ { XFER_PIO_4, 0x06814ea7 }, ++ 0x06514e21 ++ { XFER_PIO_3, 0x06814ea7 }, ++ 0x06514e22 ++ { XFER_PIO_2, 0x06814ea7 }, ++ 0x06514e33 ++ { XFER_PIO_1, 0x06814ea7 }, ++ 0x06914e43 ++ { XFER_PIO_0, 0x06814ea7 }, ++ 0x06914e57 ++ { 0, 0x06814ea7 } ++}; ++#endif ++ + #define HPT366_DEBUG_DRIVE_INFO 0 + #define HPT370_ALLOW_ATA100_5 1 + #define HPT366_ALLOW_ATA66_4 1 +@@ -345,8 +479,11 @@ + static struct pci_dev *hpt_devs[HPT366_MAX_DEVS]; + static int n_hpt_devs; + +-static unsigned int pci_rev_check_hpt3xx(struct pci_dev *dev); + static unsigned int pci_rev2_check_hpt3xx(struct pci_dev *dev); ++static unsigned int pci_rev3_check_hpt3xx(struct pci_dev *dev); ++static unsigned int pci_rev5_check_hpt3xx(struct pci_dev *dev); ++static unsigned int pci_rev7_check_hpt3xx(struct pci_dev *dev); ++ + byte hpt366_proc = 0; + byte hpt363_shared_irq; + byte hpt363_shared_pin; +@@ -360,11 +497,13 @@ + static int hpt366_get_info (char *buffer, char **addr, off_t offset, int count) + { + char *p = buffer; +- char *chipset_nums[] = {"366", "366", "368", "370", "370A"}; ++ char *chipset_nums[] = {"366", "366", "368", ++ "370", "370A", "372", ++ "??", "374" }; + int i; + + p += sprintf(p, "\n " +- "HighPoint HPT366/368/370\n"); ++ "HighPoint HPT366/368/370/372/374\n"); + for (i = 0; i < n_hpt_devs; i++) { + struct pci_dev *dev = hpt_devs[i]; + unsigned long iobase = dev->resource[4].start; +@@ -373,9 +512,14 @@ + + pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); + class_rev &= 0xff; ++ ++ if(class_rev >= sizeof(chipset_nums)/sizeof(char *)) + + p += sprintf(p, "\nController: %d\n", i); +- p += sprintf(p, "Chipset: HPT%s\n", chipset_nums[class_rev]); ++ if(class_rev >= sizeof(chipset_nums)/sizeof(char *)) ++ p += sprintf(p, "Chipset: UNKNOWN\n"); ++ else ++ p += sprintf(p, "Chipset: HPT%s\n", chipset_nums[class_rev]); + p += sprintf(p, "--------------- Primary Channel " + "--------------- Secondary Channel " + "--------------\n"); +@@ -388,7 +532,7 @@ + (c0 & 0x80) ? "no" : "yes", + (c1 & 0x80) ? "no" : "yes"); + +- if (pci_rev_check_hpt3xx(dev)) { ++ if (pci_rev3_check_hpt3xx(dev)) { + u8 cbl; + cbl = inb_p(iobase + 0x7b); + outb_p(cbl | 1, iobase + 0x7b); +@@ -437,7 +581,19 @@ + } + #endif /* defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) */ + +-static unsigned int pci_rev_check_hpt3xx (struct pci_dev *dev) ++/* ++ * fixme: it really needs to be a switch. ++ */ ++ ++static unsigned int pci_rev2_check_hpt3xx (struct pci_dev *dev) ++{ ++ unsigned int class_rev; ++ pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); ++ class_rev &= 0xff; ++ return ((int) (class_rev > 0x01) ? 1 : 0); ++} ++ ++static unsigned int pci_rev3_check_hpt3xx (struct pci_dev *dev) + { + unsigned int class_rev; + pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); +@@ -445,12 +601,20 @@ + return ((int) (class_rev > 0x02) ? 1 : 0); + } + +-static unsigned int pci_rev2_check_hpt3xx (struct pci_dev *dev) ++static unsigned int pci_rev5_check_hpt3xx (struct pci_dev *dev) + { + unsigned int class_rev; + pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); + class_rev &= 0xff; +- return ((int) (class_rev > 0x01) ? 1 : 0); ++ return ((int) (class_rev > 0x04) ? 1 : 0); ++} ++ ++static unsigned int pci_rev7_check_hpt3xx (struct pci_dev *dev) ++{ ++ unsigned int class_rev; ++ pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); ++ class_rev &= 0xff; ++ return ((int) (class_rev > 0x06) ? 1 : 0); + } + + static int check_in_drive_lists (ide_drive_t *drive, const char **list) +@@ -484,54 +648,31 @@ + + static void hpt366_tune_chipset (ide_drive_t *drive, byte speed) + { +- byte regtime = (drive->select.b.unit & 0x01) ? 0x44 : 0x40; ++ struct pci_dev *dev = HWIF(drive)->pci_dev; ++ byte drive_pci = (drive->select.b.unit & 0x01) ? 0x44 : 0x40; + byte regfast = (HWIF(drive)->channel) ? 0x55 : 0x51; +- /* +- * since the channel is always 0 it does not matter. +- */ +- +- unsigned int reg1 = 0; +- unsigned int reg2 = 0; + byte drive_fast = 0; +- +- /* +- * Disable the "fast interrupt" prediction. +- */ +- pci_read_config_byte(HWIF(drive)->pci_dev, regfast, &drive_fast); ++ unsigned int list_conf = 0; ++ unsigned int drive_conf = 0; ++ unsigned int conf_mask = (speed >= XFER_MW_DMA_0) ? 0xc0000000 : 0x30070000; ++ ++ /* Disable the "fast interrupt" prediction. */ ++ pci_read_config_byte(dev, regfast, &drive_fast); + if (drive_fast & 0x02) +- pci_write_config_byte(HWIF(drive)->pci_dev, regfast, drive_fast & ~0x20); +- +- pci_read_config_dword(HWIF(drive)->pci_dev, regtime, ®1); +- /* detect bus speed by looking at control reg timing: */ +- switch((reg1 >> 8) & 7) { +- case 5: +- reg2 = pci_bus_clock_list(speed, forty_base); +- break; +- case 9: +- reg2 = pci_bus_clock_list(speed, twenty_five_base); +- break; +- default: +- case 7: +- reg2 = pci_bus_clock_list(speed, thirty_three_base); +- break; +- } +-#if 0 +- /* this is a nice idea ... */ ++ pci_write_config_byte(dev, regfast, drive_fast & ~0x20); + list_conf = pci_bus_clock_list(speed, + (struct chipset_bus_clock_list_entry *) + dev->sysdata); +-#endif +- /* +- * Disable on-chip PIO FIFO/buffer (to avoid problems handling I/O errors later) +- */ +- if (speed >= XFER_MW_DMA_0) { +- reg2 = (reg2 & ~0xc0000000) | (reg1 & 0xc0000000); +- } else { +- reg2 = (reg2 & ~0x30070000) | (reg1 & 0x30070000); +- } +- reg2 &= ~0x80000000; ++ pci_read_config_dword(dev, drive_pci, &drive_conf); ++ list_conf = (list_conf & ~conf_mask) | (drive_conf & conf_mask); ++ if (speed < XFER_MW_DMA_0) ++ list_conf &= ~0x80000000; /* Disable on-chip PIO FIFO/buffer */ ++ pci_write_config_dword(dev, drive_pci, list_conf); ++} + +- pci_write_config_dword(HWIF(drive)->pci_dev, regtime, reg2); ++static void hpt368_tune_chipset (ide_drive_t *drive, byte speed) ++{ ++ hpt366_tune_chipset(drive, speed); + } + + static void hpt370_tune_chipset (ide_drive_t *drive, byte speed) +@@ -577,6 +718,39 @@ + pci_write_config_dword(dev, drive_pci, list_conf); + } + ++static void hpt372_tune_chipset (ide_drive_t *drive, byte speed) ++{ ++ byte regfast = (HWIF(drive)->channel) ? 0x55 : 0x51; ++ unsigned int list_conf = 0; ++ unsigned int drive_conf = 0; ++ unsigned int conf_mask = (speed >= XFER_MW_DMA_0) ? 0xc0000000 : 0x30070000; ++ byte drive_pci = 0x40 + (drive->dn * 4); ++ byte drive_fast = 0; ++ struct pci_dev *dev = HWIF(drive)->pci_dev; ++ ++ /* ++ * Disable the "fast interrupt" prediction. ++ * don't holdoff on interrupts. (== 0x01 despite what the docs say) ++ */ ++ pci_read_config_byte(dev, regfast, &drive_fast); ++ drive_fast &= ~0x07; ++ pci_write_config_byte(HWIF(drive)->pci_dev, regfast, drive_fast); ++ ++ list_conf = pci_bus_clock_list(speed, ++ (struct chipset_bus_clock_list_entry *) ++ dev->sysdata); ++ pci_read_config_dword(dev, drive_pci, &drive_conf); ++ list_conf = (list_conf & ~conf_mask) | (drive_conf & conf_mask); ++ if (speed < XFER_MW_DMA_0) ++ list_conf &= ~0x80000000; /* Disable on-chip PIO FIFO/buffer */ ++ pci_write_config_dword(dev, drive_pci, list_conf); ++} ++ ++static void hpt374_tune_chipset (ide_drive_t *drive, byte speed) ++{ ++ hpt372_tune_chipset(drive, speed); ++} ++ + static int hpt3xx_tune_chipset (ide_drive_t *drive, byte speed) + { + if ((drive->media != ide_disk) && (speed < XFER_SW_DMA_0)) +@@ -585,9 +759,15 @@ + if (!drive->init_speed) + drive->init_speed = speed; + +- if (pci_rev_check_hpt3xx(HWIF(drive)->pci_dev)) { ++ if (pci_rev7_check_hpt3xx(HWIF(drive)->pci_dev)) { ++ hpt374_tune_chipset(drive, speed); ++ } else if (pci_rev5_check_hpt3xx(HWIF(drive)->pci_dev)) { ++ hpt372_tune_chipset(drive, speed); ++ } else if (pci_rev3_check_hpt3xx(HWIF(drive)->pci_dev)) { + hpt370_tune_chipset(drive, speed); +- } else { ++ } else if (pci_rev2_check_hpt3xx(HWIF(drive)->pci_dev)) { ++ hpt368_tune_chipset(drive, speed); ++ } else { + hpt366_tune_chipset(drive, speed); + } + drive->current_speed = speed; +@@ -664,13 +844,19 @@ + byte ultra66 = eighty_ninty_three(drive); + int rval; + ++ config_chipset_for_pio(drive); ++ + if ((drive->media != ide_disk) && (speed < XFER_SW_DMA_0)) + return ((int) ide_dma_off_quietly); + +- if ((id->dma_ultra & 0x0020) && ++ if ((id->dma_ultra & 0x0040) && ++ (pci_rev5_check_hpt3xx(HWIF(drive)->pci_dev)) && ++ (ultra66)) { ++ speed = XFER_UDMA_6; ++ } else if ((id->dma_ultra & 0x0020) && + (!check_in_drive_lists(drive, bad_ata100_5)) && + (HPT370_ALLOW_ATA100_5) && +- (pci_rev_check_hpt3xx(HWIF(drive)->pci_dev)) && ++ (pci_rev3_check_hpt3xx(HWIF(drive)->pci_dev)) && + (ultra66)) { + speed = XFER_UDMA_5; + } else if ((id->dma_ultra & 0x0010) && +@@ -703,7 +889,8 @@ + + (void) hpt3xx_tune_chipset(drive, speed); + +- rval = (int)( ((id->dma_ultra >> 11) & 7) ? ide_dma_on : ++ rval = (int)( ((id->dma_ultra >> 14) & 3) ? ide_dma_on : ++ ((id->dma_ultra >> 11) & 7) ? ide_dma_on : + ((id->dma_ultra >> 8) & 7) ? ide_dma_on : + ((id->dma_mword >> 8) & 7) ? ide_dma_on : + ide_dma_off_quietly); +@@ -717,17 +904,16 @@ + + void hpt3xx_intrproc (ide_drive_t *drive) + { +- if (drive->quirk_list) { +- /* drives in the quirk_list may not like intr setups/cleanups */ +- } else { +- OUT_BYTE((drive)->ctl|2, HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]); +- } ++ /* drives in the quirk_list may not like intr setups/cleanups */ ++ if (drive->quirk_list) ++ return; ++ OUT_BYTE((drive)->ctl|2, HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]); + } + + void hpt3xx_maskproc (ide_drive_t *drive, int mask) + { + if (drive->quirk_list) { +- if (pci_rev_check_hpt3xx(HWIF(drive)->pci_dev)) { ++ if (pci_rev3_check_hpt3xx(HWIF(drive)->pci_dev)) { + byte reg5a = 0; + pci_read_config_byte(HWIF(drive)->pci_dev, 0x5a, ®5a); + if (((reg5a & 0x10) >> 4) != mask) +@@ -758,7 +944,7 @@ + } + dma_func = ide_dma_off_quietly; + if (id->field_valid & 4) { +- if (id->dma_ultra & 0x002F) { ++ if (id->dma_ultra & 0x007F) { + /* Force if Capable UltraDMA */ + dma_func = config_chipset_for_dma(drive); + if ((id->field_valid & 2) && +@@ -821,8 +1007,10 @@ + reg50h, reg52h, reg5ah); + if (reg5ah & 0x10) + pci_write_config_byte(HWIF(drive)->pci_dev, 0x5a, reg5ah & ~0x10); ++#if 1 ++ /* how about we flush and reset, mmmkay? */ ++ pci_write_config_byte(HWIF(drive)->pci_dev, 0x51, 0x1F); + /* fall through to a reset */ +-#if 0 + case ide_dma_begin: + case ide_dma_end: + /* reset the chips state over and over.. */ +@@ -889,6 +1077,44 @@ + } + return ide_dmaproc(func, drive); /* use standard DMA stuff */ + } ++ ++int hpt374_dmaproc (ide_dma_action_t func, ide_drive_t *drive) ++{ ++ ide_hwif_t *hwif = HWIF(drive); ++ unsigned long dma_base = hwif->dma_base; ++ byte mscreg = hwif->channel ? 0x54 : 0x50; ++// byte reginfo = hwif->channel ? 0x56 : 0x52; ++ byte dma_stat; ++ ++ switch (func) { ++ case ide_dma_check: ++ return config_drive_xfer_rate(drive); ++ case ide_dma_test_irq: /* returns 1 if dma irq issued, 0 otherwise */ ++ dma_stat = inb(dma_base+2); ++#if 0 /* do not set unless you know what you are doing */ ++ if (dma_stat & 4) { ++ byte stat = GET_STAT(); ++ outb(dma_base+2, dma_stat & 0xE4); ++ } ++#endif ++ /* return 1 if INTR asserted */ ++ return (dma_stat & 4) == 4; ++ case ide_dma_end: ++ { ++ byte bwsr_mask = hwif->channel ? 0x02 : 0x01; ++ byte bwsr_stat, msc_stat; ++ pci_read_config_byte(hwif->pci_dev, 0x6a, &bwsr_stat); ++ pci_read_config_byte(hwif->pci_dev, mscreg, &msc_stat); ++ if ((bwsr_stat & bwsr_mask) == bwsr_mask) ++ pci_write_config_byte(hwif->pci_dev, mscreg, msc_stat|0x30); ++ } ++ default: ++ break; ++ } ++ return ide_dmaproc(func, drive); /* use standard DMA stuff */ ++} ++ ++ + #endif /* CONFIG_BLK_DEV_IDEDMA */ + + /* +@@ -1006,6 +1232,184 @@ + return 0; + } + ++static void __init init_hpt374(struct pci_dev *dev) ++{ ++ int adjust, i; ++ u16 freq; ++ u32 pll; ++ byte reg5bh; ++ ++ /* ++ * default to pci clock. make sure MA15/16 are set to output ++ * to prevent drives having problems with 40-pin cables. ++ */ ++ pci_write_config_byte(dev, 0x5b, 0x23); ++ ++ /* ++ * set up the PLL. we need to adjust it so that it's stable. ++ * freq = Tpll * 192 / Tpci ++ */ ++ pci_read_config_word(dev, 0x78, &freq); ++ freq &= 0x1FF; ++ if (freq < 0x9c) { ++ pll = F_LOW_PCI_33; ++ dev->sysdata = (void *) thirty_three_base_hpt374; ++ printk("HPT374: using 33MHz PCI clock\n"); ++ } else if (freq < 0xb0) { ++ pll = F_LOW_PCI_40; ++ } else if (freq < 0xc8) { ++ pll = F_LOW_PCI_50; ++// dev->sysdata = (void *) fifty_base_hpt374; ++ printk("HPT374: using 50MHz PCI clock\n"); ++ } else { ++ pll = F_LOW_PCI_66; ++// dev->sysdata = (void *) sixty_six_base_hpt374; ++ printk("HPT374: using 66MHz PCI clock\n"); ++ } ++ ++ /* ++ * only try the pll if we don't have a table for the clock ++ * speed that we're running at. NOTE: the internal PLL will ++ * result in slow reads when using a 33MHz PCI clock. we also ++ * don't like to use the PLL because it will cause glitches ++ * on PRST/SRST when the HPT state engine gets reset. ++ */ ++ if (dev->sysdata) ++ goto init_hpt374_done; ++ ++ /* ++ * adjust PLL based upon PCI clock, enable it, and wait for ++ * stabilization. ++ */ ++ adjust = 0; ++ freq = (pll < F_LOW_PCI_50) ? 2 : 4; ++ while (adjust++ < 6) { ++ pci_write_config_dword(dev, 0x5c, (freq + pll) << 16 | ++ pll | 0x100); ++ ++ /* wait for clock stabilization */ ++ for (i = 0; i < 0x50000; i++) { ++ pci_read_config_byte(dev, 0x5b, ®5bh); ++ if (reg5bh & 0x80) { ++ /* spin looking for the clock to destabilize */ ++ for (i = 0; i < 0x1000; ++i) { ++ pci_read_config_byte(dev, 0x5b, ++ ®5bh); ++ if ((reg5bh & 0x80) == 0) ++ goto pll_recal; ++ } ++ pci_read_config_dword(dev, 0x5c, &pll); ++ pci_write_config_dword(dev, 0x5c, ++ pll & ~0x100); ++ pci_write_config_byte(dev, 0x5b, 0x21); ++// dev->sysdata = (void *) fifty_base_hpt374; ++ printk("HPT374: using 50MHz internal PLL\n"); ++ goto init_hpt374_done; ++ } ++ } ++pll_recal: ++ if (adjust & 1) ++ pll -= (adjust >> 1); ++ else ++ pll += (adjust >> 1); ++ } ++ ++init_hpt374_done: ++ /* reset state engine */ ++ pci_write_config_byte(dev, 0x50, 0x36); ++ pci_write_config_byte(dev, 0x54, 0x36); ++ udelay(100); ++} ++ ++static void __init init_hpt372(struct pci_dev *dev) ++{ ++ int adjust, i; ++ u16 freq; ++ u32 pll; ++ byte reg5bh; ++ ++ /* ++ * default to pci clock. make sure MA15/16 are set to output ++ * to prevent drives having problems with 40-pin cables. ++ */ ++ pci_write_config_byte(dev, 0x5b, 0x23); ++ ++ /* ++ * set up the PLL. we need to adjust it so that it's stable. ++ * freq = Tpll * 192 / Tpci ++ */ ++ pci_read_config_word(dev, 0x78, &freq); ++ freq &= 0x1FF; ++ if (freq < 0x9c) { ++ pll = F_LOW_PCI_33; ++ dev->sysdata = (void *) thirty_three_base_hpt372; ++ printk("HPT372: using 33MHz PCI clock\n"); ++ } else if (freq < 0xb0) { ++ pll = F_LOW_PCI_40; ++ } else if (freq < 0xc8) { ++ pll = F_LOW_PCI_50; ++ dev->sysdata = (void *) fifty_base_hpt372; ++ printk("HPT372: using 50MHz PCI clock\n"); ++ } else { ++ pll = F_LOW_PCI_66; ++ dev->sysdata = (void *) sixty_six_base_hpt372; ++ printk("HPT372: using 66MHz PCI clock\n"); ++ } ++ ++ /* ++ * only try the pll if we don't have a table for the clock ++ * speed that we're running at. NOTE: the internal PLL will ++ * result in slow reads when using a 33MHz PCI clock. we also ++ * don't like to use the PLL because it will cause glitches ++ * on PRST/SRST when the HPT state engine gets reset. ++ */ ++ if (dev->sysdata) ++ goto init_hpt372_done; ++ ++ /* ++ * adjust PLL based upon PCI clock, enable it, and wait for ++ * stabilization. ++ */ ++ adjust = 0; ++ freq = (pll < F_LOW_PCI_50) ? 2 : 4; ++ while (adjust++ < 6) { ++ pci_write_config_dword(dev, 0x5c, (freq + pll) << 16 | ++ pll | 0x100); ++ ++ /* wait for clock stabilization */ ++ for (i = 0; i < 0x50000; i++) { ++ pci_read_config_byte(dev, 0x5b, ®5bh); ++ if (reg5bh & 0x80) { ++ /* spin looking for the clock to destabilize */ ++ for (i = 0; i < 0x1000; ++i) { ++ pci_read_config_byte(dev, 0x5b, ++ ®5bh); ++ if ((reg5bh & 0x80) == 0) ++ goto pll_recal; ++ } ++ pci_read_config_dword(dev, 0x5c, &pll); ++ pci_write_config_dword(dev, 0x5c, ++ pll & ~0x100); ++ pci_write_config_byte(dev, 0x5b, 0x21); ++ dev->sysdata = (void *) fifty_base_hpt372; ++ printk("HPT372: using 50MHz internal PLL\n"); ++ goto init_hpt372_done; ++ } ++ } ++pll_recal: ++ if (adjust & 1) ++ pll -= (adjust >> 1); ++ else ++ pll += (adjust >> 1); ++ } ++ ++init_hpt372_done: ++ /* reset state engine */ ++ pci_write_config_byte(dev, 0x50, 0x37); ++ pci_write_config_byte(dev, 0x54, 0x37); ++ udelay(100); ++} ++ + static void __init init_hpt370(struct pci_dev *dev) + { + int adjust, i; +@@ -1095,6 +1499,34 @@ + udelay(100); + } + ++static void __init init_hpt366 (struct pci_dev *dev) ++{ ++ unsigned int reg1 = 0; ++ byte drive_fast = 0; ++ ++ /* ++ * Disable the "fast interrupt" prediction. ++ */ ++ pci_read_config_byte(dev, 0x51, &drive_fast); ++ if (drive_fast & 0x02) ++ pci_write_config_byte(dev, 0x51, drive_fast & ~0x20); ++ pci_read_config_dword(dev, 0x40, ®1); ++ ++ /* detect bus speed by looking at control reg timing: */ ++ switch((reg1 >> 8) & 7) { ++ case 5: ++ dev->sysdata = (void *) forty_base_hpt366; ++ break; ++ case 9: ++ dev->sysdata = (void *) twenty_five_base_hpt366; ++ break; ++ case 7: ++ default: ++ dev->sysdata = (void *) thirty_three_base_hpt366; ++ break; ++ } ++} ++ + unsigned int __init pci_init_hpt366 (struct pci_dev *dev, const char *name) + { + byte test = 0; +@@ -1118,13 +1550,29 @@ + if (test != 0x08) + pci_write_config_byte(dev, PCI_MAX_LAT, 0x08); + +- if (pci_rev_check_hpt3xx(dev)) { +- init_hpt370(dev); +- hpt_devs[n_hpt_devs++] = dev; +- } else { +- hpt_devs[n_hpt_devs++] = dev; ++ if(n_hpt_devs < HPT366_MAX_DEVS) ++ { ++ if (pci_rev7_check_hpt3xx(dev)) { ++ init_hpt374(dev); ++ hpt_devs[n_hpt_devs++] = dev; ++ } else if (pci_rev5_check_hpt3xx(dev)) { ++ init_hpt372(dev); ++ hpt_devs[n_hpt_devs++] = dev; ++ } else if (pci_rev3_check_hpt3xx(dev)) { ++ init_hpt370(dev); ++ hpt_devs[n_hpt_devs++] = dev; ++ } else { ++ if (dev->device == PCI_DEVICE_ID_TTI_HPT372) { ++ init_hpt372(dev); ++ hpt_devs[n_hpt_devs++] = dev; ++ } else { ++ init_hpt366(dev); ++ hpt_devs[n_hpt_devs++] = dev; ++ } ++ } + } +- ++ else printk(KERN_ERR "hpt366: Too many highpoint controllers.\n"); ++ + #if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) + if (!hpt366_proc) { + hpt366_proc = 1; +@@ -1151,8 +1599,6 @@ + + void __init ide_init_hpt366 (ide_hwif_t *hwif) + { +- int hpt_rev; +- + hwif->tuneproc = &hpt3xx_tune_drive; + hwif->speedproc = &hpt3xx_tune_chipset; + hwif->quirkproc = &hpt3xx_quirkproc; +@@ -1165,47 +1611,61 @@ + hwif->serialized = hwif->mate->serialized = 1; + #endif + +- hpt_rev = pci_rev_check_hpt3xx(hwif->pci_dev); +- if (hpt_rev) { +- /* set up ioctl for power status. note: power affects both +- * drives on each channel */ +- hwif->busproc = &hpt370_busproc; +- } +- +- if (pci_rev2_check_hpt3xx(hwif->pci_dev)) { +- /* do nothing now but will split device types */ +- hwif->resetproc = &hpt3xx_reset; +-/* +- * don't do until we can parse out the cobalt box argh ... +- * hwif->busproc = &hpt3xx_tristate; +- */ +- } +- + #ifdef CONFIG_BLK_DEV_IDEDMA +- if (hwif->dma_base) { +- if (hpt_rev) { ++ if ((pci_rev3_check_hpt3xx(hwif->pci_dev)) || ++ (hwif->pci_dev->device == PCI_DEVICE_ID_TTI_HPT372)) { ++ if (hwif->dma_base) { + byte reg5ah = 0; + pci_read_config_byte(hwif->pci_dev, 0x5a, ®5ah); +- if (reg5ah & 0x10) /* interrupt force enable */ +- pci_write_config_byte(hwif->pci_dev, 0x5a, reg5ah & ~0x10); +- hwif->dmaproc = &hpt370_dmaproc; +- } else { +- hwif->dmaproc = &hpt366_dmaproc; ++ reg5ah &= ~0x10; ++ pci_write_config_byte(hwif->pci_dev, 0x5a, reg5ah); + } +- if (!noautodma) +- hwif->autodma = 1; +- else +- hwif->autodma = 0; ++ } ++#endif /* CONFIG_BLK_DEV_IDEDMA */ ++ ++ if (pci_rev7_check_hpt3xx(hwif->pci_dev)) { ++ hwif->resetproc = &hpt3xx_reset; ++ hwif->busproc = &hpt370_busproc; ++#ifdef CONFIG_BLK_DEV_IDEDMA ++ if (hwif->dma_base) ++ hwif->dmaproc = &hpt374_dmaproc; ++#endif /* CONFIG_BLK_DEV_IDEDMA */ ++ } else if (pci_rev5_check_hpt3xx(hwif->pci_dev)) { ++ hwif->resetproc = &hpt3xx_reset; ++ hwif->busproc = &hpt370_busproc; ++#ifdef CONFIG_BLK_DEV_IDEDMA ++ if (hwif->dma_base) ++ hwif->dmaproc = &hpt374_dmaproc; ++#endif /* CONFIG_BLK_DEV_IDEDMA */ ++ } else if (pci_rev3_check_hpt3xx(hwif->pci_dev)) { ++ /* ++ * set up ioctl for power status. note: power affects both ++ * drives on each channel ++ */ ++ hwif->resetproc = &hpt3xx_reset; ++ hwif->busproc = &hpt370_busproc; ++#ifdef CONFIG_BLK_DEV_IDEDMA ++ if (hwif->dma_base) ++ hwif->dmaproc = &hpt370_dmaproc; ++#endif /* CONFIG_BLK_DEV_IDEDMA */ ++ } else if (hwif->pci_dev->device == PCI_DEVICE_ID_TTI_HPT372) { ++ hwif->resetproc = &hpt3xx_reset; ++ hwif->busproc = &hpt370_busproc; ++#ifdef CONFIG_BLK_DEV_IDEDMA ++ if (hwif->dma_base) ++ hwif->dmaproc = &hpt370_dmaproc; ++#endif /* CONFIG_BLK_DEV_IDEDMA */ + } else { +- hwif->autodma = 0; +- hwif->drives[0].autotune = 1; +- hwif->drives[1].autotune = 1; +- } +-#else /* !CONFIG_BLK_DEV_IDEDMA */ +- hwif->drives[0].autotune = 1; +- hwif->drives[1].autotune = 1; +- hwif->autodma = 0; ++ /* do nothing now but will split device types */ ++ hwif->resetproc = &hpt3xx_reset; ++ hwif->busproc = &hpt3xx_tristate; ++#ifdef CONFIG_BLK_DEV_IDEDMA ++ if (hwif->dma_base) ++ hwif->dmaproc = &hpt366_dmaproc; + #endif /* CONFIG_BLK_DEV_IDEDMA */ ++ } ++ hwif->drives[0].autotune = (hwif->autodma) ? 0 : 1; ++ hwif->drives[1].autotune = (hwif->autodma) ? 0 : 1; + } + + void __init ide_dmacapable_hpt366 (ide_hwif_t *hwif, unsigned long dmabase) diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-rtc_fix.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-rtc_fix.patch new file mode 100644 index 000000000000..10e9c228d6d2 --- /dev/null +++ b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.20-rtc_fix.patch @@ -0,0 +1,156 @@ +diff -ur linux-2.4.20-wolk4.9s/arch/cris/drivers/ds1302.c linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/ds1302.c +--- linux-2.4.20-wolk4.9s/arch/cris/drivers/ds1302.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/ds1302.c 2004-01-05 23:41:44.000000000 +0000 +@@ -315,6 +315,7 @@ + { + struct rtc_time rtc_tm; + ++ memset(&rtc_tm, 0, sizeof (struct rtc_time)); + get_rtc_time(&rtc_tm); + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) + return -EFAULT; +diff -ur linux-2.4.20-wolk4.9s/arch/cris/drivers/pcf8563.c linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/pcf8563.c +--- linux-2.4.20-wolk4.9s/arch/cris/drivers/pcf8563.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/cris/drivers/pcf8563.c 2004-01-05 23:42:22.000000000 +0000 +@@ -174,6 +174,7 @@ + { + struct rtc_time tm; + ++ memset(&tm, 0, sizeof (struct rtc_time)); + get_rtc_time(&tm); + + if (copy_to_user((struct rtc_time *) arg, &tm, sizeof(struct rtc_time))) { +diff -ur linux-2.4.20-wolk4.9s/arch/m68k/bvme6000/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/bvme6000/rtc.c +--- linux-2.4.20-wolk4.9s/arch/m68k/bvme6000/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/bvme6000/rtc.c 2004-01-05 23:43:15.000000000 +0000 +@@ -54,6 +54,7 @@ + /* Ensure clock and real-time-mode-register are accessible */ + msr = rtc->msr & 0xc0; + rtc->msr = 0x40; ++ memset(&wtime, 0, sizeof (struct rtc_time)); + do { + wtime.tm_sec = BCD2BIN(rtc->bcd_sec); + wtime.tm_min = BCD2BIN(rtc->bcd_min); +diff -ur linux-2.4.20-wolk4.9s/arch/m68k/mvme16x/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/mvme16x/rtc.c +--- linux-2.4.20-wolk4.9s/arch/m68k/mvme16x/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/m68k/mvme16x/rtc.c 2004-01-05 23:44:02.000000000 +0000 +@@ -52,6 +52,7 @@ + cli(); + /* Ensure clock and real-time-mode-register are accessible */ + rtc->ctrl = RTC_READ; ++ memset(&wtime, 0, sizeof (struct rtc_time)); + wtime.tm_sec = BCD2BIN(rtc->bcd_sec); + wtime.tm_min = BCD2BIN(rtc->bcd_min); + wtime.tm_hour = BCD2BIN(rtc->bcd_hr); +diff -ur linux-2.4.20-wolk4.9s/arch/mips/sgi-ip27/ip27-rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/mips/sgi-ip27/ip27-rtc.c +--- linux-2.4.20-wolk4.9s/arch/mips/sgi-ip27/ip27-rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/mips/sgi-ip27/ip27-rtc.c 2004-01-05 23:48:34.000000000 +0000 +@@ -84,6 +84,7 @@ + switch (cmd) { + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_time(&wtime); + break; + } +diff -ur linux-2.4.20-wolk4.9s/arch/ppc64/kernel/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/arch/ppc64/kernel/rtc.c +--- linux-2.4.20-wolk4.9s/arch/ppc64/kernel/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/arch/ppc64/kernel/rtc.c 2004-01-05 23:44:34.000000000 +0000 +@@ -96,6 +96,7 @@ + switch (cmd) { + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ppc_md.get_rtc_time(&wtime); + break; + } +diff -ur linux-2.4.20-wolk4.9s/drivers/char/efirtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/efirtc.c +--- linux-2.4.20-wolk4.9s/drivers/char/efirtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/efirtc.c 2004-01-05 23:47:53.000000000 +0000 +@@ -118,6 +118,7 @@ + static void + convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime) + { ++ memset(wtime, 0, sizeof(struct rtc_time)); + wtime->tm_sec = eft->second; + wtime->tm_min = eft->minute; + wtime->tm_hour = eft->hour; +diff -ur linux-2.4.20-wolk4.9s/drivers/char/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/rtc.c +--- linux-2.4.20-wolk4.9s/drivers/char/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/char/rtc.c 2004-01-05 23:52:43.000000000 +0000 +@@ -370,6 +370,7 @@ + * tm_min, and tm_sec values are filled in. + */ + ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_alm_time(&wtime); + break; + } +@@ -417,6 +418,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_time(&wtime); + break; + } +diff -ur linux-2.4.20-wolk4.9s/drivers/hil/hp_sdc_rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/hil/hp_sdc_rtc.c +--- linux-2.4.20-wolk4.9s/drivers/hil/hp_sdc_rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/hil/hp_sdc_rtc.c 2004-01-05 23:53:36.000000000 +0000 +@@ -561,6 +561,7 @@ + } + case RTC_ALM_READ: /* Read the present alarm time */ + { ++ memset(&ttime, 0, sizeof(struct timeval)); + if (hp_sdc_rtc_read_mt(&ttime)) return -EFAULT; + break; + } +@@ -609,6 +610,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT; + break; + } +diff -ur linux-2.4.20-wolk4.9s/drivers/macintosh/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/macintosh/rtc.c +--- linux-2.4.20-wolk4.9s/drivers/macintosh/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/macintosh/rtc.c 2004-01-05 23:54:15.000000000 +0000 +@@ -64,6 +64,7 @@ + case RTC_RD_TIME: + if (ppc_md.get_rtc_time) + { ++ memset(&rtc_tm, 0, sizeof(struct rtc_time)); + get_rtc_time(&rtc_tm); + + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) +diff -ur linux-2.4.20-wolk4.9s/drivers/sbus/char/rtc.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/sbus/char/rtc.c +--- linux-2.4.20-wolk4.9s/drivers/sbus/char/rtc.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/sbus/char/rtc.c 2004-01-05 23:54:43.000000000 +0000 +@@ -89,6 +89,7 @@ + switch (cmd) + { + case RTCGET: ++ memset(&rtc_tm, 0, sizeof(struct rtc_time)); + get_rtc_time(&rtc_tm); + + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) +diff -ur linux-2.4.20-wolk4.9s/drivers/sgi/char/ds1286.c linux-2.4.20-wolk4.9s.plasmaroo/drivers/sgi/char/ds1286.c +--- linux-2.4.20-wolk4.9s/drivers/sgi/char/ds1286.c 2004-01-05 23:33:45.000000000 +0000 ++++ linux-2.4.20-wolk4.9s.plasmaroo/drivers/sgi/char/ds1286.c 2004-01-05 23:47:25.000000000 +0000 +@@ -174,6 +174,7 @@ + * tm_min, and tm_sec values are filled in. + */ + ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ds1286_get_alm_time(&wtime); + break; + } +@@ -216,6 +217,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ds1286_get_time(&wtime); + break; + } diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-rtc_fix.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-rtc_fix.patch new file mode 100644 index 000000000000..76a663c6e89d --- /dev/null +++ b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.22-rtc_fix.patch @@ -0,0 +1,180 @@ +diff -urN linux-2.4.23/arch/cris/drivers/ds1302.c linux-2.4.24/arch/cris/drivers/ds1302.c +--- linux-2.4.23/arch/cris/drivers/ds1302.c 2003-08-25 04:44:39.000000000 -0700 ++++ linux-2.4.24/arch/cris/drivers/ds1302.c 2004-01-05 05:53:56.000000000 -0800 +@@ -346,6 +346,7 @@ + { + struct rtc_time rtc_tm; + ++ memset(&rtc_tm, 0, sizeof (struct rtc_time)); + get_rtc_time(&rtc_tm); + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) + return -EFAULT; +diff -urN linux-2.4.23/arch/cris/drivers/pcf8563.c linux-2.4.24/arch/cris/drivers/pcf8563.c +--- linux-2.4.23/arch/cris/drivers/pcf8563.c 2003-08-25 04:44:39.000000000 -0700 ++++ linux-2.4.24/arch/cris/drivers/pcf8563.c 2004-01-05 05:53:56.000000000 -0800 +@@ -220,6 +220,7 @@ + { + struct rtc_time tm; + ++ memset(&tm, 0, sizeof (struct rtc_time)); + get_rtc_time(&tm); + + if (copy_to_user((struct rtc_time *) arg, &tm, sizeof tm)) { +diff -urN linux-2.4.23/arch/m68k/bvme6000/rtc.c linux-2.4.24/arch/m68k/bvme6000/rtc.c +--- linux-2.4.23/arch/m68k/bvme6000/rtc.c 2003-06-13 07:51:31.000000000 -0700 ++++ linux-2.4.24/arch/m68k/bvme6000/rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -54,6 +54,7 @@ + /* Ensure clock and real-time-mode-register are accessible */ + msr = rtc->msr & 0xc0; + rtc->msr = 0x40; ++ memset(&wtime, 0, sizeof(struct rtc_time)); + do { + wtime.tm_sec = BCD2BIN(rtc->bcd_sec); + wtime.tm_min = BCD2BIN(rtc->bcd_min); +diff -urN linux-2.4.23/arch/m68k/mvme16x/rtc.c linux-2.4.24/arch/m68k/mvme16x/rtc.c +--- linux-2.4.23/arch/m68k/mvme16x/rtc.c 2003-06-13 07:51:31.000000000 -0700 ++++ linux-2.4.24/arch/m68k/mvme16x/rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -52,6 +52,7 @@ + cli(); + /* Ensure clock and real-time-mode-register are accessible */ + rtc->ctrl = RTC_READ; ++ memset(&wtime, 0, sizeof(struct rtc_time)); + wtime.tm_sec = BCD2BIN(rtc->bcd_sec); + wtime.tm_min = BCD2BIN(rtc->bcd_min); + wtime.tm_hour = BCD2BIN(rtc->bcd_hr); +diff -urN linux-2.4.23/arch/ppc64/kernel/rtc.c linux-2.4.24/arch/ppc64/kernel/rtc.c +--- linux-2.4.23/arch/ppc64/kernel/rtc.c 2003-06-13 07:51:32.000000000 -0700 ++++ linux-2.4.24/arch/ppc64/kernel/rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -96,6 +96,7 @@ + switch (cmd) { + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ppc_md.get_rtc_time(&wtime); + break; + } +diff -urN linux-2.4.23/drivers/acorn/char/i2c.c linux-2.4.24/drivers/acorn/char/i2c.c +--- linux-2.4.23/drivers/acorn/char/i2c.c 2003-08-25 04:44:40.000000000 -0700 ++++ linux-2.4.24/drivers/acorn/char/i2c.c 2004-01-05 05:53:56.000000000 -0800 +@@ -166,6 +166,7 @@ + break; + + case RTC_RD_TIME: ++ memset(&rtctm, 0, sizeof(struct rtc_time)); + get_rtc_time(&rtc_raw, &year); + rtctm.tm_sec = rtc_raw.secs; + rtctm.tm_min = rtc_raw.mins; +diff -urN linux-2.4.23/drivers/char/ds1286.c linux-2.4.24/drivers/char/ds1286.c +--- linux-2.4.23/drivers/char/ds1286.c 2003-08-25 04:44:41.000000000 -0700 ++++ linux-2.4.24/drivers/char/ds1286.c 2004-01-05 05:53:56.000000000 -0800 +@@ -173,7 +173,7 @@ + * means "don't care" or "match all". Only the tm_hour, + * tm_min, and tm_sec values are filled in. + */ +- ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ds1286_get_alm_time(&wtime); + break; + } +@@ -216,6 +216,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + ds1286_get_time(&wtime); + break; + } +diff -urN linux-2.4.23/drivers/char/efirtc.c linux-2.4.24/drivers/char/efirtc.c +--- linux-2.4.23/drivers/char/efirtc.c 2003-06-13 07:51:32.000000000 -0700 ++++ linux-2.4.24/drivers/char/efirtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -118,6 +118,7 @@ + static void + convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime) + { ++ memset(wtime, 0, sizeof(struct rtc_time)); + wtime->tm_sec = eft->second; + wtime->tm_min = eft->minute; + wtime->tm_hour = eft->hour; +diff -urN linux-2.4.23/drivers/char/ip27-rtc.c linux-2.4.24/drivers/char/ip27-rtc.c +--- linux-2.4.23/drivers/char/ip27-rtc.c 2003-08-25 04:44:41.000000000 -0700 ++++ linux-2.4.24/drivers/char/ip27-rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -83,6 +83,7 @@ + switch (cmd) { + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_time(&wtime); + break; + } +diff -urN linux-2.4.23/drivers/char/mips_rtc.c linux-2.4.24/drivers/char/mips_rtc.c +--- linux-2.4.23/drivers/char/mips_rtc.c 2003-08-25 04:44:41.000000000 -0700 ++++ linux-2.4.24/drivers/char/mips_rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -82,6 +82,7 @@ + + switch (cmd) { + case RTC_RD_TIME: /* Read the time/date from RTC */ ++ memset(&rtc_tm, 0, sizeof(struct rtc_time)); + curr_time = rtc_get_time(); + to_tm(curr_time, &rtc_tm); + rtc_tm.tm_year -= 1900; +diff -urN linux-2.4.23/drivers/char/rtc.c linux-2.4.24/drivers/char/rtc.c +--- linux-2.4.23/drivers/char/rtc.c 2003-11-28 10:26:20.000000000 -0800 ++++ linux-2.4.24/drivers/char/rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -362,7 +362,7 @@ + * means "don't care" or "match all". Only the tm_hour, + * tm_min, and tm_sec values are filled in. + */ +- ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_alm_time(&wtime); + break; + } +@@ -406,6 +406,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + get_rtc_time(&wtime); + break; + } +diff -urN linux-2.4.23/drivers/hil/hp_sdc_rtc.c linux-2.4.24/drivers/hil/hp_sdc_rtc.c +--- linux-2.4.23/drivers/hil/hp_sdc_rtc.c 2003-06-13 07:51:33.000000000 -0700 ++++ linux-2.4.24/drivers/hil/hp_sdc_rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -561,6 +561,7 @@ + } + case RTC_ALM_READ: /* Read the present alarm time */ + { ++ memset(&ttime, 0, sizeof(struct timeval)); + if (hp_sdc_rtc_read_mt(&ttime)) return -EFAULT; + break; + } +@@ -609,6 +610,7 @@ + } + case RTC_RD_TIME: /* Read the time/date from RTC */ + { ++ memset(&wtime, 0, sizeof(struct rtc_time)); + if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT; + break; + } +diff -urN linux-2.4.23/drivers/macintosh/rtc.c linux-2.4.24/drivers/macintosh/rtc.c +--- linux-2.4.23/drivers/macintosh/rtc.c 2002-02-25 11:37:58.000000000 -0800 ++++ linux-2.4.24/drivers/macintosh/rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -64,6 +64,7 @@ + case RTC_RD_TIME: + if (ppc_md.get_rtc_time) + { ++ memset(&rtc_tm, 0, sizeof(struct rtc_time)); + get_rtc_time(&rtc_tm); + + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) +diff -urN linux-2.4.23/drivers/sbus/char/rtc.c linux-2.4.24/drivers/sbus/char/rtc.c +--- linux-2.4.23/drivers/sbus/char/rtc.c 2001-10-10 23:42:47.000000000 -0700 ++++ linux-2.4.24/drivers/sbus/char/rtc.c 2004-01-05 05:53:56.000000000 -0800 +@@ -89,6 +89,7 @@ + switch (cmd) + { + case RTCGET: ++ memset(&rtc_tm, 0, sizeof(struct rtc_time)); + get_rtc_time(&rtc_tm); + + if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2003-0985.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2003-0985.patch new file mode 100644 index 000000000000..bacef69f02f8 --- /dev/null +++ b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.CAN-2003-0985.patch @@ -0,0 +1,13 @@ +--- linux/mm/mremap.c.orig 2004-01-05 17:01:21.382104120 +0000 ++++ linux/mm/mremap.c 2004-01-05 17:15:25.689749848 +0000 +@@ -315,6 +315,10 @@ + old_len = PAGE_ALIGN(old_len); + new_len = PAGE_ALIGN(new_len); + ++ /* Don't allow the degenerate cases */ ++ if (!(old_len | new_len)) ++ goto out; ++ + /* new_addr is only valid if MREMAP_FIXED is specified */ + if (flags & MREMAP_FIXED) { + if (new_addr & ~PAGE_MASK) diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r10.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r10.ebuild index 0dc338b43895..0c09e48a9ccb 100644 --- a/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r10.ebuild +++ b/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r10.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r10.ebuild,v 1.15 2003/12/14 17:19:21 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r10.ebuild,v 1.16 2004/01/06 15:17:52 plasmaroo Exp $ IUSE="build crypt xfs acpi4linux" diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r10.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r10.ebuild new file mode 100644 index 000000000000..f0bea3462b81 --- /dev/null +++ b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r10.ebuild @@ -0,0 +1,168 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r10.ebuild,v 1.1 2004/01/06 15:17:52 plasmaroo Exp $ + +IUSE="build crypt evms2 aavm usagi" + +# OKV=original kernel version, KV=patched kernel version. They can be the same. + +# Kernel ebuilds using the kernel.eclass can remove any patch that you +# do not want to apply by simply setting the KERNEL_EXCLUDE shell +# variable to the string you want to exclude (for instance +# KERNEL_EXCLUDE="evms" would not patch any patches whose names match +# *evms*). Kernels are only tested in the default configuration, but +# this may be useful if you know that a particular patch is causing a +# conflict with a patch you personally want to apply, or some other +# similar situation. + +ETYPE="sources" + +inherit kernel +OKV="`echo ${PV}|sed -e 's:^\([0-9]\+\.[0-9]\+\.[0-9]\+\).*:\1:'`" +EXTRAVERSION="-${PN/-*/}" +[ ! "${PR}" == "r0" ] && EXTRAVERSION="${EXTRAVERSION}-${PR}" +KV="${OKV}${EXTRAVERSION}" + +S=${WORKDIR}/linux-${KV} + +# Documentation on the patches contained in this kernel will be installed +# to /usr/share/doc/gentoo-sources-${PV}/patches.txt.gz + +DESCRIPTION="Full sources for the Gentoo Kernel." +SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2 + mirror://gentoo/patches-${KV/10/5}.tar.bz2" +HOMEPAGE="http://www.gentoo.org/ http://www.kernel.org/" +LICENSE="GPL-2" +KEYWORDS="~x86 -ppc -sparc -alpha -hppa -mips -arm" +SLOT="${KV}" + + +src_unpack() { + unpack ${A} + mv linux-${OKV} linux-${KV} || die "Error moving kernel source tree to linux-${KV}" + + cd ${WORKDIR}/${KV/10/5} + + # Move over new iptables-ROUTE patch + cp ${FILESDIR}/gentoo-sources-2.4.20-ipt-route.patch 727_iptables-ROUTE + + # This is the *ratified* aavm USE flag, enables aavm support in this kernel + if [ -z "`use aavm`" ]; then + einfo "Setting up kernel for rmap support(default)." + for file in *.aavm ;do + einfo "Dropping ${file}..." + rm -f ${file} + done + else + einfo "Setting up kernel for aavm support." + for file in *.rmap ;do + einfo "Dropping ${file}..." + rm -f ${file} + done + fi + + # If the compiler isn't gcc>3.1 drop the gcc>=3.1 patches + if [[ "${COMPILER}" == "gcc3" ]]; then + einfo "Enabling gcc > 3.1 processor optimizations..." + einfo "To use them, choose the processor families labelled with (gcc>31)" + einfo "in \"Processor type and features -> Processor Family\"" + else + einfo "Your compiler is not gcc3, dropping patches..." + for file in *gcc3*;do + einfo "Dropping ${file}..." + rm -f ${file} + done + fi + + # This is the *ratified* evms2 USE flag, enables evms2 support + if [ -z "`use evms2`" ]; then + einfo "Setting up kernel for EVMS 1.2.1 support (default)..." + for file in 2* ;do + einfo "Dropping ${file}..." + rm -f ${file} + done + else + einfo "Setting up kernel for EVMS 2.0.1 support..." + ewarn "This is very beta. Please read the 'evms2' doc provided with this kernel." + ewarn "It is the install doc from the evms 2.0.1 tarball." + for file in 1* ;do + einfo "Dropping ${file}..." + rm -f ${file} + done + fi + + # This is the crypt USE flag, keeps {USAGI/superfreeswan/patch-int/loop-jari} + if [ -z "`use crypt`" ]; then + einfo "No Cryptographic support, dropping patches..." + for file in 6* 8* ;do + einfo "Dropping ${file}..." + rm -f ${file} + done + else + einfo "Cryptographic patches will be applied." + fi + + # This is the usagi USE flag, keeps USAGI, drops {superfreeswan/patch-int/loop-jari} + # Using USAGI will also cause you to drop all iptables ipv6 patches + if [ -z "`use usagi`" ]; then + einfo "Keeping {superfreeswan/patch-int/loop-jari} patches, dropping USAGI" + for file in 6* ;do + einfo "Dropping ${file}..." + rm -f ${file} + done + else + einfo "Keeping USAGI patch, dropping {superfreeswan/patch-int/loop-jari}" + for file in *.ipv6 8* ;do + einfo "Dropping ${file}..." + rm -f ${file} + done + fi + + kernel_src_unpack + + epatch ${FILESDIR}/security.patch1 + epatch ${FILESDIR}/security.patch2 + epatch ${FILESDIR}/security.patch3 + epatch ${FILESDIR}/security.patch4 + epatch ${FILESDIR}/gentoo-sources-2.4.20-gcc33.patch + epatch ${FILESDIR}/gentoo-sources-2.4.20-cs46xx-gcc33.patch + epatch ${FILESDIR}/gentoo-sources-2.4.20-grsec-datasize_fix.patch + epatch ${FILESDIR}/gentoo-sources-2.4.20-grsec-disabled.patch + epatch ${FILESDIR}/gentoo-sources-2.4.20-sched-interrupt.patch + epatch ${FILESDIR}/gentoo-sources-2.4.20-mdcount.patch + epatch ${FILESDIR}/gentoo-sources-2.4.20-devfs-snd-fix.patch + epatch ${FILESDIR}/gentoo-sources-2.4.20-ipt-realm.patch + epatch ${FILESDIR}/gentoo-sources-2.4.20-hpt372.patch + + epatch ${FILESDIR}/do_brk_fix.patch || die "Failed to apply do_brk() fix!" + epatch ${FILESDIR}/gentoo-sources-2.4.CAN-2003-0985.patch || die "Failed to apply mremap() fix!" + epatch ${FILESDIR}/gentoo-sources-2.4.20-rtc_fix.patch || die "Failed to apply RTC fix!" + +} + +pkg_postinst() { + + kernel_pkg_postinst + + echo + ewarn "There is no xfs support in this kernel." + ewarn "If you need xfs support, emerge xfs-sources." + echo + ewarn "If iptables/netfilter behaves abnormally, such as 'Invalid Argument'," + ewarn "you will need to re-emerge iptables to restore proper functionality." + echo + einfo "This set contains the ptrace patch as part of grsecurity." + echo + einfo "If there are issues with it, read the docs and associated help provided." + einfo "Next you should check http://forums.gentoo.org/ for assistance." + echo + einfo "Otherwise check http://bugs.gentoo.org/ for an existing bug." + einfo "Only create a new bug if you have not found one that matches your issue." + einfo "It is best to do an advanced search to increase search yield." + echo + einfo "Please assign bugs to x86-kernel@gentoo.org" + echo + einfo "Please read the ChangeLog and associated docs for more information." + echo + +} diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r5.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r5.ebuild index 040beb575dc3..2ed39a2dc917 100644 --- a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r5.ebuild +++ b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r5.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r5.ebuild,v 1.5 2003/12/01 21:59:51 iggy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r5.ebuild,v 1.6 2004/01/06 15:17:52 plasmaroo Exp $ IUSE="build crypt evms2 aavm usagi" diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r6.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r6.ebuild index 5bb2683e05d2..68ccb2d6b512 100644 --- a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r6.ebuild +++ b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r6.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r6.ebuild,v 1.6 2003/12/01 21:59:51 iggy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r6.ebuild,v 1.7 2004/01/06 15:17:52 plasmaroo Exp $ IUSE="build crypt evms2 aavm usagi" diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r7.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r7.ebuild index 6eead41a3171..94d94e5d6ef3 100644 --- a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r7.ebuild +++ b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r7.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r7.ebuild,v 1.9 2003/12/01 21:59:51 iggy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r7.ebuild,v 1.10 2004/01/06 15:17:52 plasmaroo Exp $ IUSE="build crypt evms2 aavm usagi" diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r8.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r8.ebuild index f39540df3363..d9cf9a4874f6 100644 --- a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r8.ebuild +++ b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r8.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r8.ebuild,v 1.4 2003/12/01 21:59:51 iggy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r8.ebuild,v 1.5 2004/01/06 15:17:52 plasmaroo Exp $ IUSE="build crypt evms2 aavm usagi" diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r9.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r9.ebuild index bbfedc4aa8e3..4534b01e4f59 100644 --- a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r9.ebuild +++ b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r9.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r9.ebuild,v 1.2 2003/12/03 16:31:56 iggy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r9.ebuild,v 1.3 2004/01/06 15:17:52 plasmaroo Exp $ IUSE="build crypt evms2 aavm usagi" diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r1.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r1.ebuild index b7d47d865990..260a70757d9c 100644 --- a/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r1.ebuild +++ b/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r1.ebuild,v 1.3 2003/12/05 23:55:03 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r1.ebuild,v 1.4 2004/01/06 15:17:52 plasmaroo Exp $ # OKV=original kernel version, KV=patched kernel version. They can be the same. diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r2.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r2.ebuild index 8a908aef910b..fbeddda6be75 100644 --- a/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r2.ebuild +++ b/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r2.ebuild,v 1.2 2003/12/21 06:45:59 iggy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r2.ebuild,v 1.3 2004/01/06 15:17:52 plasmaroo Exp $ # OKV=original kernel version, KV=patched kernel version. They can be the same. @@ -38,6 +38,9 @@ src_unpack() { cd ${S} + epatch ${FILESDIR}/gentoo-sources-2.4.CAN-2003-0985.patch || die "Failed to apply mremap() fix!" + epatch ${FILESDIR}/gentoo-sources-2.4.22-rtc_fix.patch || die "Failed to apply RTC fix!" + make mrproper || die "make mrproper failed" make include/linux/version.h || die "make include/linux/version.h failed" } diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.22.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.22.ebuild index 70d0393433d8..bd479c1cbaf7 100644 --- a/sys-kernel/gentoo-sources/gentoo-sources-2.4.22.ebuild +++ b/sys-kernel/gentoo-sources/gentoo-sources-2.4.22.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.22.ebuild,v 1.3 2003/12/02 19:41:26 iggy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.22.ebuild,v 1.4 2004/01/06 15:17:52 plasmaroo Exp $ # OKV=original kernel version, KV=patched kernel version. They can be the same. |