Skip to content

Commit

Permalink
[PATCH] ahci: enable prefetching for PACKET commands
Browse files Browse the repository at this point in the history
Turn on AHCI_CMD_PREFETCH for PACKET commands.  This hints the
controller that it can prefetch the CDB and the PRD entries.  This
patch is originally from Jeff Garzik.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Mar 12, 2006
1 parent 418dc1f commit 4b10e55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ enum {
AHCI_IRQ_ON_SG = (1 << 31),
AHCI_CMD_ATAPI = (1 << 5),
AHCI_CMD_WRITE = (1 << 6),
AHCI_CMD_PREFETCH = (1 << 7),
AHCI_CMD_RESET = (1 << 8),
AHCI_CMD_CLR_BUSY = (1 << 10),

Expand Down Expand Up @@ -631,7 +632,7 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc)
if (qc->tf.flags & ATA_TFLAG_WRITE)
opts |= AHCI_CMD_WRITE;
if (is_atapi)
opts |= AHCI_CMD_ATAPI;
opts |= AHCI_CMD_ATAPI | AHCI_CMD_PREFETCH;

ahci_fill_cmd_slot(pp, opts);
}
Expand Down

0 comments on commit 4b10e55

Please sign in to comment.