lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063d5262b6f7401bb9a0bb2a52a123b2@hisilicon.com>
Date:   Fri, 6 Mar 2020 03:58:53 +0000
From:   "tiantao (H)" <tiantao6@...ilicon.com>
To:     "tiantao (H)" <tiantao6@...ilicon.com>,
        "Chenfeng (puck)" <puck.chen@...ilicon.com>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        "daniel@...ll.ch" <daniel@...ll.ch>,
        "tzimmermann@...e.de" <tzimmermann@...e.de>,
        "kraxel@...hat.com" <kraxel@...hat.com>,
        "alexander.deucher@....com" <alexander.deucher@....com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "xinliang.liu@...aro.org" <xinliang.liu@...aro.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     Linuxarm <linuxarm@...wei.com>
Subject: 答复: [PATCH] drm/hisilicon: Add the shutdown for hibmc_pci_driver

Hi All:

	Sorry,please  ignore this patch.

Best

-----邮件原件-----
发件人: Linuxarm [mailto:linuxarm-bounces@...wei.com] 代表 Tian Tao
发送时间: 2020年3月6日 11:43
收件人: Chenfeng (puck) <puck.chen@...ilicon.com>; airlied@...ux.ie; daniel@...ll.ch; tzimmermann@...e.de; kraxel@...hat.com; alexander.deucher@....com; tglx@...utronix.de; dri-devel@...ts.freedesktop.org; xinliang.liu@...aro.org; linux-kernel@...r.kernel.org
抄送: Linuxarm <linuxarm@...wei.com>
主题: [PATCH] drm/hisilicon: Add the shutdown for hibmc_pci_driver

add the shutdown function to release the resource.

Signed-off-by: Tian Tao <tiantao6@...ilicon.com>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index 51f1c70..0e58455d 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -357,9 +357,14 @@ static void hibmc_pci_remove(struct pci_dev *pdev)  {
 	struct drm_device *dev = pci_get_drvdata(pdev);
 
-	drm_dev_unregister(dev);
-	hibmc_unload(dev);
 	drm_dev_put(dev);
+	pci_disable_device(pdev);
+
+}
+
+static void hibmc_pci_shutdown(struct pci_dev *pdev) {
+	hibmc_pci_remove(pdev);
 }
 
 static struct pci_device_id hibmc_pci_table[] = { @@ -372,6 +377,7 @@ static struct pci_driver hibmc_pci_driver = {
 	.id_table =	hibmc_pci_table,
 	.probe =	hibmc_pci_probe,
 	.remove =	hibmc_pci_remove,
+	.shutdown = hibmc_pci_shutdown,
 	.driver.pm =    &hibmc_pm_ops,
 };
 
--
2.7.4

_______________________________________________
Linuxarm mailing list
Linuxarm@...wei.com
http://hulk.huawei.com/mailman/listinfo/linuxarm

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ