summaryrefslogtreecommitdiffstats
path: root/Documentation/scsi
diff options
context:
space:
mode:
authorAvri Altman <avri.altman@wdc.com>2019-02-20 08:11:14 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2019-02-27 15:00:02 +0100
commit5c17f87abb1a86eb4d2a108477e56389622cf195 (patch)
tree05d55c07b59ec5ef06a3ae3e52b3e8ab2f091163 /Documentation/scsi
parentscsi: ufs: Allow reading descriptor via raw upiu (diff)
downloadlinux-5c17f87abb1a86eb4d2a108477e56389622cf195.tar.xz
linux-5c17f87abb1a86eb4d2a108477e56389622cf195.zip
scsi: ufs-bsg: Allow reading descriptors
Add this functionality, placing the descriptor being read in the actual data buffer in the bio. That is, for both read and write descriptors query upiu, we are using the job's request_payload. This in turn, is mapped back in user land to the applicable sg_io_v4 xferp: dout_xferp for write descriptor, and din_xferp for read descriptor. Signed-off-by: Avri Altman <avri.altman@wdc.com> Reviewed-by: Evan Green <evgreen@chromium.org> Reviewed-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'Documentation/scsi')
-rw-r--r--Documentation/scsi/ufs.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/scsi/ufs.txt b/Documentation/scsi/ufs.txt
index 78fe7cbfae48..1769f71c4c20 100644
--- a/Documentation/scsi/ufs.txt
+++ b/Documentation/scsi/ufs.txt
@@ -150,9 +150,14 @@ send SG_IO with the applicable sg_io_v4:
if (dir == SG_DXFER_TO_DEV) {
io_hdr_v4.dout_xfer_len = (uint32_t)byte_cnt;
io_hdr_v4.dout_xferp = (uintptr_t)(__u64)buff;
+ } else {
+ io_hdr_v4.din_xfer_len = (uint32_t)byte_cnt;
+ io_hdr_v4.din_xferp = (uintptr_t)(__u64)buff;
}
-If you wish to write a descriptor, use the dout_xferp sg_io_v4.
+If you wish to read or write a descriptor, use the appropriate xferp of
+sg_io_v4.
+
UFS Specifications can be found at,
UFS - http://www.jedec.org/sites/default/files/docs/JESD220.pdf