From 94eb3c3ad1e3828a885cf5e5178fc78e21cca990 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Mar 03 2019 16:58:02 +0000 Subject: Update to 4.14.104 --- diff --git a/.raspberrypi2.metadata b/.raspberrypi2.metadata index 1f3be26..770f710 100644 --- a/.raspberrypi2.metadata +++ b/.raspberrypi2.metadata @@ -3,5 +3,6 @@ d899d197a41382c50fab113787b9788ba10e8b66 SOURCES/patch-4.14.100-101.xz c2494e145278e7ff6d218815c0c1d44ad0a26040 SOURCES/patch-4.14.101-102.xz ced2cbf884317bdb9501d11ac849dec38fb73db1 SOURCES/patch-4.14.102-103.xz +7c6c1429a74ebddd1a52612fcfa24d8e88487a1a SOURCES/patch-4.14.103-104.xz 8a6efa04d0de9b7aaa176c2873600a53244a7b3e SOURCES/patch-4.14.98-99.xz d0e71a944598cf0c3078ce25177c6de80651ff9d SOURCES/patch-4.14.99-100.xz diff --git a/SOURCES/raspberrypi-upstream.patch b/SOURCES/raspberrypi-upstream.patch new file mode 100644 index 0000000..4ccb4fc --- /dev/null +++ b/SOURCES/raspberrypi-upstream.patch @@ -0,0 +1,207 @@ +From 35edb61a12847fbd800281e3b8226aac14c85706 Mon Sep 17 00:00:00 2001 +From: Lukas Wunner +Date: Wed, 16 Jan 2019 12:22:32 +0100 +Subject: [PATCH] bcm2835-mmc: Fix DMA channel leak + +The BCM2835 MMC host driver requests a DMA channel on probe but neglects +to release the channel in the probe error path and on driver unbind. + +I'm seeing this happen on every boot of the Compute Module 3: On first +driver probe, DMA channel 2 is allocated and then leaked with a "could +not get clk, deferring probe" message. On second driver probe, channel 4 +is allocated. + +Fix it. + +Signed-off-by: Lukas Wunner +Cc: Frank Pavlic +--- + drivers/mmc/host/bcm2835-mmc.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c +index b7f5fd96ecb6c..6c37fb0b57135 100644 +--- a/drivers/mmc/host/bcm2835-mmc.c ++++ b/drivers/mmc/host/bcm2835-mmc.c +@@ -1505,6 +1505,8 @@ static int bcm2835_mmc_probe(struct platform_device *pdev) + + return 0; + err: ++ if (host->dma_chan_rxtx) ++ dma_release_channel(host->dma_chan_rxtx); + mmc_free_host(mmc); + + return ret; +@@ -1550,6 +1552,9 @@ static int bcm2835_mmc_remove(struct platform_device *pdev) + + tasklet_kill(&host->finish_tasklet); + ++ if (host->dma_chan_rxtx) ++ dma_release_channel(host->dma_chan_rxtx); ++ + mmc_free_host(host->mmc); + platform_set_drvdata(pdev, NULL); + +From c2d680f8bc195dd8456bc191178de27a178199d7 Mon Sep 17 00:00:00 2001 +From: Lukas Wunner +Date: Sat, 19 Jan 2019 08:06:48 +0100 +Subject: [PATCH] bcm2835-mmc: Fix struct mmc_host leak on probe + +The BCM2835 MMC host driver requests the bus address of the host's +register map on probe. If that fails, the driver leaks the struct +mmc_host allocated earlier. + +Fix it. + +Signed-off-by: Lukas Wunner +Cc: Frank Pavlic +--- + drivers/mmc/host/bcm2835-mmc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c +index 6c37fb0b57135..64abe5d6aec1a 100644 +--- a/drivers/mmc/host/bcm2835-mmc.c ++++ b/drivers/mmc/host/bcm2835-mmc.c +@@ -1441,7 +1441,8 @@ static int bcm2835_mmc_probe(struct platform_device *pdev) + addr = of_get_address(node, 0, NULL, NULL); + if (!addr) { + dev_err(dev, "could not get DMA-register address\n"); +- return -ENODEV; ++ ret = -ENODEV; ++ goto err; + } + host->bus_addr = be32_to_cpup(addr); + pr_debug(" - ioaddr %lx, iomem->start %lx, bus_addr %lx\n", +From c60ad3359c42bbc20c02fbb61bd4f7f2a8b2e360 Mon Sep 17 00:00:00 2001 +From: Lukas Wunner +Date: Sat, 19 Jan 2019 09:00:26 +0100 +Subject: [PATCH] bcm2835-mmc: Fix duplicate free_irq() on remove + +The BCM2835 MMC host driver requests its interrupt as a device-managed +resource, so the interrupt is automatically freed after the driver is +unbound. + +However on driver unbind, bcm2835_mmc_remove() frees the interrupt +explicitly to avoid invocation of the interrupt handler after driver +structures have been torn down. + +The interrupt is thus freed twice, leading to a WARN splat in +__free_irq(). Fix by not requesting the interrupt as a device-managed +resource. + +Signed-off-by: Lukas Wunner +Cc: Frank Pavlic +--- + drivers/mmc/host/bcm2835-mmc.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c +index 64abe5d6aec1a..9a3654d1836c4 100644 +--- a/drivers/mmc/host/bcm2835-mmc.c ++++ b/drivers/mmc/host/bcm2835-mmc.c +@@ -1391,9 +1391,9 @@ static int bcm2835_mmc_add_host(struct bcm2835_host *host) + init_waitqueue_head(&host->buf_ready_int); + + bcm2835_mmc_init(host, 0); +- ret = devm_request_threaded_irq(dev, host->irq, bcm2835_mmc_irq, +- bcm2835_mmc_thread_irq, IRQF_SHARED, +- mmc_hostname(mmc), host); ++ ret = request_threaded_irq(host->irq, bcm2835_mmc_irq, ++ bcm2835_mmc_thread_irq, IRQF_SHARED, ++ mmc_hostname(mmc), host); + if (ret) { + dev_err(dev, "Failed to request IRQ %d: %d\n", host->irq, ret); + goto untasklet; +From f7837b0daf0e9ef899da0271391c91bdfe488fb6 Mon Sep 17 00:00:00 2001 +From: Lukas Wunner +Date: Tue, 22 Jan 2019 12:29:45 +0100 +Subject: [PATCH] bcm2835-mmc: Handle mmc_add_host() errors + +The BCM2835 MMC host driver calls mmc_add_host() but doesn't check its +return value. Errors occurring in that function are therefore not +handled. Fix it. + +Signed-off-by: Lukas Wunner +Cc: Frank Pavlic +--- + drivers/mmc/host/bcm2835-mmc.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c +index 9a3654d1836c4..b9f7b6d45999e 100644 +--- a/drivers/mmc/host/bcm2835-mmc.c ++++ b/drivers/mmc/host/bcm2835-mmc.c +@@ -1400,10 +1400,16 @@ static int bcm2835_mmc_add_host(struct bcm2835_host *host) + } + + mmiowb(); +- mmc_add_host(mmc); ++ ret = mmc_add_host(mmc); ++ if (ret) { ++ dev_err(dev, "could not add MMC host\n"); ++ goto free_irq; ++ } + + return 0; + ++free_irq: ++ free_irq(host->irq, host); + untasklet: + tasklet_kill(&host->finish_tasklet); + +From d4c5c9d8d0dc5c344655e31046a558372f0e50c6 Mon Sep 17 00:00:00 2001 +From: Lukas Wunner +Date: Sat, 19 Jan 2019 08:42:40 +0100 +Subject: [PATCH] bcm2835-mmc: Deduplicate reset of driver data on remove + +The BCM2835 MMC host driver sets the device's driver data pointer to +NULL on ->remove() even though the driver core subsequently does the +same in __device_release_driver(). Drop the duplicate assignment. + +Signed-off-by: Lukas Wunner +Cc: Frank Pavlic +--- + drivers/mmc/host/bcm2835-mmc.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c +index b9f7b6d45999e..98a2d807b6acb 100644 +--- a/drivers/mmc/host/bcm2835-mmc.c ++++ b/drivers/mmc/host/bcm2835-mmc.c +@@ -1563,7 +1563,6 @@ static int bcm2835_mmc_remove(struct platform_device *pdev) + dma_release_channel(host->dma_chan_rxtx); + + mmc_free_host(host->mmc); +- platform_set_drvdata(pdev, NULL); + + return 0; + } +From 877656cd145497db7c09a7de06ea85db98bd72a3 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 18 Feb 2019 15:43:30 +0000 +Subject: [PATCH] Revert "brcmfmac: Mute expected startup 'errors'" + +This reverts commit 34eba9138ccf8d84552ab9dae37d8f348640e663. + +Upstream patch 26e537884a ("brcmfmac: Do not complain about country code "00") +fixes the same issue, so drop this downstream patch. + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +index 2b671d03387b9..48733c5f343da 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -6890,8 +6890,6 @@ static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy, + /* ignore non-ISO3166 country codes */ + for (i = 0; i < 2; i++) + if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') { +- if (req->alpha2[0] == '0' && req->alpha2[1] == '0') +- return; + brcmf_err("not an ISO3166 code (0x%02x 0x%02x)\n", + req->alpha2[0], req->alpha2[1]); + return; diff --git a/SPECS/raspberrypi2.spec b/SPECS/raspberrypi2.spec index b67a8b8..6e0ca7a 100644 --- a/SPECS/raspberrypi2.spec +++ b/SPECS/raspberrypi2.spec @@ -10,7 +10,7 @@ %define extra_version 1 Name: raspberrypi2 -Version: 4.14.103 +Version: 4.14.104 Release: %{local_version}.%{extra_version}%{?dist} Summary: Specific kernel and bootcode for Raspberry Pi @@ -33,6 +33,9 @@ Patch2: patch-4.14.99-100.xz Patch3: patch-4.14.100-101.xz Patch4: patch-4.14.101-102.xz Patch5: patch-4.14.102-103.xz +Patch6: patch-4.14.103-104.xz + +Patch100: raspberrypi-upstream.patch %description Specific kernel and bootcode for Raspberry Pi @@ -90,6 +93,9 @@ including the kernel bootloader. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 + +%patch100 -p1 perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}/" Makefile perl -p -i -e "s/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=/" arch/%{Arch}/configs/bcm2709_defconfig @@ -176,10 +182,10 @@ cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays/README /boot/ov #/usr/sbin/dracut /boot/initramfs-%{version}-%{release}.img %{version}-%{release} %postun kernel -cp $(ls -1 /boot/kernel-*-*|tail -1) /boot/kernel7.img -cp $(ls -1d /usr/share/%{name}-kernel/*-*/|tail -1)/boot/*.dtb /boot/ -cp $(ls -1d /usr/share/%{name}-kernel/*-*/|tail -1)/boot/overlays/*.dtb* /boot/overlays/ -cp $(ls -1d /usr/share/%{name}-kernel/*-*/|tail -1)/boot/overlays/README /boot/overlays/ +cp $(ls -1 /boot/kernel-*-*|sort -V|tail -1) /boot/kernel7.img +cp $(ls -1d /usr/share/%{name}-kernel/*-*/|sort -V|tail -1)/boot/*.dtb /boot/ +cp $(ls -1d /usr/share/%{name}-kernel/*-*/|sort -V|tail -1)/boot/overlays/*.dtb* /boot/overlays/ +cp $(ls -1d /usr/share/%{name}-kernel/*-*/|sort -V|tail -1)/boot/overlays/README /boot/overlays/ %files kernel-devel %defattr(-,root,root) @@ -199,6 +205,10 @@ cp $(ls -1d /usr/share/%{name}-kernel/*-*/|tail -1)/boot/overlays/README /boot/o %doc /boot/LICENCE.broadcom %changelog +* Sun Mar 2 2019 Pablo Greco - 4.14.104-v1.el7 +- Rebase to LTS 4.14.104 +- Fix postun script (https://lists.centos.org/pipermail/arm-dev/2019-March/003748.html) + * Sun Feb 24 2019 Pablo Greco - 4.14.103-v1.el7 - Rebase to LTS 4.14.103 - Add README to /boot/overlays to fix userspace tool