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

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

 




+AD4- -----Original Message-----
+AD4- From: Bart Van Assche
+AD4- Sent: Wednesday, August 08, 2018 7:58 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 v2 1/8+AF0- scsi: Add ufs transport class
+AD4- 
+AD4- On Sun, 2018-08-05 at 14:39 +-0300, Avri Altman wrote:
+AD4- +AD4- A +IBw-ufs-port+IB0- is purely a software object. Evidently, the function
+AD4- +AD4- template takes no port as an argument, as the driver has no concept
+AD4- +AD4- of +ACI-port+ACI-.  We only need it as a hanging point in the bsg device tree,
+AD4- +AD4- so maybe a more appropriate term would be: +ACI-ufs-bsg-dev-node+ACI-.
+AD4- +AD4-
+AD4- +AD4- The ufs-port has a pretty lean structure.  This is because we are
+AD4- +AD4- using upiu transactions that contains the outmost detailed info,
+AD4- +AD4- so we don't really need complex constructs to support it.
+AD4- +AD4-
+AD4- +AD4- The transport will keep track of its  ufs-ports via its scsi host.
+AD4- 
+AD4- Since no port concept has been defined in the UFS standard, can the port
+AD4- concept be left out? Have you considered to attach the bsg queue directly
+AD4- to the UFS SCSI host? There are two struct device instances in each Scsi+AF8-Host
+AD4- structure, namely shost+AF8-gendev and shost+AF8-dev. I think the former
+AD4- corresponds
+AD4- to /sys/bus/scsi/devices/host+ADw-n+AD4- and the latter corresponds to
+AD4- /sys/class/scsi+AF8-host/host+ADw-n+AD4-. The bsg queue probably can be attached to the
+AD4- latter. Several SCSI drivers already add additional sysfs attributes to the
+AD4- /sys/class/scsi+AF8-host/host+ADw-n+AD4-.
Yeah - so today we are using shost+AF8-gendev, and the newly created classes points to /sys/devices/... :

htc+AF8-ocnwhl:/sys/class/ufs+AF8-host +ACM- ls -la
lrwxrwxrwx  1 root root 0 2018-06-17 13:15 host0 -+AD4- ../../devices/soc/1da4000.ufshc/host0/ufs+AF8-host/host0

htc+AF8-ocnwhl:/sys/class/ufs+AF8-ports +ACM- ls -la
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

and under /dev/ we get:
htc+AF8-ocnwhl:/dev +ACM- ls -la +AHw- grep ufs
crw-------  1 root      root         246,   3 1970-02-26 03:12 ufs-port-0:0

We didn't add any sysfs attribute to those classes, and I don't expect any to be added,
as I tried to explain in the commit:
+ACI-Those classes are left empty for now, as ufs-sysfs already contains
    an abundant amount of attributes.+ACI-

Practically, this infrastructure provides the bsg device files /dev/+ADw-xxx-id+AD4-.

Anyway, if you think it's better, I will try to switch it as you suggested.
Can you please refer me to those scsi drivers that you mentioned?

Thanks a lot,
Avri

+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