Hello Avri, On 2/11/2019 8:59 PM, Avri Altman wrote: > Hello Pedro, > >> >> Hello everyone, >> >> We are planning to build an open source tool for UFS, (let's name it >> "ufsutils"). The idea is to interact with the ufs driver for debug and test >> purposes. For us it would be useful for scenarios like bring up of new >> hardware, >> debug while adding new features, force specific conditions for testing, check >> specific registers from any of the layers (UFS/UniPro/MPhy) at any time... >> >> We would like to check with you what would be the advisable method to >> interact >> with the driver from user-space (sysfs, debugFS, ioctls, etc.). I am aware of >> the ioctl through sg but we may have use cases without a device. >> >> Do you think this would be useful for you? Any suggestions? > Great minds think alike :) > Actually, we already did all that: we introduced a new bsg companion to the ufs driver, > To support the very exactly ufs-utils. It was merged in 4.20. > You can look it up using "scsi: Add ufs bsg endpoint". > We also have a supplementary short series, see https://urldefense.proofpoint.com/v2/url?u=https-3A__www.spinics.net_lists_linux-2Dscsi_msg127370.html&d=DwIGaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=g_qwcP4gtO-yTlPB3EORzwKHYiXOsyQ6rIu-FZXM-tQ&m=tHYDsllS1T5y9hV_Psczm02gYROQ7kvH316StZaHj24&s=5DLVujPypvbDuJ32Km9ZA-_vIGmrRwI20o_3yy388Og&e=. > We are about to publish ufs-utils in the coming days. > > Thanks, > Avri > That's very good news! Do you already have any date to publish? Can we contribute in any way? I have noticed that ufs_bsg_probe is only called when a successful link startup occurs, do you think this could be changed in some way to allow debug and testing when for some reason we are not able to establish link to the device? Thanks, Pedro