svn commit: r255901 - stable/9/sys/cam/ctl

Kenneth D. Merry ken at FreeBSD.org
Thu Sep 26 19:42:59 UTC 2013


Author: ken
Date: Thu Sep 26 19:42:58 2013
New Revision: 255901
URL: http://svnweb.freebsd.org/changeset/base/255901

Log:
  MFC 249028:
  
  The CTL block backend is broken without this.
  
    Fix sending virtual scatter/gather lists from the CTL CAM frontend
    peripheral.
  
    Sponsored by:	Spectra Logic

Modified:
  stable/9/sys/cam/ctl/scsi_ctl.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cam/ctl/scsi_ctl.c
==============================================================================
--- stable/9/sys/cam/ctl/scsi_ctl.c	Thu Sep 26 18:32:51 2013	(r255900)
+++ stable/9/sys/cam/ctl/scsi_ctl.c	Thu Sep 26 19:42:58 2013	(r255901)
@@ -916,7 +916,7 @@ ctlfestart(struct cam_periph *periph, un
 				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, un
 				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)++;
 			}


More information about the svn-src-stable-9 mailing list