Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753526AbcCJTUV (ORCPT ); Thu, 10 Mar 2016 14:20:21 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:53524 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752241AbcCJTUP (ORCPT ); Thu, 10 Mar 2016 14:20:15 -0500 From: Arnd Bergmann To: ygardi@codeaurora.org Subject: Re: [PATCH v7] scsi: ufs: add ioctl interface for query request Date: Thu, 10 Mar 2016 20:19:32 +0100 User-Agent: KMail/1.12.2 (Linux/3.19.0-54-generic; KDE/4.3.2; x86_64; ; ) Cc: "Greg KH" , james.bottomley@hansenpartnership.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org, santoshsy@gmail.com, linux-scsi-owner@vger.kernel.org, "Dolev Raviv" , "Gilad Broner" , "Vinayak Holikatti" , "James E.J. Bottomley" , "Martin K. Petersen" , "Michael Neuling" , "Matthew R. Ochs" , "Wen Xiong" , "Subhash Jadavani" , "open list:ABI/API" References: <1457532699-11487-1-git-send-email-ygardi@codeaurora.org> <046fc2d00e51f331a6bbc00553cc1f9c.squirrel@us.codeaurora.org> <201603101818.33826.arnd@arndb.de> In-Reply-To: <201603101818.33826.arnd@arndb.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201603102019.32467.arnd@arndb.de> X-Provags-ID: V03:K0:OkgFtQjU56q9etH+TGw0m/KYCv7mS3sEBNEWILcsPTizOW5luXp dlCvSBmBUZbGp6dPhPgR7deWzqP1gjNS07m7WNQmgjPaQcOnLx2jo7MNMx5KKlM6pr1jV4s XQLKPFUrC6wwaUDX4Nn63NMsnaryt9iG7Lmyy+Csy9CHG84x/2ZN3OoLNXKiDiSRtqF+VO9 TFH/hGWJKc+OreJL7kS4g== X-UI-Out-Filterresults: notjunk:1;V01:K0:28GclUuLcA4=:FpdPcdwa15GQCHqh4hI+6L jroQ9LVEnmEzY4egUR8775DlubtqopcT2tITw75urDcqfybn9qTCD7zt8Feg1QkC/QWPStm/U xYC+3KbgsbxyVPLhnV5Dg4t+I7X538VKiAXgK36YEubT6GQFwYT9DtIE6J1u4dkfLpVNFSyDe CfYyyoIchaD4fee+FvewIBovP13T+ZQP1VEF+H5P7fTMep+nkJVDJRNH+JPTYLO0d7FG+q2Xy sRvcCuIMtUcmAJ1T6B8iu5rDEpty8dHy9q0MPNqY43V4dhQxzCGCwCM3Ed5LxWlPGeg/UmE4/ q/vShNOKwigTwXOTTjxYF7x9DLzZBQgRtvP+ZuG7u0MpBulcVxKe01a7xdKTkfX4kTIPkYOF8 sUF+Pg7nQk5vfHZrgXcsYgr0q/2hnkGklD1Y81SK7VUgS5a7ZnNQECTADt6R/00Orb4/MOGVr sRjktqQ4QjI7Onae/SqYL6nlWnZpQz3FqvlfrrsCM4agywddhAnoJ58mbkz3DOFkDiO5dJpGc wZyw3T9A81dnRqQgW/XOEUSUttzK67xetSZQlfgFZ7LtPQBM7dc8cCkKsUGavAGgCOteOLSOr aFBEpEuW5WCXhJjkEEolHHjoFe7frbSZc2I99BfyhTTW4RPPG0TcA+43CPhmk/7CxfDWuuj5P hWAJZ9kzg3muWrpFA26YCAfD03oEfKJgQ3z0e3gxtkSzYkoS4N+2OAa6OqfsIBwVKp1pKkvjF lHFDSHmnd+u6ENeu Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1799 Lines: 43 On Thursday 10 March 2016, Arnd Bergmann wrote: > On Wednesday 09 March 2016, ygardi@codeaurora.org wrote: > > Any userspace application can be a tool. > > We already implemented and used a user space application, that sent > > queries to the UFS devices in order to get information and descriptors. > > Not only ioctl interface is a useful way to interact with the device, > > we used it, and found it very helpful in varies cases. > > hence, this patch. > > This patch has been already addressed all comments of Arnd Bergman from 5 > > months ago, and now, re-uploaded again. > > Do you have a pointer to that review? It's been a long while, so I > have completely forgotten what issues I raised and how it got resolved. I got your link in private message and read up on it again now. To clarify: I commented on the formal API definition, and you indeed addressed all my concerns, so this is now an ioctl command that follows our usual calling conventions. However, this is orthogonal to the question of whether it is a good idea to have this interface implemented as an ioctl as asked by Greg, and who is actually using it. I'm lacking the detailed subsystem knowledge to answer this, but I note that other block drivers have similar passthrough interfaces. Looking through what other drivers do, I've found a couple of patterns now. n particular, most use the SG_IO ioctl to pass down commands from user space into a device specific command queue. Have you looked at that interface in the past to see if it would fit your use case? There is also a 'bsg' API that some drivers implement, which I think would be another alternative. Could any of the SCSI experts comment on what they expect a driver to use out of those three alternatives (if any): * private ioctl * bsg * sg_io Arnd