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:	Tue, 14 Sep 2010 15:20:49 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Alexandre Bounine <alexandre.bounine@....com>
Cc:	linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
	Thomas Moll <thomas.moll@...go.com>,
	Matt Porter <mporter@...nel.crashing.org>,
	Li Yang <leoli@...escale.com>,
	Kumar Gala <galak@...nel.crashing.org>,
	Micha Nelissen <micha@...i.hopto.org>
Subject: Re: [PATCH v2 09/10] RapidIO: Add support for IDT CPS Gen2 switches

On Tue, 14 Sep 2010 10:59:22 -0400
Alexandre Bounine <alexandre.bounine@....com> wrote:

> +static int
> +idtg2_route_add_entry(struct rio_mport *mport, u16 destid, u8 hopcount,
> +		       u16 table, u16 route_destid, u8 route_port)
> +{
> +	/*
> +	 * Select routing table to update
> +	 */
> +	if (table == RIO_GLOBAL_TABLE)
> +		table = 0;
> +	else
> +		table++;
> +
> +	rio_mport_write_config_32(mport, destid, hopcount,
> +				  LOCAL_RTE_CONF_DESTID_SEL, table);
> +
> +	/*
> +	 * Program destination port for the specified destID
> +	 */
> +	rio_mport_write_config_32(mport, destid, hopcount,
> +				  RIO_STD_RTE_CONF_DESTID_SEL_CSR,
> +				  (u32)route_destid);
> +
> +	rio_mport_write_config_32(mport, destid, hopcount,
> +				  RIO_STD_RTE_CONF_PORT_SEL_CSR,
> +				  (u32)route_port);
> +	udelay(10);
> +
> +	return 0;
> +}

The handling of `table' is strange.  One would expect the caller of
this function to provide the correct table index, and for the caller to
increment that index at an appropriate time.

So I take a look around but cannot find any means by which
->add_entry() is called with anything other than RIO_GLOBAL_TABLE. 
Maybe I missed something.  Is this all dead code?
--
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