Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 2017 17:55:26 +0000 (UTC)
From:      "Kenneth D. Merry" <ken@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320420 - head/sys/cam/scsi
Message-ID:  <201706271755.v5RHtQ51038309@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ken
Date: Tue Jun 27 17:55:25 2017
New Revision: 320420
URL: https://svnweb.freebsd.org/changeset/base/320420

Log:
  In scsi_zbc_in(), fill in the length in the ZBC IN CDB.
  
  Without the allocation length set, the target will either reject
  the command or complete it without transferring any data.
  
  This fixes the REPORT ZONES command for SCSI ZBC protocol devices,
  as well as ATA ZAC protocol devices that are behind a SCSI to ATA
  translation layer.  (LSI/Broadcom's 12Gb SAS adapters translate ZBC
  commands to ZAC commands.)  Those are Host Aware and Host Managed SMR
  drives.
  
  This will fix REPORT ZONE commands sent to the da(4) driver via the
  GEOM bio interface and zonectl, and REPORT ZONE commands sent from
  camcontrol(8).
  
  Note that in the case of camcontrol(8), we currently only send
  SCSI ZBC commands to native SCSI protocol devices, not ATA devices
  behind a SAT layer.
  
  sys/cam/scsi/scsi_da.c:
  	Fill in the length field in scsi_zbc_in().
  
  MFC after:	3 days
  Sponsored by:	Spectra Logic

Modified:
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c	Tue Jun 27 17:48:11 2017	(r320419)
+++ head/sys/cam/scsi/scsi_da.c	Tue Jun 27 17:55:25 2017	(r320420)
@@ -5804,6 +5804,7 @@ scsi_zbc_in(struct ccb_scsiio *csio, uint32_t retries,
 	scsi_cmd = (struct scsi_zbc_in *)&csio->cdb_io.cdb_bytes;
 	scsi_cmd->opcode = ZBC_IN;
 	scsi_cmd->service_action = service_action;
+	scsi_ulto4b(dxfer_len, scsi_cmd->length);
 	scsi_u64to8b(zone_start_lba, scsi_cmd->zone_start_lba);
 	scsi_cmd->zone_options = zone_options;
 



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