[PATCH 5/8] ide: always set DMA masks in ide_pci_setup_ports()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-ide@...>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@...>, <linux-kernel@...>
Date: Sunday, January 6, 2008 - 1:02 pm

Always set DMA masks in ide_pci_setup_ports() to make sure that the valid
masks for a host are set.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
+34 bytes
 drivers/ide/setup-pci.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Index: b/drivers/ide/setup-pci.c
===================================================================
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -556,10 +556,15 @@ void ide_pci_setup_ports(struct pci_dev 
 			hwif->drives[1].unmask = 1;
 		}
 
-		if (hwif->dma_base) {
-			hwif->swdma_mask = d->swdma_mask;
-			hwif->mwdma_mask = d->mwdma_mask;
-			hwif->ultra_mask = d->udma_mask;
+		hwif->swdma_mask = d->swdma_mask;
+		hwif->mwdma_mask = d->mwdma_mask;
+		hwif->ultra_mask = d->udma_mask;
+
+		if ((d->host_flags && IDE_HFLAG_NO_DMA) == 0 &&
+		    hwif->dma_base == 0) {
+			hwif->swdma_mask = 0;
+			hwif->mwdma_mask = 0;
+			hwif->ultra_mask = 0;
 		}
 
 		hwif->drives[0].autotune = 1;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/8] ide: more IDE probing code rework, Bartlomiej Zolnierkiewicz..., (Sun Jan 6, 1:02 pm)
[PATCH 8/8] ide: add -&gt;cable_detect method to ide_hwif_t, Bartlomiej Zolnierkiewicz..., (Sun Jan 6, 1:03 pm)
[PATCH 7/8] ide: add struct ide_port_info instances to legac..., Bartlomiej Zolnierkiewicz..., (Sun Jan 6, 1:03 pm)
Re: [PATCH 7/8] ide: add struct ide_port_info instances to l..., Bartlomiej Zolnierkiewicz..., (Sun Feb 10, 1:04 pm)
Re: [PATCH 7/8] ide: add struct ide_port_info instances to l..., Bartlomiej Zolnierkiewicz..., (Sun Feb 10, 7:16 pm)
Re: [PATCH 7/8] ide: add struct ide_port_info instances to l..., Bartlomiej Zolnierkiewicz..., (Fri Feb 1, 7:35 pm)
[PATCH 6/8] ide: separate PCI specific init from generic ini..., Bartlomiej Zolnierkiewicz..., (Sun Jan 6, 1:03 pm)
[PATCH 5/8] ide: always set DMA masks in ide_pci_setup_ports(), Bartlomiej Zolnierkiewicz..., (Sun Jan 6, 1:02 pm)
[PATCH 4/8] macide: remove drive-&gt;capacity64 quirk, Bartlomiej Zolnierkiewicz..., (Sun Jan 6, 1:02 pm)
[PATCH 3/8] atiixp/cs5535/scc_pata: fix "idex=ata66" paramet..., Bartlomiej Zolnierkiewicz..., (Sun Jan 6, 1:02 pm)
[PATCH 2/8] au1xxx-ide: fix -&gt;io_32bit handling, Bartlomiej Zolnierkiewicz..., (Sun Jan 6, 1:02 pm)
[PATCH 1/8] dtc2278: fix -&gt;io_32bit handling, Bartlomiej Zolnierkiewicz..., (Sun Jan 6, 1:02 pm)