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]
Date:   Mon, 10 Oct 2022 00:22:46 +0800
From:   Soha Jin <soha@...u.info>
To:     Giuseppe Cavallaro <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Jose Abreu <joabreu@...opsys.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
Cc:     Yangyu Chen <cyy@...self.name>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Soha Jin <soha@...u.info>
Subject: [PATCH 2/3] net: stmmac: add Phytium's PHYT0004 to dwmac-generic compatible devices

Phytium's GMAC devices (ACPI HID: PHYT0004) can be run by DWMAC's generic
driver, add it to the match table.

Signed-off-by: Soha Jin <soha@...u.info>
Tested-by: Yangyu Chen <cyy@...self.name>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
index 4d272605a8b7..bde827bc7b72 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
@@ -66,7 +66,7 @@ static int dwmac_generic_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static const struct of_device_id dwmac_generic_match[] = {
+static const struct of_device_id dwmac_generic_match_of[] = {
 	{ .compatible = "st,spear600-gmac"},
 	{ .compatible = "snps,dwmac-3.40a"},
 	{ .compatible = "snps,dwmac-3.50a"},
@@ -80,7 +80,13 @@ static const struct of_device_id dwmac_generic_match[] = {
 	{ .compatible = "snps,dwxgmac"},
 	{ }
 };
-MODULE_DEVICE_TABLE(of, dwmac_generic_match);
+MODULE_DEVICE_TABLE(of, dwmac_generic_match_of);
+
+static const struct acpi_device_id dwmac_generic_match_acpi[] = {
+	{"PHYT0004"},
+	{}
+};
+MODULE_DEVICE_TABLE(acpi, dwmac_generic_match_acpi);
 
 static struct platform_driver dwmac_generic_driver = {
 	.probe  = dwmac_generic_probe,
@@ -88,7 +94,8 @@ static struct platform_driver dwmac_generic_driver = {
 	.driver = {
 		.name           = STMMAC_RESOURCE_NAME,
 		.pm		= &stmmac_pltfr_pm_ops,
-		.of_match_table = of_match_ptr(dwmac_generic_match),
+		.of_match_table = dwmac_generic_match_of,
+		.acpi_match_table = dwmac_generic_match_acpi
 	},
 };
 module_platform_driver(dwmac_generic_driver);
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ