summaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_radisys.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-12-03 20:32:13 +0100
committerJeff Garzik <jgarzik@redhat.com>2009-12-03 22:11:24 +0100
commitdd4a43c979d5da7f2cd20e2751dbbd841116cdfe (patch)
tree05b0fc53813ad0a7ac2e20e858c0f7c80a3ce275 /drivers/ata/pata_radisys.c
parentpata_ns87415: Power Management fix (diff)
downloadlinux-dd4a43c979d5da7f2cd20e2751dbbd841116cdfe.tar.xz
linux-dd4a43c979d5da7f2cd20e2751dbbd841116cdfe.zip
pata_radisys: fix UDMA handling
Set correct bits to switch between UDMA2 and UDMA4. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_radisys.c')
-rw-r--r--drivers/ata/pata_radisys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c
index 4401b332eaab..4fd25e737d9a 100644
--- a/drivers/ata/pata_radisys.c
+++ b/drivers/ata/pata_radisys.c
@@ -139,9 +139,9 @@ static void radisys_set_dmamode (struct ata_port *ap, struct ata_device *adev)
pci_read_config_byte(dev, 0x4A, &udma_mode);
if (adev->xfer_mode == XFER_UDMA_2)
- udma_mode &= ~ (1 << adev->devno);
+ udma_mode &= ~(2 << (adev->devno * 4));
else /* UDMA 4 */
- udma_mode |= (1 << adev->devno);
+ udma_mode |= (2 << (adev->devno * 4));
pci_write_config_byte(dev, 0x4A, udma_mode);