diff options
| author | Scott Long <scottl@FreeBSD.org> | 2013-06-18 00:36:53 +0000 |
|---|---|---|
| committer | Scott Long <scottl@FreeBSD.org> | 2013-06-18 00:36:53 +0000 |
| commit | 039e422c063977ba9073fd2c93883dd8a5a36d48 (patch) | |
| tree | ac9f929e7c22086aea07210a03683e5d77a1f585 /sys/dev/ahci | |
| parent | de93d9ce32e709231bb626392d9ae78d08441eb2 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ahci')
| -rw-r--r-- | sys/dev/ahci/ahci.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index f4e738423249..85c9c87977c7 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -1790,21 +1790,10 @@ ahci_begin_transaction(device_t dev, union ccb *ccb) (ccb->ataio.cmd.flags & (CAM_ATAIO_CONTROL | CAM_ATAIO_NEEDRESULT))) ch->aslots |= (1 << slot->slot); slot->dma.nsegs = 0; - /* If request moves data, setup and load SG list */ if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { - void *buf; - bus_size_t size; - slot->state = AHCI_SLOT_LOADING; - if (ccb->ccb_h.func_code == XPT_ATA_IO) { - buf = ccb->ataio.data_ptr; - size = ccb->ataio.dxfer_len; - } else { - buf = ccb->csio.data_ptr; - size = ccb->csio.dxfer_len; - } - bus_dmamap_load(ch->dma.data_tag, slot->dma.data_map, - buf, size, ahci_dmasetprd, slot, 0); + bus_dmamap_load_ccb(ch->dma.data_tag, slot->dma.data_map, ccb, + ahci_dmasetprd, slot, 0); } else ahci_execute_transaction(slot); } |
