From: Marek Vasut <marex(a)denx.de>
Older versions of the core are not compatible with the driver due
to various intrusive fixes of the core. Read out the VER register,
check the core revision bitfield and verify if the core in use is
new enough (rev 2.1 or newer) to work correctly with this driver.
Signed-off-by: Marek Vasut <marex(a)denx.de>
Cc: Heiko Schocher <hs(a)denx.de>
Cc: Markus Marb <markus(a)marb.org>
Cc: Marc Kleine-Budde <mkl(a)pengutronix.de>
Cc: linux-stable <stable(a)vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl(a)pengutronix.de>
---
drivers/net/can/ifi_canfd/ifi_canfd.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/can/ifi_canfd/ifi_canfd.c b/drivers/net/can/ifi_canfd/ifi_canfd.c
index 2772d05ff11c..9fd396c3569a 100644
--- a/drivers/net/can/ifi_canfd/ifi_canfd.c
+++ b/drivers/net/can/ifi_canfd/ifi_canfd.c
@@ -136,6 +136,8 @@
#define IFI_CANFD_SYSCLOCK 0x50
#define IFI_CANFD_VER 0x54
+#define IFI_CANFD_VER_REV_MASK 0xff
+#define IFI_CANFD_VER_REV_MIN_SUPPORTED 0x15
#define IFI_CANFD_IP_ID 0x58
#define IFI_CANFD_IP_ID_VALUE 0xD073CAFD
@@ -933,7 +935,7 @@ static int ifi_canfd_plat_probe(struct platform_device *pdev)
struct resource *res;
void __iomem *addr;
int irq, ret;
- u32 id;
+ u32 id, rev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
addr = devm_ioremap_resource(dev, res);
@@ -947,6 +949,13 @@ static int ifi_canfd_plat_probe(struct platform_device *pdev)
return -EINVAL;
}
+ rev = readl(addr + IFI_CANFD_VER) & IFI_CANFD_VER_REV_MASK;
+ if (rev < IFI_CANFD_VER_REV_MIN_SUPPORTED) {
+ dev_err(dev, "This block is too old (rev %i), minimum supported is rev %i\n",
+ rev, IFI_CANFD_VER_REV_MIN_SUPPORTED);
+ return -EINVAL;
+ }
+
ndev = alloc_candev(sizeof(*priv), 1);
if (!ndev)
return -ENOMEM;
--
2.16.1
This is the start of the stable review cycle for the 4.14.26 release.
There are 9 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Mon Mar 12 00:18:16 UTC 2018.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.26-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.26-rc1
Radim Krčmář <rkrcmar(a)redhat.com>
KVM: x86: fix backward migration with async_PF
Daniel Borkmann <daniel(a)iogearbox.net>
bpf, ppc64: fix out of bounds access in tail call
Daniel Borkmann <daniel(a)iogearbox.net>
bpf: allow xadd only on aligned memory
Eric Dumazet <edumazet(a)google.com>
bpf: add schedule points in percpu arrays management
Daniel Borkmann <daniel(a)iogearbox.net>
bpf, arm64: fix out of bounds access in tail call
Daniel Borkmann <daniel(a)iogearbox.net>
bpf, x64: implement retpoline for tail call
Yonghong Song <yhs(a)fb.com>
bpf: fix rcu lockdep warning for lpm_trie map_free callback
Yonghong Song <yhs(a)fb.com>
bpf: fix memory leak in lpm_trie map_free callback function
Daniel Borkmann <daniel(a)iogearbox.net>
bpf: fix mlock precharge on arraymaps
-------------
Diffstat:
Documentation/virtual/kvm/cpuid.txt | 4 ++
Documentation/virtual/kvm/msr.txt | 3 +-
Makefile | 4 +-
arch/arm64/net/bpf_jit_comp.c | 5 +-
arch/powerpc/net/bpf_jit_comp64.c | 1 +
arch/x86/include/asm/nospec-branch.h | 37 +++++++++++++
arch/x86/include/uapi/asm/kvm_para.h | 1 +
arch/x86/kernel/kvm.c | 8 +--
arch/x86/kvm/cpuid.c | 3 +-
arch/x86/net/bpf_jit_comp.c | 9 ++--
kernel/bpf/arraymap.c | 33 +++++++-----
kernel/bpf/lpm_trie.c | 14 ++---
kernel/bpf/verifier.c | 42 +++++++++------
tools/testing/selftests/bpf/test_verifier.c | 84 +++++++++++++++++++++++++++++
14 files changed, 199 insertions(+), 49 deletions(-)
This is the start of the stable review cycle for the 4.15.9 release.
There are 11 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Mon Mar 12 00:18:21 UTC 2018.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.15.9-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.15.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.15.9-rc1
Radim Krčmář <rkrcmar(a)redhat.com>
KVM: x86: fix backward migration with async_PF
Sreekanth Reddy <sreekanth.reddy(a)broadcom.com>
scsi: mpt3sas: wait for and flush running commands on shutdown/unload
Mauricio Faria de Oliveira <mauricfo(a)linux.vnet.ibm.com>
scsi: mpt3sas: fix oops in error handlers after shutdown/unload
Daniel Borkmann <daniel(a)iogearbox.net>
bpf, ppc64: fix out of bounds access in tail call
Daniel Borkmann <daniel(a)iogearbox.net>
bpf: allow xadd only on aligned memory
Eric Dumazet <edumazet(a)google.com>
bpf: add schedule points in percpu arrays management
Daniel Borkmann <daniel(a)iogearbox.net>
bpf, arm64: fix out of bounds access in tail call
Daniel Borkmann <daniel(a)iogearbox.net>
bpf, x64: implement retpoline for tail call
Yonghong Song <yhs(a)fb.com>
bpf: fix rcu lockdep warning for lpm_trie map_free callback
Yonghong Song <yhs(a)fb.com>
bpf: fix memory leak in lpm_trie map_free callback function
Daniel Borkmann <daniel(a)iogearbox.net>
bpf: fix mlock precharge on arraymaps
-------------
Diffstat:
Documentation/virtual/kvm/cpuid.txt | 4 ++
Documentation/virtual/kvm/msr.txt | 3 +-
Makefile | 4 +-
arch/arm64/net/bpf_jit_comp.c | 5 +-
arch/powerpc/net/bpf_jit_comp64.c | 1 +
arch/x86/include/asm/nospec-branch.h | 37 +++++++++++++
arch/x86/include/uapi/asm/kvm_para.h | 1 +
arch/x86/kernel/kvm.c | 8 +--
arch/x86/kvm/cpuid.c | 3 +-
arch/x86/net/bpf_jit_comp.c | 9 ++--
drivers/scsi/mpt3sas/mpt3sas_base.c | 8 +--
drivers/scsi/mpt3sas/mpt3sas_base.h | 3 ++
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 21 ++++++--
kernel/bpf/arraymap.c | 33 +++++++-----
kernel/bpf/lpm_trie.c | 14 ++---
kernel/bpf/verifier.c | 42 +++++++++------
tools/testing/selftests/bpf/test_verifier.c | 84 +++++++++++++++++++++++++++++
17 files changed, 222 insertions(+), 58 deletions(-)
It's found that the final phase set by driver doesn't match that of
the output from clk_summary:
dwmmc_rockchip fe310000.dwmmc: Successfully tuned phase to 346
mmc0: new ultra high speed SDR104 SDIO card at address 0001
cat /sys/kernel/debug/clk/clk_summary | grep sdio_sample
sdio_sample 0 1 0 50000000 0 0
It seems the cached core->phase isn't updated after the clk was
registered. So fix this issue by updating the core->phase if setting
phase successfully.
Fixes: 9e4d04adeb1a ("clk: add clk_core_set_phase_nolock function")
Cc: Stable <stable(a)vger.kernel.org>
Cc: Jerome Brunet <jbrunet(a)baylibre.com>
Signed-off-by: Shawn Lin <shawn.lin(a)rock-chips.com>
---
drivers/clk/clk.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 0f686a9..617e562 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2309,8 +2309,11 @@ static int clk_core_set_phase_nolock(struct clk_core *core, int degrees)
trace_clk_set_phase(core, degrees);
- if (core->ops->set_phase)
+ if (core->ops->set_phase) {
ret = core->ops->set_phase(core->hw, degrees);
+ if (!ret)
+ core->phase = degrees;
+ }
trace_clk_set_phase_complete(core, degrees);
--
1.9.1
From: Sean Wang <sean.wang(a)mediatek.com>
Fix the pointer to struct scp_subdomian not being moved forward
when each sub-domain is expected to be iteratively added through
pm_genpd_add_subdomain call.
Cc: stable(a)vger.kernel.org
Fixes: 53fddb1a66dd ("soc: mediatek: reduce code duplication of scpsys_probe across all SoCs")
Reported-by: Weiyi Lu <weiyi.lu(a)mediatek.com>
Signed-off-by: Sean Wang <sean.wang(a)mediatek.com>
---
drivers/soc/mediatek/mtk-scpsys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c
index fc55faa..9de801e 100644
--- a/drivers/soc/mediatek/mtk-scpsys.c
+++ b/drivers/soc/mediatek/mtk-scpsys.c
@@ -1048,7 +1048,7 @@ static int scpsys_probe(struct platform_device *pdev)
pd_data = &scp->pd_data;
- for (i = 0, sd = soc->subdomains ; i < soc->num_subdomains ; i++) {
+ for (i = 0, sd = soc->subdomains; i < soc->num_subdomains; i++, sd++) {
ret = pm_genpd_add_subdomain(pd_data->domains[sd->origin],
pd_data->domains[sd->subdomain]);
if (ret && IS_ENABLED(CONFIG_PM))
--
2.7.4