Skip to content

Commit

Permalink
pata_radisys: fix UDMA handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Jeff Garzik committed Dec 3, 2009
1 parent a809c68 commit dd4a43c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ata/pata_radisys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit dd4a43c

Please sign in to comment.