diff options
author | Figue | 2017-08-25 10:53:10 +0200 |
---|---|---|
committer | Figue | 2017-08-25 10:53:10 +0200 |
commit | a17d6ff8663ca9b78cc0746bc32374425dbce8d7 (patch) | |
tree | 14eb6aec8c77fa084ad88e337c0ea91dbefd0b2d | |
parent | e87f3857459399631b4470b7372f41afaa8cd021 (diff) | |
download | aur-a17d6ff8663ca9b78cc0746bc32374425dbce8d7.tar.gz |
4.12.9-xanmod10
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 18 | ||||
-rw-r--r-- | bonding-ratelimit-failed-speed-duplex-update-warning.patch | 47 | ||||
-rw-r--r-- | bonding-require-speed-duplex-only-for-802.3ad-alb-an.patch | 68 |
4 files changed, 135 insertions, 8 deletions
@@ -1,5 +1,5 @@ pkgbase = linux-xanmod - pkgver = 4.12.8 + pkgver = 4.12.9 pkgrel = 1 url = http://www.xanmod.org/ arch = i686 @@ -12,12 +12,16 @@ pkgbase = linux-xanmod makedepends = bc makedepends = libelf options = !strip - source = https://github.com/xanmod/linux/archive/4.12.8-xanmod9.tar.gz + source = https://github.com/xanmod/linux/archive/4.12.9-xanmod10.tar.gz source = 90-linux.hook source = linux-xanmod.preset - sha256sums = d56f5d2f9ac8835ab4f014ca569a8ea609d206ad28b77d98d60702d1122dd57a + source = bonding-require-speed-duplex-only-for-802.3ad-alb-an.patch + source = bonding-ratelimit-failed-speed-duplex-update-warning.patch + sha256sums = b8ea56e1c41a450ae9d65ae49b65e55a19dc4bc0d99c6c87e11f85b7b9a34e44 sha256sums = 834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0 sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65 + sha256sums = 48e0505438bb4ccc7a0e050a896122b490e8f1b1446aa3833841a9d4d7853d68 + sha256sums = fc606711a922638d5cc4358f47f69f554d9e6eab1cec91f0b49f00911f399722 source_i686 = config.i686 sha256sums_i686 = df55887a43dcbb6bd35fd2fb1ec841427b6ea827334c0880cbc256d4f042a7a1 source_x86_64 = config.x86_64 @@ -5,8 +5,8 @@ pkgbase=linux-xanmod _srcname=linux -pkgver=4.12.8 -xanmod=9 +pkgver=4.12.9 +xanmod=10 pkgrel=1 arch=('i686' 'x86_64') url="http://www.xanmod.org/" @@ -18,12 +18,16 @@ source=(https://github.com/xanmod/linux/archive/${pkgver}-xanmod${xanmod}.tar.gz # pacman hook for initramfs regeneration '90-linux.hook' # standard config files for mkinitcpio ramdisk - "${pkgbase}.preset") + "${pkgbase}.preset" + 'bonding-require-speed-duplex-only-for-802.3ad-alb-an.patch' + 'bonding-ratelimit-failed-speed-duplex-update-warning.patch') source_x86_64=("config.x86_64") source_i686=("config.i686") -sha256sums=('d56f5d2f9ac8835ab4f014ca569a8ea609d206ad28b77d98d60702d1122dd57a' +sha256sums=('b8ea56e1c41a450ae9d65ae49b65e55a19dc4bc0d99c6c87e11f85b7b9a34e44' '834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0' - 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65') + 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65' + '48e0505438bb4ccc7a0e050a896122b490e8f1b1446aa3833841a9d4d7853d68' + 'fc606711a922638d5cc4358f47f69f554d9e6eab1cec91f0b49f00911f399722') sha256sums_i686=('df55887a43dcbb6bd35fd2fb1ec841427b6ea827334c0880cbc256d4f042a7a1') sha256sums_x86_64=('bf84528c592d1841bba0662242f0339a24a1de384c31f28248631e8be9446586') @@ -57,6 +61,10 @@ prepare() { # don't run depmod on 'make install'. We'll do this ourselves in packaging sed -i '2iexit 0' scripts/depmod.sh + # https://bugzilla.kernel.org/show_bug.cgi?id=196547 + patch -Np1 -i ../bonding-ratelimit-failed-speed-duplex-update-warning.patch + patch -Np1 -i ../bonding-require-speed-duplex-only-for-802.3ad-alb-an.patch + # get kernel version make prepare diff --git a/bonding-ratelimit-failed-speed-duplex-update-warning.patch b/bonding-ratelimit-failed-speed-duplex-update-warning.patch new file mode 100644 index 000000000000..c1a8bc5b47e6 --- /dev/null +++ b/bonding-ratelimit-failed-speed-duplex-update-warning.patch @@ -0,0 +1,47 @@ +From 11e9d7829dd08dbafb24517fe922f11c3a8a9dc2 Mon Sep 17 00:00:00 2001 +From: Andreas Born <futur.andy@googlemail.com> +Date: Sat, 12 Aug 2017 00:36:55 +0200 +Subject: [PATCH] bonding: ratelimit failed speed/duplex update warning + +bond_miimon_commit() handles the UP transition for each slave of a bond +in the case of MII. It is triggered 10 times per second for the default +MII Polling interval of 100ms. For device drivers that do not implement +__ethtool_get_link_ksettings() the call to bond_update_speed_duplex() +fails persistently while the MII status could remain UP. That is, in +this and other cases where the speed/duplex update keeps failing over a +longer period of time while the MII state is UP, a warning is printed +every MII polling interval. + +To address these excessive warnings net_ratelimit() should be used. +Printing a warning once would not be sufficient since the call to +bond_update_speed_duplex() could recover to succeed and fail again +later. In that case there would be no new indication what went wrong. + +Fixes: b5bf0f5b16b9c (bonding: correctly update link status during mii-commit phase) +Signed-off-by: Andreas Born <futur.andy@googlemail.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + drivers/net/bonding/bond_main.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c +index 85bb272d2a34..fc63992ab0e0 100644 +--- a/drivers/net/bonding/bond_main.c ++++ b/drivers/net/bonding/bond_main.c +@@ -2144,9 +2144,10 @@ static void bond_miimon_commit(struct bonding *bond) + if (bond_update_speed_duplex(slave) && + bond_needs_speed_duplex(bond)) { + slave->link = BOND_LINK_DOWN; +- netdev_warn(bond->dev, +- "failed to get link speed/duplex for %s\n", +- slave->dev->name); ++ if (net_ratelimit()) ++ netdev_warn(bond->dev, ++ "failed to get link speed/duplex for %s\n", ++ slave->dev->name); + continue; + } + bond_set_slave_link_state(slave, BOND_LINK_UP, +-- +2.14.1 + diff --git a/bonding-require-speed-duplex-only-for-802.3ad-alb-an.patch b/bonding-require-speed-duplex-only-for-802.3ad-alb-an.patch new file mode 100644 index 000000000000..09028515b84f --- /dev/null +++ b/bonding-require-speed-duplex-only-for-802.3ad-alb-an.patch @@ -0,0 +1,68 @@ +From ad729bc9acfb7c47112964b4877ef5404578ed13 Mon Sep 17 00:00:00 2001 +From: Andreas Born <futur.andy@googlemail.com> +Date: Thu, 10 Aug 2017 06:41:44 +0200 +Subject: [PATCH] bonding: require speed/duplex only for 802.3ad, alb and tlb + +The patch c4adfc822bf5 ("bonding: make speed, duplex setting consistent +with link state") puts the link state to down if +bond_update_speed_duplex() cannot retrieve speed and duplex settings. +Assumably the patch was written with 802.3ad mode in mind which relies +on link speed/duplex settings. For other modes like active-backup these +settings are not required. Thus, only for these other modes, this patch +reintroduces support for slaves that do not support reporting speed or +duplex such as wireless devices. This fixes the regression reported in +bug 196547 (https://bugzilla.kernel.org/show_bug.cgi?id=196547). + +Fixes: c4adfc822bf5 ("bonding: make speed, duplex setting consistent +with link state") +Signed-off-by: Andreas Born <futur.andy@googlemail.com> +Acked-by: Mahesh Bandewar <maheshb@google.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + drivers/net/bonding/bond_main.c | 6 ++++-- + include/net/bonding.h | 5 +++++ + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c +index 9bee6c1c70cc..85bb272d2a34 100644 +--- a/drivers/net/bonding/bond_main.c ++++ b/drivers/net/bonding/bond_main.c +@@ -1569,7 +1569,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) + new_slave->delay = 0; + new_slave->link_failure_count = 0; + +- if (bond_update_speed_duplex(new_slave)) ++ if (bond_update_speed_duplex(new_slave) && ++ bond_needs_speed_duplex(bond)) + new_slave->link = BOND_LINK_DOWN; + + new_slave->last_rx = jiffies - +@@ -2140,7 +2141,8 @@ static void bond_miimon_commit(struct bonding *bond) + continue; + + case BOND_LINK_UP: +- if (bond_update_speed_duplex(slave)) { ++ if (bond_update_speed_duplex(slave) && ++ bond_needs_speed_duplex(bond)) { + slave->link = BOND_LINK_DOWN; + netdev_warn(bond->dev, + "failed to get link speed/duplex for %s\n", +diff --git a/include/net/bonding.h b/include/net/bonding.h +index b00508d22e0a..b2e68657a216 100644 +--- a/include/net/bonding.h ++++ b/include/net/bonding.h +@@ -277,6 +277,11 @@ static inline bool bond_is_lb(const struct bonding *bond) + BOND_MODE(bond) == BOND_MODE_ALB; + } + ++static inline bool bond_needs_speed_duplex(const struct bonding *bond) ++{ ++ return BOND_MODE(bond) == BOND_MODE_8023AD || bond_is_lb(bond); ++} ++ + static inline bool bond_is_nondyn_tlb(const struct bonding *bond) + { + return (BOND_MODE(bond) == BOND_MODE_TLB) && +-- +2.14.1 + |