tulip: endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
@@ -326,8 +326,8 @@ static void tulip_up(struct net_device *dev)
|
||||
tp->dirty_rx = tp->dirty_tx = 0;
|
||||
|
||||
if (tp->flags & MC_HASH_ONLY) {
|
||||
u32 addr_low = le32_to_cpu(get_unaligned((u32 *)dev->dev_addr));
|
||||
u32 addr_high = le16_to_cpu(get_unaligned((u16 *)(dev->dev_addr+4)));
|
||||
u32 addr_low = le32_to_cpu(get_unaligned((__le32 *)dev->dev_addr));
|
||||
u32 addr_high = le16_to_cpu(get_unaligned((__le16 *)(dev->dev_addr+4)));
|
||||
if (tp->chip_id == AX88140) {
|
||||
iowrite32(0, ioaddr + CSR13);
|
||||
iowrite32(addr_low, ioaddr + CSR14);
|
||||
@@ -1443,13 +1443,13 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
|
||||
do
|
||||
value = ioread32(ioaddr + CSR9);
|
||||
while (value < 0 && --boguscnt > 0);
|
||||
put_unaligned(le16_to_cpu(value), ((u16*)dev->dev_addr) + i);
|
||||
put_unaligned(cpu_to_le16(value), ((__le16*)dev->dev_addr) + i);
|
||||
sum += value & 0xffff;
|
||||
}
|
||||
} else if (chip_idx == COMET) {
|
||||
/* No need to read the EEPROM. */
|
||||
put_unaligned(cpu_to_le32(ioread32(ioaddr + 0xA4)), (u32 *)dev->dev_addr);
|
||||
put_unaligned(cpu_to_le16(ioread32(ioaddr + 0xA8)), (u16 *)(dev->dev_addr + 4));
|
||||
put_unaligned(cpu_to_le32(ioread32(ioaddr + 0xA4)), (__le32 *)dev->dev_addr);
|
||||
put_unaligned(cpu_to_le16(ioread32(ioaddr + 0xA8)), (__le16 *)(dev->dev_addr + 4));
|
||||
for (i = 0; i < 6; i ++)
|
||||
sum += dev->dev_addr[i];
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user