From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1035105AbcIZTXc (ORCPT ); Mon, 26 Sep 2016 15:23:32 -0400 Received: from mx0b-00003501.pphosted.com ([67.231.152.68]:33365 "EHLO mx0a-000cda01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1034033AbcIZTX1 (ORCPT ); Mon, 26 Sep 2016 15:23:27 -0400 Authentication-Results: seagate.com; dkim=pass header.s="google" header.d=seagate.com MIME-Version: 1.0 In-Reply-To: References: From: Shaun Tancheff Date: Mon, 26 Sep 2016 14:22:59 -0500 Message-ID: Subject: Re: UFS API in the kernel To: Joao Pinto Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 X-Proofpoint-PolicyRoute: Outbound X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-26_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=6 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609260364 X-Proofpoint-Spam-Policy: Default Domain Policy Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u8QJNdsp005174 On Thu, Sep 22, 2016 at 10:21 AM, Joao Pinto wrote: > Hi! > > I am designing an application that has the goal to be an utility for Unipro and > UFS testing purposes. This application is going to run on top of a recent Linux > Kernel containing the new UFS stack (including the new DWC drivers). > > I am considering doing the following: > a) Create a new config item called CONFIG_UFS_CHARDEV which is going to create a > char device responsible to make some IOCTL available for user-space applications > b) Create a linux/ufs.h header file that contains data structures declarations > that will be needed in user-space applications I am not very familiar with UFS devices, that said you should have an sgX chardev being created already so you can handle SG_IO requests. There also appear to be some sysfs entries being created. So between sg and sysfs you should be able to handle any user-space out of band requests without resorting to making a new chardev. Adding more sysfs entries, if you need them, should be fine. You may find it easier to expand on the existing interfaces than to get consensus on a new driver and ioctls. Hope this helps, Shaun > Could you please advise me about what the correct approach should be to make it > as standard as possible and usable in the future? > > Thank you very much for your help! > > regards, > Joao > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DQICaQ&c=IGDlg0lD0b-nebmJJ0Kp8A&r=Wg5NqlNlVTT7Ugl8V50qIHLe856QW0qfG3WVYGOrWzA&m=vJFB6pCywWtdvkgHz9Vc0jQz0xzeyZlr-7eCWYu88nM&s=yiQLPFpqmMrbqLZz1Jb3aNqOje2dRMLJHEzUDobwcXc&e= -- Shaun Tancheff