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: <YM//kGGAp3vz8OYb@lunn.ch>
Date:   Mon, 21 Jun 2021 04:55:12 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Qing Zhang <zhangqing@...ngson.cn>
Cc:     Giuseppe Cavallaro <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Jose Abreu <joabreu@...opsys.com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Rob Herring <robh+dt@...nel.org>,
        Huacai Chen <chenhc@...ote.com>, linux-mips@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        netdev@...r.kernel.org, Jiaxun Yang <jiaxun.yang@...goat.com>
Subject: Re: [PATCH 1/4] stmmac: pci: Add dwmac support for Loongson

> +static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> +{
> +	struct plat_stmmacenet_data *plat;
> +	struct stmmac_resources res;
> +	int ret, i, mdio;
> +	struct device_node *np;
> +
> +	np = dev_of_node(&pdev->dev);
> +
> +	if (!np) {
> +		pr_info("dwmac_loongson_pci: No OF node\n");
> +		return -ENODEV;
> +	}
> +
> +	if (!of_device_is_compatible(np, "loongson, pci-gmac")) {
> +		pr_info("dwmac_loongson_pci: Incompatible OF node\n");
> +		return -ENODEV;
> +	}
> +
> +	plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL);
> +	if (!plat)
> +		return -ENOMEM;
> +
> +	if (plat->mdio_node) {
> +		dev_err(&pdev->dev, "Found MDIO subnode\n");

It is an error is an MDIO node is found?

> +		mdio = true;
> +	}
> +

...

> +
> +	plat->phy_interface = device_get_phy_mode(&pdev->dev);
> +	if (plat->phy_interface < 0)
> +		dev_err(&pdev->dev, "phy_mode not found\n");
> +
> +	plat->interface = PHY_INTERFACE_MODE_GMII;

Seems odd you call device_get_phy_mode() but then have this hard coded
PHY_INTERFACE_MODE_GMII?

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ