Re: [PATCH] fixed pcnet32 multicast listen on big endian

Geert Uytterhoeven
2003-02-23T10:05:49Z

On Wed, 5 Feb 2003, Marcus Meissner wrote:
> This fixes multicast listen for pcnet32 on at least powerpc and powerpc64
> kernels.
>
> The mcast_table is in memory referenced by the card and so it needs
> to be accessed in little endian mode.
>
> Ciao, Marcus
>
> --- linux-2.4.19/drivers/net/pcnet32.c.be 2003-02-05 07:59:27.000000000 +0100
> +++ linux-2.4.19/drivers/net/pcnet32.c 2003-02-05 08:00:22.000000000 +0100
> @@ -1534,7 +1534,9 @@
>
> crc = ether_crc_le(6, addrs);
> crc = crc >> 26;
> - mcast_table [crc >> 4] |= 1 << (crc & 0xf);
> + mcast_table [crc >> 4] = le16_to_cpu(
^^^^^^^^^^^
> + le16_to_cpu(mcast_table [crc >> 4]) | (1 << (crc & 0xf))
> + );

Shouldn't the first conversion be `cpu_to_le16'?

Gr{oetje,eeting}s,

Geert (reading bk-commits)