Patchwork [natty,oneiric] UBUNTU: SAUCE: Unregister input device only if it is registered

login
register
mail settings
Submitter Jesse Sung
Date Sept. 19, 2011, 1:25 a.m.
Message ID <4E7699FA.20202@canonical.com>
Download mbox | patch
Permalink /patch/115283/
State New
Headers show

Comments

Jesse Sung - Sept. 19, 2011, 1:25 a.m.
https://bugs.launchpad.net/bugs/839238

SRU Justification:

Using an ALPS touchpad in the quirk list makes unloading psmouse.ko hang 
the system.
Also, due to the protocol problem of ALPS touchpad, the disconnect 
function would be called when system is running, and cause a random hang.

Fix:

 From e14874429daac619a2bea5030494ffd68230bfa1 Mon Sep 17 00:00:00 2001
From: Wen-chien Jesse Sung <jesse.sung@canonical.com>
Date: Fri, 16 Sep 2011 15:20:22 +0800
Subject: [PATCH] UBUNTU: SAUCE: Unregister input device only if it is
  registered

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/839238

dev2 is not registered in alps_model_quirk_enabled mode, do not
unregister while disconnecting.

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
  drivers/input/mouse/alps.c |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)
Tim Gardner - Sept. 19, 2011, 12:56 p.m.
On 09/18/2011 07:25 PM, Jesse Sung wrote:
> https://bugs.launchpad.net/bugs/839238
>
> SRU Justification:
>
> Using an ALPS touchpad in the quirk list makes unloading psmouse.ko hang
> the system.
> Also, due to the protocol problem of ALPS touchpad, the disconnect
> function would be called when system is running, and cause a random hang.
>
> Fix:
>
>  From e14874429daac619a2bea5030494ffd68230bfa1 Mon Sep 17 00:00:00 2001
> From: Wen-chien Jesse Sung <jesse.sung@canonical.com>
> Date: Fri, 16 Sep 2011 15:20:22 +0800
> Subject: [PATCH] UBUNTU: SAUCE: Unregister input device only if it is
> registered
>
> BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/839238
>
> dev2 is not registered in alps_model_quirk_enabled mode, do not
> unregister while disconnecting.
>
> Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
> ---
> drivers/input/mouse/alps.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index da20b62..9adff60 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -745,7 +745,8 @@ static void alps_disconnect(struct psmouse *psmouse)
>
> psmouse_reset(psmouse);
> del_timer_sync(&priv->timer);
> - input_unregister_device(priv->dev2);
> + if (!alps_model_quirk_enabled)
> + input_unregister_device(priv->dev2);
> kfree(priv);
> }
>

Have you run this patch by the upstream maintainer ? It seems like a 
good stable patch as well.

Acked-by: Tim Gardner <tim.gardner@canonical.com>

rtg
Seth Forshee - Sept. 19, 2011, 1:37 p.m.
On Mon, Sep 19, 2011 at 06:56:15AM -0600, Tim Gardner wrote:
> On 09/18/2011 07:25 PM, Jesse Sung wrote:
> >https://bugs.launchpad.net/bugs/839238
> >
> >SRU Justification:
> >
> >Using an ALPS touchpad in the quirk list makes unloading psmouse.ko hang
> >the system.
> >Also, due to the protocol problem of ALPS touchpad, the disconnect
> >function would be called when system is running, and cause a random hang.
> >
> >Fix:
> >
> > From e14874429daac619a2bea5030494ffd68230bfa1 Mon Sep 17 00:00:00 2001
> >From: Wen-chien Jesse Sung <jesse.sung@canonical.com>
> >Date: Fri, 16 Sep 2011 15:20:22 +0800
> >Subject: [PATCH] UBUNTU: SAUCE: Unregister input device only if it is
> >registered
> >
> >BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/839238
> >
> >dev2 is not registered in alps_model_quirk_enabled mode, do not
> >unregister while disconnecting.
> >
> >Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
> >---
> >drivers/input/mouse/alps.c | 3 ++-
> >1 files changed, 2 insertions(+), 1 deletions(-)
> >
> >diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> >index da20b62..9adff60 100644
> >--- a/drivers/input/mouse/alps.c
> >+++ b/drivers/input/mouse/alps.c
> >@@ -745,7 +745,8 @@ static void alps_disconnect(struct psmouse *psmouse)
> >
> >psmouse_reset(psmouse);
> >del_timer_sync(&priv->timer);
> >- input_unregister_device(priv->dev2);
> >+ if (!alps_model_quirk_enabled)
> >+ input_unregister_device(priv->dev2);
> >kfree(priv);
> >}
> >
> 
> Have you run this patch by the upstream maintainer ? It seems like a
> good stable patch as well.

I think this problem is caused by our sauce patches for IMPS/2 support
on certain models, therefore it isn't applicable to upstream.

Acked-by: Seth Forshee <seth.forshee@canonical.com>

> 
> Acked-by: Tim Gardner <tim.gardner@canonical.com>
> 
> rtg
> -- 
> Tim Gardner tim.gardner@canonical.com
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Leann Ogasawara - Sept. 19, 2011, 1:41 p.m.
On Mon, 2011-09-19 at 09:25 +0800, Jesse Sung wrote:
> https://bugs.launchpad.net/bugs/839238
> 
> SRU Justification:
> 
> Using an ALPS touchpad in the quirk list makes unloading psmouse.ko hang 
> the system.
> Also, due to the protocol problem of ALPS touchpad, the disconnect 
> function would be called when system is running, and cause a random hang.
> 
> Fix:
> 
>  From e14874429daac619a2bea5030494ffd68230bfa1 Mon Sep 17 00:00:00 2001
> From: Wen-chien Jesse Sung <jesse.sung@canonical.com>
> Date: Fri, 16 Sep 2011 15:20:22 +0800
> Subject: [PATCH] UBUNTU: SAUCE: Unregister input device only if it is
>   registered
> 
> BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/839238
> 
> dev2 is not registered in alps_model_quirk_enabled mode, do not
> unregister while disconnecting.
> 
> Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

Applied to Oneiric master-next.  Jesse, I'm also curious if you have
sent this upstream as well?

Thanks,
Leann

> ---
>   drivers/input/mouse/alps.c |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index da20b62..9adff60 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -745,7 +745,8 @@ static void alps_disconnect(struct psmouse *psmouse)
> 
>   	psmouse_reset(psmouse);
>   	del_timer_sync(&priv->timer);
> -	input_unregister_device(priv->dev2);
> +	if (!alps_model_quirk_enabled)
> +		input_unregister_device(priv->dev2);
>   	kfree(priv);
>   }
> 
> -- 
> 1.7.5.4
> 
>
Jesse Sung - Sept. 20, 2011, 2:03 a.m.
On 09/19/2011 09:41 PM, Leann Ogasawara wrote:
> On Mon, 2011-09-19 at 09:25 +0800, Jesse Sung wrote:
>> https://bugs.launchpad.net/bugs/839238
>>
>> SRU Justification:
>>
>> Using an ALPS touchpad in the quirk list makes unloading psmouse.ko hang
>> the system.
>> Also, due to the protocol problem of ALPS touchpad, the disconnect
>> function would be called when system is running, and cause a random hang.
>>
>> Fix:
>>
>>   From e14874429daac619a2bea5030494ffd68230bfa1 Mon Sep 17 00:00:00 2001
>> From: Wen-chien Jesse Sung<jesse.sung@canonical.com>
>> Date: Fri, 16 Sep 2011 15:20:22 +0800
>> Subject: [PATCH] UBUNTU: SAUCE: Unregister input device only if it is
>>    registered
>>
>> BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/839238
>>
>> dev2 is not registered in alps_model_quirk_enabled mode, do not
>> unregister while disconnecting.
>>
>> Signed-off-by: Wen-chien Jesse Sung<jesse.sung@canonical.com>
>
> Signed-off-by: Leann Ogasawara<leann.ogasawara@canonical.com>
>
> Applied to Oneiric master-next.  Jesse, I'm also curious if you have
> sent this upstream as well?
>
> Thanks,
> Leann
>
>> ---
>>    drivers/input/mouse/alps.c |    3 ++-
>>    1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
>> index da20b62..9adff60 100644
>> --- a/drivers/input/mouse/alps.c
>> +++ b/drivers/input/mouse/alps.c
>> @@ -745,7 +745,8 @@ static void alps_disconnect(struct psmouse *psmouse)
>>
>>    	psmouse_reset(psmouse);
>>    	del_timer_sync(&priv->timer);
>> -	input_unregister_device(priv->dev2);
>> +	if (!alps_model_quirk_enabled)
>> +		input_unregister_device(priv->dev2);
>>    	kfree(priv);
>>    }
>>
>> --
>> 1.7.5.4
>>
>>

Hi Leann and rtg,

Just as Seth pointed out, alps_model_quirk_enabled is only exists in 
ubuntu kernel (natty and oneiric), so I didn't send this to upstream.

Thanks,
Jesse Sung
Jeremy Kerr - Sept. 26, 2011, 9:01 a.m.
Hi Leann,

> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
> 
> Applied to Oneiric master-next.

Any chance we could get it applied to natty as a SRU, given that it's
relevant there too? We're happy to do the SRU approval testing.

Cheers,


Jeremy
Tim Gardner - Sept. 26, 2011, 1:22 p.m.
On 09/26/2011 03:01 AM, Jeremy Kerr wrote:
> Hi Leann,
>
>> Signed-off-by: Leann Ogasawara<leann.ogasawara@canonical.com>
>>
>> Applied to Oneiric master-next.
>
> Any chance we could get it applied to natty as a SRU, given that it's
> relevant there too? We're happy to do the SRU approval testing.
>
> Cheers,
>
>
> Jeremy
>
>
>

Done

Patch

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index da20b62..9adff60 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -745,7 +745,8 @@  static void alps_disconnect(struct psmouse *psmouse)

  	psmouse_reset(psmouse);
  	del_timer_sync(&priv->timer);
-	input_unregister_device(priv->dev2);
+	if (!alps_model_quirk_enabled)
+		input_unregister_device(priv->dev2);
  	kfree(priv);
  }