summaryrefslogtreecommitdiff
path: root/sys/dev/sym
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2013-02-12 16:57:20 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2013-02-12 16:57:20 +0000
commitdd0b4fb6d50631c140e800bdfac48d02e7e4c875 (patch)
treee550f2c754f1edf951a8b93963ebcfc4fa0d20ce /sys/dev/sym
parent44c169253de5caec5de2a397c522ad3e359f86e6 (diff)
Notes
Diffstat (limited to 'sys/dev/sym')
-rw-r--r--sys/dev/sym/sym_hipd.c50
1 files changed, 7 insertions, 43 deletions
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c
index 7d0450c2e41a..68ad77f68f93 100644
--- a/sys/dev/sym/sym_hipd.c
+++ b/sys/dev/sym/sym_hipd.c
@@ -7877,51 +7877,15 @@ sym_setup_data_and_start(hcb_p np, struct ccb_scsiio *csio, ccb_p cp)
return;
}
- if (!(ccb_h->flags & CAM_SCATTER_VALID)) {
- /* Single buffer */
- if (!(ccb_h->flags & CAM_DATA_PHYS)) {
- /* Buffer is virtual */
- cp->dmamapped = (dir == CAM_DIR_IN) ?
- SYM_DMA_READ : SYM_DMA_WRITE;
- retv = bus_dmamap_load(np->data_dmat, cp->dmamap,
- csio->data_ptr, csio->dxfer_len,
- sym_execute_ccb, cp, 0);
- if (retv == EINPROGRESS) {
- cp->host_status = HS_WAIT;
- xpt_freeze_simq(np->sim, 1);
- csio->ccb_h.status |= CAM_RELEASE_SIMQ;
- }
- } else {
- /* Buffer is physical */
- struct bus_dma_segment seg;
-
- seg.ds_addr = (bus_addr_t) csio->data_ptr;
- sym_execute_ccb(cp, &seg, 1, 0);
- }
- } else {
- /* Scatter/gather list */
- struct bus_dma_segment *segs;
-
- if ((ccb_h->flags & CAM_SG_LIST_PHYS) != 0) {
- /* The SG list pointer is physical */
- sym_set_cam_status(cp->cam_ccb, CAM_REQ_INVALID);
- goto out_abort;
- }
-
- if (!(ccb_h->flags & CAM_DATA_PHYS)) {
- /* SG buffer pointers are virtual */
- sym_set_cam_status(cp->cam_ccb, CAM_REQ_INVALID);
- goto out_abort;
- }
-
- /* SG buffer pointers are physical */
- segs = (struct bus_dma_segment *)csio->data_ptr;
- sym_execute_ccb(cp, segs, csio->sglist_cnt, 0);
+ cp->dmamapped = (dir == CAM_DIR_IN) ? SYM_DMA_READ : SYM_DMA_WRITE;
+ retv = bus_dmamap_load_ccb(np->data_dmat, cp->dmamap,
+ (union ccb *)csio, sym_execute_ccb, cp, 0);
+ if (retv == EINPROGRESS) {
+ cp->host_status = HS_WAIT;
+ xpt_freeze_simq(np->sim, 1);
+ csio->ccb_h.status |= CAM_RELEASE_SIMQ;
}
return;
-out_abort:
- sym_xpt_done(np, (union ccb *) csio, cp);
- sym_free_ccb(np, cp);
}
/*