Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753916AbdHQTIV (ORCPT ); Thu, 17 Aug 2017 15:08:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:34152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753230AbdHQTIA (ORCPT ); Thu, 17 Aug 2017 15:08:00 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9CD9122BEA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=atull@kernel.org MIME-Version: 1.0 In-Reply-To: <1498441938-14046-21-git-send-email-hao.wu@intel.com> References: <1498441938-14046-1-git-send-email-hao.wu@intel.com> <1498441938-14046-21-git-send-email-hao.wu@intel.com> From: Alan Tull Date: Thu, 17 Aug 2017 14:07:18 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 20/22] fpga: intel: afu add FPGA_GET_API_VERSION/CHECK_EXTENSION ioctls support To: Wu Hao Cc: Moritz Fischer , linux-fpga@vger.kernel.org, linux-kernel , linux-api@vger.kernel.org, "Kang, Luwei" , "Zhang, Yi Z" , Tim Whisonant , Enno Luebbers , Shiva Rao , Christopher Rauer , Xiao Guangrong Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1967 Lines: 51 On Sun, Jun 25, 2017 at 8:52 PM, Wu Hao wrote: > FPGA_GET_API_VERSION and FPGA_CHECK_EXTENSION ioctls are common ones which > need to be supported by all feature devices drivers including FME and AFU. > This patch implements above 2 ioctls in Intel FPGA Accelerated Function > Unit (AFU) driver. > > Signed-off-by: Tim Whisonant > Signed-off-by: Enno Luebbers > Signed-off-by: Shiva Rao > Signed-off-by: Christopher Rauer > Signed-off-by: Xiao Guangrong > Signed-off-by: Wu Hao Acked-by: Alan Tull > --- > v2: rebased > --- > drivers/fpga/intel-afu-main.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/fpga/intel-afu-main.c b/drivers/fpga/intel-afu-main.c > index 2a17cde..22f77f2 100644 > --- a/drivers/fpga/intel-afu-main.c > +++ b/drivers/fpga/intel-afu-main.c > @@ -122,6 +122,13 @@ static int afu_release(struct inode *inode, struct file *filp) > return 0; > } > > +static long afu_ioctl_check_extension(struct feature_platform_data *pdata, > + unsigned long arg) > +{ > + /* No extension support for now */ > + return 0; > +} > + > static long afu_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) > { > struct platform_device *pdev = filp->private_data; > @@ -132,6 +139,10 @@ static long afu_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) > dev_dbg(&pdev->dev, "%s cmd 0x%x\n", __func__, cmd); > > switch (cmd) { > + case FPGA_GET_API_VERSION: > + return FPGA_API_VERSION; > + case FPGA_CHECK_EXTENSION: > + return afu_ioctl_check_extension(pdata, arg); > default: > /* > * Let sub-feature's ioctl function to handle the cmd > -- > 1.8.3.1 >