Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp12333623imu; Tue, 1 Jan 2019 21:06:00 -0800 (PST) X-Google-Smtp-Source: AFSGD/UDtyejmckpASH/yY8Xq0/1abTBNG779327mK70JkeNPiqDLiEf/SeEDXTxIkEwHQs7RfCE X-Received: by 2002:a62:db41:: with SMTP id f62mr44008112pfg.123.1546405560722; Tue, 01 Jan 2019 21:06:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546405560; cv=none; d=google.com; s=arc-20160816; b=aHtYqC/fyQXmWyiVZUT8e62pJgEBFSL+AvYGKdgeUruve10mPbBgytxRrAhNVzYq88 OPd5hkiWevxqYRfPD6fdch+x6EbGyDoluFAiTMCpHgHkyJdbFdO0BWcKlPwtZNO/oCkG Y6El8enHiz/g3SI3gzMrCx4pkdfNRmUubNndf92XvNuHYx3yL35acLO3Szs/Im8LAADp a+g3Wpd0NJ4yDn1J102RLeCVA51rFWoJFfa8F7KaMXT7IjU8dJLBNPy5Aei5mMcc9S5y 6oW3alSmcl4KlQYRIwuX6u1HMMHoK/DnaFxQIhWd1M8EU9LnOHupA8Ha1nfcFFF8Jr11 HIPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=0JKQLaiPc07qB9i21WX15H5cqUjmkwV9Dvs6dvJcsxw=; b=ibq4bkyGzjlvuhnM4XwlW/nUxXD9GU4iOXW9ctIlXblVA7DxwqVhp7kfaIg5VSLl+9 2X7EJvKpvJdeplUR8CPFk4bmgu7p/0OIJFFADfaacqBA0LtmIw62sGm2F9ZON35e4eOU SJkc4D0eO/W7m+dAUQ1S/DKvSXII+QbrNFOz8RSJUHb8UPQNqslL89j4QUVVwfuWRzu/ uZI7blYh8t1a5sfs4jggl6CS68vbUivygDypHMBg4VbW0fP/xXvZEzaT8vzRZ27Rzvo7 2IYuv66IMTq5FfhDYu08x1sLn0g/D9WmNbThwg3nm4xC3XpgZqI1O9iq44BYnOf1zguI tWFA== 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 a12si43793160pgk.291.2019.01.01.21.05.27; Tue, 01 Jan 2019 21:06:00 -0800 (PST) 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 S1728288AbfABDdg (ORCPT + 99 others); Tue, 1 Jan 2019 22:33:36 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:17073 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727478AbfABDdf (ORCPT ); Tue, 1 Jan 2019 22:33:35 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 408A12D85A95; Wed, 2 Jan 2019 11:33:32 +0800 (CST) Received: from localhost.localdomain (10.175.34.53) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.408.0; Wed, 2 Jan 2019 11:33:24 +0800 From: Xue Chaojing To: CC: , , , , , , , Subject: [PATCH 1/1] net-next/hinic:add shutdown callback Date: Tue, 1 Jan 2019 19:39:33 +0000 Message-ID: <20190101193933.27361-1-xuechaojing@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.34.53] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If there is no shutdown callback, our board will report pcie UNF errors after restarting. This patch add shutdown callback for hinic. Signed-off-by: Xue Chaojing --- drivers/net/ethernet/huawei/hinic/hinic_main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c index 6d48dc62a44b..da323b9e1f62 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_main.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c @@ -1106,6 +1106,11 @@ static void hinic_remove(struct pci_dev *pdev) dev_info(&pdev->dev, "HiNIC driver - removed\n"); } +static void hinic_shutdown(struct pci_dev *pdev) +{ + pci_disable_device(pdev); +} + static const struct pci_device_id hinic_pci_table[] = { { PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_QUAD_PORT_25GE), 0}, { PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_DUAL_PORT_25GE), 0}, @@ -1119,6 +1124,7 @@ static struct pci_driver hinic_driver = { .id_table = hinic_pci_table, .probe = hinic_probe, .remove = hinic_remove, + .shutdown = hinic_shutdown, }; module_pci_driver(hinic_driver); -- 2.17.1