Linux Input Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash
@ 2019-11-29 13:35 Lucas Stach
  2019-12-02 18:27 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2019-11-29 13:35 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, kernel, patchwork-lst

F34 is a bit special as it reinitializes the device and related driver
structs during the firmware update. This clears the fn_irq_mask which
will then prevent F34 from receiving further interrupts, leading to
timeouts during the firmware update. Make sure to reinitialize the
IRQ enables at the appropriate times.

The issue is in F34 code, but the commit in the fixes tag exposed the
issue, as before this commit things would work by accident.

Fixes: 363c53875aef (Input: synaptics-rmi4 - avoid processing unknown IRQs)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/input/rmi4/rmi_f34v7.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/input/rmi4/rmi_f34v7.c b/drivers/input/rmi4/rmi_f34v7.c
index a4cabf52740c..74f7c6f214ff 100644
--- a/drivers/input/rmi4/rmi_f34v7.c
+++ b/drivers/input/rmi4/rmi_f34v7.c
@@ -1189,6 +1189,9 @@ int rmi_f34v7_do_reflash(struct f34_data *f34, const struct firmware *fw)
 {
 	int ret;
 
+	f34->fn->rmi_dev->driver->set_irq_bits(f34->fn->rmi_dev,
+					       f34->fn->irq_mask);
+
 	rmi_f34v7_read_queries_bl_version(f34);
 
 	f34->v7.image = fw->data;
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash
  2019-11-29 13:35 [PATCH] Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash Lucas Stach
@ 2019-12-02 18:27 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2019-12-02 18:27 UTC (permalink / raw)
  To: Lucas Stach; +Cc: linux-input, kernel, patchwork-lst

On Fri, Nov 29, 2019 at 02:35:14PM +0100, Lucas Stach wrote:
> F34 is a bit special as it reinitializes the device and related driver
> structs during the firmware update. This clears the fn_irq_mask which
> will then prevent F34 from receiving further interrupts, leading to
> timeouts during the firmware update. Make sure to reinitialize the
> IRQ enables at the appropriate times.
> 
> The issue is in F34 code, but the commit in the fixes tag exposed the
> issue, as before this commit things would work by accident.
> 
> Fixes: 363c53875aef (Input: synaptics-rmi4 - avoid processing unknown IRQs)
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Applied, thank you.

> ---
>  drivers/input/rmi4/rmi_f34v7.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/input/rmi4/rmi_f34v7.c b/drivers/input/rmi4/rmi_f34v7.c
> index a4cabf52740c..74f7c6f214ff 100644
> --- a/drivers/input/rmi4/rmi_f34v7.c
> +++ b/drivers/input/rmi4/rmi_f34v7.c
> @@ -1189,6 +1189,9 @@ int rmi_f34v7_do_reflash(struct f34_data *f34, const struct firmware *fw)
>  {
>  	int ret;
>  
> +	f34->fn->rmi_dev->driver->set_irq_bits(f34->fn->rmi_dev,
> +					       f34->fn->irq_mask);
> +
>  	rmi_f34v7_read_queries_bl_version(f34);
>  
>  	f34->v7.image = fw->data;
> -- 
> 2.20.1
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-29 13:35 [PATCH] Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash Lucas Stach
2019-12-02 18:27 ` Dmitry Torokhov

Linux Input Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-input/0 linux-input/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-input linux-input/ https://lore.kernel.org/linux-input \
		linux-input@vger.kernel.org
	public-inbox-index linux-input

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-input


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git