From: Ivan Vecera <ivecera@redhat.com> Date: Tue, 18 Nov 2008 16:14:52 +0100 Subject: [net] r8169: disable the ability to change MAC address Message-id: 1227021292-24642-1-git-send-email-ivecera@redhat.com O-Subject: [PATCH] [RHEL5.3 PATCH] r8169: temporarily disable the ability to change MAC address Bugzilla: 475867 RH-Acked-by: Prarit Bhargava <prarit@redhat.com> RH-Acked-by: Jerome Marchand <jmarchan@redhat.com> RH-Acked-by: Andy Gospodarek <gospo@redhat.com> RH-Acked-by: Neil Horman <nhorman@redhat.com> RH-Acked-by: Neil Horman <nhorman@redhat.com> RH-Acked-by: David Miller <davem@redhat.com> Description: The ability to change MAC address should be temporarily disabled for r8169 driver in RHEL 5.3 because it is too "sticky". The problem is mainly with Xen kernels with Xen daemon running, because it changes the MAC address of the real device to 'FE:FF:FF:FF:FF:FF'. The problem is the Realtek's chips doesn't reset the MAC address to hardwired one on reset. To reset it the power-off is necessary (unplugging battery on notebooks). For r8169 driver exists the patch that adds an ability to read hardwired MAC address from EEPROM on init but there were some problems with it and its inclusion into RHEL 5.3 kernel is too risky. Signed-off-by: Ivan Vecera <ivecera@redhat.com> diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 3ab402b..41f99d1 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1792,6 +1792,8 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp) printk(KERN_INFO PFX "%s: TBI auto-negotiating\n", dev->name); } +#if 0 /* Temporarily disabled */ + static void rtl_rar_set(struct rtl8169_private *tp, u8 *addr) { void __iomem *ioaddr = tp->mmio_addr; @@ -1826,6 +1828,8 @@ static int rtl_set_mac_address(struct net_device *dev, void *p) return 0; } +#endif + static int rtl8169_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct rtl8169_private *tp = netdev_priv(dev); @@ -2102,7 +2106,9 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) dev->irq = pdev->irq; dev->base_addr = (unsigned long) ioaddr; dev->change_mtu = rtl8169_change_mtu; +#if 0 /* Temporarily disabled */ dev->set_mac_address = rtl_set_mac_address; +#endif dev->poll = rtl8169_poll; dev->weight = R8169_NAPI_WEIGHT;