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

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

 



Bart,
Thanks a lot,
Avri

+AD4- -----Original Message-----
+AD4- From: Bart Van Assche
+AD4- Sent: Wednesday, August 01, 2018 6:13 PM
+AD4- To: hch+AEA-lst.de+ADs- Avri Altman +ADs- linux-scsi+AEA-vger.kernel.org+ADs-
+AD4- jthumshirn+AEA-suse.de+ADs- hare+AEA-suse.com+ADs- martin.petersen+AEA-oracle.com+ADs-
+AD4- jejb+AEA-linux.vnet.ibm.com
+AD4- Cc: Vinayak Holikatti +ADs- Avi Shchislowski +ADs- Alex Lemberg +ADs- Stanislav Nijnikov +ADs-
+AD4- subhashj+AEA-codeaurora.org
+AD4- Subject: Re: +AFs-PATCH 2/6+AF0- scsi: ufs: Add ufs-bsg module
+AD4- 
+AD4- On Wed, 2018-08-01 at 11:04 +-0300, Avri Altman wrote:
+AD4- +AD4- +-+-+- b/drivers/scsi/ufs/ufs+AF8-bsg.c
+AD4- +AD4- +AEAAQA- -0,0 +-1,127 +AEAAQA-
+AD4- +AD4- +-// SPDX-License-Identifier: GPL-2.0
+AD4- +AD4- +-/+ACo-
+AD4- +AD4- +- +ACo- SSCSI transport companion for UFS HBA
+AD4- 
+AD4- What is +ACI-SSCSI+ACI-?
Done

+AD4- 
+AD4- +AD4- diff --git a/drivers/scsi/ufs/ufs+AF8-bsg.h b/drivers/scsi/ufs/ufs+AF8-bsg.h
+AD4- +AD4- new file mode 100644
+AD4- 
+AD4- +AFs- ... +AF0-
+AD4- 
+AD4- +AD4- +-struct ufs+AF8-bsg+AF8-request +AHs-
+AD4- +AD4- +-	uint32+AF8-t msgcode+ADs-
+AD4- +AD4- +-	struct utp+AF8-upiu+AF8-header header+ADs-
+AD4- +AD4- +-	union +AHs-
+AD4- +AD4- +-		struct utp+AF8-upiu+AF8-query		qr+ADs-
+AD4- +AD4- +-		struct utp+AF8-upiu+AF8-task+AF8-req	tr+ADs-
+AD4- +AD4- +-		/+ACo- use utp+AF8-upiu+AF8-query to host the 4 dwards of uic command
+AD4- +ACo-/
+AD4- 
+AD4- What are +ACI-dwards+ACI-?
Done.

+AD4- 
+AD4- +AD4- +-		struct utp+AF8-upiu+AF8-query		uc+ADs-
+AD4- +AD4- +-	+AH0- tsf+ADs-
+AD4- +AD4- +-	uint8+AF8-t data+AFs-0+AF0AOw-
+AD4- 
+AD4- The offset of the data member will change if a member will be added to the
+AD4- union with a larger size than the existing members. That seems like an API
+AD4- design bug to me.
Actually I am not using it, so will just remove it.

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

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

+AD4- 
+AD4- +AD4- +-	uint32+AF8-t reply+AF8-payload+AF8-rcv+AF8-len+ADs-
+AD4- +AD4- +-
+AD4- +AD4- +-	struct utp+AF8-upiu+AF8-header header+ADs-
+AD4- +AD4- +-	union +AHs-
+AD4- +AD4- +-		struct utp+AF8-upiu+AF8-query		qr+ADs-
+AD4- +AD4- +-		struct utp+AF8-upiu+AF8-task+AF8-rsp	tr+ADs-
+AD4- +AD4- +-		struct utp+AF8-upiu+AF8-query		uc+ADs-
+AD4- +AD4- +-	+AH0- tsf+ADs-
+AD4- +AD4- +-	uint8+AF8-t data+AFs-0+AF0AOw-
+AD4- +AD4- +-+AH0AOw-
+AD4- +AD4- +-
+AD4- +AD4- +-struct ufs+AF8-bsg+AF8-raw+AF8-upiu +AHs-
+AD4- +AD4- +-	struct ufs+AF8-bsg+AF8-upiu request+ADs-
+AD4- +AD4- +-	struct ufs+AF8-bsg+AF8-upiu reply+ADs-
+AD4- +AD4- +-+AH0AOw-
+AD4- 
+AD4- Are any of the above data structures needed by user space software? Should
+AD4- these
+AD4- data structure definitions perhaps be moved to a header file under
+AD4- include/uapi?
I wanted to benefit from ufs.h and ufshcd.h so used it here.
In include/uapi/scsi/scsi+AF8-bsg+AF8-ufs.h I defined an 8 dw+ACo-o+ACo-rds opaque structs for the request and reply.
 
+AD4- 
+AD4- Thanks,
+AD4- 
+AD4- 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