Skip to contentSkip to conversation

via-rhine: disable rx_copybreak on archs that don't allow unaligned DMA access

PATCH Applied [email protected] 3 participants 3 messages Aug 10, 2007 – Aug 14, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/18 via-rhine: disable rx_copybreak on archs that don't allow unaligned DMA access

From: Dustin Marquess <[email protected]>

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.

Cc Francois Romieu <[email protected]>
Cc Ivan Kokshaysky <[email protected]>
Cc Jeff Garzik <[email protected]>

---

 drivers/net/via-rhine.c |    6 ++++++
 1 files changed, 6 insertions(+)
drivers/net/via-rhine.c renamed from drivers/net/via-rhine.c~via-rhine-disable-rx_copybreak-on-archs-that +6 -0
diff -puN drivers/net/via-rhine.c~via-rhine-disable-rx_copybreak-on-archs-that drivers/net/via-rhine.c
@@ -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
 
 /* Work-around for broken BIOSes: they are unable to get the chip back out of
    power state D3 so PXE booting fails. bootparam(7): via-rhine.avoid_D3=1 */

_

#1 lore raw

[email protected] <[email protected]> :

Quoted 7 lines

From: Dustin Marquess <[email protected]>

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.

Color me confused but what are we trying to solve here ?

The rx_copybreak processing is performed after the DMA from the network card to memory is done: DMA does not care about rx_copybreak.

Signature · 1 line
Ueimor
Applied
#2 lore raw
In reply to [email protected]
Quoted 13 lines · [email protected] wrote:

From: Dustin Marquess <[email protected]>

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.

Cc Francois Romieu <[email protected]>
Cc Ivan Kokshaysky <[email protected]>
Cc Jeff Garzik <[email protected]>
Quoted 4 lines

---

 drivers/net/via-rhine.c |    6 ++++++
 1 files changed, 6 insertions(+)

applied