aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:08 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:08 -0500
commit4f52a32994f9e05fb8ae1a9ba3f20cd0b55145b7 (patch)
tree32daca85380f3448c0370dd651cca724877938a2 /drivers/ide
parentce635f605e52a0d47aea5313ba406ada20e6028a (diff)
ide-pmac: use custom hwif->sg_max_nents only if DMA support is enabled
Move setting hwif->sg_max_nents from pmac_ide_setup_device() to pmac_ide_setup_dma(). Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ppc/pmac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index cd514743df96..736d12c8e68a 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -1133,8 +1133,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw)
1133 hwif->noprobe = 0; 1133 hwif->noprobe = 0;
1134#endif /* CONFIG_PMAC_MEDIABAY */ 1134#endif /* CONFIG_PMAC_MEDIABAY */
1135 1135
1136 hwif->sg_max_nents = MAX_DCMDS;
1137
1138#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC 1136#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
1139 /* has a DBDMA controller channel */ 1137 /* has a DBDMA controller channel */
1140 if (pmif->dma_regs) 1138 if (pmif->dma_regs)
@@ -1751,6 +1749,8 @@ pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
1751 return; 1749 return;
1752 } 1750 }
1753 1751
1752 hwif->sg_max_nents = MAX_DCMDS;
1753
1754 hwif->dma_host_set = &pmac_ide_dma_host_set; 1754 hwif->dma_host_set = &pmac_ide_dma_host_set;
1755 hwif->dma_setup = &pmac_ide_dma_setup; 1755 hwif->dma_setup = &pmac_ide_dma_setup;
1756 hwif->dma_exec_cmd = &pmac_ide_dma_exec_cmd; 1756 hwif->dma_exec_cmd = &pmac_ide_dma_exec_cmd;