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

peripheral.

Sponsored by:	Spectra Logic
This commit is contained in:
Kenneth D. Merry 2013-04-02 17:29:17 +00:00
parent 9eef3375ce
commit 3e49efa8b3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249028

View File

@ -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)++;
}