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] [day] [month] [year] [list]
Date:	Mon, 11 Jun 2007 14:03:27 -0500
From:	Vitaly Bordug <vitb@...e.crashing.org>
To:	Mark Zhan <rongkai.zhan@...driver.com>
Cc:	netdev@...r.kernel.org,
	"linuxppc-dev@...abs.org" <linuxppc-dev@...abs.org>,
	Vitaly Bordug <vbordug@...mvista.com>
Subject: Re: [PATCH] MII bitbang driver should generate MII bus phy_mask dynamically

On Mon, Jun 11, 2007 at 03:53:37PM +0800, Mark Zhan wrote:
> Current MII bitbang bus driver hard-codes the phy mask of mii_bus to
> ~0x09, which is actually specific to the FSL boards. This patch will
> make the bitbang driver to generate MII bus phy_mask dynamically, by the
> PHY irq info provided by the platform.

just realized that haven't mentioned that it's OK from  me,
assuming Andy's comment taken into account...
> 
> Signed-off-by: Mark Zhan <rongkai.zhan@...driver.com>
> ---
>  b/drivers/net/fs_enet/mii-bitbang.c |    9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/fs_enet/mii-bitbang.c
> b/drivers/net/fs_enet/mii-bitbang.c
> index d384010..3732d69 100644
> --- a/drivers/net/fs_enet/mii-bitbang.c
> +++ b/drivers/net/fs_enet/mii-bitbang.c
> @@ -315,7 +315,7 @@ static int __devinit fs_enet_mdio_probe(
>  	struct fs_mii_bb_platform_info *pdata;
>  	struct mii_bus *new_bus;
>  	struct bb_info *bitbang;
> -	int err = 0;
> +	int i, err = 0;
>  
>  	if (NULL == dev)
>  		return -EINVAL;
> @@ -336,14 +336,17 @@ static int __devinit fs_enet_mdio_probe(
>  	new_bus->reset = &fs_enet_mii_bb_reset,
>  	new_bus->id = pdev->id;
>  
> -	new_bus->phy_mask = ~0x9;
>  	pdata = (struct fs_mii_bb_platform_info *)pdev->dev.platform_data;
> -
>  	if (NULL == pdata) {
>  		printk(KERN_ERR "gfar mdio %d: Missing platform data!\n", pdev->id);
>  		return -ENODEV;
>  	}
>  
> +	new_bus->phy_mask = 0xFFFFFFFF;
> +	for (i = 0; i < PHY_MAX_ADDR; i++)
> +		if (pdata->irq[i] != -1)
> +			new_bus->phy_mask &= ~(1 << i);
> +
>  	/*set up workspace*/
>  	fs_mii_bitbang_init(bitbang, pdata);
>  
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@...abs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ