Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Apr 2014 21:30:10 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264279 - in head/sys/cam: ctl scsi
Message-ID:  <201404082130.s38LUAHd024582@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Apr  8 21:30:10 2014
New Revision: 264279
URL: http://svnweb.freebsd.org/changeset/base/264279

Log:
  Oops! Few quick fixes for r264274.

Modified:
  head/sys/cam/ctl/ctl_backend_ramdisk.c
  head/sys/cam/scsi/scsi_all.h

Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c
==============================================================================
--- head/sys/cam/ctl/ctl_backend_ramdisk.c	Tue Apr  8 21:06:58 2014	(r264278)
+++ head/sys/cam/ctl/ctl_backend_ramdisk.c	Tue Apr  8 21:30:10 2014	(r264279)
@@ -546,6 +546,7 @@ ctl_backend_ramdisk_create(struct ctl_be
 
 	be_lun->softc = softc;
 
+	unmap = 0;
 	for (i = 0; i < req->num_be_args; i++) {
 		if (strcmp(req->kern_be_args[i].kname, "unmap") == 0 &&
 		    strcmp(req->kern_be_args[i].kvalue, "on") == 0) {
@@ -565,7 +566,7 @@ ctl_backend_ramdisk_create(struct ctl_be
 	be_lun->flags = CTL_BE_RAMDISK_LUN_UNCONFIGURED;
 	be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY;
 	if (unmap)
-		be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_UNMAP;
+		be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP;
 	be_lun->ctl_be_lun.be_lun = be_lun;
 
 	if (params->flags & CTL_LUN_FLAG_ID_REQ) {

Modified: head/sys/cam/scsi/scsi_all.h
==============================================================================
--- head/sys/cam/scsi/scsi_all.h	Tue Apr  8 21:06:58 2014	(r264278)
+++ head/sys/cam/scsi/scsi_all.h	Tue Apr  8 21:30:10 2014	(r264279)
@@ -858,7 +858,7 @@ struct scsi_unmap_header
 {
 	uint8_t	length[2];
 	uint8_t	desc_length[2];
-	uint8_t	reserved[8];
+	uint8_t	reserved[4];
 };
 
 struct scsi_unmap_desc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404082130.s38LUAHd024582>