Re: [PATCH v2 1/8] scsi: Add ufs transport class

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

 



On Thu, 2018-08-09 at 16:22 +-0000, Avri Altman wrote:
+AD4- +AD4- -----Original Message-----
+AD4- +AD4- From: Bart Van Assche
+AD4- +AD4- Sent: Wednesday, August 08, 2018 7:58 PM
+AD4- +AD4- To: hch+AEA-lst.de+ADs- Avri Altman +ADs- linux-scsi+AEA-vger.kernel.org+ADs-
+AD4- +AD4- jthumshirn+AEA-suse.de+ADs- hare+AEA-suse.com+ADs- martin.petersen+AEA-oracle.com+ADs-
+AD4- +AD4- jejb+AEA-linux.vnet.ibm.com
+AD4- +AD4- Cc: Vinayak Holikatti +ADs- Avi Shchislowski +ADs- Alex Lemberg +ADs- Stanislav Nijnikov +ADs-
+AD4- +AD4- subhashj+AEA-codeaurora.org
+AD4- +AD4- Subject: Re: +AFs-PATCH v2 1/8+AF0- scsi: Add ufs transport class
+AD4- +AD4- 
+AD4- +AD4- On Sun, 2018-08-05 at 14:39 +-0300, Avri Altman wrote:
+AD4- +AD4- +AD4- A +IBw-ufs-port+IB0- is purely a software object. Evidently, the function
+AD4- +AD4- +AD4- template takes no port as an argument, as the driver has no concept
+AD4- +AD4- +AD4- of +ACI-port+ACI-.  We only need it as a hanging point in the bsg device tree,
+AD4- +AD4- +AD4- so maybe a more appropriate term would be: +ACI-ufs-bsg-dev-node+ACI-.
+AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- The ufs-port has a pretty lean structure.  This is because we are
+AD4- +AD4- +AD4- using upiu transactions that contains the outmost detailed info,
+AD4- +AD4- +AD4- so we don't really need complex constructs to support it.
+AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- The transport will keep track of its  ufs-ports via its scsi host.
+AD4- +AD4- 
+AD4- +AD4- Since no port concept has been defined in the UFS standard, can the port
+AD4- +AD4- concept be left out? Have you considered to attach the bsg queue directly
+AD4- +AD4- to the UFS SCSI host? There are two struct device instances in each Scsi+AF8-Host
+AD4- +AD4- structure, namely shost+AF8-gendev and shost+AF8-dev. I think the former
+AD4- +AD4- corresponds
+AD4- +AD4- to /sys/bus/scsi/devices/host+ADw-n+AD4- and the latter corresponds to
+AD4- +AD4- /sys/class/scsi+AF8-host/host+ADw-n+AD4-. The bsg queue probably can be attached to the
+AD4- +AD4- latter. Several SCSI drivers already add additional sysfs attributes to the
+AD4- +AD4- /sys/class/scsi+AF8-host/host+ADw-n+AD4-.
+AD4- 
+AD4- Yeah - so today we are using shost+AF8-gendev, and the newly created classes points to /sys/devices/... :
+AD4- 
+AD4- htc+AF8-ocnwhl:/sys/class/ufs+AF8-host +ACM- ls -la
+AD4- lrwxrwxrwx  1 root root 0 2018-06-17 13:15 host0 -+AD4- ../../devices/soc/1da4000.ufshc/host0/ufs+AF8-host/host0
+AD4- 
+AD4- htc+AF8-ocnwhl:/sys/class/ufs+AF8-ports +ACM- ls -la
+AD4- lrwxrwxrwx  1 root root 0 2018-06-17 13:05 ufs-port-0:1 -+AD4- ../../devices/soc/1da4000.ufshc/host0/ufs-port-0:1/ufs+AF8-ports/ufs-port-0:0
+AD4- 
+AD4- and under /dev/ we get:
+AD4- htc+AF8-ocnwhl:/dev +ACM- ls -la +AHw- grep ufs
+AD4- crw-------  1 root      root         246,   3 1970-02-26 03:12 ufs-port-0:0
+AD4- 
+AD4- We didn't add any sysfs attribute to those classes, and I don't expect any to be added,
+AD4- as I tried to explain in the commit:
+AD4- +ACI-Those classes are left empty for now, as ufs-sysfs already contains
+AD4-     an abundant amount of attributes.+ACI-
+AD4- 
+AD4- Practically, this infrastructure provides the bsg device files /dev/+ADw-xxx-id+AD4-.
+AD4- 
+AD4- Anyway, if you think it's better, I will try to switch it as you suggested.

My concern is that no port concept is defined in the UFS standard and hence that users
will be confused if they see a UFS port object in sysfs.

+AD4- Can you please refer me to those scsi drivers that you mentioned?

The following command will yield plenty of examples:

git grep -nHE 'device+AF8-(create+AHw-remove)+AF8-file+AHw-shost+AF8-attrs' drivers/scsi drivers/infiniband

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