* [PATCH RESEND 0/2] Misc OMAP GPIO/UART fixes @ 2024-10-11 17:33 Judith Mendez 2024-10-11 17:33 ` [PATCH RESEND 1/2] gpio: omap: Add omap_gpio_disable/enable_irq calls Judith Mendez ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Judith Mendez @ 2024-10-11 17:33 UTC (permalink / raw) To: Santosh Shilimkar, Kevin Hilman, Linus Walleij, Bartosz Golaszewski Cc: linux-omap, linux-gpio, linux-kernel, Bin Liu, linux-serial, Judith Mendez This patch series carries some miscellaneous OMAP driver fixes for GPIO and UART drivers. For GPIO, add gpio_enable and gpio_disable calls to gpio-omap which fixes an issue where if there is an irq storm, serial console is unresponsive. For UART, move pm_runtime_get_sync since the current order of omap_8250_rx_dma_flush and pm_runtime_get_sync calls are set in a way that when omap_8250_shutdown returns, dma->rx_running is set and this causes issues next time the UART is re-opened. Changes since v1: - Fix CC list - Drop Fixes tag Judith Mendez (2): gpio: omap: Add omap_gpio_disable/enable_irq calls serial: 8250: omap: Move pm_runtime_get_sync drivers/gpio/gpio-omap.c | 29 +++++++++++++++++++++++++++++ drivers/tty/serial/8250/8250_omap.c | 4 ++-- 2 files changed, 31 insertions(+), 2 deletions(-) base-commit: f45840d172a06d07a1a408b38bdb0be9ab3fd8cb -- 2.47.0 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH RESEND 1/2] gpio: omap: Add omap_gpio_disable/enable_irq calls 2024-10-11 17:33 [PATCH RESEND 0/2] Misc OMAP GPIO/UART fixes Judith Mendez @ 2024-10-11 17:33 ` Judith Mendez 2024-10-11 19:07 ` Andrew Davis 2024-10-11 17:33 ` [PATCH RESEND 2/2] serial: 8250: omap: Move pm_runtime_get_sync Judith Mendez 2024-10-11 22:52 ` [PATCH RESEND 0/2] Misc OMAP GPIO/UART fixes Kevin Hilman 2 siblings, 1 reply; 11+ messages in thread From: Judith Mendez @ 2024-10-11 17:33 UTC (permalink / raw) To: Santosh Shilimkar, Kevin Hilman, Linus Walleij, Bartosz Golaszewski Cc: linux-omap, linux-gpio, linux-kernel, Bin Liu, linux-serial, Judith Mendez Add omap_gpio_disable_irq and omap_gpio_enable_irq calls in gpio-omap. Currently, kernel cannot disable gpio interrupts in case of a irq storm, so add omap_gpio_disable_irq so that interrupts can be disabled/enabled. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Judith Mendez <jm@ti.com> --- drivers/gpio/gpio-omap.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 76d5d87e9681..913e6ece1238 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -711,6 +711,31 @@ static void omap_gpio_unmask_irq(struct irq_data *d) raw_spin_unlock_irqrestore(&bank->lock, flags); } +static void omap_gpio_set_irq(struct irq_data *d, bool enable) +{ + struct gpio_bank *bank = omap_irq_data_get_bank(d); + unsigned int offset = d->hwirq; + unsigned long flags; + + raw_spin_lock_irqsave(&bank->lock, flags); + omap_set_gpio_irqenable(bank, offset, enable); + raw_spin_unlock_irqrestore(&bank->lock, flags); +} + +static void omap_gpio_disable_irq(struct irq_data *d) +{ + bool enable = 1; + + omap_gpio_set_irq(d, !enable); +} + +static void omap_gpio_enable_irq(struct irq_data *d) +{ + bool enable = 1; + + omap_gpio_set_irq(d, enable); +} + static void omap_gpio_irq_print_chip(struct irq_data *d, struct seq_file *p) { struct gpio_bank *bank = omap_irq_data_get_bank(d); @@ -723,6 +748,8 @@ static const struct irq_chip omap_gpio_irq_chip = { .irq_shutdown = omap_gpio_irq_shutdown, .irq_mask = omap_gpio_mask_irq, .irq_unmask = omap_gpio_unmask_irq, + .irq_disable = omap_gpio_disable_irq, + .irq_enable = omap_gpio_enable_irq, .irq_set_type = omap_gpio_irq_type, .irq_set_wake = omap_gpio_wake_enable, .irq_bus_lock = omap_gpio_irq_bus_lock, @@ -737,6 +764,8 @@ static const struct irq_chip omap_gpio_irq_chip_nowake = { .irq_shutdown = omap_gpio_irq_shutdown, .irq_mask = omap_gpio_mask_irq, .irq_unmask = omap_gpio_unmask_irq, + .irq_disable = omap_gpio_disable_irq, + .irq_enable = omap_gpio_enable_irq, .irq_set_type = omap_gpio_irq_type, .irq_bus_lock = omap_gpio_irq_bus_lock, .irq_bus_sync_unlock = gpio_irq_bus_sync_unlock, -- 2.47.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH RESEND 1/2] gpio: omap: Add omap_gpio_disable/enable_irq calls 2024-10-11 17:33 ` [PATCH RESEND 1/2] gpio: omap: Add omap_gpio_disable/enable_irq calls Judith Mendez @ 2024-10-11 19:07 ` Andrew Davis 2024-10-17 18:38 ` Judith Mendez 0 siblings, 1 reply; 11+ messages in thread From: Andrew Davis @ 2024-10-11 19:07 UTC (permalink / raw) To: Judith Mendez, Santosh Shilimkar, Kevin Hilman, Linus Walleij, Bartosz Golaszewski Cc: linux-omap, linux-gpio, linux-kernel, Bin Liu, linux-serial On 10/11/24 12:33 PM, Judith Mendez wrote: > Add omap_gpio_disable_irq and omap_gpio_enable_irq > calls in gpio-omap. > > Currently, kernel cannot disable gpio interrupts in > case of a irq storm, so add omap_gpio_disable_irq > so that interrupts can be disabled/enabled. > > Signed-off-by: Bin Liu <b-liu@ti.com> > Signed-off-by: Judith Mendez <jm@ti.com> > --- > drivers/gpio/gpio-omap.c | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c > index 76d5d87e9681..913e6ece1238 100644 > --- a/drivers/gpio/gpio-omap.c > +++ b/drivers/gpio/gpio-omap.c > @@ -711,6 +711,31 @@ static void omap_gpio_unmask_irq(struct irq_data *d) > raw_spin_unlock_irqrestore(&bank->lock, flags); > } > > +static void omap_gpio_set_irq(struct irq_data *d, bool enable) > +{ > + struct gpio_bank *bank = omap_irq_data_get_bank(d); > + unsigned int offset = d->hwirq; > + unsigned long flags; > + > + raw_spin_lock_irqsave(&bank->lock, flags); > + omap_set_gpio_irqenable(bank, offset, enable); > + raw_spin_unlock_irqrestore(&bank->lock, flags); > +} > + > +static void omap_gpio_disable_irq(struct irq_data *d) > +{ > + bool enable = 1; > + > + omap_gpio_set_irq(d, !enable); Seems like an odd way to make "false", why not: omap_gpio_set_irq(d, false); Andrew > +} > + > +static void omap_gpio_enable_irq(struct irq_data *d) > +{ > + bool enable = 1; > + > + omap_gpio_set_irq(d, enable); > +} > + > static void omap_gpio_irq_print_chip(struct irq_data *d, struct seq_file *p) > { > struct gpio_bank *bank = omap_irq_data_get_bank(d); > @@ -723,6 +748,8 @@ static const struct irq_chip omap_gpio_irq_chip = { > .irq_shutdown = omap_gpio_irq_shutdown, > .irq_mask = omap_gpio_mask_irq, > .irq_unmask = omap_gpio_unmask_irq, > + .irq_disable = omap_gpio_disable_irq, > + .irq_enable = omap_gpio_enable_irq, > .irq_set_type = omap_gpio_irq_type, > .irq_set_wake = omap_gpio_wake_enable, > .irq_bus_lock = omap_gpio_irq_bus_lock, > @@ -737,6 +764,8 @@ static const struct irq_chip omap_gpio_irq_chip_nowake = { > .irq_shutdown = omap_gpio_irq_shutdown, > .irq_mask = omap_gpio_mask_irq, > .irq_unmask = omap_gpio_unmask_irq, > + .irq_disable = omap_gpio_disable_irq, > + .irq_enable = omap_gpio_enable_irq, > .irq_set_type = omap_gpio_irq_type, > .irq_bus_lock = omap_gpio_irq_bus_lock, > .irq_bus_sync_unlock = gpio_irq_bus_sync_unlock, ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RESEND 1/2] gpio: omap: Add omap_gpio_disable/enable_irq calls 2024-10-11 19:07 ` Andrew Davis @ 2024-10-17 18:38 ` Judith Mendez 0 siblings, 0 replies; 11+ messages in thread From: Judith Mendez @ 2024-10-17 18:38 UTC (permalink / raw) To: Andrew Davis Cc: linux-omap, linux-gpio, linux-kernel, Bin Liu, linux-serial, Linus Walleij, Kevin Hilman, Santosh Shilimkar, Bartosz Golaszewski Hi Andrew, On 10/11/24 2:07 PM, Andrew Davis wrote: > On 10/11/24 12:33 PM, Judith Mendez wrote: >> Add omap_gpio_disable_irq and omap_gpio_enable_irq >> calls in gpio-omap. >> >> Currently, kernel cannot disable gpio interrupts in >> case of a irq storm, so add omap_gpio_disable_irq >> so that interrupts can be disabled/enabled. >> >> Signed-off-by: Bin Liu <b-liu@ti.com> >> Signed-off-by: Judith Mendez <jm@ti.com> >> --- >> drivers/gpio/gpio-omap.c | 29 +++++++++++++++++++++++++++++ >> 1 file changed, 29 insertions(+) >> >> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c >> index 76d5d87e9681..913e6ece1238 100644 >> --- a/drivers/gpio/gpio-omap.c >> +++ b/drivers/gpio/gpio-omap.c >> @@ -711,6 +711,31 @@ static void omap_gpio_unmask_irq(struct irq_data *d) >> raw_spin_unlock_irqrestore(&bank->lock, flags); >> } >> +static void omap_gpio_set_irq(struct irq_data *d, bool enable) >> +{ >> + struct gpio_bank *bank = omap_irq_data_get_bank(d); >> + unsigned int offset = d->hwirq; >> + unsigned long flags; >> + >> + raw_spin_lock_irqsave(&bank->lock, flags); >> + omap_set_gpio_irqenable(bank, offset, enable); >> + raw_spin_unlock_irqrestore(&bank->lock, flags); >> +} >> + >> +static void omap_gpio_disable_irq(struct irq_data *d) >> +{ >> + bool enable = 1; >> + >> + omap_gpio_set_irq(d, !enable); > > Seems like an odd way to make "false", why not: > > omap_gpio_set_irq(d, false); Thanks for your review, you are right, but I will be reverting to the original patch format. Where we do not used wrappers function around omap_gpio_set_irq(). ~ Judith > > Andrew > >> +} >> + >> +static void omap_gpio_enable_irq(struct irq_data *d) >> +{ >> + bool enable = 1; >> + >> + omap_gpio_set_irq(d, enable); >> +} >> + >> static void omap_gpio_irq_print_chip(struct irq_data *d, struct >> seq_file *p) >> { >> struct gpio_bank *bank = omap_irq_data_get_bank(d); >> @@ -723,6 +748,8 @@ static const struct irq_chip omap_gpio_irq_chip = { >> .irq_shutdown = omap_gpio_irq_shutdown, >> .irq_mask = omap_gpio_mask_irq, >> .irq_unmask = omap_gpio_unmask_irq, >> + .irq_disable = omap_gpio_disable_irq, >> + .irq_enable = omap_gpio_enable_irq, >> .irq_set_type = omap_gpio_irq_type, >> .irq_set_wake = omap_gpio_wake_enable, >> .irq_bus_lock = omap_gpio_irq_bus_lock, >> @@ -737,6 +764,8 @@ static const struct irq_chip >> omap_gpio_irq_chip_nowake = { >> .irq_shutdown = omap_gpio_irq_shutdown, >> .irq_mask = omap_gpio_mask_irq, >> .irq_unmask = omap_gpio_unmask_irq, >> + .irq_disable = omap_gpio_disable_irq, >> + .irq_enable = omap_gpio_enable_irq, >> .irq_set_type = omap_gpio_irq_type, >> .irq_bus_lock = omap_gpio_irq_bus_lock, >> .irq_bus_sync_unlock = gpio_irq_bus_sync_unlock, ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH RESEND 2/2] serial: 8250: omap: Move pm_runtime_get_sync 2024-10-11 17:33 [PATCH RESEND 0/2] Misc OMAP GPIO/UART fixes Judith Mendez 2024-10-11 17:33 ` [PATCH RESEND 1/2] gpio: omap: Add omap_gpio_disable/enable_irq calls Judith Mendez @ 2024-10-11 17:33 ` Judith Mendez 2024-10-12 0:19 ` Kevin Hilman ` (2 more replies) 2024-10-11 22:52 ` [PATCH RESEND 0/2] Misc OMAP GPIO/UART fixes Kevin Hilman 2 siblings, 3 replies; 11+ messages in thread From: Judith Mendez @ 2024-10-11 17:33 UTC (permalink / raw) To: Santosh Shilimkar, Kevin Hilman, Linus Walleij, Bartosz Golaszewski Cc: linux-omap, linux-gpio, linux-kernel, Bin Liu, linux-serial, Judith Mendez Currently in omap_8250_shutdown, the dma->rx_running flag is set to zero in omap_8250_rx_dma_flush. Next pm_runtime_get_sync is called, which is a runtime resume call stack which can re-set the flag. When the call omap_8250_shutdown returns, the flag is expected to be UN-SET, but this is not the case. This is causing issues the next time UART is re-opened and omap_8250_rx_dma is called. Fix by moving pm_runtime_get_sync before the omap_8250_rx_dma_flush. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Judith Mendez <jm@ti.com> --- drivers/tty/serial/8250/8250_omap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 88b58f44e4e9..0dd68bdbfbcf 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -776,12 +776,12 @@ static void omap_8250_shutdown(struct uart_port *port) struct uart_8250_port *up = up_to_u8250p(port); struct omap8250_priv *priv = port->private_data; + pm_runtime_get_sync(port->dev); + flush_work(&priv->qos_work); if (up->dma) omap_8250_rx_dma_flush(up); - pm_runtime_get_sync(port->dev); - serial_out(up, UART_OMAP_WER, 0); if (priv->habit & UART_HAS_EFR2) serial_out(up, UART_OMAP_EFR2, 0x0); -- 2.47.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH RESEND 2/2] serial: 8250: omap: Move pm_runtime_get_sync 2024-10-11 17:33 ` [PATCH RESEND 2/2] serial: 8250: omap: Move pm_runtime_get_sync Judith Mendez @ 2024-10-12 0:19 ` Kevin Hilman 2024-10-12 8:03 ` Greg KH 2024-10-12 12:27 ` Andreas Kemnade 2 siblings, 0 replies; 11+ messages in thread From: Kevin Hilman @ 2024-10-12 0:19 UTC (permalink / raw) To: Judith Mendez, Santosh Shilimkar, Linus Walleij, Bartosz Golaszewski Cc: linux-omap, linux-gpio, linux-kernel, Bin Liu, linux-serial, Judith Mendez Judith Mendez <jm@ti.com> writes: > Currently in omap_8250_shutdown, the dma->rx_running > flag is set to zero in omap_8250_rx_dma_flush. Next > pm_runtime_get_sync is called, which is a runtime > resume call stack which can re-set the flag. When the > call omap_8250_shutdown returns, the flag is expected > to be UN-SET, but this is not the case. This is causing > issues the next time UART is re-opened and omap_8250_rx_dma > is called. Fix by moving pm_runtime_get_sync before the > omap_8250_rx_dma_flush. > > Signed-off-by: Bin Liu <b-liu@ti.com> > Signed-off-by: Judith Mendez <jm@ti.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Tested-by: Kevin Hilman <khilman@baylibre.com> Gave this a quick boot test on am335x-boneblack and am57xx-beagle-x15. I realize that doesn't really test the DMA paths involved here, but at least it doesn't break basic boot to serial console, and the change looks coorect. Thanks for sending a fix for this. Kevin ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RESEND 2/2] serial: 8250: omap: Move pm_runtime_get_sync 2024-10-11 17:33 ` [PATCH RESEND 2/2] serial: 8250: omap: Move pm_runtime_get_sync Judith Mendez 2024-10-12 0:19 ` Kevin Hilman @ 2024-10-12 8:03 ` Greg KH 2024-10-17 18:47 ` Judith Mendez 2024-10-12 12:27 ` Andreas Kemnade 2 siblings, 1 reply; 11+ messages in thread From: Greg KH @ 2024-10-12 8:03 UTC (permalink / raw) To: Judith Mendez Cc: Santosh Shilimkar, Kevin Hilman, Linus Walleij, Bartosz Golaszewski, linux-omap, linux-gpio, linux-kernel, Bin Liu, linux-serial On Fri, Oct 11, 2024 at 12:33:56PM -0500, Judith Mendez wrote: > Currently in omap_8250_shutdown, the dma->rx_running > flag is set to zero in omap_8250_rx_dma_flush. Next > pm_runtime_get_sync is called, which is a runtime > resume call stack which can re-set the flag. When the > call omap_8250_shutdown returns, the flag is expected > to be UN-SET, but this is not the case. This is causing > issues the next time UART is re-opened and omap_8250_rx_dma > is called. Fix by moving pm_runtime_get_sync before the > omap_8250_rx_dma_flush. You can go to 72 columns :) > Signed-off-by: Bin Liu <b-liu@ti.com> > Signed-off-by: Judith Mendez <jm@ti.com> Wait, who wrote this, Bin? If so, there needs to be a "From:" line saying so. What commit id does this fix? Do you want it backported to older kernels? Why mix two different subsystems in the same patch series, who is supposed to take it? thanks, greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RESEND 2/2] serial: 8250: omap: Move pm_runtime_get_sync 2024-10-12 8:03 ` Greg KH @ 2024-10-17 18:47 ` Judith Mendez 0 siblings, 0 replies; 11+ messages in thread From: Judith Mendez @ 2024-10-17 18:47 UTC (permalink / raw) To: Greg KH Cc: Santosh Shilimkar, Kevin Hilman, Linus Walleij, Bartosz Golaszewski, linux-omap, linux-gpio, linux-kernel, Bin Liu, linux-serial Hi Greg, On 10/12/24 3:03 AM, Greg KH wrote: > On Fri, Oct 11, 2024 at 12:33:56PM -0500, Judith Mendez wrote: >> Currently in omap_8250_shutdown, the dma->rx_running >> flag is set to zero in omap_8250_rx_dma_flush. Next >> pm_runtime_get_sync is called, which is a runtime >> resume call stack which can re-set the flag. When the >> call omap_8250_shutdown returns, the flag is expected >> to be UN-SET, but this is not the case. This is causing >> issues the next time UART is re-opened and omap_8250_rx_dma >> is called. Fix by moving pm_runtime_get_sync before the >> omap_8250_rx_dma_flush. > > You can go to 72 columns :) ok, will fix, thanks! > >> Signed-off-by: Bin Liu <b-liu@ti.com> >> Signed-off-by: Judith Mendez <jm@ti.com> > > Wait, who wrote this, Bin? If so, there needs to be a "From:" line > saying so. I did not realize I could create a patch for someone, apologies, I will be sending v3 with correct "From:". > > What commit id does this fix? Do you want it backported to older > kernels? Why mix two different subsystems in the same patch series, who > is supposed to take it? I suppose it should be backported to older kernels so I will add back the fixes tag. Apologies for sending two different subsystems in one series, I thought describing as "misc" would be good enough to mix the two, but I can separate the patches and respin. Thanks. ~ Judith > > thanks, > > greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RESEND 2/2] serial: 8250: omap: Move pm_runtime_get_sync 2024-10-11 17:33 ` [PATCH RESEND 2/2] serial: 8250: omap: Move pm_runtime_get_sync Judith Mendez 2024-10-12 0:19 ` Kevin Hilman 2024-10-12 8:03 ` Greg KH @ 2024-10-12 12:27 ` Andreas Kemnade [not found] ` <4297747A-8AB9-4E50-93FF-723672B6471C@gmail.com> 2 siblings, 1 reply; 11+ messages in thread From: Andreas Kemnade @ 2024-10-12 12:27 UTC (permalink / raw) To: Judith Mendez Cc: Santosh Shilimkar, Kevin Hilman, Linus Walleij, Bartosz Golaszewski, linux-omap, linux-gpio, linux-kernel, Bin Liu, linux-serial Am Fri, 11 Oct 2024 12:33:56 -0500 schrieb Judith Mendez <jm@ti.com>: > Currently in omap_8250_shutdown, the dma->rx_running > flag is set to zero in omap_8250_rx_dma_flush. Next > pm_runtime_get_sync is called, which is a runtime > resume call stack which can re-set the flag. When the > call omap_8250_shutdown returns, the flag is expected > to be UN-SET, but this is not the case. This is causing > issues the next time UART is re-opened and omap_8250_rx_dma > is called. Fix by moving pm_runtime_get_sync before the > omap_8250_rx_dma_flush. > > Signed-off-by: Bin Liu <b-liu@ti.com> > Signed-off-by: Judith Mendez <jm@ti.com> Is this a theorectical problem or some real practical problem? So you are running a system with runtime pm enabled on serial console. How did you come across this issue? I could run the serial console/getty with runtime pm autosuspend enabled without issues all the years. Regards, Andreas ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <4297747A-8AB9-4E50-93FF-723672B6471C@gmail.com>]
* Re: [PATCH RESEND 2/2] serial: 8250: omap: Move pm_runtime_get_sync [not found] ` <4297747A-8AB9-4E50-93FF-723672B6471C@gmail.com> @ 2024-10-14 15:22 ` Andreas Kemnade 0 siblings, 0 replies; 11+ messages in thread From: Andreas Kemnade @ 2024-10-14 15:22 UTC (permalink / raw) To: Bin Liu Cc: Judith Mendez, Santosh Shilimkar, Kevin Hilman, Linus Walleij, Bartosz Golaszewski, linux-omap, linux-gpio, linux-kernel, Bin Liu, linux-serial Am Sun, 13 Oct 2024 21:52:05 -0500 schrieb Bin Liu <binmlist@gmail.com>: > Hi, > > Somehow this email wasn’t cc’d to my company email account > b-liu@ti.com, so I am replying from my personal email which > subscribed to the mailing list, and sorry if the formatting is wrong > since I am writing this response on my phone. > > On Oct 12, 2024, at 7:27 AM, Andreas Kemnade <andreas@kemnade.info> > wrote: > > > > Am Fri, 11 Oct 2024 12:33:56 -0500 > > schrieb Judith Mendez <jm@ti.com>: > > > > Currently in omap_8250_shutdown, the dma->rx_running > >> flag is set to zero in omap_8250_rx_dma_flush. Next > >> pm_runtime_get_sync is called, which is a runtime > >> resume call stack which can re-set the flag. When the > >> call omap_8250_shutdown returns, the flag is expected > >> to be UN-SET, but this is not the case. This is causing > >> issues the next time UART is re-opened and omap_8250_rx_dma > >> is called. Fix by moving pm_runtime_get_sync before the > >> omap_8250_rx_dma_flush. > >> > >> Signed-off-by: Bin Liu <b-liu@ti.com> > >> Signed-off-by: Judith Mendez <jm@ti.com> > >> > > Is this a theorectical problem or some real practical problem? > > So you are running a system with runtime pm enabled on serial > > console. > > How did you come across this issue? > > I could run the serial console/getty with runtime pm autosuspend > > enabled without issues all the years. > > > Yes this is a real issue reported on AM335x. Please see the report > linked below. > > PROCESSOR-SDK-AM335X: Possible bug in 8250_omap UART driver - > Processors forum - Processors - TI E2E support forums e2e.ti.com > > Thanks for information, so it looks like material for backporting. Maybe add the link in the description and add the cc stable and add back the fixes tag. Regards, Andreas ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RESEND 0/2] Misc OMAP GPIO/UART fixes 2024-10-11 17:33 [PATCH RESEND 0/2] Misc OMAP GPIO/UART fixes Judith Mendez 2024-10-11 17:33 ` [PATCH RESEND 1/2] gpio: omap: Add omap_gpio_disable/enable_irq calls Judith Mendez 2024-10-11 17:33 ` [PATCH RESEND 2/2] serial: 8250: omap: Move pm_runtime_get_sync Judith Mendez @ 2024-10-11 22:52 ` Kevin Hilman 2 siblings, 0 replies; 11+ messages in thread From: Kevin Hilman @ 2024-10-11 22:52 UTC (permalink / raw) To: Judith Mendez, Santosh Shilimkar, Linus Walleij, Bartosz Golaszewski Cc: linux-omap, linux-gpio, linux-kernel, Bin Liu, linux-serial, Judith Mendez Judith Mendez <jm@ti.com> writes: > This patch series carries some miscellaneous > OMAP driver fixes for GPIO and UART drivers. > > For GPIO, add gpio_enable and gpio_disable calls > to gpio-omap which fixes an issue where if there > is an irq storm, serial console is unresponsive. > > For UART, move pm_runtime_get_sync since the > current order of omap_8250_rx_dma_flush and > pm_runtime_get_sync calls are set in a way that > when omap_8250_shutdown returns, dma->rx_running > is set and this causes issues next time the UART > is re-opened. Could you summarize which OMAP platforms this was tested on? Thanks, Kevin ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-10-17 18:48 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-10-11 17:33 [PATCH RESEND 0/2] Misc OMAP GPIO/UART fixes Judith Mendez 2024-10-11 17:33 ` [PATCH RESEND 1/2] gpio: omap: Add omap_gpio_disable/enable_irq calls Judith Mendez 2024-10-11 19:07 ` Andrew Davis 2024-10-17 18:38 ` Judith Mendez 2024-10-11 17:33 ` [PATCH RESEND 2/2] serial: 8250: omap: Move pm_runtime_get_sync Judith Mendez 2024-10-12 0:19 ` Kevin Hilman 2024-10-12 8:03 ` Greg KH 2024-10-17 18:47 ` Judith Mendez 2024-10-12 12:27 ` Andreas Kemnade [not found] ` <4297747A-8AB9-4E50-93FF-723672B6471C@gmail.com> 2024-10-14 15:22 ` Andreas Kemnade 2024-10-11 22:52 ` [PATCH RESEND 0/2] Misc OMAP GPIO/UART fixes Kevin Hilman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).