Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH

From: Stephen Hemminger
Date: Thu Aug 26 2010 - 11:43:18 EST


On Thu, 26 Aug 2010 18:56:55 +0900
Masayuki Ohtake <masa-korg@xxxxxxxxxxxxxxx> wrote:

> s32 pch_gbe_mac_read_mac_addr(struct pch_gbe_hw *hw)
> +{
> + u32 adr1a, adr1b;
> +
> + PCH_GBE_DEBUG("pch_gbe_mac_read_mac_addr\n");
> +
> + adr1a = ioread32(&hw->reg->mac_adr[0].high);
> + adr1b = ioread32(&hw->reg->mac_adr[0].low);
> +
> + hw->mac.addr[0] = (u8)(adr1a & 0xFF);
> + hw->mac.addr[1] = (u8)((adr1a >> 8) & 0xFF);
> + hw->mac.addr[2] = (u8)((adr1a >> 16) & 0xFF);
> + hw->mac.addr[3] = (u8)((adr1a >> 24) & 0xFF);
> + hw->mac.addr[4] = (u8)(adr1b & 0xFF);
> + hw->mac.addr[5] = (u8)((adr1b >> 8) & 0xFF);
> +
> + PCH_GBE_DEBUG("hw->mac.addr : 0x%02x %02x %02x %02x %02x %02x\n",
> + hw->mac.addr[0], hw->mac.addr[1], hw->mac.addr[2],
> + hw->mac.addr[3], hw->mac.addr[4], hw->mac.addr[5]);

can use new %pM printk format here.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/