Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp747283ybi; Wed, 3 Jul 2019 04:05:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+PMDcolLWlHLdvMw9CPAW3npgK7vnWNqF6JZY/x+yWwHo2uwD/me6f9z/m5GjEbQG7eHt X-Received: by 2002:a63:f146:: with SMTP id o6mr35658496pgk.179.1562151921234; Wed, 03 Jul 2019 04:05:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562151921; cv=none; d=google.com; s=arc-20160816; b=puL6Vrg3bxxhAkoHzQHc/5Sc5hse83fMItEZ3FCppo+7MmooWIJt9HhKJKw5CNdMB+ 9P+z7hKo+ybzuHUGYOeFs6GdGzXOB1AkYHExX2290462b7J3MhH4A2igySBS+vROi/L+ cM9PF0IqhQgodStxkT1XmkMKRs7e9z3sWgKdNYG2x9MtnZEjgVe3xuXdhdrMq6vyV1TE r3rcgjKh56NidwwZmxFhAGpSVoROeb3f1d/W07XSl0WYaGbraC4Ng5eDC4U0mTy0m+Be qmd0Nzd6PUr2qUGKJh5g9AHXU59Ld/O5jWcvEK8IZMJZ/5x/XV6F8b+zqbRRcJkYWUsJ OA1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=Vp0rqdLuu4DONvE4ea8TBMWjUjorJbwMs3yqZs4UmJI=; b=j6nQJ6568HtKI83jQDisxPRNbvHMRyH5KyJxELoMMN0XxOKm07/ReV5+w1cHENsuh/ wlpw/tGWviU+moGCWc6iVwxoK0fc8cWevZVfHd8uzs5uC2LY0gZv04IEkhLaTzNa6LHn Z0IsnofG2rl5TM+p6VFIc5E3DBJdKCmRwAUvipzVWJh1si8HWSgrTvTrINyCXlgrVZcI Ur3Zg3VnwcLz4Iy71HpuGORU4o6gcs6XIACPezaoW9Jo6xXHpCosxDt+JWu1VYRxpnqs hluLaI1imH5g5HDXS2LmMwr/hc/tympnGofYJzHBmsir1j5TRJoEVXZgtUJJDSCQKJng Lo0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-onmicrosoft-com header.b="mugXz/nn"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8si1989692pgq.28.2019.07.03.04.05.05; Wed, 03 Jul 2019 04:05:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-onmicrosoft-com header.b="mugXz/nn"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727281AbfGCLE2 (ORCPT + 99 others); Wed, 3 Jul 2019 07:04:28 -0400 Received: from mail-eopbgr740047.outbound.protection.outlook.com ([40.107.74.47]:56176 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727269AbfGCLEZ (ORCPT ); Wed, 3 Jul 2019 07:04:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Vp0rqdLuu4DONvE4ea8TBMWjUjorJbwMs3yqZs4UmJI=; b=mugXz/nnTV/7nKB2TVSN+5nOeGqdUBNRuNsRujAyOLwM5LOjzXuOA/y0sXgToWwwz1JwUjq2xKOQxlc6z6FUcE3BKKos6ll+9sXB+kDo6pUzNjL5KY4LEGPQTKLgws2gG0kT6DxWZ83fJMJpjr/PL5mkn9EyMKS9mDnytI9YNxo= Received: from MN2PR02MB6368.namprd02.prod.outlook.com (52.132.175.153) by MN2PR02MB5823.namprd02.prod.outlook.com (20.179.87.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.20; Wed, 3 Jul 2019 11:04:22 +0000 Received: from MN2PR02MB6368.namprd02.prod.outlook.com ([fe80::eddc:227e:27cc:d2bc]) by MN2PR02MB6368.namprd02.prod.outlook.com ([fe80::eddc:227e:27cc:d2bc%5]) with mapi id 15.20.2032.019; Wed, 3 Jul 2019 11:04:22 +0000 From: Dragan Cvetic To: Greg KH CC: "arnd@arndb.de" , Michal Simek , "linux-arm-kernel@lists.infradead.org" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Derek Kiernan Subject: RE: [PATCH V7 00/11] misc: xilinx sd-fec drive Thread-Topic: [PATCH V7 00/11] misc: xilinx sd-fec drive Thread-Index: AQHVIHtLLdGbOE767U2XbDHU36aibaamNrSAgAA5XPCAAM7egIARm4rg Date: Wed, 3 Jul 2019 11:04:22 +0000 Message-ID: References: <1560274185-264438-1-git-send-email-dragan.cvetic@xilinx.com> <20190621141553.GA16650@kroah.com> <20190622060135.GB26200@kroah.com> In-Reply-To: <20190622060135.GB26200@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=draganc@xilinx.com; x-originating-ip: [149.199.80.133] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bee70e3e-e6f8-440f-45f1-08d6ffa6340a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:MN2PR02MB5823; x-ms-traffictypediagnostic: MN2PR02MB5823: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 00872B689F x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(136003)(366004)(39860400002)(376002)(396003)(346002)(199004)(13464003)(189003)(71190400001)(102836004)(53546011)(68736007)(7696005)(99286004)(81156014)(8676002)(8936002)(66946007)(25786009)(71200400001)(6506007)(26005)(305945005)(7736002)(74316002)(76176011)(76116006)(14454004)(5660300002)(476003)(52536014)(486006)(66446008)(66476007)(64756008)(14444005)(6916009)(66556008)(73956011)(81166006)(966005)(33656002)(9686003)(6306002)(4326008)(446003)(53936002)(86362001)(186003)(11346002)(316002)(6436002)(256004)(54906003)(66066001)(229853002)(107886003)(3846002)(55016002)(6116002)(6246003)(2906002)(478600001);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR02MB5823;H:MN2PR02MB6368.namprd02.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: xilinx.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: PAvRYdPVc5KlEHo3KT3Mhcru3iD0F7fLTVkYFoZWK7MbH9JQY3z+9ODb4qeGPu9Ou9KWdsvXx/1WiKUNDQP9hplmelTYF9+KRYdF1AHU3Hkl8yLYC6pCjYhG3AhxYiAwFhp+e/P/l1r3rigACfQ1gl0hCwBrOg53K9tVaPmiJTfzk5+ltjA2GNS2RkL4fJALS6GP0nvS5QBeMGAGmiIPi8DvPFZymTG5T/MDdm0K6iYY/MtVFQBiq52WGq84RUJY7K+G2hSHPHeTizCGKMBeXaBb4w+sPHm+IacwGvNWF9gkY9mRhJFcHlhwCGKzADJ3/O7QI4RjwAZdtkEeaNV+gNAbhSxjCMjFSzmRBrGkM3vqrryG0D6cPdJS5IESLJKl5ffYK5nlrcmsvlRBJhikkNVXZNc3hlZL4U826t5xAHQ= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-Network-Message-Id: bee70e3e-e6f8-440f-45f1-08d6ffa6340a X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jul 2019 11:04:22.0937 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: draganc@xilinx.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB5823 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Greg KH [mailto:gregkh@linuxfoundation.org] > Sent: Saturday 22 June 2019 07:02 > To: Dragan Cvetic > Cc: arnd@arndb.de; Michal Simek ; linux-arm-kernel@li= sts.infradead.org; robh+dt@kernel.org; > mark.rutland@arm.com; devicetree@vger.kernel.org; linux-kernel@vger.kerne= l.org; Derek Kiernan > Subject: Re: [PATCH V7 00/11] misc: xilinx sd-fec drive >=20 > On Fri, Jun 21, 2019 at 05:49:45PM +0000, Dragan Cvetic wrote: > > > > > > > -----Original Message----- > > > From: Greg KH [mailto:gregkh@linuxfoundation.org] > > > Sent: Friday 21 June 2019 15:16 > > > To: Dragan Cvetic > > > Cc: arnd@arndb.de; Michal Simek ; linux-arm-kerne= l@lists.infradead.org; robh+dt@kernel.org; > > > mark.rutland@arm.com; devicetree@vger.kernel.org; linux-kernel@vger.k= ernel.org; Derek Kiernan > > > Subject: Re: [PATCH V7 00/11] misc: xilinx sd-fec drive > > > > > > On Tue, Jun 11, 2019 at 06:29:34PM +0100, Dragan Cvetic wrote: > > > > This patchset is adding the full Soft Decision Forward Error > > > > Correction (SD-FEC) driver implementation, driver DT binding and > > > > driver documentation. > > > > > > > > Forward Error Correction (FEC) codes such as Low Density Parity > > > > Check (LDPC) and turbo codes provide a means to control errors in > > > > data transmissions over unreliable or noisy communication > > > > channels. The SD-FEC Integrated Block is an optimized block for > > > > soft-decision decoding of these codes. Fixed turbo codes are > > > > supported directly, whereas custom and standardized LDPC codes > > > > are supported through the ability to specify the parity check > > > > matrix through an AXI4-Lite bus or using the optional programmable > > > > (PL)-based support logic. For the further information see > > > > https://www.xilinx.com/support/documentation/ip_documentation/ > > > > sd_fec/v1_1/pg256-sdfec-integrated-block.pdf > > > > > > > > This driver is a platform device driver which supports SDFEC16 > > > > (16nm) IP. SD-FEC driver supports LDPC decoding and encoding and > > > > Turbo code decoding. LDPC codes can be specified on > > > > a codeword-by-codeword basis, also a custom LDPC code can be used. > > > > > > > > The SD-FEC driver exposes a char device interface and supports > > > > file operations: open(), close(), poll() and ioctl(). The driver > > > > allows only one usage of the device, open() limits the number of > > > > driver instances. The driver also utilize Common Clock Framework > > > > (CCF). > > > > > > > > The control and monitoring is supported over ioctl system call. > > > > The features supported by ioctl(): > > > > - enable or disable data pipes to/from device > > > > - configure the FEC algorithm parameters > > > > - set the order of data > > > > - provide a control of a SDFEC bypass option > > > > - activates/deactivates SD-FEC > > > > - collect and provide statistical data > > > > - enable/disable interrupt mode > > > > > > Is there any userspace tool that talks to this device using these cus= tom > > > ioctls yet? > > > > > Tools no, but could be the customer who is using the driver. >=20 > I don't understand this. Who has written code to talk to these > special ioctls from userspace? Is there a pointer to that code > anywhere? >=20 > > > Doing a one-off ioctl api is always a risky thing, you are pretty muc= h > > > just creating brand new system calls for one piece of hardware. > > > > > > > Why is that wrong and what is the risk? >=20 > You now have custom syscalls for one specfic piece of hardware that you > now have to maintain working properly for the next 40+ years. You have > to make sure those calls are correct and that this is the correct api to > talk to this hardware. >=20 The only idea I have got from the comments are to do more abstraction eg. have a few ioctls with the abstraction done through the passing argumen= ts? > > What would you propose? > > Definitely, I have to read about this. >=20 > What is this hardware and what is it used for? Who will be talking to > it from userspace? What userspace workload uses it? What tools need to > talk to it? Where is the code that uses these new apis? >=20 > thanks, >=20 > greg k-h