From 01cebb78724ee49a5d276c94885a5dfdc02bb008 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 30 Oct 2006 15:52:50 +0000 Subject: [PATCH] pull upstream r8169 feature revert svn path=/dists/trunk/linux-2.6/; revision=7661 --- debian/changelog | 3 +- .../net-r8169-no_mac_adress_change.patch | 106 ++++++++++++++++++ debian/patches/series/4 | 1 + 3 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 debian/patches/bugfix/net-r8169-no_mac_adress_change.patch diff --git a/debian/changelog b/debian/changelog index 0d4410407..afb09247a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -33,8 +33,9 @@ linux-2.6 (2.6.18-4) UNRELEASED; urgency=low * r8169: the MMIO region of the 8167 stands behin BAR#1. * r8169: Add upstream fix for infinite loop during hotplug. * Bump build-dependency on kernel-package to 10.063. + * r8169: pull revert mac address change support. - -- maximilian attems Wed, 25 Oct 2006 11:47:18 +0200 + -- maximilian attems Mon, 30 Oct 2006 16:47:47 +0100 linux-2.6 (2.6.18-3) unstable; urgency=low diff --git a/debian/patches/bugfix/net-r8169-no_mac_adress_change.patch b/debian/patches/bugfix/net-r8169-no_mac_adress_change.patch new file mode 100644 index 000000000..8d024e0fc --- /dev/null +++ b/debian/patches/bugfix/net-r8169-no_mac_adress_change.patch @@ -0,0 +1,106 @@ +From git-commits-head-owner@vger.kernel.org Mon Oct 30 09:33:16 2006 +Date: Mon, 30 Oct 2006 01:59:17 GMT +Message-Id: <200610300159.k9U1xHkH020247@hera.kernel.org> +From: Linux Kernel Mailing List +To: git-commits-head@vger.kernel.org +Subject: Revert "r8169: mac address change support" + +commit 209ad53bc19667a128d9c51beba873a5c62bff6e +tree d33657bb32ada69baf79015d7d484402e2937a43 +parent 9ca0e5474d11ca044e0aacfa6e78bf17957118d2 +author Linus Torvalds 1162171909 -0800 +committer Linus Torvalds 1162171909 -0800 + +Revert "r8169: mac address change support" + +This reverts commit a2b98a697fa4e7564f78905b83db122824916cf9. + +As per Guennadi Liakhovetski, the mac address change support code breaks +some normal uses (_without_ any address changes), and until it's all +sorted out, we're better off without it. + +Says Francois: + + "Go revert it. + + Despite what I claimed, I can not find a third-party confirmation by + email that it works elsewhere. + + It would probably be enough to remove the call to + __rtl8169_set_mac_addr() in rtl8169_hw_start() though." + +See also + + http://bugzilla.kernel.org/show_bug.cgi?id=6032 + +Cc: Guennadi Liakhovetski +Acked-by: Francois Romieu +Signed-off-by: Linus Torvalds + + drivers/net/r8169.c | 38 -------------------------------------- + 1 file changed, 38 deletions(-) + +diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c +index d132fe7..27f90b2 100644 +--- a/drivers/net/r8169.c ++++ b/drivers/net/r8169.c +@@ -1397,41 +1397,6 @@ static void rtl8169_netpoll(struct net_d + } + #endif + +-static void __rtl8169_set_mac_addr(struct net_device *dev, void __iomem *ioaddr) +-{ +- unsigned int i, j; +- +- RTL_W8(Cfg9346, Cfg9346_Unlock); +- for (i = 0; i < 2; i++) { +- __le32 l = 0; +- +- for (j = 0; j < 4; j++) { +- l <<= 8; +- l |= dev->dev_addr[4*i + j]; +- } +- RTL_W32(MAC0 + 4*i, cpu_to_be32(l)); +- } +- RTL_W8(Cfg9346, Cfg9346_Lock); +-} +- +-static int rtl8169_set_mac_addr(struct net_device *dev, void *p) +-{ +- struct rtl8169_private *tp = netdev_priv(dev); +- struct sockaddr *addr = p; +- +- if (!is_valid_ether_addr(addr->sa_data)) +- return -EINVAL; +- +- memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); +- +- if (netif_running(dev)) { +- spin_lock_irq(&tp->lock); +- __rtl8169_set_mac_addr(dev, tp->mmio_addr); +- spin_unlock_irq(&tp->lock); +- } +- return 0; +-} +- + static void rtl8169_release_board(struct pci_dev *pdev, struct net_device *dev, + void __iomem *ioaddr) + { +@@ -1681,7 +1646,6 @@ rtl8169_init_one(struct pci_dev *pdev, c + dev->stop = rtl8169_close; + dev->tx_timeout = rtl8169_tx_timeout; + dev->set_multicast_list = rtl8169_set_rx_mode; +- dev->set_mac_address = rtl8169_set_mac_addr; + dev->watchdog_timeo = RTL8169_TX_TIMEOUT; + dev->irq = pdev->irq; + dev->base_addr = (unsigned long) ioaddr; +@@ -1929,8 +1893,6 @@ rtl8169_hw_start(struct net_device *dev) + /* Enable all known interrupts by setting the interrupt mask. */ + RTL_W16(IntrMask, rtl8169_intr_mask); + +- __rtl8169_set_mac_addr(dev, ioaddr); +- + netif_start_queue(dev); + } + + diff --git a/debian/patches/series/4 b/debian/patches/series/4 index b0d308ba5..c7870962b 100644 --- a/debian/patches/series/4 +++ b/debian/patches/series/4 @@ -13,3 +13,4 @@ + bugfix/arm/arm-generic-time.patch + bugfix/arm/ixp4xx-clocksource.patch + bugfix/audit-syscalls.patch ++ bugfix/net-r8169-no_mac_adress_change.patch