aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/jmicron.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 19:56:35 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 19:56:35 -0400
commit2b0460b534f383eca744eb8fff66ec9f57e702b9 (patch)
tree1bf4b9d0ebccd3083da4de7e4273b8d29f5d5c5d /drivers/ide/pci/jmicron.c
parentd91f5bb69adde86173071cf7fffbdf705ae8c6e7 (diff)
parentb02fcae007ac64012806bc57054e7fee6e2ffe5e (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (33 commits) amd74xx: remove /proc/ide/amd74xx amd74xx/via82cxxx: don't initialize drive->dn sis5513: remove /proc/ide/sis ide: remove CONFIG_IDEDMA_ONLYDISK ide: add "hdx=nodma" kernel parameter ide: remove hwif->autodma and drive->autodma ide: remove "idex=dma" kernel parameter ide: remove CONFIG_BLK_DEV_IDEDMA_FORCED ide: use PCI_VDEVICE() macro sis5513: clear prefetch and postwrite for ATAPI devices it8213/piix/slc90e66: "de-couple" PIO and UDMA modes ide: unexport noautodma ide: unexport ide_tune_dma ide: remove ->ide_dma_check (take 2) ide-pmac: add PIO autotune fallback to ->ide_dma_check ide-cris: add PIO autotune fallback to ->ide_dma_check sl82c105: add PIO autotune fallback to ->ide_dma_check cs5530/sc1200: add PIO autotune fallback to ->ide_dma_check ide: remove ide_use_fast_pio() ide: remove drive->init_speed zeroing ...
Diffstat (limited to 'drivers/ide/pci/jmicron.c')
-rw-r--r--drivers/ide/pci/jmicron.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c
index 582b4cae2b53..bb893ffcc987 100644
--- a/drivers/ide/pci/jmicron.c
+++ b/drivers/ide/pci/jmicron.c
@@ -100,24 +100,6 @@ static void jmicron_set_dma_mode(ide_drive_t *drive, const u8 mode)
100} 100}
101 101
102/** 102/**
103 * jmicron_configure_drive_for_dma - set up for DMA transfers
104 * @drive: drive we are going to set up
105 *
106 * As the JMicron snoops for timings all we actually need to do is
107 * make sure we don't set an invalid mode.
108 */
109
110static int jmicron_config_drive_for_dma (ide_drive_t *drive)
111{
112 if (ide_tune_dma(drive))
113 return 0;
114
115 ide_set_max_pio(drive);
116
117 return -1;
118}
119
120/**
121 * init_hwif_jmicron - set up hwif structs 103 * init_hwif_jmicron - set up hwif structs
122 * @hwif: interface to set up 104 * @hwif: interface to set up
123 * 105 *
@@ -132,25 +114,15 @@ static void __devinit init_hwif_jmicron(ide_hwif_t *hwif)
132 hwif->drives[0].autotune = 1; 114 hwif->drives[0].autotune = 1;
133 hwif->drives[1].autotune = 1; 115 hwif->drives[1].autotune = 1;
134 116
135 if (!hwif->dma_base) 117 if (hwif->dma_base == 0)
136 goto fallback; 118 return;
137 119
138 hwif->atapi_dma = 1; 120 hwif->atapi_dma = 1;
139 hwif->ultra_mask = 0x7f; 121 hwif->ultra_mask = 0x7f;
140 hwif->mwdma_mask = 0x07; 122 hwif->mwdma_mask = 0x07;
141 123
142 hwif->ide_dma_check = &jmicron_config_drive_for_dma;
143
144 if (hwif->cbl != ATA_CBL_PATA40_SHORT) 124 if (hwif->cbl != ATA_CBL_PATA40_SHORT)
145 hwif->cbl = ata66_jmicron(hwif); 125 hwif->cbl = ata66_jmicron(hwif);
146
147 hwif->autodma = 1;
148 hwif->drives[0].autodma = hwif->autodma;
149 hwif->drives[1].autodma = hwif->autodma;
150 return;
151fallback:
152 hwif->autodma = 0;
153 return;
154} 126}
155 127
156static ide_pci_device_t jmicron_chipset __devinitdata = { 128static ide_pci_device_t jmicron_chipset __devinitdata = {