via-velocity: Correct 64-byte alignment for rx buffers
authorSimon Kagstrom <simon.kagstrom@netinsight.net>
Wed, 25 Nov 2009 22:09:53 +0000 (22:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Nov 2009 23:51:06 +0000 (15:51 -0800)
commitda95b2d422b6eb2b76789bbdbfafb7e07c493e7a
tree7ca2d1d0115d34364a7bc8c7ad558d3c5246f7be
parent350f75960c8ba317935b4274c56c16412e085b08
via-velocity: Correct 64-byte alignment for rx buffers

(From the VIA driver). The current code does not guarantee 64-byte
alignment since it simply does

        int add = skb->data & 63;

        skb->data += add;

(via skb_reserve). So for example, if the skb->data address would be
0x10, this would result in 32-byte alignment (0x10 + 0x10).

Correct by adding

        64 - (skb->data & 63)

instead.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/via-velocity.c