Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172890
b: refs/heads/master
c: c4d8a20
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Jeff Garzik committed Dec 3, 2009
1 parent 9adbc47 commit 54a99a2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 750c7136ea873255ed0b74e20f0d3ef9ac8984c0
refs/heads/master: c4d8a20022e617174eb887c82356d3f513e279a7
19 changes: 13 additions & 6 deletions trunk/drivers/ata/pata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,21 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo
}

/* Set UDMA unless device is not UDMA capable */
if (udma_type && t.udma) {
u8 cable80_status;
if (udma_type) {
u8 udma_etc;

/* Get 80-wire cable detection bit */
pci_read_config_byte(pdev, 0x50 + offset, &cable80_status);
cable80_status &= 0x10;
pci_read_config_byte(pdev, 0x50 + offset, &udma_etc);

pci_write_config_byte(pdev, 0x50 + offset, ut | cable80_status);
/* clear transfer mode bit */
udma_etc &= ~0x20;

if (t.udma) {
/* preserve 80-wire cable detection bit */
udma_etc &= 0x10;
udma_etc |= ut;
}

pci_write_config_byte(pdev, 0x50 + offset, udma_etc);
}
}

Expand Down

0 comments on commit 54a99a2

Please sign in to comment.