Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183167
b: refs/heads/master
c: 3403c24
h: refs/heads/master
i:
  183165: f4c2b2d
  183163: 50f2be7
  183159: acdc042
  183151: 626624b
  183135: 81c007c
  183103: 23a2060
  183039: d334c03
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Jeff Garzik committed Mar 1, 2010
1 parent aed4e6b commit 2757de7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 8ebf473860e8166e3d4f152a02e22b9cdddcd440
refs/heads/master: 3403c24529ddfb4a47f5cfe8496370997f1b0758
10 changes: 6 additions & 4 deletions trunk/drivers/ata/pata_cypress.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,16 @@ static void cy82c693_set_piomode(struct ata_port *ap, struct ata_device *adev)
return;
}

time_16 = clamp_val(t.recover, 0, 15) | (clamp_val(t.active, 0, 15) << 4);
time_8 = clamp_val(t.act8b, 0, 15) | (clamp_val(t.rec8b, 0, 15) << 4);
time_16 = clamp_val(t.recover - 1, 0, 15) |
(clamp_val(t.active - 1, 0, 15) << 4);
time_8 = clamp_val(t.act8b - 1, 0, 15) |
(clamp_val(t.rec8b - 1, 0, 15) << 4);

if (adev->devno == 0) {
pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr);

addr &= ~0x0F; /* Mask bits */
addr |= clamp_val(t.setup, 0, 15);
addr |= clamp_val(t.setup - 1, 0, 15);

pci_write_config_dword(pdev, CY82_IDE_ADDRSETUP, addr);
pci_write_config_byte(pdev, CY82_IDE_MASTER_IOR, time_16);
Expand All @@ -79,7 +81,7 @@ static void cy82c693_set_piomode(struct ata_port *ap, struct ata_device *adev)
pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr);

addr &= ~0xF0; /* Mask bits */
addr |= (clamp_val(t.setup, 0, 15) << 4);
addr |= (clamp_val(t.setup - 1, 0, 15) << 4);

pci_write_config_dword(pdev, CY82_IDE_ADDRSETUP, addr);
pci_write_config_byte(pdev, CY82_IDE_SLAVE_IOR, time_16);
Expand Down

0 comments on commit 2757de7

Please sign in to comment.