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:	Wed, 6 Jan 2016 14:07:31 +0000
From:	Shaohui Xie <shaohui.xie@....com>
To:	Andrew Lunn <andrew@...n.ch>,
	Florian Fainelli <f.fainelli@...il.com>
CC:	netdev <netdev@...r.kernel.org>
Subject: RE: [RFC PATCH net-next 10/24] mdio: Move allocation of interrupts
 into core

> Have mdio_alloc() create the array of interrupt numbers, and
> initialize it to POLLING. This is what most MDIO drivers want, so
> allowing code to be removed from the drivers.
> 
[S.H] Snip.

> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> index 88cb4592b6fb..05381d0f559c 100644
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -51,6 +51,7 @@ struct mii_bus *mdiobus_alloc_size(size_t size)
>  	struct mii_bus *bus;
>  	size_t aligned_size = ALIGN(sizeof(*bus), NETDEV_ALIGN);
>  	size_t alloc_size;
> +	int i;
> 
>  	/* If we alloc extra space, it should be aligned */
>  	if (size)
> @@ -65,6 +66,10 @@ struct mii_bus *mdiobus_alloc_size(size_t size)
>  			bus->priv = (void *)bus + aligned_size;
>  	}
> 
> +	/* Initialise the interrupts to polling */
> +	for (i = 0; i < PHY_MAX_ADDR; i++)
> +		bus->irq[i] = PHY_POLL;
> +
>  	return bus;
>  }
[S.H] Should similar code in of_mdiobus_register() to remove?

Thanks,

Shaohui
--
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