Re: [PATCH 2/2] r8169: checks against wrong mac addresse init

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Martin Capitanio
Date: Friday, October 17, 2008 - 4:52 pm

On Fri, 2008-10-17 at 22:01 +0200, Francois Romieu wrote:

So it seems ;)
RTL_W8(Cfg9346, Cfg9346_AMMO);
        mdelay(15);

and here they arm/unarm vpd:

static int
rtl8169_eeprom_read(struct net_device *dev, u32 *eeprom_cont, int eeprom_size)
{
	struct rtl8169_private *tp = netdev_priv(dev);
	void __iomem *ioaddr = tp->mmio_addr;
	int i;
	unsigned int read_addr;

	RTL_W8(Cfg9346, Cfg9346_Unlock);
	RTL_W8(Config1, RTL_R8(Config1) | VPDEnable);
	RTL_W8(Cfg9346, Cfg9346_Lock);

	for (i = 0, read_addr = 0; i < eeprom_size / 4; i++)
		*(eeprom_cont + i) = rtl8169_vpd_read(dev, read_addr + i * 4);

	RTL_W8(Cfg9346, Cfg9346_Unlock);
	RTL_W8(Config1, RTL_R8(Config1) & ~VPDEnable);
	RTL_W8(Cfg9346, Cfg9346_Lock);

	return 0;
}

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/2] Pull request for 'r8169-fixes' branch, Francois Romieu, (Thu Oct 16, 2:45 pm)
[PATCH 1/2] r8169: verbose mac address init, Francois Romieu, (Thu Oct 16, 2:47 pm)
[PATCH 2/2] r8169: checks against wrong mac addresse init, Francois Romieu, (Thu Oct 16, 2:48 pm)
Re: [PATCH 2/2] r8169: checks against wrong mac addresse init, Martin Capitanio, (Fri Oct 17, 10:47 am)
Re: [PATCH 2/2] r8169: checks against wrong mac addresse init, Martin Capitanio, (Fri Oct 17, 4:52 pm)
Re: [PATCH 0/2] Pull request for 'r8169-fixes' branch, Jeff Garzik, (Mon Oct 20, 10:05 pm)
Re: [PATCH 2/2] r8169: checks against wrong mac addresse init, Martin Capitanio, (Tue Oct 21, 2:55 pm)