r1056 - in trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches: . series
Joshua Kwan
joshk@haydn.debian.org
Thu, 12 Aug 2004 23:44:02 -0600
Author: joshk
Date: 2004-08-12 23:43:57 -0600 (Thu, 12 Aug 2004)
New Revision: 1056
Added:
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/044_ide_48bit_hpa.diff
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/062_ide_stroke_runtime.diff
Removed:
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/044_ide_stroke_runtime.diff-BROKEN
Modified:
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/032_cramfs_initrd.diff
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series/2.4.27-1
Log:
unbreak the stroke and hba48 patches; remove a no longer necessary hunk for cramfs initrd
Modified: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/032_cramfs_initrd.diff
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/032_cramfs_initrd.diff 2004-08-13 01:57:50 UTC (rev 1055)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/032_cramfs_initrd.diff 2004-08-13 05:43:57 UTC (rev 1056)
@@ -1,15 +1,3 @@
-diff -urN kernel-source-2.4.22-2.4.22.orig/fs/block_dev.c kernel-source-2.4.22-2.4.22/fs/block_dev.c
---- kernel-source-2.4.22-2.4.22.orig/fs/block_dev.c 2003-06-01 13:06:32.000000000 +1000
-+++ kernel-source-2.4.22-2.4.22/fs/block_dev.c 2003-06-01 20:43:53.000000000 +1000
-@@ -95,7 +95,7 @@
- sync_buffers(dev, 2);
- blksize_size[MAJOR(dev)][MINOR(dev)] = size;
- bdev->bd_inode->i_blkbits = blksize_bits(size);
-- kill_bdev(bdev);
-+ invalidate_bdev(bdev, 1);
- bdput(bdev);
- return 0;
- }
diff -urN kernel-source-2.4.22-2.4.22.orig/fs/cramfs/inode.c kernel-source-2.4.22-2.4.22/fs/cramfs/inode.c
--- kernel-source-2.4.22-2.4.22.orig/fs/cramfs/inode.c 2002-08-03 10:39:45.000000000 +1000
+++ kernel-source-2.4.22-2.4.22/fs/cramfs/inode.c 2002-08-30 20:40:16.000000000 +1000
Added: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/044_ide_48bit_hpa.diff
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/044_ide_48bit_hpa.diff 2004-08-13 01:57:50 UTC (rev 1055)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/044_ide_48bit_hpa.diff 2004-08-13 05:43:57 UTC (rev 1056)
@@ -0,0 +1,206 @@
+--- kernel-source-2.4.27-2.4.27/drivers/ide/ide-disk.c~ 2004-08-12 22:34:17.000000000 -0700
++++ kernel-source-2.4.27-2.4.27/drivers/ide/ide-disk.c 2004-08-12 22:35:46.000000000 -0700
+@@ -69,6 +69,7 @@
+ #include <asm/irq.h>
+ #include <asm/uaccess.h>
+ #include <asm/io.h>
++#include <asm/div64.h>
+
+ /* FIXME: some day we shouldnt need to look in here! */
+
+@@ -1130,16 +1131,62 @@
+
+ #endif /* CONFIG_IDEDISK_STROKE */
+
+-/*
+- * Tests if the drive supports Host Protected Area feature.
+- * Returns true if supported, false otherwise.
+- */
+-static inline int idedisk_supports_host_protected_area(ide_drive_t *drive)
++static unsigned long long sectors_to_MB(unsigned long long n) {
++ n <<= 9; /* make it bytes */
++ do_div(n, 1000000); /* make it MB */
++ return n;
++}
++
++static inline void idedisk_check_hpa_lba28(ide_drive_t *drive)
+ {
+- int flag = (drive->id->cfs_enable_1 & 0x0400) ? 1 : 0;
+- if (flag)
+- printk("%s: host protected area => %d\n", drive->name, flag);
+- return flag;
++ unsigned long capacity, set_max;
++
++ capacity = drive->id->lba_capacity;
++ set_max = idedisk_read_native_max_address(drive);
++
++ if (set_max <= capacity)
++ return;
++
++ printk(KERN_INFO "%s: Host Protected Area detected.\n"
++ "\tcurrent capacity is %ld sectors (%ld MB)\n"
++ "\tnative capacity is %ld sectors (%ld MB)\n",
++ drive->name,
++ capacity, (capacity - capacity/625 + 974)/1950,
++ set_max, (set_max - set_max/625 + 974)/1950);
++#ifdef CONFIG_IDEDISK_STROKE
++ set_max = idedisk_set_max_address(drive, set_max);
++ if (set_max) {
++ drive->id->lba_capacity = set_max;
++ printk(KERN_INFO "%s: Host Protected Area disabled.\n",
++ drive->name);
++ }
++#endif /* CONFIG_IDEDISK_STROKE */
++}
++
++static inline void idedisk_check_hpa_lba48(ide_drive_t *drive)
++{
++ unsigned long long capacity_2, set_max_ext;
++
++ capacity_2 = drive->id->lba_capacity_2;
++ set_max_ext = idedisk_read_native_max_address_ext(drive);
++
++ if (set_max_ext <= capacity_2)
++ return;
++
++ printk(KERN_INFO "%s: Host Protected Area detected.\n"
++ "\tcurrent capacity is %lld sectors (%lld MB)\n"
++ "\tnative capacity is %lld sectors (%lld MB)\n",
++ drive->name,
++ capacity_2, sectors_to_MB(capacity_2),
++ set_max_ext, sectors_to_MB(set_max_ext));
++#ifdef CONFIG_IDEDISK_STROKE
++ set_max_ext = idedisk_set_max_address_ext(drive, set_max_ext);
++ if (set_max_ext) {
++ drive->id->lba_capacity_2 = set_max_ext;
++ printk(KERN_INFO "%s: Host Protected Area disabled.\n",
++ drive->name);
++ }
++#endif /* CONFIG_IDEDISK_STROKE */
+ }
+
+ /*
+@@ -1156,86 +1203,43 @@
+ * in above order (i.e., if value of higher priority is available,
+ * reset will be ignored).
+ */
+-#define IDE_STROKE_LIMIT (32000*1024*2)
+ static void init_idedisk_capacity (ide_drive_t *drive)
+ {
+ struct hd_driveid *id = drive->id;
+- unsigned long capacity = drive->cyl * drive->head * drive->sect;
+- int have_setmax = idedisk_supports_host_protected_area(drive);
+- unsigned long set_max =
+- (have_setmax ? idedisk_read_native_max_address(drive) : 0);
+- unsigned long long capacity_2 = capacity;
+- unsigned long long set_max_ext;
+
+- drive->capacity48 = 0;
+- drive->select.b.lba = 0;
++ /*
++ * If this drive supports the Host Protected Area feature set,
++ * then we may need to change our opinion about the drive's capacity.
++ */
++ int hpa = (id->command_set_1 & 0x0400) && (id->cfs_enable_1 & 0x0400);
+
+- if (id->cfs_enable_2 & 0x0400) {
++ if ((id->command_set_2 & 0x0400) && (id->cfs_enable_2 & 0x0400)) {
++ /* drive speaks 48-bit LBA */
++ unsigned long long capacity_2;
++
++ drive->select.b.lba = 1;
++ if (hpa)
++ idedisk_check_hpa_lba48(drive);
+ capacity_2 = id->lba_capacity_2;
+ drive->head = drive->bios_head = 255;
+ drive->sect = drive->bios_sect = 63;
+ drive->cyl = (unsigned int) capacity_2 / (drive->head * drive->sect);
+- drive->select.b.lba = 1;
+- set_max_ext = idedisk_read_native_max_address_ext(drive);
+- if (set_max_ext > capacity_2 && capacity_2 > IDE_STROKE_LIMIT) {
+-#ifdef CONFIG_IDEDISK_STROKE
+- set_max_ext = idedisk_read_native_max_address_ext(drive);
+- set_max_ext = idedisk_set_max_address_ext(drive, set_max_ext);
+- if (set_max_ext) {
+- drive->capacity48 = capacity_2 = set_max_ext;
+- drive->cyl = (unsigned int) set_max_ext / (drive->head * drive->sect);
+- drive->select.b.lba = 1;
+- drive->id->lba_capacity_2 = capacity_2;
+- }
+-#else /* !CONFIG_IDEDISK_STROKE */
+- printk(KERN_INFO "%s: setmax_ext LBA %llu, native %llu\n",
+- drive->name, set_max_ext, capacity_2);
+-#endif /* CONFIG_IDEDISK_STROKE */
+- }
+- drive->cyl = (unsigned int) capacity_2 / (drive->head * drive->sect);
+ drive->bios_cyl = drive->cyl;
+ drive->capacity48 = capacity_2;
+ drive->capacity = (unsigned long) capacity_2;
+- goto check_capacity48;
+- /* Determine capacity, and use LBA if the drive properly supports it */
+ } else if ((id->capability & 2) && lba_capacity_is_ok(id)) {
++ /* drive speaks 28-bit LBA */
++ unsigned long capacity;
++
++ drive->select.b.lba = 1;
++ if (hpa)
++ idedisk_check_hpa_lba28(drive);
+ capacity = id->lba_capacity;
+ drive->cyl = capacity / (drive->head * drive->sect);
+- drive->select.b.lba = 1;
+- }
+-
+- if (set_max > capacity && capacity > IDE_STROKE_LIMIT) {
+-#ifdef CONFIG_IDEDISK_STROKE
+- set_max = idedisk_read_native_max_address(drive);
+- set_max = idedisk_set_max_address(drive, set_max);
+- if (set_max) {
+- drive->capacity = capacity = set_max;
+- drive->cyl = set_max / (drive->head * drive->sect);
+- drive->select.b.lba = 1;
+- drive->id->lba_capacity = capacity;
+- }
+-#else /* !CONFIG_IDEDISK_STROKE */
+- printk(KERN_INFO "%s: setmax LBA %lu, native %lu\n",
+- drive->name, set_max, capacity);
+-#endif /* CONFIG_IDEDISK_STROKE */
+- }
+-
+- drive->capacity = capacity;
+-
+- if ((id->command_set_2 & 0x0400) && (id->cfs_enable_2 & 0x0400)) {
+- drive->capacity48 = id->lba_capacity_2;
+- drive->head = 255;
+- drive->sect = 63;
+- drive->cyl = (unsigned long)(drive->capacity48) / (drive->head * drive->sect);
+- }
+-
+-check_capacity48:
+- /* Limit disk size to 137GB if LBA48 addressing is not supported */
+- if (drive->addressing == 0 && drive->capacity48 > (1ULL)<<28) {
+- printk("%s: cannot use LBA48 - capacity reset "
+- "from %llu to %llu\n",
+- drive->name, drive->capacity48, (1ULL)<<28);
+- drive->capacity48 = (1ULL)<<28;
++ drive->capacity = capacity;
++ } else {
++ /* drive speaks boring old 28-bit CHS */
++ drive->capacity = drive->cyl * drive->head * drive->sect;
+ }
+ }
+
+@@ -1686,6 +1690,14 @@
+ /* calculate drive capacity, and select LBA if possible */
+ init_idedisk_capacity (drive);
+
++ /* Limit disk size to 137GB if LBA48 addressing is not supported */
++ if (drive->addressing == 0 && drive->capacity48 > (1ULL)<<28) {
++ printk("%s: cannot use LBA48 - capacity reset "
++ "from %llu to %llu\n",
++ drive->name, drive->capacity48, (1ULL)<<28);
++ drive->capacity48 = (1ULL)<<28;
++ }
++
+ /*
+ * if possible, give fdisk access to more of the drive,
+ * by correcting bios_cyls:
Deleted: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/044_ide_stroke_runtime.diff-BROKEN
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/044_ide_stroke_runtime.diff-BROKEN 2004-08-13 01:57:50 UTC (rev 1055)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/044_ide_stroke_runtime.diff-BROKEN 2004-08-13 05:43:57 UTC (rev 1056)
@@ -1,292 +0,0 @@
-diff -urN kernel-source-2.4.26/drivers/ide/ide-disk.c kernel-source-2.4.26-1/drivers/ide/ide-disk.c
---- kernel-source-2.4.26/drivers/ide/ide-disk.c 2003-11-29 05:26:20.000000000 +1100
-+++ kernel-source-2.4.26-1/drivers/ide/ide-disk.c 2003-11-29 20:53:31.000000000 +1100
-@@ -69,6 +69,7 @@
- #include <asm/irq.h>
- #include <asm/uaccess.h>
- #include <asm/io.h>
-+#include <asm/div64.h>
-
- /* FIXME: some day we shouldnt need to look in here! */
-
-@@ -76,6 +77,12 @@
-
- static int driver_blocked;
-
-+#ifdef CONFIG_IDEDISK_STROKE
-+#define STROKE 1
-+#else
-+#define STROKE 0
-+#endif
-+
- static inline u32 idedisk_read_24 (ide_drive_t *drive)
- {
- #if 0
-@@ -1062,7 +1069,6 @@
- return addr;
- }
-
--#ifdef CONFIG_IDEDISK_STROKE
- /*
- * Sets maximum virtual LBA address of the drive.
- * Returns new maximum virtual LBA address (> 0) or 0 on failure.
-@@ -1126,20 +1132,64 @@
- addr_set = ((__u64)high << 24) | low;
- }
- return addr_set;
-+}
-+
-+static unsigned long long sectors_to_MB(unsigned long long n) {
-+ n <<= 9; /* make it bytes */
-+ do_div(n, 1000000); /* make it MB */
-+ return n;
- }
-
--#endif /* CONFIG_IDEDISK_STROKE */
-+static inline void idedisk_check_hpa_lba28(ide_drive_t *drive)
-+{
-+ unsigned long capacity, set_max;
-
--/*
-- * Tests if the drive supports Host Protected Area feature.
-- * Returns true if supported, false otherwise.
-- */
--static inline int idedisk_supports_host_protected_area(ide_drive_t *drive)
-
- {
-- int flag = (drive->id->cfs_enable_1 & 0x0400) ? 1 : 0;
-- if (flag)
-- printk("%s: host protected area => %d\n", drive->name, flag);
-- return flag;
-+ unsigned long long capacity_2, set_max_ext;
-+
-+ capacity_2 = drive->id->lba_capacity_2;
-+ set_max_ext = idedisk_read_native_max_address_ext(drive);
-+
-+ if (set_max_ext <= capacity_2)
-+ return;
-+
-+ printk(KERN_INFO "%s: Host Protected Area detected.\n"
-+ "\tcurrent capacity is %lld sectors (%lld MB)\n"
-+ "\tnative capacity is %lld sectors (%lld MB)\n",
-+ drive->name,
-+ capacity_2, sectors_to_MB(capacity_2),
-+ set_max_ext, sectors_to_MB(set_max_ext));
-+ if (STROKE || drive->stroke) {
-+ set_max_ext = idedisk_set_max_address_ext(drive, set_max_ext);
-+ if (set_max_ext) {
-+ drive->id->lba_capacity_2 = set_max_ext;
-+ printk(KERN_INFO "%s: Host Protected Area disabled.\n",
-+ drive->name);
-+ }
-+ }
- }
-
- /*
-@@ -1156,87 +1206,42 @@
- * in above order (i.e., if value of higher priority is available,
- * reset will be ignored).
- */
--#define IDE_STROKE_LIMIT (32000*1024*2)
- static void init_idedisk_capacity (ide_drive_t *drive)
- {
- struct hd_driveid *id = drive->id;
-- unsigned long capacity = drive->cyl * drive->head * drive->sect;
-- unsigned long set_max =
-- (have_setmax ? idedisk_read_native_max_address(drive) : 0);
-- unsigned long long capacity_2 = capacity;
-- unsigned long long set_max_ext;
--
-- drive->capacity48 = 0;
-- drive->select.b.lba = 0;
-+ /*
-+ * If this drive supports the Host Protected Area feature set,
-+ * then we may need to change our opinion about the drive's capacity.
-+ */
-+ int hpa = (id->command_set_1 & 0x0400) && (id->cfs_enable_1 & 0x0400);
-
-- (void) idedisk_supports_host_protected_area(drive);
-+ if ((id->command_set_2 & 0x0400) && (id->cfs_enable_2 & 0x0400)) {
-+ /* drive speaks 48-bit LBA */
-+ unsigned long long capacity_2;
-
-- if (id->cfs_enable_2 & 0x0400) {
-+ drive->select.b.lba = 1;
-+ if (hpa)
-+ idedisk_check_hpa_lba48(drive);
- capacity_2 = id->lba_capacity_2;
- drive->head = drive->bios_head = 255;
- drive->sect = drive->bios_sect = 63;
- drive->cyl = (unsigned int) capacity_2 / (drive->head * drive->sect);
-- drive->select.b.lba = 1;
-- set_max_ext = idedisk_read_native_max_address_ext(drive);
-- if (set_max_ext > capacity_2 && capacity_2 > IDE_STROKE_LIMIT) {
--#ifdef CONFIG_IDEDISK_STROKE
-- set_max_ext = idedisk_read_native_max_address_ext(drive);
-- set_max_ext = idedisk_set_max_address_ext(drive, set_max_ext);
-- if (set_max_ext) {
-- drive->capacity48 = capacity_2 = set_max_ext;
-- drive->cyl = (unsigned int) set_max_ext / (drive->head * drive->sect);
-- drive->select.b.lba = 1;
-- drive->id->lba_capacity_2 = capacity_2;
-- }
--#else /* !CONFIG_IDEDISK_STROKE */
-- printk(KERN_INFO "%s: setmax_ext LBA %llu, native %llu\n",
-- drive->name, set_max_ext, capacity_2);
--#endif /* CONFIG_IDEDISK_STROKE */
-- }
-- drive->cyl = (unsigned int) capacity_2 / (drive->head * drive->sect);
- drive->bios_cyl = drive->cyl;
- drive->capacity48 = capacity_2;
- drive->capacity = (unsigned long) capacity_2;
-- goto check_capacity48;
-- /* Determine capacity, and use LBA if the drive properly supports it */
- } else if ((id->capability & 2) && lba_capacity_is_ok(id)) {
-+ /* drive speaks 28-bit LBA */
-+ unsigned long capacity;
-+
-+ drive->select.b.lba = 1;
-+ if (hpa)
-+ idedisk_check_hpa_lba28(drive);
- capacity = id->lba_capacity;
- drive->cyl = capacity / (drive->head * drive->sect);
-- drive->select.b.lba = 1;
-- }
--
-- if (set_max > capacity && capacity > IDE_STROKE_LIMIT) {
--#ifdef CONFIG_IDEDISK_STROKE
-- set_max = idedisk_read_native_max_address(drive);
-- set_max = idedisk_set_max_address(drive, set_max);
-- if (set_max) {
-- drive->capacity = capacity = set_max;
-- drive->cyl = set_max / (drive->head * drive->sect);
-- drive->select.b.lba = 1;
-- drive->id->lba_capacity = capacity;
-- }
--#else /* !CONFIG_IDEDISK_STROKE */
-- printk(KERN_INFO "%s: setmax LBA %lu, native %lu\n",
-- drive->name, set_max, capacity);
--#endif /* CONFIG_IDEDISK_STROKE */
-- }
--
-- drive->capacity = capacity;
--
-- if ((id->command_set_2 & 0x0400) && (id->cfs_enable_2 & 0x0400)) {
-- drive->capacity48 = id->lba_capacity_2;
-- drive->head = 255;
-- drive->sect = 63;
-- drive->cyl = (unsigned long)(drive->capacity48) / (drive->head * drive->sect);
-- }
--
--check_capacity48:
-- /* Limit disk size to 137GB if LBA48 addressing is not supported */
-- if (drive->addressing == 0 && drive->capacity48 > (1ULL)<<28) {
-- printk("%s: cannot use LBA48 - capacity reset "
-- "from %llu to %llu\n",
-- drive->name, drive->capacity48, (1ULL)<<28);
-- drive->capacity48 = (1ULL)<<28;
-+ drive->capacity = capacity;
-+ } else {
-+ /* drive speaks boring old 28-bit CHS */
-+ drive->capacity = drive->cyl * drive->head * drive->sect;
- }
- }
-
-@@ -1560,7 +1566,13 @@
- return 0;
- }
-
--static int probe_lba_addressing (ide_drive_t *drive, int arg)
-+/*
-+ * drive->addressing:
-+ * 0: 28-bit
-+ * 1: 48-bit
-+ * 2: 48-bit capable doing 28-bit
-+ */
-+static int set_lba_addressing (ide_drive_t *drive, int arg)
- {
- drive->addressing = 0;
-
-@@ -1573,11 +1585,6 @@
- return 0;
- }
-
--static int set_lba_addressing (ide_drive_t *drive, int arg)
--{
-- return (probe_lba_addressing(drive, arg));
--}
--
- static void idedisk_add_settings(ide_drive_t *drive)
- {
- struct hd_driveid *id = drive->id;
-@@ -1654,10 +1661,10 @@
- }
-
- #if 1
-- (void) probe_lba_addressing(drive, 1);
-+ (void)set_lba_addressing(drive, 1);
- #else
- /* if using 48-bit addressing bump the request size up */
-- if (probe_lba_addressing(drive, 1))
-+ if (set_lba_addressing(drive, 1))
- blk_queue_max_sectors(&drive->queue, 2048);
- #endif
-
-@@ -1686,6 +1693,14 @@
- /* calculate drive capacity, and select LBA if possible */
- init_idedisk_capacity (drive);
-
-+ /* Limit disk size to 137GB if LBA48 addressing is not supported */
-+ if (drive->addressing == 0 && drive->capacity48 > (1ULL)<<28) {
-+ printk("%s: cannot use LBA48 - capacity reset "
-+ "from %llu to %llu\n",
-+ drive->name, drive->capacity48, (1ULL)<<28);
-+ drive->capacity48 = (1ULL)<<28;
-+ }
-+
- /*
- * if possible, give fdisk access to more of the drive,
- * by correcting bios_cyls:
-
-diff -urN kernel-source-2.4.26/drivers/ide/ide.c kernel-source-2.4.26-1/drivers/ide/ide.c
---- kernel-source-2.4.26/drivers/ide/ide.c 2004-02-19 00:36:31.000000000 +1100
-+++ kernel-source-2.4.26-1/drivers/ide/ide.c 2004-02-22 20:28:18.000000000 +1100
-@@ -2089,6 +2089,7 @@
- * "hdx=scsi" : the return of the ide-scsi flag, this is useful for
- * allowwing ide-floppy, ide-tape, and ide-cdrom|writers
- * to use ide-scsi emulation on a device specific option.
-+ * "hdx=stroke" : runtime version of CONFIG_IDEDISK_STROKE
- * "idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz,
- * where "xx" is between 20 and 66 inclusive,
- * used when tuning chipset PIO modes.
-@@ -2188,7 +2189,7 @@
- const char *hd_words[] = {"none", "noprobe", "nowerr", "cdrom",
- "serialize", "autotune", "noautotune",
- "slow", "swapdata", "bswap", "flash",
-- "remap", "noremap", "scsi", NULL};
-+ "remap", "noremap", "scsi", "stroke", NULL};
- unit = s[2] - 'a';
- hw = unit / MAX_DRIVES;
- unit = unit % MAX_DRIVES;
-@@ -2254,6 +2255,9 @@
- case -14: /* "scsi" */
- drive->scsi = 1;
- goto done;
-+ case -15: /* "stroke" */
-+ drive->stroke = 1;
-+ goto done;
- case 3: /* cyl,head,sect */
- drive->media = ide_disk;
- drive->cyl = drive->bios_cyl = vals[0];
-diff -urN kernel-source-2.4.26/include/linux/ide.h kernel-source-2.4.26-1/include/linux/ide.h
---- kernel-source-2.4.26/include/linux/ide.h 2004-04-14 23:05:40.000000000 +1000
-+++ kernel-source-2.4.26-1/include/linux/ide.h 2004-04-17 14:24:05.000000000 +1000
-@@ -747,6 +747,7 @@
- unsigned ata_flash : 1; /* 1=present, 0=default */
- unsigned dead : 1; /* 1=dead, no new attachments */
- unsigned id_read : 1; /* 1=id read from disk 0 = synthetic */
-+ unsigned stroke : 1; /* from: hdx=stroke */
- unsigned addressing; /* : 3;
- * 0=28-bit
- * 1=48-bit
-
Added: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/062_ide_stroke_runtime.diff
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/062_ide_stroke_runtime.diff 2004-08-13 01:57:50 UTC (rev 1055)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/062_ide_stroke_runtime.diff 2004-08-13 05:43:57 UTC (rev 1056)
@@ -0,0 +1,116 @@
+--- kernel-source-2.4.27-2.4.27/drivers/ide/ide.c~ 2004-08-12 22:38:36.000000000 -0700
++++ kernel-source-2.4.27-2.4.27/drivers/ide/ide.c 2004-08-12 22:39:01.000000000 -0700
+@@ -2089,6 +2089,7 @@
+ * "hdx=scsi" : the return of the ide-scsi flag, this is useful for
+ * allowwing ide-floppy, ide-tape, and ide-cdrom|writers
+ * to use ide-scsi emulation on a device specific option.
++ * "hdx=stroke" : runtime version of CONFIG_IDEDISK_STROKE
+ * "idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz,
+ * where "xx" is between 20 and 66 inclusive,
+ * used when tuning chipset PIO modes.
+@@ -2188,7 +2189,7 @@
+ const char *hd_words[] = {"none", "noprobe", "nowerr", "cdrom",
+ "serialize", "autotune", "noautotune",
+ "slow", "swapdata", "bswap", "flash",
+- "remap", "noremap", "scsi", NULL};
++ "remap", "noremap", "scsi", "stroke", NULL};
+ unit = s[2] - 'a';
+ hw = unit / MAX_DRIVES;
+ unit = unit % MAX_DRIVES;
+@@ -2254,6 +2255,9 @@
+ case -14: /* "scsi" */
+ drive->scsi = 1;
+ goto done;
++ case -15: /* "stroke" */
++ drive->stroke = 1;
++ goto done;
+ case 3: /* cyl,head,sect */
+ drive->media = ide_disk;
+ drive->cyl = drive->bios_cyl = vals[0];
+--- kernel-source-2.4.27-2.4.27/drivers/ide/ide-disk.c~ 2004-08-12 22:36:07.000000000 -0700
++++ kernel-source-2.4.27-2.4.27/drivers/ide/ide-disk.c 2004-08-12 22:38:11.000000000 -0700
+@@ -77,6 +77,12 @@
+
+ static int driver_blocked;
+
++#ifdef CONFIG_IDEDISK_STROKE
++#define STROKE 1
++#else
++#define STROKE 0
++#endif
++
+ static inline u32 idedisk_read_24 (ide_drive_t *drive)
+ {
+ #if 0
+@@ -1063,7 +1069,6 @@
+ return addr;
+ }
+
+-#ifdef CONFIG_IDEDISK_STROKE
+ /*
+ * Sets maximum virtual LBA address of the drive.
+ * Returns new maximum virtual LBA address (> 0) or 0 on failure.
+@@ -1129,8 +1134,6 @@
+ return addr_set;
+ }
+
+-#endif /* CONFIG_IDEDISK_STROKE */
+-
+ static unsigned long long sectors_to_MB(unsigned long long n) {
+ n <<= 9; /* make it bytes */
+ do_div(n, 1000000); /* make it MB */
+@@ -1153,14 +1156,15 @@
+ drive->name,
+ capacity, (capacity - capacity/625 + 974)/1950,
+ set_max, (set_max - set_max/625 + 974)/1950);
+-#ifdef CONFIG_IDEDISK_STROKE
+- set_max = idedisk_set_max_address(drive, set_max);
+- if (set_max) {
++ if (STROKE || drive->stroke)
++ {
++ set_max = idedisk_set_max_address(drive, set_max);
++ if (set_max) {
+ drive->id->lba_capacity = set_max;
+- printk(KERN_INFO "%s: Host Protected Area disabled.\n",
+- drive->name);
++ printk(KERN_INFO "%s: Host Protected Area disabled.\n",
++ drive->name);
++ }
+ }
+-#endif /* CONFIG_IDEDISK_STROKE */
+ }
+
+ static inline void idedisk_check_hpa_lba48(ide_drive_t *drive)
+@@ -1179,14 +1183,15 @@
+ drive->name,
+ capacity_2, sectors_to_MB(capacity_2),
+ set_max_ext, sectors_to_MB(set_max_ext));
+-#ifdef CONFIG_IDEDISK_STROKE
+- set_max_ext = idedisk_set_max_address_ext(drive, set_max_ext);
+- if (set_max_ext) {
+- drive->id->lba_capacity_2 = set_max_ext;
+- printk(KERN_INFO "%s: Host Protected Area disabled.\n",
+- drive->name);
++ if (STROKE || drive->stroke)
++ {
++ set_max_ext = idedisk_set_max_address_ext(drive, set_max_ext);
++ if (set_max_ext) {
++ drive->id->lba_capacity_2 = set_max_ext;
++ printk(KERN_INFO "%s: Host Protected Area disabled.\n",
++ drive->name);
++ }
+ }
+-#endif /* CONFIG_IDEDISK_STROKE */
+ }
+
+ /*
+--- kernel-source-2.4.27-2.4.27/include/linux/ide.h~ 2004-08-12 22:38:42.000000000 -0700
++++ kernel-source-2.4.27-2.4.27/include/linux/ide.h 2004-08-12 22:39:01.000000000 -0700
+@@ -747,6 +747,7 @@
+ unsigned ata_flash : 1; /* 1=present, 0=default */
+ unsigned dead : 1; /* 1=dead, no new attachments */
+ unsigned id_read : 1; /* 1=id read from disk 0 = synthetic */
++ unsigned stroke : 1; /* from: hdx=stroke */
+ unsigned addressing; /* : 3;
+ * 0=28-bit
+ * 1=48-bit
Modified: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series/2.4.27-1
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series/2.4.27-1 2004-08-13 01:57:50 UTC (rev 1055)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series/2.4.27-1 2004-08-13 05:43:57 UTC (rev 1056)
@@ -42,6 +42,7 @@
+ 041_7xxxosm_deadlock.diff
+ 042_toshiba_blacklist.diff
+ 043_ipsec.diff
++ 044_ide_48bit_hpa.diff
+ 045_isdn_cleanups.diff
+ 046_mtd_config_dep.diff
+ 047_advansys_le32.diff
@@ -59,5 +60,6 @@
+ 059_ea_acl.diff
+ 060_ipsec_update.diff
+ 061_devmapper_1.00.19-2.diff
++ 062_ide_stroke_runtime.diff
+ 900_changelog.diff
+ 999_spelling_mistakes.diff