Re: [PATCH 2/6] scsi: ufs: Add ufs-bsg module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2018-08-01 at 11:04 +-0300, Avri Altman wrote:
+AD4- +-+-+- b/drivers/scsi/ufs/ufs+AF8-bsg.c
+AD4- +AEAAQA- -0,0 +-1,127 +AEAAQA-
+AD4- +-// SPDX-License-Identifier: GPL-2.0
+AD4- +-/+ACo-
+AD4- +- +ACo- SSCSI transport companion for UFS HBA

What is +ACI-SSCSI+ACI-?

+AD4- diff --git a/drivers/scsi/ufs/ufs+AF8-bsg.h b/drivers/scsi/ufs/ufs+AF8-bsg.h
+AD4- new file mode 100644

+AFs- ... +AF0-

+AD4- +-struct ufs+AF8-bsg+AF8-request +AHs-
+AD4- +-	uint32+AF8-t msgcode+ADs-
+AD4- +-	struct utp+AF8-upiu+AF8-header header+ADs-
+AD4- +-	union +AHs-
+AD4- +-		struct utp+AF8-upiu+AF8-query		qr+ADs-
+AD4- +-		struct utp+AF8-upiu+AF8-task+AF8-req	tr+ADs-
+AD4- +-		/+ACo- use utp+AF8-upiu+AF8-query to host the 4 dwards of uic command +ACo-/

What are +ACI-dwards+ACI-?

+AD4- +-		struct utp+AF8-upiu+AF8-query		uc+ADs-
+AD4- +-	+AH0- tsf+ADs-
+AD4- +-	uint8+AF8-t data+AFs-0+AF0AOw-

The offset of the data member will change if a member will be added to the
union with a larger size than the existing members. That seems like an API
design bug to me.

+AD4- +-+AH0- +AF8AXw-packed+ADs-

Would the data member offsets be the same without +ACIAXwBf-packed+ACI-? If so, +AF8AXw-packed
should be left out because it results in generation of suboptimal code on
architectures that do not support unaligned multi-byte reads (e.g. IA-64).

+AD4- +-struct ufs+AF8-bsg+AF8-reply +AHs-
+AD4- +-	/+ACo-
+AD4- +-	 +ACo- The completion result. Result exists in two forms:
+AD4- +-	 +ACo- if negative, it is an -Exxx system errno value. There will
+AD4- +-	 +ACo- be no further reply information supplied.
+AD4- +-	 +ACo- else, it's the 4-byte scsi error result, with driver, host,
+AD4- +-	 +ACo- msg and status fields. The per-msgcode reply structure
+AD4- +-	 +ACo- will contain valid data.
+AD4- +-	 +ACo-/
+AD4- +-	uint32+AF8-t result+ADs-
+AD4- +-
+AD4- +-	/+ACo- If there was reply+AF8-payload, how much was recevied ? +ACo-/
                                                    +AF4AXgBeAF4AXgBeAF4AXg-
Did you perhaps mean +ACI-received+ACI-?

+AD4- +-	uint32+AF8-t reply+AF8-payload+AF8-rcv+AF8-len+ADs-
+AD4- +-
+AD4- +-	struct utp+AF8-upiu+AF8-header header+ADs-
+AD4- +-	union +AHs-
+AD4- +-		struct utp+AF8-upiu+AF8-query		qr+ADs-
+AD4- +-		struct utp+AF8-upiu+AF8-task+AF8-rsp	tr+ADs-
+AD4- +-		struct utp+AF8-upiu+AF8-query		uc+ADs-
+AD4- +-	+AH0- tsf+ADs-
+AD4- +-	uint8+AF8-t data+AFs-0+AF0AOw-
+AD4- +-+AH0AOw-
+AD4- +-
+AD4- +-struct ufs+AF8-bsg+AF8-raw+AF8-upiu +AHs-
+AD4- +-	struct ufs+AF8-bsg+AF8-upiu request+ADs-
+AD4- +-	struct ufs+AF8-bsg+AF8-upiu reply+ADs-
+AD4- +-+AH0AOw-

Are any of the above data structures needed by user space software? Should these
data structure definitions perhaps be moved to a header file under include/uapi?

Thanks,

Bart.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux