* [PATCH] Revert "bcma: init serial console directly from ChipCommon code"
@ 2017-01-12 17:44 Rafał Miłecki
2017-01-13 10:16 ` Kalle Valo
2017-01-13 11:23 ` [PATCH 4.10 fix V2] " Rafał Miłecki
0 siblings, 2 replies; 6+ messages in thread
From: Rafał Miłecki @ 2017-01-12 17:44 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, Felix Fietkau, Rafał Miłecki
From: Rafał Miłecki <rafal@milecki.pl>
This reverts commit 4c81acab3816 ("bcma: init serial console directly
from ChipCommon code") as it broke IRQ assignment. Getting IRQ with
bcma_core_irq helper on SoC requires MIPS core to be set. It happens
*after* ChipCommon initialization so we can't do this so early.
This fixes a regression but it seems noone noticed it for about a year.
It could be it was because serial was still somehow working, just
without IRQs. It doesn't look like a critical patch / fix.
Reported-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
drivers/bcma/bcma_private.h | 3 +++
drivers/bcma/driver_chipcommon.c | 11 +++--------
drivers/bcma/driver_mips.c | 3 +++
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h
index f642c42..168fa17 100644
--- a/drivers/bcma/bcma_private.h
+++ b/drivers/bcma/bcma_private.h
@@ -45,6 +45,9 @@ int bcma_sprom_get(struct bcma_bus *bus);
void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc);
void bcma_core_chipcommon_init(struct bcma_drv_cc *cc);
void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);
+#ifdef CONFIG_BCMA_DRIVER_MIPS
+void bcma_chipco_serial_init(struct bcma_drv_cc *cc);
+#endif /* CONFIG_BCMA_DRIVER_MIPS */
/* driver_chipcommon_b.c */
int bcma_core_chipcommon_b_init(struct bcma_drv_cc_b *ccb);
diff --git a/drivers/bcma/driver_chipcommon.c b/drivers/bcma/driver_chipcommon.c
index b4f6520..62f5bfa 100644
--- a/drivers/bcma/driver_chipcommon.c
+++ b/drivers/bcma/driver_chipcommon.c
@@ -15,8 +15,6 @@
#include <linux/platform_device.h>
#include <linux/bcma/bcma.h>
-static void bcma_chipco_serial_init(struct bcma_drv_cc *cc);
-
static inline u32 bcma_cc_write32_masked(struct bcma_drv_cc *cc, u16 offset,
u32 mask, u32 value)
{
@@ -186,9 +184,6 @@ void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc)
if (cc->capabilities & BCMA_CC_CAP_PMU)
bcma_pmu_early_init(cc);
- if (IS_BUILTIN(CONFIG_BCM47XX) && bus->hosttype == BCMA_HOSTTYPE_SOC)
- bcma_chipco_serial_init(cc);
-
if (bus->hosttype == BCMA_HOSTTYPE_SOC)
bcma_core_chipcommon_flash_detect(cc);
@@ -378,9 +373,9 @@ u32 bcma_chipco_gpio_pulldown(struct bcma_drv_cc *cc, u32 mask, u32 value)
return res;
}
-static void bcma_chipco_serial_init(struct bcma_drv_cc *cc)
+#ifdef CONFIG_BCMA_DRIVER_MIPS
+void bcma_chipco_serial_init(struct bcma_drv_cc *cc)
{
-#if IS_BUILTIN(CONFIG_BCM47XX)
unsigned int irq;
u32 baud_base;
u32 i;
@@ -422,5 +417,5 @@ static void bcma_chipco_serial_init(struct bcma_drv_cc *cc)
ports[i].baud_base = baud_base;
ports[i].reg_shift = 0;
}
-#endif /* CONFIG_BCM47XX */
}
+#endif /* CONFIG_BCMA_DRIVER_MIPS */
diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c
index 96f1713..89af807 100644
--- a/drivers/bcma/driver_mips.c
+++ b/drivers/bcma/driver_mips.c
@@ -278,9 +278,12 @@ static void bcma_core_mips_nvram_init(struct bcma_drv_mips *mcore)
void bcma_core_mips_early_init(struct bcma_drv_mips *mcore)
{
+ struct bcma_bus *bus = mcore->core->bus;
+
if (mcore->early_setup_done)
return;
+ bcma_chipco_serial_init(&bus->drv_cc);
bcma_core_mips_nvram_init(mcore);
mcore->early_setup_done = true;
--
2.10.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "bcma: init serial console directly from ChipCommon code"
2017-01-12 17:44 [PATCH] Revert "bcma: init serial console directly from ChipCommon code" Rafał Miłecki
@ 2017-01-13 10:16 ` Kalle Valo
2017-01-13 10:23 ` Rafał Miłecki
2017-01-13 11:23 ` [PATCH 4.10 fix V2] " Rafał Miłecki
1 sibling, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2017-01-13 10:16 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Kalle Valo, linux-wireless, Felix Fietkau, Rafał Miłecki
Rafa=C5=82 Mi=C5=82ecki <zajec5@gmail.com> writes:
> From: Rafa=C5=82 Mi=C5=82ecki <rafal@milecki.pl>
>
> This reverts commit 4c81acab3816 ("bcma: init serial console directly
> from ChipCommon code") as it broke IRQ assignment. Getting IRQ with
> bcma_core_irq helper on SoC requires MIPS core to be set. It happens
> *after* ChipCommon initialization so we can't do this so early.
>
> This fixes a regression but it seems noone noticed it for about a year.
> It could be it was because serial was still somehow working, just
> without IRQs. It doesn't look like a critical patch / fix.
>
> Reported-by: Felix Fietkau <nbd@nbd.name>
> Signed-off-by: Rafa=C5=82 Mi=C5=82ecki <rafal@milecki.pl>
So this is for 4.11? What about CC stable?
I'll add a Fixes line:
Fixes: 4c81acab3816 ("bcma: init serial console directly from ChipCommon co=
de")
--=20
Kalle Valo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "bcma: init serial console directly from ChipCommon code"
2017-01-13 10:16 ` Kalle Valo
@ 2017-01-13 10:23 ` Rafał Miłecki
2017-01-13 10:42 ` Kalle Valo
0 siblings, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2017-01-13 10:23 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, Felix Fietkau, Rafał Miłecki
On 13 January 2017 at 11:16, Kalle Valo <kvalo@codeaurora.org> wrote:
> Rafa=C5=82 Mi=C5=82ecki <zajec5@gmail.com> writes:
>
>> From: Rafa=C5=82 Mi=C5=82ecki <rafal@milecki.pl>
>>
>> This reverts commit 4c81acab3816 ("bcma: init serial console directly
>> from ChipCommon code") as it broke IRQ assignment. Getting IRQ with
>> bcma_core_irq helper on SoC requires MIPS core to be set. It happens
>> *after* ChipCommon initialization so we can't do this so early.
>>
>> This fixes a regression but it seems noone noticed it for about a year.
>> It could be it was because serial was still somehow working, just
>> without IRQs. It doesn't look like a critical patch / fix.
>>
>> Reported-by: Felix Fietkau <nbd@nbd.name>
>> Signed-off-by: Rafa=C5=82 Mi=C5=82ecki <rafal@milecki.pl>
>
> So this is for 4.11? What about CC stable?
>
> I'll add a Fixes line:
>
> Fixes: 4c81acab3816 ("bcma: init serial console directly from ChipCommon =
code")
After hearing about policy for fixes getting more strict, I thought we
can get it for next only.
Thanks for "Fixes:", I wasn't sure if we need that for reverts.
--=20
Rafa=C5=82
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "bcma: init serial console directly from ChipCommon code"
2017-01-13 10:23 ` Rafał Miłecki
@ 2017-01-13 10:42 ` Kalle Valo
0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2017-01-13 10:42 UTC (permalink / raw)
To: Rafał Miłecki
Cc: linux-wireless, Felix Fietkau, Rafał Miłecki
Rafa=C5=82 Mi=C5=82ecki <zajec5@gmail.com> writes:
> On 13 January 2017 at 11:16, Kalle Valo <kvalo@codeaurora.org> wrote:
>> Rafa=C5=82 Mi=C5=82ecki <zajec5@gmail.com> writes:
>>
>>> From: Rafa=C5=82 Mi=C5=82ecki <rafal@milecki.pl>
>>>
>>> This reverts commit 4c81acab3816 ("bcma: init serial console directly
>>> from ChipCommon code") as it broke IRQ assignment. Getting IRQ with
>>> bcma_core_irq helper on SoC requires MIPS core to be set. It happens
>>> *after* ChipCommon initialization so we can't do this so early.
>>>
>>> This fixes a regression but it seems noone noticed it for about a year.
>>> It could be it was because serial was still somehow working, just
>>> without IRQs. It doesn't look like a critical patch / fix.
>>>
>>> Reported-by: Felix Fietkau <nbd@nbd.name>
>>> Signed-off-by: Rafa=C5=82 Mi=C5=82ecki <rafal@milecki.pl>
>>
>> So this is for 4.11? What about CC stable?
>>
>> I'll add a Fixes line:
>>
>> Fixes: 4c81acab3816 ("bcma: init serial console directly from ChipCommon=
code")
>
> After hearing about policy for fixes getting more strict, I thought we
> can get it for next only.
As this is a user reported regression it would qualify for 4.10, but on
the other hand quite old regression so can easily wait for 4.11 as well.
Up to you really.
But I would like to add CC stable so that this gets backported to older
releases. Is that ok?
> Thanks for "Fixes:", I wasn't sure if we need that for reverts.
If you are fixing a regression it's always a good idea to add the Fixes
line. Makes it easier to backport the fix.
--=20
Kalle Valo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 4.10 fix V2] Revert "bcma: init serial console directly from ChipCommon code"
2017-01-12 17:44 [PATCH] Revert "bcma: init serial console directly from ChipCommon code" Rafał Miłecki
2017-01-13 10:16 ` Kalle Valo
@ 2017-01-13 11:23 ` Rafał Miłecki
2017-01-17 12:24 ` [4.10, fix, " Kalle Valo
1 sibling, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2017-01-13 11:23 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, Felix Fietkau, Rafał Miłecki
From: Rafał Miłecki <rafal@milecki.pl>
This reverts commit 4c81acab3816 ("bcma: init serial console directly
from ChipCommon code") as it broke IRQ assignment. Getting IRQ with
bcma_core_irq helper on SoC requires MIPS core to be set. It happens
*after* ChipCommon initialization so we can't do this so early.
This fixes a user reported regression. It wasn't critical as serial was
still somehow working but lack of IRQs was making in unreliable.
Fixes: 4c81acab3816 ("bcma: init serial console directly from ChipCommon code")
Reported-by: Felix Fietkau <nbd@nbd.name>
Cc: stable@vger.kernel.org # 4.6+
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V2: Update commit message (regression part), add Fixes & Cc. Thanks Kalle!
---
drivers/bcma/bcma_private.h | 3 +++
drivers/bcma/driver_chipcommon.c | 11 +++--------
drivers/bcma/driver_mips.c | 3 +++
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h
index f642c42..168fa17 100644
--- a/drivers/bcma/bcma_private.h
+++ b/drivers/bcma/bcma_private.h
@@ -45,6 +45,9 @@ int bcma_sprom_get(struct bcma_bus *bus);
void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc);
void bcma_core_chipcommon_init(struct bcma_drv_cc *cc);
void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);
+#ifdef CONFIG_BCMA_DRIVER_MIPS
+void bcma_chipco_serial_init(struct bcma_drv_cc *cc);
+#endif /* CONFIG_BCMA_DRIVER_MIPS */
/* driver_chipcommon_b.c */
int bcma_core_chipcommon_b_init(struct bcma_drv_cc_b *ccb);
diff --git a/drivers/bcma/driver_chipcommon.c b/drivers/bcma/driver_chipcommon.c
index b4f6520..62f5bfa 100644
--- a/drivers/bcma/driver_chipcommon.c
+++ b/drivers/bcma/driver_chipcommon.c
@@ -15,8 +15,6 @@
#include <linux/platform_device.h>
#include <linux/bcma/bcma.h>
-static void bcma_chipco_serial_init(struct bcma_drv_cc *cc);
-
static inline u32 bcma_cc_write32_masked(struct bcma_drv_cc *cc, u16 offset,
u32 mask, u32 value)
{
@@ -186,9 +184,6 @@ void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc)
if (cc->capabilities & BCMA_CC_CAP_PMU)
bcma_pmu_early_init(cc);
- if (IS_BUILTIN(CONFIG_BCM47XX) && bus->hosttype == BCMA_HOSTTYPE_SOC)
- bcma_chipco_serial_init(cc);
-
if (bus->hosttype == BCMA_HOSTTYPE_SOC)
bcma_core_chipcommon_flash_detect(cc);
@@ -378,9 +373,9 @@ u32 bcma_chipco_gpio_pulldown(struct bcma_drv_cc *cc, u32 mask, u32 value)
return res;
}
-static void bcma_chipco_serial_init(struct bcma_drv_cc *cc)
+#ifdef CONFIG_BCMA_DRIVER_MIPS
+void bcma_chipco_serial_init(struct bcma_drv_cc *cc)
{
-#if IS_BUILTIN(CONFIG_BCM47XX)
unsigned int irq;
u32 baud_base;
u32 i;
@@ -422,5 +417,5 @@ static void bcma_chipco_serial_init(struct bcma_drv_cc *cc)
ports[i].baud_base = baud_base;
ports[i].reg_shift = 0;
}
-#endif /* CONFIG_BCM47XX */
}
+#endif /* CONFIG_BCMA_DRIVER_MIPS */
diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c
index 96f1713..89af807 100644
--- a/drivers/bcma/driver_mips.c
+++ b/drivers/bcma/driver_mips.c
@@ -278,9 +278,12 @@ static void bcma_core_mips_nvram_init(struct bcma_drv_mips *mcore)
void bcma_core_mips_early_init(struct bcma_drv_mips *mcore)
{
+ struct bcma_bus *bus = mcore->core->bus;
+
if (mcore->early_setup_done)
return;
+ bcma_chipco_serial_init(&bus->drv_cc);
bcma_core_mips_nvram_init(mcore);
mcore->early_setup_done = true;
--
2.10.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [4.10, fix, V2] Revert "bcma: init serial console directly from ChipCommon code"
2017-01-13 11:23 ` [PATCH 4.10 fix V2] " Rafał Miłecki
@ 2017-01-17 12:24 ` Kalle Valo
0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2017-01-17 12:24 UTC (permalink / raw)
To: Rafał Miłecki
Cc: linux-wireless, Felix Fietkau, Rafał Miłecki
Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This reverts commit 4c81acab3816 ("bcma: init serial console directly
> from ChipCommon code") as it broke IRQ assignment. Getting IRQ with
> bcma_core_irq helper on SoC requires MIPS core to be set. It happens
> *after* ChipCommon initialization so we can't do this so early.
>
> This fixes a user reported regression. It wasn't critical as serial was
> still somehow working but lack of IRQs was making in unreliable.
>
> Fixes: 4c81acab3816 ("bcma: init serial console directly from ChipCommon code")
> Reported-by: Felix Fietkau <nbd@nbd.name>
> Cc: stable@vger.kernel.org # 4.6+
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Patch applied to wireless-drivers.git, thanks.
7195439d1d71 Revert "bcma: init serial console directly from ChipCommon code"
--
https://patchwork.kernel.org/patch/9515267/
Documentation about submitting wireless patches and checking status
from patchwork:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-17 12:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-12 17:44 [PATCH] Revert "bcma: init serial console directly from ChipCommon code" Rafał Miłecki
2017-01-13 10:16 ` Kalle Valo
2017-01-13 10:23 ` Rafał Miłecki
2017-01-13 10:42 ` Kalle Valo
2017-01-13 11:23 ` [PATCH 4.10 fix V2] " Rafał Miłecki
2017-01-17 12:24 ` [4.10, fix, " Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.