From e9dda978b333e3cad807da8eb9006af667b98254 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 29 Nov 2018 14:31:17 +0100 Subject: [PATCH] drop broken 4.4 lan78xx patch --- ...-read-mac-address-from-dt-if-present.patch | 87 ------------------- queue-4.4/series | 1 - 2 files changed, 88 deletions(-) delete mode 100644 queue-4.4/lan78xx-read-mac-address-from-dt-if-present.patch diff --git a/queue-4.4/lan78xx-read-mac-address-from-dt-if-present.patch b/queue-4.4/lan78xx-read-mac-address-from-dt-if-present.patch deleted file mode 100644 index a0c3bce44da..00000000000 --- a/queue-4.4/lan78xx-read-mac-address-from-dt-if-present.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 760db29bdc97b73ff60b091315ad787b1deb5cf5 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Thu, 19 Apr 2018 17:59:38 +0100 -Subject: lan78xx: Read MAC address from DT if present - -From: Phil Elwell - -commit 760db29bdc97b73ff60b091315ad787b1deb5cf5 upstream. - -There is a standard mechanism for locating and using a MAC address from -the Device Tree. Use this facility in the lan78xx driver to support -applications without programmed EEPROM or OTP. At the same time, -regularise the handling of the different address sources. - -Signed-off-by: Phil Elwell -Signed-off-by: David S. Miller -Tested-by: Paolo Pisati -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/net/usb/lan78xx.c | 42 ++++++++++++++++++++---------------------- - 1 file changed, 20 insertions(+), 22 deletions(-) - ---- a/drivers/net/usb/lan78xx.c -+++ b/drivers/net/usb/lan78xx.c -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include - #include "lan78xx.h" - - #define DRIVER_AUTHOR "WOOJUNG HUH " -@@ -1326,34 +1327,31 @@ static void lan78xx_init_mac_address(str - addr[5] = (addr_hi >> 8) & 0xFF; - - if (!is_valid_ether_addr(addr)) { -- /* reading mac address from EEPROM or OTP */ -- if ((lan78xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, -- addr) == 0) || -- (lan78xx_read_otp(dev, EEPROM_MAC_OFFSET, ETH_ALEN, -- addr) == 0)) { -- if (is_valid_ether_addr(addr)) { -- /* eeprom values are valid so use them */ -- netif_dbg(dev, ifup, dev->net, -- "MAC address read from EEPROM"); -- } else { -- /* generate random MAC */ -- random_ether_addr(addr); -- netif_dbg(dev, ifup, dev->net, -- "MAC address set to random addr"); -- } -- -- addr_lo = addr[0] | (addr[1] << 8) | -- (addr[2] << 16) | (addr[3] << 24); -- addr_hi = addr[4] | (addr[5] << 8); -- -- ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo); -- ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi); -+ if (!eth_platform_get_mac_address(&dev->udev->dev, addr)) { -+ /* valid address present in Device Tree */ -+ netif_dbg(dev, ifup, dev->net, -+ "MAC address read from Device Tree"); -+ } else if (((lan78xx_read_eeprom(dev, EEPROM_MAC_OFFSET, -+ ETH_ALEN, addr) == 0) || -+ (lan78xx_read_otp(dev, EEPROM_MAC_OFFSET, -+ ETH_ALEN, addr) == 0)) && -+ is_valid_ether_addr(addr)) { -+ /* eeprom values are valid so use them */ -+ netif_dbg(dev, ifup, dev->net, -+ "MAC address read from EEPROM"); - } else { - /* generate random MAC */ - random_ether_addr(addr); - netif_dbg(dev, ifup, dev->net, - "MAC address set to random addr"); - } -+ -+ addr_lo = addr[0] | (addr[1] << 8) | -+ (addr[2] << 16) | (addr[3] << 24); -+ addr_hi = addr[4] | (addr[5] << 8); -+ -+ ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo); -+ ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi); - } - - ret = lan78xx_write_reg(dev, MAF_LO(0), addr_lo); diff --git a/queue-4.4/series b/queue-4.4/series index 34df480116f..dbab914af56 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -82,5 +82,4 @@ usb-xhci-fix-uninitialized-completion-when-usb3-port-got-wrong-status.patch btrfs-ensure-btrfs_trim_fs-can-trim-the-whole-filesystem.patch sched-core-allow-__sched_setscheduler-in-interrupts-when-pi-is-not-used.patch namei-allow-restricted-o_creat-of-fifos-and-regular-files.patch -lan78xx-read-mac-address-from-dt-if-present.patch s390-mm-check-for-valid-vma-before-zapping-in-gmap_discard.patch -- 2.47.3