Commit 5416912a authored by Aaron Lu's avatar Aaron Lu Committed by Jeff Garzik

libata: set dma_mode to 0xff in reset

ata_device->dma_mode's initial value is zero, which is not a valid dma
mode, but ata_dma_enabled will return true for this value. This patch
sets dma_mode to 0xff in reset function, so that ata_dma_enabled will
not return true for this case, or it will cause problem for pata_acpi.

The corrsponding bugzilla page is at:
https://bugzilla.kernel.org/show_bug.cgi?id=49151Reported-by: default avatarPhillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: default avatarAaron Lu <aaron.lu@intel.com>
Tested-by: default avatarSzymon Janc <szymon@janc.net.pl>
Tested-by: default avatarDutra Julio <dutra.julio@gmail.com>
Acked-by: default avatarAlan Cox <alan@linux.intel.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent f295be25
......@@ -2559,6 +2559,7 @@ int ata_bus_probe(struct ata_port *ap)
* bus as we may be talking too fast.
*/
dev->pio_mode = XFER_PIO_0;
dev->dma_mode = 0xff;
/* If the controller has a pio mode setup function
* then use it to set the chipset to rights. Don't
......
......@@ -2657,6 +2657,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
* bus as we may be talking too fast.
*/
dev->pio_mode = XFER_PIO_0;
dev->dma_mode = 0xff;
/* If the controller has a pio mode setup function
* then use it to set the chipset to rights. Don't
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment