From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH] igb_uio: revert open and release operations Date: Fri, 13 Oct 2017 16:51:04 +0200 Message-ID: <20171013145104.17596-1-thomas@monjalon.net> References: 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 To: shijith.thotton@caviumnetworks.com, qiming.yang@intel.com, jingjing.wu@intel.com 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) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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