Permalink
Browse files

Fix sending virtual scatter/gather lists from the CTL CAM frontend

peripheral.

Sponsored by:	Spectra Logic
  • Loading branch information...
1 parent c634b46 commit 65d6e2cf04f600a82865a903278b095aa7e70b6b ken committed Apr 2, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 sys/cam/ctl/scsi_ctl.c
View
@@ -916,7 +916,7 @@ ctlfestart(struct cam_periph *periph, union ccb *start_ccb)
if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR)
flags |= CAM_DATA_SG_PADDR;
else
- flags &= ~CAM_DATA_SG;
+ flags |= CAM_DATA_SG;
data_ptr = (uint8_t *)cam_sglist;
dxfer_len = io->scsiio.kern_data_len;
} else {
@@ -938,6 +938,10 @@ ctlfestart(struct cam_periph *periph, union ccb *start_ccb)
data_ptr = sglist[*ti].addr;
dxfer_len = sglist[*ti].len;
csio->sglist_cnt = 0;
+ if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR)
+ flags |= CAM_DATA_PADDR;
+ else
+ flags |= CAM_DATA_VADDR;
cmd_info->flags |= CTLFE_CMD_PIECEWISE;
(*ti)++;
}

0 comments on commit 65d6e2c

Please sign in to comment.