diff options
| author | Joel Stanley <joel@jms.id.au> | 2018-02-20 11:28:06 +1030 |
|---|---|---|
| committer | Joel Stanley <joel@jms.id.au> | 2018-02-20 11:38:00 +1030 |
| commit | b8cdd193b20954ca425c26b5704580b5043e4cbd (patch) | |
| tree | 044e6a451fa319b4a86f5a6637acb935b5b2e6d6 /openpower/linux | |
| parent | b999e0181775515dbbe15e2bdd6a05b8cb53a448 (diff) | |
| download | talos-op-build-b8cdd193b20954ca425c26b5704580b5043e4cbd.tar.gz talos-op-build-b8cdd193b20954ca425c26b5704580b5043e4cbd.zip | |
kernel: Update to Linux 4.14.20-openpower1
This adds an upstream backport of a fix for the Broadcom network device:
tg3: APE heartbeat changes
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'openpower/linux')
| -rw-r--r-- | openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch | 2 | ||||
| -rw-r--r-- | openpower/linux/0002-powerpc-64s-Add-workaround-for-P9-vector-CI-load-iss.patch | 2 | ||||
| -rw-r--r-- | openpower/linux/0003-tg3-APE-heartbeat-changes.patch | 162 | ||||
| -rw-r--r-- | openpower/linux/0004-Release-OpenPower-kernel.patch (renamed from openpower/linux/0003-Release-OpenPower-kernel.patch) | 8 |
4 files changed, 168 insertions, 6 deletions
diff --git a/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch b/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch index a0724db8..6b416f09 100644 --- a/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch +++ b/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Brian King <brking@linux.vnet.ibm.com> Date: Wed, 25 Oct 2017 10:42:59 +1100 -Subject: [PATCH 1/3] xhci: Reset controller on xhci shutdown +Subject: [PATCH 1/4] xhci: Reset controller on xhci shutdown Fixes kexec boot. Without a hard reset, some USB chips will fail to initialize in a kexec booted kernel. diff --git a/openpower/linux/0002-powerpc-64s-Add-workaround-for-P9-vector-CI-load-iss.patch b/openpower/linux/0002-powerpc-64s-Add-workaround-for-P9-vector-CI-load-iss.patch index 3f6630d5..fd5e813c 100644 --- a/openpower/linux/0002-powerpc-64s-Add-workaround-for-P9-vector-CI-load-iss.patch +++ b/openpower/linux/0002-powerpc-64s-Add-workaround-for-P9-vector-CI-load-iss.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Michael Neuling <mikey@neuling.org> Date: Fri, 15 Sep 2017 15:25:48 +1000 -Subject: [PATCH 2/3] powerpc/64s: Add workaround for P9 vector CI load issue +Subject: [PATCH 2/4] powerpc/64s: Add workaround for P9 vector CI load issue POWER9 DD2.1 and earlier has an issue where some cache inhibited vector load will return bad data. The workaround is two part, one diff --git a/openpower/linux/0003-tg3-APE-heartbeat-changes.patch b/openpower/linux/0003-tg3-APE-heartbeat-changes.patch new file mode 100644 index 00000000..7f986b5a --- /dev/null +++ b/openpower/linux/0003-tg3-APE-heartbeat-changes.patch @@ -0,0 +1,162 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Prashant Sreedharan <prashant.sreedharan@broadcom.com> +Date: Mon, 19 Feb 2018 12:27:04 +0530 +Subject: [PATCH 3/4] tg3: APE heartbeat changes + +In ungraceful host shutdown or driver crash case BMC connectivity is +lost. APE firmware is missing the driver state in this +case to keep the BMC connectivity alive. +This patch has below change to address this issue. + +Heartbeat mechanism with APE firmware. This heartbeat mechanism +is needed to notify the APE firmware about driver state. + +This patch also has the change in wait time for APE event from +1ms to 20ms as there can be some delay in getting response. + +v2: Drop inline keyword as per David suggestion. + +Signed-off-by: Prashant Sreedharan <prashant.sreedharan@broadcom.com> +Signed-off-by: Satish Baddipadige <satish.baddipadige@broadcom.com> +Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com> +Acked-by: Michael Chan <michael.chan@broadcom.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +(cherry picked from commit 506b0a395f26e52b3f18827e0de1be051acb77ab) +Signed-off-by: Joel Stanley <joel@jms.id.au> +--- + drivers/net/ethernet/broadcom/tg3.c | 35 ++++++++++++++++++++++++----------- + drivers/net/ethernet/broadcom/tg3.h | 5 +++++ + 2 files changed, 29 insertions(+), 11 deletions(-) + +diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c +index aef3fcf2f5b9..703af1bd196c 100644 +--- a/drivers/net/ethernet/broadcom/tg3.c ++++ b/drivers/net/ethernet/broadcom/tg3.c +@@ -818,7 +818,7 @@ static int tg3_ape_event_lock(struct tg3 *tp, u32 timeout_us) + + tg3_ape_unlock(tp, TG3_APE_LOCK_MEM); + +- udelay(10); ++ usleep_range(10, 20); + timeout_us -= (timeout_us > 10) ? 10 : timeout_us; + } + +@@ -920,8 +920,8 @@ static int tg3_ape_send_event(struct tg3 *tp, u32 event) + if (!(apedata & APE_FW_STATUS_READY)) + return -EAGAIN; + +- /* Wait for up to 1 millisecond for APE to service previous event. */ +- err = tg3_ape_event_lock(tp, 1000); ++ /* Wait for up to 20 millisecond for APE to service previous event. */ ++ err = tg3_ape_event_lock(tp, 20000); + if (err) + return err; + +@@ -944,6 +944,7 @@ static void tg3_ape_driver_state_change(struct tg3 *tp, int kind) + + switch (kind) { + case RESET_KIND_INIT: ++ tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_COUNT, tp->ape_hb++); + tg3_ape_write32(tp, TG3_APE_HOST_SEG_SIG, + APE_HOST_SEG_SIG_MAGIC); + tg3_ape_write32(tp, TG3_APE_HOST_SEG_LEN, +@@ -960,13 +961,6 @@ static void tg3_ape_driver_state_change(struct tg3 *tp, int kind) + event = APE_EVENT_STATUS_STATE_START; + break; + case RESET_KIND_SHUTDOWN: +- /* With the interface we are currently using, +- * APE does not track driver state. Wiping +- * out the HOST SEGMENT SIGNATURE forces +- * the APE to assume OS absent status. +- */ +- tg3_ape_write32(tp, TG3_APE_HOST_SEG_SIG, 0x0); +- + if (device_may_wakeup(&tp->pdev->dev) && + tg3_flag(tp, WOL_ENABLE)) { + tg3_ape_write32(tp, TG3_APE_HOST_WOL_SPEED, +@@ -988,6 +982,18 @@ static void tg3_ape_driver_state_change(struct tg3 *tp, int kind) + tg3_ape_send_event(tp, event); + } + ++static void tg3_send_ape_heartbeat(struct tg3 *tp, ++ unsigned long interval) ++{ ++ /* Check if hb interval has exceeded */ ++ if (!tg3_flag(tp, ENABLE_APE) || ++ time_before(jiffies, tp->ape_hb_jiffies + interval)) ++ return; ++ ++ tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_COUNT, tp->ape_hb++); ++ tp->ape_hb_jiffies = jiffies; ++} ++ + static void tg3_disable_ints(struct tg3 *tp) + { + int i; +@@ -7260,6 +7266,7 @@ static int tg3_poll_msix(struct napi_struct *napi, int budget) + } + } + ++ tg3_send_ape_heartbeat(tp, TG3_APE_HB_INTERVAL << 1); + return work_done; + + tx_recovery: +@@ -7342,6 +7349,7 @@ static int tg3_poll(struct napi_struct *napi, int budget) + } + } + ++ tg3_send_ape_heartbeat(tp, TG3_APE_HB_INTERVAL << 1); + return work_done; + + tx_recovery: +@@ -10720,7 +10728,7 @@ static int tg3_reset_hw(struct tg3 *tp, bool reset_phy) + if (tg3_flag(tp, ENABLE_APE)) + /* Write our heartbeat update interval to APE. */ + tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_INT_MS, +- APE_HOST_HEARTBEAT_INT_DISABLE); ++ APE_HOST_HEARTBEAT_INT_5SEC); + + tg3_write_sig_post_reset(tp, RESET_KIND_INIT); + +@@ -11065,6 +11073,9 @@ static void tg3_timer(unsigned long __opaque) + tp->asf_counter = tp->asf_multiplier; + } + ++ /* Update the APE heartbeat every 5 seconds.*/ ++ tg3_send_ape_heartbeat(tp, TG3_APE_HB_INTERVAL); ++ + spin_unlock(&tp->lock); + + restart_timer: +@@ -16625,6 +16636,8 @@ static int tg3_get_invariants(struct tg3 *tp, const struct pci_device_id *ent) + pci_state_reg); + + tg3_ape_lock_init(tp); ++ tp->ape_hb_interval = ++ msecs_to_jiffies(APE_HOST_HEARTBEAT_INT_5SEC); + } + + /* Set up tp->grc_local_ctrl before calling +diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h +index c2d02d02d1e6..99578ab2ddad 100644 +--- a/drivers/net/ethernet/broadcom/tg3.h ++++ b/drivers/net/ethernet/broadcom/tg3.h +@@ -2494,6 +2494,7 @@ + #define TG3_APE_LOCK_PHY3 5 + #define TG3_APE_LOCK_GPIO 7 + ++#define TG3_APE_HB_INTERVAL (tp->ape_hb_interval) + #define TG3_EEPROM_SB_F1R2_MBA_OFF 0x10 + + +@@ -3408,6 +3409,10 @@ struct tg3 { + struct device *hwmon_dev; + bool link_up; + bool pcierr_recovery; ++ ++ u32 ape_hb; ++ unsigned long ape_hb_interval; ++ unsigned long ape_hb_jiffies; + }; + + /* Accessor macros for chip and asic attributes diff --git a/openpower/linux/0003-Release-OpenPower-kernel.patch b/openpower/linux/0004-Release-OpenPower-kernel.patch index 30818403..9e5e9332 100644 --- a/openpower/linux/0003-Release-OpenPower-kernel.patch +++ b/openpower/linux/0004-Release-OpenPower-kernel.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Joel Stanley <joel@jms.id.au> -Date: Thu, 1 Feb 2018 08:37:13 +1030 -Subject: [PATCH 3/3] Release OpenPower kernel +Date: Tue, 20 Feb 2018 11:14:30 +1030 +Subject: [PATCH 4/4] Release OpenPower kernel Signed-off-by: Joel Stanley <joel@jms.id.au> --- @@ -9,13 +9,13 @@ Signed-off-by: Joel Stanley <joel@jms.id.au> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index 90a4bffa8446..21b1d16a9545 100644 +index 33176140f133..621b3d99e2dd 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ VERSION = 4 PATCHLEVEL = 14 - SUBLEVEL = 16 + SUBLEVEL = 20 -EXTRAVERSION = +EXTRAVERSION = -openpower1 NAME = Petit Gorille |

