Skip to content

Commit

Permalink
pata_via: fix address setup timings underlocking
Browse files Browse the repository at this point in the history
Correct via_do_set_mode() documentation while at it.

Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
  • Loading branch information
bzolnier authored and Jeff Garzik committed Mar 1, 2010
1 parent cfcf9ee commit f777582
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ata/pata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ static int via_pre_reset(struct ata_link *link, unsigned long deadline)


/**
* via_do_set_mode - set initial PIO mode data
* via_do_set_mode - set transfer mode data
* @ap: ATA interface
* @adev: ATA device
* @mode: ATA mode being programmed
Expand Down Expand Up @@ -273,7 +273,7 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo

pci_read_config_byte(pdev, 0x4C, &setup);
setup &= ~(3 << shift);
setup |= clamp_val(t.setup, 1, 4) << shift; /* 1,4 or 1,4 - 1 FIXME */
setup |= (clamp_val(t.setup, 1, 4) - 1) << shift;
pci_write_config_byte(pdev, 0x4C, setup);
}

Expand Down

0 comments on commit f777582

Please sign in to comment.