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:	Fri, 29 May 2015 04:08:54 +0200
From:	Andrew Lunn <andrew@...n.ch>
To:	Mathieu Olivari <mathieu@...eaurora.org>
Cc:	robh+dt@...nel.org, pawel.moll@....com, mark.rutland@....com,
	ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
	davem@...emloft.net, f.fainelli@...il.com, linux@...ck-us.net,
	gang.chen.5i5j@...il.com, jiri@...nulli.us, leitec@...ticky.com,
	fabf@...net.be, alexander.h.duyck@...el.com,
	pavel.nakonechny@...tlab.ru, joe@...ches.com, sfeldma@...il.com,
	nbd@...nwrt.org, juhosg@...nwrt.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 1/7] net: dsa: add new driver for ar8xxx family

> +static int ar8xxx_set_pad_ctrl(struct dsa_switch *ds, int port, int mode)
> +{
> +	int reg;
> +
> +	switch (port) {
> +	case 0:
> +		reg = AR8327_REG_PORT0_PAD_CTRL;
> +		break;
> +	case 6:
> +		reg = AR8327_REG_PORT6_PAD_CTRL;
> +		break;
> +	default:
> +		pr_err("Can't set PAD_CTRL on port %d\n", port);
> +		return -EINVAL;
> +	}
> +
> +	/* DSA only supports 1 CPU port for now, so we'll take the assumption
> +	 * that P0 is connected to the CPU master_dev.
> +	 */

I don't like this assumption. Hardware i have with Marvell switches
has the CPU connected to ports 5, or 6, or 0.

Calling dsa_upstream_port() will tell you which is the CPU port.

	Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ