From 9e9cfbbee4d69b27c40aa74ef10e7d1fb0af48eb Mon Sep 17 00:00:00 2001 From: jimharris Date: Mon, 27 Aug 2012 18:12:08 +0000 Subject: [PATCH] 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) git-svn-id: svn://svn.freebsd.org/base/releng/9.1@239742 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/cam/scsi/scsi_da.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 994aaa6d..36b2c4c4 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -1788,8 +1788,8 @@ dastart(struct cam_periph *periph, union ccb *start_ccb) 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 ccb *start_ccb) /*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; -- 2.45.0