aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r--drivers/ide/ide-dma.c54
1 files changed, 5 insertions, 49 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index d0e7b537353e..d61e5788d310 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -1,9 +1,13 @@
1/* 1/*
2 * IDE DMA support (including IDE PCI BM-DMA).
3 *
2 * Copyright (C) 1995-1998 Mark Lord 4 * Copyright (C) 1995-1998 Mark Lord
3 * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org> 5 * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org>
4 * Copyright (C) 2004, 2007 Bartlomiej Zolnierkiewicz 6 * Copyright (C) 2004, 2007 Bartlomiej Zolnierkiewicz
5 * 7 *
6 * May be copied or modified under the terms of the GNU General Public License 8 * May be copied or modified under the terms of the GNU General Public License
9 *
10 * DMA is supported for all IDE devices (disk drives, cdroms, tapes, floppies).
7 */ 11 */
8 12
9/* 13/*
@@ -11,49 +15,6 @@
11 */ 15 */
12 16
13/* 17/*
14 * This module provides support for the bus-master IDE DMA functions
15 * of various PCI chipsets, including the Intel PIIX (i82371FB for
16 * the 430 FX chipset), the PIIX3 (i82371SB for the 430 HX/VX and
17 * 440 chipsets), and the PIIX4 (i82371AB for the 430 TX chipset)
18 * ("PIIX" stands for "PCI ISA IDE Xcellerator").
19 *
20 * Pretty much the same code works for other IDE PCI bus-mastering chipsets.
21 *
22 * DMA is supported for all IDE devices (disk drives, cdroms, tapes, floppies).
23 *
24 * By default, DMA support is prepared for use, but is currently enabled only
25 * for drives which already have DMA enabled (UltraDMA or mode 2 multi/single),
26 * or which are recognized as "good" (see table below). Drives with only mode0
27 * or mode1 (multi/single) DMA should also work with this chipset/driver
28 * (eg. MC2112A) but are not enabled by default.
29 *
30 * Use "hdparm -i" to view modes supported by a given drive.
31 *
32 * The hdparm-3.5 (or later) utility can be used for manually enabling/disabling
33 * DMA support, but must be (re-)compiled against this kernel version or later.
34 *
35 * To enable DMA, use "hdparm -d1 /dev/hd?" on a per-drive basis after booting.
36 * If problems arise, ide.c will disable DMA operation after a few retries.
37 * This error recovery mechanism works and has been extremely well exercised.
38 *
39 * IDE drives, depending on their vintage, may support several different modes
40 * of DMA operation. The boot-time modes are indicated with a "*" in
41 * the "hdparm -i" listing, and can be changed with *knowledgeable* use of
42 * the "hdparm -X" feature. There is seldom a need to do this, as drives
43 * normally power-up with their "best" PIO/DMA modes enabled.
44 *
45 * Testing has been done with a rather extensive number of drives,
46 * with Quantum & Western Digital models generally outperforming the pack,
47 * and Fujitsu & Conner (and some Seagate which are really Conner) drives
48 * showing more lackluster throughput.
49 *
50 * Keep an eye on /var/adm/messages for "DMA disabled" messages.
51 *
52 * Some people have reported trouble with Intel Zappa motherboards.
53 * This can be fixed by upgrading the AMI BIOS to version 1.00.04.BS0,
54 * available from ftp://ftp.intel.com/pub/bios/10004bs0.exe
55 * (thanks to Glen Morrell <glen@spin.Stanford.edu> for researching this).
56 *
57 * Thanks to "Christopher J. Reimer" <reimer@doe.carleton.ca> for 18 * Thanks to "Christopher J. Reimer" <reimer@doe.carleton.ca> for
58 * fixing the problem with the BIOS on some Acer motherboards. 19 * fixing the problem with the BIOS on some Acer motherboards.
59 * 20 *
@@ -65,11 +26,6 @@
65 * 26 *
66 * Most importantly, thanks to Robert Bringman <rob@mars.trion.com> 27 * Most importantly, thanks to Robert Bringman <rob@mars.trion.com>
67 * for supplying a Promise UDMA board & WD UDMA drive for this work! 28 * for supplying a Promise UDMA board & WD UDMA drive for this work!
68 *
69 * And, yes, Intel Zappa boards really *do* use both PIIX IDE ports.
70 *
71 * ATA-66/100 and recovery functions, I forgot the rest......
72 *
73 */ 29 */
74 30
75#include <linux/module.h> 31#include <linux/module.h>
@@ -757,7 +713,7 @@ static int ide_tune_dma(ide_drive_t *drive)
757 } 713 }
758 714
759 if (hwif->host_flags & IDE_HFLAG_NO_SET_MODE) 715 if (hwif->host_flags & IDE_HFLAG_NO_SET_MODE)
760 return 0; 716 return 1;
761 717
762 if (ide_set_dma_mode(drive, speed)) 718 if (ide_set_dma_mode(drive, speed))
763 return 0; 719 return 0;