Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp940628imm; Tue, 15 May 2018 11:22:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZogcigpO5u0qwTzba1ODpkBk0bkiXiJ48Nwe6bFyVYMDpbU1UlCZwRWDa2U48uLaCCpOifY X-Received: by 2002:a17:902:bb92:: with SMTP id m18-v6mr7495356pls.46.1526408545453; Tue, 15 May 2018 11:22:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526408545; cv=none; d=google.com; s=arc-20160816; b=LRT2UKJd5y9c5+u5vLoeVNK9zhgmY6+UVTTPxBQN6Lko4zTju5D0q/YPI2Apd6IvqX 6PCZrp8c1uyMRP8ZODZZHQAsL/BgQ51BZfYdKYpcHW35LL0HIhrvWGewRWrJfiYVtuWW dhDYodWrWOwXbB+/+sf78kYBLpj/iMBH3OdIWXMjr9iTDYrtlWjXhNl0ejCwoEl9Zd5U 4ew1gUgmKjCr9ICAPr9e6unqq4+JbHxd12FsmLuPxawPvKK1jgG9l+OSTmmQZgQwgAPB 8MYCDevlCUWhYlTTaaidOlpdGsZye32o2fJmo6DddUD6YMau+RIjNG67fFiw4VODKSYC 1AbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=TYlDJQwdft9RiuZQggMa5jjyI/r9E+JuLXyXewhSxPE=; b=kFsc0RrINKJ+5RDC8zz02bN9H6XFzp1gVaIy5Yy6fnFfBf51uwiJq3rNb5+rwXUrEa vfXDbhjzU8I+j5xJXxlOXe7OEqH6l1TBHOaIqBtaJ1EY3sFI4OmpabQ0xBLKp4+IYEP+ wPkNYo883Ylk+blmgNzI5DdAyhJ5ZiXV7LK60wd2TXKJ6oedlPElQI9mA1hogbK3brDk ax2VMmlcHUBsMutL6M+GQfhHvyp7Ge4IebvahLCFPsE/4cxdTkSdlralVk+pElMyMXje IG8XgLqYaNDnS/tbbsiI09wVadFXPD1IwTip3mlUPy+2e4l2DRHnsnQERZWBiNqX+rVS w76g== ARC-Authentication-Results: i=1; mx.google.com; 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 k22-v6si528151pll.393.2018.05.15.11.22.10; Tue, 15 May 2018 11:22:25 -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; 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 S1753847AbeEOSVs (ORCPT + 99 others); Tue, 15 May 2018 14:21:48 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7691 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752485AbeEOSVq (ORCPT ); Tue, 15 May 2018 14:21:46 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 29047E25116EB; Wed, 16 May 2018 02:21:32 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.227.234) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.382.0; Wed, 16 May 2018 02:21:24 +0800 From: Salil Mehta To: CC: , , , , , , , Fuyun Liang Subject: [PATCH net-next 10/10] net: hns3: Fixes the missing PCI iounmap for various legs Date: Tue, 15 May 2018 19:20:14 +0100 Message-ID: <20180515182014.42196-11-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180515182014.42196-1-salil.mehta@huawei.com> References: <20180515182014.42196-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.202.227.234] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fuyun Liang We call pcim_iomap in hclge_pci_init, pcim_iounmap should be called in error handle of hclge_init_ae_dev. We call pcim_iomap in hclge_pci_init, but do not call pcim_iounmap in hclge_pci_uninit. When we remove the hclge.ko and insert it again, a problem that pci can not map will happen. pcim_iounmap need to be called in hclge_pci_uninit. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 75d9b8c..46435c8 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -5425,6 +5425,7 @@ static void hclge_pci_uninit(struct hclge_dev *hdev) { struct pci_dev *pdev = hdev->pdev; + pcim_iounmap(pdev, hdev->hw.io_base); pci_free_irq_vectors(pdev); pci_clear_master(pdev); pci_release_mem_regions(pdev); @@ -5589,6 +5590,7 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev) err_cmd_uninit: hclge_destroy_cmd_queue(&hdev->hw); err_pci_uninit: + pcim_iounmap(pdev, hdev->hw.io_base); pci_clear_master(pdev); pci_release_regions(pdev); pci_disable_device(pdev); -- 2.7.4