On Wed, 06 Sep 2006 07:12:43 +1000 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote:
> > > > Which means that if it worked on x86 with le16_to_cpu, it should work on > > > powerpc... The main difference here however is that you called > > > le16_to_cpu (which is basically a nop) on a 32 bits field, while I > > > called le32_to_cpu() on it. But both should lead to the same ... (x86 > > > will do a swapped 16 bits load of the 2 first bytes, while ppc will do a > > > load of 4 bytes and swap that, thus ending up with the first 2 bytes > > > swapped in the low order of the result). I'll dump the values and have a > > > look to be sure. Another possibility would be a problem with the bits > > > telling the chip where to calculate the checksum. > > > > > Hardware only computes 16 bit checksum. > > Oh I know that, but calling 16 bits swapping macros on a 32 bits field > is a bit dodgy... might work in this case, I'll verify, but you may end > up with the wrong half of the 32 bits word being used :) > > Ben. > > Agreed. Actually the checksum value is same hi/lo because there are two checksum units and we ask for the same offset on both. -- Stephen Hemminger <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html