diff options
author | ken <ken@FreeBSD.org> | 2017-07-03 18:07:09 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 2017-07-03 18:07:09 +0000 |
commit | 1d493faa56da15954ddeb137d269e6ef887b6f6f (patch) | |
tree | efdde5c55d3bf8c262064def2ff33475ce300a4d | |
parent | 64e0abde4c704ce3ed2baeb3834d15c078a0c7f8 (diff) | |
download | FreeBSD-src-1d493faa56da15954ddeb137d269e6ef887b6f6f.zip FreeBSD-src-1d493faa56da15954ddeb137d269e6ef887b6f6f.tar.gz |
Merge r320600 from stable/11 into releng/11.1:
------------------------------------------------------------------------
r320600 | ken | 2017-07-03 09:10:16 -0600 (Mon, 03 Jul 2017) | 30 lines
MFC r320420:
------------------------------------------------------------------------
r320420 | ken | 2017-06-27 11:55:25 -0600 (Tue, 27 Jun 2017) | 25 lines
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().
Sponsored by: Spectra Logic
------------------------------------------------------------------------
------------------------------------------------------------------------
Approved by: re (gjb)
-rw-r--r-- | sys/cam/scsi/scsi_da.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 9b10230..1529580 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -5748,6 +5748,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; |