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: <20160530133442.GK6027@lunn.ch>
Date:	Mon, 30 May 2016 15:34:42 +0200
From:	Andrew Lunn <andrew@...n.ch>
To:	Pramod Kumar <pramod.kumar@...adcom.com>
Cc:	Rob Herring <robh+dt@...nel.org>, Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	Kishon Vijay Abraham I <kishon@...com>,
	"David S. Miller" <davem@...emloft.net>,
	devicetree@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	bcm-kernel-feedback-list@...adcom.com,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 5/7] net:mdio-mux: Add MDIO mux driver for iProc SoCs

On Mon, May 30, 2016 at 12:40:49PM +0530, Pramod Kumar wrote:
> iProc based SoCs supports the integrated mdio multiplexer which
> has the bus selection as well as mdio transaction generation logic
> inside.

Hi Pramod

Great to see you using the existing MDIO framework. Thanks.

> +static int mdio_mux_iproc_switch_fn(int current_child, int desired_child,
> +				    void *data)
> +{
> +	struct iproc_mdiomux_desc *md = data;
> +	struct mdiomux_bus_param *bp = &md->bus_param[desired_child];
> +	u32 param, bus_id;
> +	bool bus_dir;
> +
> +	/* select bus and its properties */
> +	bus_dir = (desired_child < EXT_BUS_START_ADDR);
> +	bus_id = bus_dir ? desired_child : (desired_child - EXT_BUS_START_ADDR);
> +
> +	param = (bus_dir ? 1 : 0) << MDIO_PARAM_INTERNAL_SEL;
> +	param |= (bp->is_c45 ? 1 : 0) << MDIO_PARAM_C45_SEL;
> +	param |= (bus_id << MDIO_PARAM_BUS_ID);
> +
> +	writel(param, md->base + MDIO_PARAM_OFFSET);
> +	return 0;
> +}

What i don't yet see is why you went for the concept of an integrated
MDIO and MUX. This function above is the mux function, and it looks
like it could be used to implement a standard mdio-mux driver.

Thanks
     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ