aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_tpc.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2015-10-01 16:30:20 +0000
committerAlexander Motin <mav@FreeBSD.org>2015-10-01 16:30:20 +0000
commit6ac1446d0e1978cffb1027485ffd3cc69b30c516 (patch)
treea496a801055bcf61898eacd53cd8ebc70cc5fd13 /sys/cam/ctl/ctl_tpc.c
parentf24b1dc90c9c95872eafeb5e937d51a87319ee37 (diff)
downloadsrc-6ac1446d0e1978cffb1027485ffd3cc69b30c516.tar.gz
src-6ac1446d0e1978cffb1027485ffd3cc69b30c516.zip
Make zero WUT use WRITE SAME with recently allowed NDOB flag.
Notes
Notes: svn path=/head/; revision=288450
Diffstat (limited to 'sys/cam/ctl/ctl_tpc.c')
-rw-r--r--sys/cam/ctl/ctl_tpc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/cam/ctl/ctl_tpc.c b/sys/cam/ctl/ctl_tpc.c
index 33c7db8c0371..6aa2080853b3 100644
--- a/sys/cam/ctl/ctl_tpc.c
+++ b/sys/cam/ctl/ctl_tpc.c
@@ -1295,7 +1295,6 @@ complete:
ctl_free_io(tio->io);
free(tio, M_CTL);
}
- free(list->buf, M_CTL);
if (list->abort) {
ctl_set_task_aborted(list->ctsio);
return (CTL_RETVAL_ERROR);
@@ -1311,7 +1310,6 @@ complete:
}
dstblock = list->lun->be_lun->blocksize;
- list->buf = malloc(dstblock, M_CTL, M_WAITOK | M_ZERO);
TAILQ_INIT(&run);
prun = &run;
list->tbdio = 1;
@@ -1328,9 +1326,9 @@ complete:
TAILQ_INSERT_TAIL(&list->allio, tiow, links);
tiow->io = tpcl_alloc_io();
ctl_scsi_write_same(tiow->io,
- /*data_ptr*/ list->buf,
- /*data_len*/ dstblock,
- /*byte2*/ 0,
+ /*data_ptr*/ NULL,
+ /*data_len*/ 0,
+ /*byte2*/ SWS_NDOB,
/*lba*/ scsi_8btou64(list->range[r].lba),
/*num_blocks*/ len,
/*tag_type*/ CTL_TAG_SIMPLE,