* Re: [PATCH 2.6.22-git5] via-rhine: Disable rx_copybreak on archs that don't allow unaligned DMA access
[not found] <46991FBC.5070705@alcatraz.fdf.net>
@ 2007-07-19 1:19 ` Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2007-07-19 1:19 UTC (permalink / raw)
To: Dustin Marquess
Cc: Francois Romieu, Jeff Garzik, Ivan Kokshaysky, netdev, linux-arch
(mailing lsits and cc's added - I trust that's OK)
(Please always cc mailing list(s) on patches)
On Sat, 14 Jul 2007 14:10:52 -0500
Dustin Marquess <jailbird@alcatraz.dnsalias.net> wrote:
> From: Dustin Marquess <jailbird@alcatraz.fdf.net>
>
> Patch to disable the rx_copybreak feature on hardware architectures that
> don't allow unaligned DMA access.
>
> #ifdef code taken from tulip_core.c. Problem pointed out by Ivan
> Kokshaysky.
>
> Signed-off-by: Dustin Marquess <jailbird@alcatraz.fdf.net>
> ---
>
> diff -uprN a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
> --- a/drivers/net/via-rhine.c 2007-07-14 13:51:18.475341321 -0500
> +++ b/drivers/net/via-rhine.c 2007-07-14 13:56:40.684678999 -0500
> @@ -42,7 +42,13 @@ static int max_interrupt_work = 20;
>
> /* Set the copy breakpoint for the copy-only-tiny-frames scheme.
> Setting to > 1518 effectively disables this feature. */
> +#if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \
> + || defined(CONFIG_SPARC) || defined(__ia64__) \
> + || defined(__sh__) || defined(__mips__)
> +static int rx_copybreak = 1518;
> +#else
> static int rx_copybreak;
> +#endif
I guess the patch makes sense, but boy that conditional does suck.
It would be much better to go into each of those architecture's
arch/foo/Kconfig and define a new CONFIG_NO_UNALIGNED_DMA or whatever, and
to then use that config variable here, in tulip_core.c and wherever else
we're doing this.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-07-19 1:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <46991FBC.5070705@alcatraz.fdf.net>
2007-07-19 1:19 ` [PATCH 2.6.22-git5] via-rhine: Disable rx_copybreak on archs that don't allow unaligned DMA access Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).