Skip to content

Commit

Permalink
starfire VLAN fix
Browse files Browse the repository at this point in the history
Recognized VLAN ids are set via writew(), should go in host-endian.
That's a long-standing bug, BTW - see http://lkml.org/lkml/2004/2/27/180
for example.  What happens is that card gets VLAN id table populated by
byteswapped values on little-endian boxen (so 257 works as expected, 256
and 258 do not, etc.).  Bug is easily reproduced, patch fixes it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Al Viro authored and Jeff Garzik committed Dec 14, 2007
1 parent 14c9d9b commit 813820b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/starfire.c
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,7 @@ static void set_rx_mode(struct net_device *dev)
if (vlan_group_get_device(np->vlgrp, i)) {
if (vlan_count >= 32)
break;
writew(cpu_to_be16(i), filter_addr);
writew(i, filter_addr);
filter_addr += 16;
vlan_count++;
}
Expand Down

0 comments on commit 813820b

Please sign in to comment.