Skip to content

Commit

Permalink
pata_pdc202xx_old: LBA48 bug
Browse files Browse the repository at this point in the history
In LBA48 mode we have to help the controller to get anything to work. The
chip provides a register giving word counts meant for ATAPI use which we
can use. However we need to load the count in words not bytes..

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Mar 28, 2007
1 parent 8c3c52a commit 5e51881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/pata_pdc202xx_old.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc)
/* Cases the state machine will not complete correctly without help */
if ((tf->flags & ATA_TFLAG_LBA48) || tf->protocol == ATA_PROT_ATAPI_DMA)
{
len = qc->nbytes;
len = qc->nbytes / 2;

if (tf->flags & ATA_TFLAG_WRITE)
len |= 0x06000000;
Expand Down

0 comments on commit 5e51881

Please sign in to comment.