svn commit: r239742 - releng/9.1/sys/cam/scsi

Jim Harris jimharris at FreeBSD.org
Mon Aug 27 18:12:08 UTC 2012


Author: jimharris
Date: Mon Aug 27 18:12:08 2012
New Revision: 239742
URL: http://svn.freebsd.org/changeset/base/239742

Log:
  MFC r239655:
  
    Fix scsi_da's BIO_DELETE->SCSI_UNMAP translation to use correct local
    variable when determining various sizes related to SCSI UNMAP block
    descriptor lists.
  
  Sponsored by:	Intel
  Approved by:	re (kib)

Modified:
  releng/9.1/sys/cam/scsi/scsi_da.c
Directory Properties:
  releng/9.1/sys/   (props changed)

Modified: releng/9.1/sys/cam/scsi/scsi_da.c
==============================================================================
--- releng/9.1/sys/cam/scsi/scsi_da.c	Mon Aug 27 18:10:25 2012	(r239741)
+++ releng/9.1/sys/cam/scsi/scsi_da.c	Mon Aug 27 18:12:08 2012	(r239742)
@@ -1788,8 +1788,8 @@ dastart(struct cam_periph *periph, union
 				     softc->params.secsize > softc->unmap_max_lba)
 					break;
 			} while (1);
-			scsi_ulto2b(count * 16 + 6, &buf[0]);
-			scsi_ulto2b(count * 16, &buf[2]);
+			scsi_ulto2b(ranges * 16 + 6, &buf[0]);
+			scsi_ulto2b(ranges * 16, &buf[2]);
 
 			scsi_unmap(&start_ccb->csio,
 					/*retries*/da_retry_count,
@@ -1797,7 +1797,7 @@ dastart(struct cam_periph *periph, union
 					/*tag_action*/MSG_SIMPLE_Q_TAG,
 					/*byte2*/0,
 					/*data_ptr*/ buf,
-					/*dxfer_len*/ count * 16 + 8,
+					/*dxfer_len*/ ranges * 16 + 8,
 					/*sense_len*/SSD_FULL_SIZE,
 					da_default_timeout * 1000);
 			start_ccb->ccb_h.ccb_state = DA_CCB_DELETE;


More information about the svn-src-all mailing list