diff options
author | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2007-03-20 12:01:19 +0000 |
---|---|---|
committer | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2007-03-20 12:01:19 +0000 |
commit | 5eb2ced892a32a85dd7a55cd1ac62b1f93a3587f (patch) | |
tree | 5d8a9004ddd83b45b2827b08f545dce8a99580d3 /sys/dev/pci/ahci.c | |
parent | 13ed7c51079a96587a67b924a6b68c2c2b35d842 (diff) |
Add support for ATA PACKET commands. This should make ATAPI cdrom drives,
etc, just work.
Diffstat (limited to 'sys/dev/pci/ahci.c')
-rw-r--r-- | sys/dev/pci/ahci.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c index 7a95fba59c8..c9348a07403 100644 --- a/sys/dev/pci/ahci.c +++ b/sys/dev/pci/ahci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahci.c,v 1.86 2007/03/20 11:22:40 pascoe Exp $ */ +/* $OpenBSD: ahci.c,v 1.87 2007/03/20 12:01:18 pascoe Exp $ */ /* * Copyright (c) 2006 David Gwynne <dlg@openbsd.org> @@ -869,6 +869,8 @@ nomem: ccb->ccb_cmd_hdr->ctba_lo = htole32((u_int32_t)dva); ccb->ccb_xa.cmd.tx = (struct ata_regs *)ccb->ccb_cmd_table->cfis; + ccb->ccb_xa.cmd.packetcmd = ccb->ccb_cmd_table->acmd; + ccb->ccb_xa.cmd.tag = i; ccb->ccb_xa.ata_put_xfer = ahci_ata_put_xfer; @@ -1781,6 +1783,9 @@ ahci_ata_cmd(struct ata_xfer *xa) if (xa->flags & ATA_F_WRITE) cmd_slot->flags |= htole16(AHCI_CMD_LIST_FLAG_W); + if (xa->flags & ATA_F_PACKET) + cmd_slot->flags |= htole16(AHCI_CMD_LIST_FLAG_A); + if (ahci_load_prdt(ccb) != 0) goto failcmd; |