-diff -ur linux.old/drivers/net/via-rhine.c linux.dev/drivers/net/via-rhine.c
---- linux.old/drivers/net/via-rhine.c 2006-11-29 22:57:37.000000000 +0100
-+++ linux.dev/drivers/net/via-rhine.c 2006-12-14 03:39:01.000000000 +0100
-@@ -33,6 +33,7 @@
+Index: linux-2.6.23.17/drivers/net/via-rhine.c
+===================================================================
+--- linux-2.6.23.17.orig/drivers/net/via-rhine.c
++++ linux-2.6.23.17/drivers/net/via-rhine.c
+@@ -33,6 +33,8 @@
static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */
static int max_interrupt_work = 20;
+#ifndef PKT_ALIGN
/* Set the copy breakpoint for the copy-only-tiny-frames scheme.
Setting to > 1518 effectively disables this feature. */
static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */
static int max_interrupt_work = 20;
+#ifndef PKT_ALIGN
/* Set the copy breakpoint for the copy-only-tiny-frames scheme.
Setting to > 1518 effectively disables this feature. */
/* 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 */
/* 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 */
module_param(max_interrupt_work, int, 0);
module_param(debug, int, 0);
module_param(max_interrupt_work, int, 0);
module_param(debug, int, 0);
/* Fill in the Rx buffers. Handle allocation failure gracefully. */
for (i = 0; i < RX_RING_SIZE; i++) {
/* Fill in the Rx buffers. Handle allocation failure gracefully. */
for (i = 0; i < RX_RING_SIZE; i++) {
+#ifdef PKT_ALIGN
+ int i;
+#else
/* Check if the packet is long enough to accept without
copying to a minimally-sized skbuff. */
if (pkt_len < rx_copybreak &&
+#ifdef PKT_ALIGN
+ int i;
+#else
/* Check if the packet is long enough to accept without
copying to a minimally-sized skbuff. */
if (pkt_len < rx_copybreak &&
+ /* align the data to the ip header - should be faster than copying the entire packet */
+ for (i = pkt_len - (pkt_len % 4); i >= 0; i -= 4) {
+ put_unaligned(*((u32 *) (skb->data + i)), (u32 *) (skb->data + i + 2));
+ }
+ skb->data += 2;
+ skb->tail += 2;
+ /* align the data to the ip header - should be faster than copying the entire packet */
+ for (i = pkt_len - (pkt_len % 4); i >= 0; i -= 4) {
+ put_unaligned(*((u32 *) (skb->data + i)), (u32 *) (skb->data + i + 2));
+ }
+ skb->data += 2;
+ skb->tail += 2;
}
skb->protocol = eth_type_trans(skb, dev);
#ifdef CONFIG_VIA_RHINE_NAPI
}
skb->protocol = eth_type_trans(skb, dev);
#ifdef CONFIG_VIA_RHINE_NAPI