]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.25.8/opti621-disable-read-prefetch.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.25.8 / opti621-disable-read-prefetch.patch
CommitLineData
cd378b7b
GKH
1From stable-bounces@linux.kernel.org Wed Jun 18 15:50:59 2008
2From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
3Date: Wed, 18 Jun 2008 23:54:53 +0200
4Subject: opti621: disable read prefetch
5To: stable@kernel.org
6Cc: Juergen Kosel <juergen.kosel@gmx.de>
7Message-ID: <200806182354.55057.bzolnier@gmail.com>
8Content-Disposition: inline
9
10From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
11
12commit 62128b2ca812c1266f4ff7bac068bf0b626c6179 upstream
13
14This fixes 2.6.25 regression (kernel.org bugzilla bug #10723) caused by:
15
16commit 912fb29a36a7269ac1c4a4df45bc0ac1d2637972
17Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
18Date: Fri Oct 19 00:30:11 2007 +0200
19
20 opti621: always tune PIO
21...
22
23Based on a bugreport from Juergen Kosel & inspired by pata_opti.c code.
24
25Bisected-by: Juergen Kosel <juergen.kosel@gmx.de>
26Tested-by: Juergen Kosel <juergen.kosel@gmx.de>
27Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
28Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29
30---
31 drivers/ide/pci/opti621.c | 15 ++-------------
32 1 file changed, 2 insertions(+), 13 deletions(-)
33
34--- a/drivers/ide/pci/opti621.c
35+++ b/drivers/ide/pci/opti621.c
36@@ -103,18 +103,6 @@
37 * address: 50 ns, data: 50 ns, recovery: 100 ns.
38 */
39
40-/* #define READ_PREFETCH 0 */
41-/* Uncomment for disable read prefetch.
42- * There is some readprefetch capatibility in hdparm,
43- * but when I type hdparm -P 1 /dev/hda, I got errors
44- * and till reset drive is inaccessible.
45- * This (hw) read prefetch is safe on my drive.
46- */
47-
48-#ifndef READ_PREFETCH
49-#define READ_PREFETCH 0x40 /* read prefetch is enabled */
50-#endif /* else read prefetch is disabled */
51-
52 #define READ_REG 0 /* index of Read cycle timing register */
53 #define WRITE_REG 1 /* index of Write cycle timing register */
54 #define CNTRL_REG 3 /* index of Control register */
55@@ -260,7 +248,8 @@ static void opti621_set_pio_mode(ide_dri
56
57 cycle1 = ((first.data_time-1)<<4) | (first.recovery_time-2);
58 cycle2 = ((second.data_time-1)<<4) | (second.recovery_time-2);
59- misc = READ_PREFETCH | ((ax-1)<<4) | ((drdy-2)<<1);
60+
61+ misc = ((ax - 1) << 4) | ((drdy - 2) << 1);
62
63 #ifdef OPTI621_DEBUG
64 printk("%s: master: address: %d, data: %d, "