diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-26 14:13:09 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-26 14:13:09 -0500 |
commit | 9e47be0c97f7357b80e91dc0632e9cce2eb025e0 (patch) | |
tree | 7047b2b3c9ac094b801d376e4bbb95292b1962ac /drivers/ide/ide.c | |
parent | 3a5015cc9d7051ce8e706ef48276d8484aac0c4b (diff) |
ide: remove broken disk byte-swapping support
Remove broken disk byte-swapping support:
- it can cause a data corruption on SMP (or if using PREEMPT on UP)
- all data coming from disk are byte-swapped by taskfile_*_data() which
results in incorrect identify data being reported by /proc/ide/ and IOCTLs
- "hdx=bswap/byteswap" kernel parameter has been broken on m68k host drivers
(including Atari/Q40 ones) since 2.5.x days (because of 'hwif' zero-ing)
- byte-swapping is limited to PIO transfers (for working with TiVo disks on
x86 machines using user-space solutions or dm-byteswap should result in
much better performance because DMA can be used)
For previous discussions please see:
http://www.ussg.iu.edu/hypermail/linux/kernel/0201.0/0768.html
http://lkml.org/lkml/2004/2/28/111
[ I have dm-byteswap device mapper target if somebody is interested
(patch is for 2.6.4 though but I'll dust it off if needed). ]
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 5f3e53ec5838..52115ef1f01a 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -1303,7 +1303,7 @@ static int __init ide_setup(char *s) | |||
1303 | if (s[0] == 'h' && s[1] == 'd' && s[2] >= 'a' && s[2] <= max_drive) { | 1303 | if (s[0] == 'h' && s[1] == 'd' && s[2] >= 'a' && s[2] <= max_drive) { |
1304 | const char *hd_words[] = { | 1304 | const char *hd_words[] = { |
1305 | "none", "noprobe", "nowerr", "cdrom", "nodma", | 1305 | "none", "noprobe", "nowerr", "cdrom", "nodma", |
1306 | "autotune", "noautotune", "minus8", "swapdata", "bswap", | 1306 | "autotune", "noautotune", "-8", "-9", "-10", |
1307 | "noflush", "remap", "remap63", "scsi", NULL }; | 1307 | "noflush", "remap", "remap63", "scsi", NULL }; |
1308 | unit = s[2] - 'a'; | 1308 | unit = s[2] - 'a'; |
1309 | hw = unit / MAX_DRIVES; | 1309 | hw = unit / MAX_DRIVES; |
@@ -1339,10 +1339,6 @@ static int __init ide_setup(char *s) | |||
1339 | case -7: /* "noautotune" */ | 1339 | case -7: /* "noautotune" */ |
1340 | drive->autotune = IDE_TUNE_NOAUTO; | 1340 | drive->autotune = IDE_TUNE_NOAUTO; |
1341 | goto obsolete_option; | 1341 | goto obsolete_option; |
1342 | case -9: /* "swapdata" */ | ||
1343 | case -10: /* "bswap" */ | ||
1344 | drive->bswap = 1; | ||
1345 | goto done; | ||
1346 | case -11: /* noflush */ | 1342 | case -11: /* noflush */ |
1347 | drive->noflush = 1; | 1343 | drive->noflush = 1; |
1348 | goto done; | 1344 | goto done; |