diff options
author | kib <kib@FreeBSD.org> | 2013-02-12 16:57:20 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-02-12 16:57:20 +0000 |
commit | bd7f0fa0bb4b7b0f87227e0c4d49a4bd9b113cf0 (patch) | |
tree | e550f2c754f1edf951a8b93963ebcfc4fa0d20ce /sys/dev/ata | |
parent | e0a463e76c719f11788ec107b5aa3e2da4e57c0b (diff) | |
download | FreeBSD-src-bd7f0fa0bb4b7b0f87227e0c4d49a4bd9b113cf0.zip FreeBSD-src-bd7f0fa0bb4b7b0f87227e0c4d49a4bd9b113cf0.tar.gz |
Reform the busdma API so that new types may be added without modifying
every architecture's busdma_machdep.c. It is done by unifying the
bus_dmamap_load_buffer() routines so that they may be called from MI
code. The MD busdma is then given a chance to do any final processing
in the complete() callback.
The cam changes unify the bus_dmamap_load* handling in cam drivers.
The arm and mips implementations are updated to track virtual
addresses for sync(). Previously this was done in a type specific
way. Now it is done in a generic way by recording the list of
virtuals in the map.
Submitted by: jeff (sponsored by EMC/Isilon)
Reviewed by: kan (previous version), scottl,
mjacob (isp(4), no objections for target mode changes)
Discussed with: ian (arm changes)
Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris),
amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/ata-dma.c | 15 | ||||
-rw-r--r-- | sys/dev/ata/atapi-cam.c | 6 |
2 files changed, 11 insertions, 10 deletions
diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c index ffd2461..9aea845 100644 --- a/sys/dev/ata/ata-dma.c +++ b/sys/dev/ata/ata-dma.c @@ -304,10 +304,17 @@ ata_dmaload(struct ata_request *request, void *addr, int *entries) else dspa.dmatab = request->dma->sg; - if ((error = bus_dmamap_load(request->dma->data_tag, request->dma->data_map, - request->data, request->bytecount, - ch->dma.setprd, &dspa, BUS_DMA_NOWAIT)) || - (error = dspa.error)) { +#ifdef ATA_CAM + if (request->ccb) + error = bus_dmamap_load_ccb(request->dma->data_tag, + request->dma->data_map, request->ccb, + ch->dma.setprd, &dspa, BUS_DMA_NOWAIT); + else +#endif + error = bus_dmamap_load(request->dma->data_tag, request->dma->data_map, + request->data, request->bytecount, + ch->dma.setprd, &dspa, BUS_DMA_NOWAIT); + if (error || (error = dspa.error)) { device_printf(request->parent, "FAILURE - load data\n"); goto error; } diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c index 363aa94..0181785 100644 --- a/sys/dev/ata/atapi-cam.c +++ b/sys/dev/ata/atapi-cam.c @@ -514,12 +514,6 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) ("CAM CCB too long for ATAPI")); goto action_invalid; } - if ((ccb_h->flags & CAM_SCATTER_VALID)) { - /* scatter-gather not supported */ - xpt_print_path(ccb_h->path); - printf("ATAPI/CAM does not support scatter-gather yet!\n"); - goto action_invalid; - } switch (ccb_h->flags & CAM_DIR_MASK) { case CAM_DIR_IN: |