-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1886 from shenki/linux-4.14.20
kernel: Update to Linux 4.14.20-openpower1
- Loading branch information
Showing
18 changed files
with
182 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Brian King <[email protected]> | ||
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. | ||
|
2 changes: 1 addition & 1 deletion
2
openpower/linux/0002-powerpc-64s-Add-workaround-for-P9-vector-CI-load-iss.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Michael Neuling <[email protected]> | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Prashant Sreedharan <[email protected]> | ||
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 <[email protected]> | ||
Signed-off-by: Satish Baddipadige <[email protected]> | ||
Signed-off-by: Siva Reddy Kallam <[email protected]> | ||
Acked-by: Michael Chan <[email protected]> | ||
Signed-off-by: David S. Miller <[email protected]> | ||
(cherry picked from commit 506b0a395f26e52b3f18827e0de1be051acb77ab) | ||
Signed-off-by: Joel Stanley <[email protected]> | ||
--- | ||
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 |
8 changes: 4 additions & 4 deletions
8
...linux/0003-Release-OpenPower-kernel.patch → ...linux/0004-Release-OpenPower-kernel.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Joel Stanley <[email protected]> | ||
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 <[email protected]> | ||
--- | ||
Makefile | 2 +- | ||
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 | ||
|