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:	Wed, 6 Aug 2008 11:36:17 +0900
From:	Paul Mundt <lethal@...ux-sh.org>
To:	Yoshinori Sato <ysato@...rs.sourceforge.jp>
Cc:	Simon Horman <horms@...ge.net.au>,
	Nobuhiro Iwamatsu <iwamatsu@...auri.org>,
	Jeff Garzik <jeff@...zik.org>,
	Nobuhiro Iwamatsu <iwamatsu.nobuhiro@...esas.com>,
	netdev@...r.kernel.org, linux-sh@...r.kernel.org
Subject: Re: [PATCH] sh_eth Add SH7619 support

On Tue, Aug 05, 2008 at 03:21:31PM -0400, Yoshinori Sato wrote:
> At Mon, 4 Aug 2008 04:23:35 +0900,
> Paul Mundt wrote:
> > On Sat, Aug 02, 2008 at 11:34:21AM -0400, Yoshinori Sato wrote:
> > > At Sat, 2 Aug 2008 17:30:22 +1000,
> > > Simon Horman wrote:
> > > > what is the difference between CONFIG_CPU_LITTLE_ENDIAN and
> > > > __LITTLE_ENDIAN__ as used in drivers/net/sh_eth.h ?
> > > 
> > > EDMAC endian is no depend CPU endian.
> > > 
> > The cleaner thing to do might just be to introduce a config symbol for
> > specifying whether the EDMAC is in big or little endian mode, depending
> > on how it's wired up in the CPU. Also, you should use a consistent ifdef
> > style. In some cases you only check if 7619 is defined and do your corner
> > cases there, in others (like this one) you check if it is not defined and
> > push its corner cases further down. The latter of which is very error
> > prone.
> > 
> > If the EDMAC endianness can be changed within a given subtype (or hooked
> > up externally), then we also need to making the conversion run-time
> > configurable, and we can toss the endian hint in the platform data.
> 
> I think it's best solution.
> 
> example
> 
> struct sh_eth_drvadata drvdata {
>        .phy = 1,
>        .edmac_endian = EDMAC_LITTLE, /* or EDMAC_BIG */
> };
> 
> static struct platform_device eth_device = {
>  :
>         .dev = {
>                 .platform_data = &drvdata,
>         },
>  :
> };
> 
> It's OK?
> 
Looks good to me.
--
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