From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 161491B726 for ; Fri, 13 Oct 2017 16:51:21 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 80C2B209D1; Fri, 13 Oct 2017 10:51:21 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 13 Oct 2017 10:51:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=+lCiam6zXERMtz X9+OZe+XlHQptRUc2edOyjdWkwcwc=; b=GBZynzPgE3DLZppr8k1s54l9AhSM/i 3+5tkmlliSxK6XnfXfmzytnscYUCJdMF2Y+kdfCgb+f9QpZniqiHmoY6lBoPUMDD V7qYXu/RIuR1Za1r4AD95kL3DcLpA2d7Tdf5o8s8Rbs1wHK3bFp2dvoXLpX7bA3C 8W0QgZYYs6YN0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=+lCiam6zXERMtzX9+OZe+XlHQptRUc2edOyjdWkwcwc=; b=GhLOSams leU/6o5I9tOSuvlZtmMwqMdjmYoZjacWrrYABfuobst6rRsA1Ysh+eEMoisQvH1W BnkWRJp4OcqvvL+f27Z+5cBWNONQPpQGhU50WlDLHEwRwIOhFC4biBTwjBoHbcwv Wj8GutMN2oN28Xb5h/pNFBi5EmeMTjUH+8OV74OK1uQQTMuwCM4Pk7MobUtEqzoi K2MSR4am+zto64coCIsSPCjeqKtTXlGnRjxAEij+kBA1umBmg0L3OfhaB77TgVTl wABNBriVH7Zf/QmSkST9mzMmhqYKvZcxoOEsEmbdkKzT7c4LSMG3cbU9GzpsBu6e bLHjKa5nn5XSbQ== X-ME-Sender: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 0C0797E954; Fri, 13 Oct 2017 10:51:19 -0400 (EDT) From: Thomas Monjalon To: shijith.thotton@caviumnetworks.com, qiming.yang@intel.com, jingjing.wu@intel.com Cc: ferruh.yigit@intel.com, luca.boccassi@att.com, gregory@weka.io, helin.zhang@intel.com, xuekun.hu@intel.com, harish.patil@cavium.com, dev@dpdk.org Date: Fri, 13 Oct 2017 16:51:04 +0200 Message-Id: <20171013145104.17596-1-thomas@monjalon.net> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Subject: [dpdk-dev] [PATCH] igb_uio: revert open and release operations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Oct 2017 14:51:22 -0000 Some VF drivers cannot work with igb_uio because of the reset done in these functions. First bug report: http://dpdk.org/ml/archives/dev/2017-September/075236.html A partial reset was tried: http://dpdk.org/patch/28940 Second bug report after a partial revert trial: http://dpdk.org/ml/archives/dev/2017-September/076998.html The patch author agreed to revert his patch: http://dpdk.org/ml/archives/dev/2017-October/077158.html There are also some patches available to fix issues with i40e: http://dpdk.org/patch/30021 http://dpdk.org/patch/30022 This patch takes the simple option of reverting the initial patch and gives more time to properly improve igb_uio and PMDs. Fixes: b58eedfc7dd5 ("igb_uio: issue FLR during open and release of device file") Reported-by: Qiming Yang Reported-by: Jingjing Wu Signed-off-by: Thomas Monjalon --- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 33 ------------------------------- 1 file changed, 33 deletions(-) diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c index 0dda26c7a..e47afb98b 100644 --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c @@ -220,37 +220,6 @@ igbuio_pci_irqhandler(int irq, struct uio_info *info) return IRQ_HANDLED; } -/** - * This gets called while opening uio device file. - */ -static int -igbuio_pci_open(struct uio_info *info, struct inode *inode) -{ - struct rte_uio_pci_dev *udev = info->priv; - struct pci_dev *dev = udev->pdev; - - pci_reset_function(dev); - - /* set bus master, which was cleared by the reset function */ - pci_set_master(dev); - - return 0; -} - -static int -igbuio_pci_release(struct uio_info *info, struct inode *inode) -{ - struct rte_uio_pci_dev *udev = info->priv; - struct pci_dev *dev = udev->pdev; - - /* stop the device from further DMA */ - pci_clear_master(dev); - - pci_reset_function(dev); - - return 0; -} - /* Remap pci resources described by bar #pci_bar in uio resource n. */ static int igbuio_pci_setup_iomem(struct pci_dev *dev, struct uio_info *info, @@ -492,8 +461,6 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) udev->info.version = "0.1"; udev->info.handler = igbuio_pci_irqhandler; udev->info.irqcontrol = igbuio_pci_irqcontrol; - udev->info.open = igbuio_pci_open; - udev->info.release = igbuio_pci_release; udev->info.priv = udev; udev->pdev = dev; -- 2.14.1