SRU: Fix blaze board crash with tiwlan package installed
On 10/22/2010 05:52 AM, Sebastien Jan wrote:
> SRU justification:
>
> Impact: When booting official Maverick pre-installed images on OMAP4
> blaze board, with standard wlan packages installed (tiwlan-wl1271*), the
> blaze board crashes on wlan driver init.
>
> Fix: The problem is fixed by registering the wlan device exclusively on
> pandaboard (the wlan device on blaze board is not compatible).
>
> Testcase: install the standard TI packages on the Maverick OMAP4
> pre-installed image running on a blaze board. On next boot, the platform
> crashes while loading the wlan driver.
>
> BugLink:
> https://bugs.launchpad.net/ubuntu/+source/linux-ti-omap4/+bug/665039
>
> This issue is fixed by the below (and also attached) patch.
>
>
> From f8c552bce2a258a080536c86fff61e5c50e0e843 Mon Sep 17 00:00:00 2001
> From: Sebastien Jan <s-jan@ti.com>
> Date: Mon, 18 Oct 2010 18:00:55 +0200
> Subject: [PATCH] wlan: register wlan device only on pandaboard
>
> Registering the wlan device on blaze triggers the loading
> of user-space wlan drivers for 1271 chip. These user-space
> drivers are not compatible with the 1283 chip of the blaze and
> cause a kernel crash.
>
> The event is the same whatever the wlan controller, which
> prevents managing different wlan drivers in user-space.
>
> This patch registers the wlan device only on pandaboard.
> Long term, we would like to generate different events depending
> on the wlan controller.
>
> Signed-off-by: Sebastien Jan <s-jan@ti.com>
> ---
> arch/arm/mach-omap2/board-4430sdp-wifi.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-4430sdp-wifi.c
> b/arch/arm/mach-omap2/board-4430sdp-wifi.c
> index aa731ef..eea7cad 100644
> --- a/arch/arm/mach-omap2/board-4430sdp-wifi.c
> +++ b/arch/arm/mach-omap2/board-4430sdp-wifi.c
> @@ -129,7 +129,8 @@ static int __init sdp4430_wifi_init(void)
> }
> gpio_direction_input(SDP4430_WIFI_IRQ_GPIO);
> #ifdef CONFIG_WIFI_CONTROL_FUNC
> - ret = platform_device_register(&sdp4430_wifi_device);
> + if (machine_is_omap4_panda())
> + ret = platform_device_register(&sdp4430_wifi_device);
> #endif
> out:
> return ret;
>
Methinks y'all are forgetting the patch that defines
machine_is_omap4_panda().
/home/rtg/maverick/kern/ubuntu-maverick/arch/arm/mach-omap2/board-4430sdp-wifi.c:
In function 'sdp4430_wifi_init':
/home/rtg/maverick/kern/ubuntu-maverick/arch/arm/mach-omap2/board-4430sdp-wifi.c:132:
error: implicit declaration of function 'machine_is_omap4_panda'
rtg
--
Tim Gardner tim.gardner@canonical.com
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
10-22-2010, 01:44 PM
Sebastien Jan
SRU: Fix blaze board crash with tiwlan package installed
On 10/22/2010 03:32 PM, Tim Gardner wrote:
Methinks y'all are forgetting the patch that defines
machine_is_omap4_panda().
/home/rtg/maverick/kern/ubuntu-maverick/arch/arm/mach-omap2/board-4430sdp-wifi.c:
In function 'sdp4430_wifi_init':
/home/rtg/maverick/kern/ubuntu-maverick/arch/arm/mach-omap2/board-4430sdp-wifi.c:132:
error: implicit declaration of function 'machine_is_omap4_panda'
Right, sorry for that, I already had this line in my testing branch...
Here is the fixed patch, + checked compilation on ti-omap4 branch.
From eb27da7160e112bc206ef6e75824cffd1ec6ce07 Mon Sep 17 00:00:00 2001
From: Sebastien Jan <s-jan@ti.com>
Date: Mon, 18 Oct 2010 18:00:55 +0200
Subject: [PATCH v2] wlan: register wlan device only on pandaboard
Registering the wlan device on blaze triggers the loading
of user-space wlan drivers for 1271 chip. These user-space
drivers are not compatible with the 1283 chip of the blaze and
cause a kernel crash.
The event is the same whatever the wlan controller, which
prevents managing different wlan drivers in user-space.
This patch registers the wlan device only on pandaboard.
Long term, we would like to generate different events depending
on the wlan controller.
#define SDP4430_WIFI_PMENA_GPIO 43
@@ -129,7 +130,8 @@ static int __init sdp4430_wifi_init(void)
}
gpio_direction_input(SDP4430_WIFI_IRQ_GPIO);
#ifdef CONFIG_WIFI_CONTROL_FUNC
- ret = platform_device_register(&sdp4430_wifi_device);
+ if (machine_is_omap4_panda())
+ ret = platform_device_register(&sdp4430_wifi_device);
#endif
out:
return ret;
--
1.7.0.4
10-22-2010, 01:53 PM
Bryan Wu
SRU: Fix blaze board crash with tiwlan package installed
On Fri, Oct 22, 2010 at 9:32 PM, Tim Gardner <tim.gardner@canonical.com> wrote:
> On 10/22/2010 05:52 AM, Sebastien Jan wrote:
>> SRU justification:
>>
>> Impact: When booting official Maverick pre-installed images on OMAP4
>> blaze board, with standard wlan packages installed (tiwlan-wl1271*), the
>> blaze board crashes on wlan driver init.
>>
>> Fix: The problem is fixed by registering the wlan device exclusively on
>> pandaboard (the wlan device on blaze board is not compatible).
>>
>> Testcase: install the standard TI packages on the Maverick OMAP4
>> pre-installed image running on a blaze board. On next boot, the platform
>> crashes while loading the wlan driver.
>>
>> BugLink:
>> https://bugs.launchpad.net/ubuntu/+source/linux-ti-omap4/+bug/665039
>>
>> This issue is fixed by the below (and also attached) patch.
>>
>>
>> *From f8c552bce2a258a080536c86fff61e5c50e0e843 Mon Sep 17 00:00:00 2001
>> From: Sebastien Jan <s-jan@ti.com>
>> Date: Mon, 18 Oct 2010 18:00:55 +0200
>> Subject: [PATCH] wlan: register wlan device only on pandaboard
>>
>> Registering the wlan device on blaze triggers the loading
>> of user-space wlan drivers for 1271 chip. These user-space
>> drivers are not compatible with the 1283 chip of the blaze and
>> cause a kernel crash.
>>
>> The event is the same whatever the wlan controller, which
>> prevents managing different wlan drivers in user-space.
>>
>> This patch registers the wlan device only on pandaboard.
>> Long term, we would like to generate different events depending
>> on the wlan controller.
>>
>> Signed-off-by: Sebastien Jan <s-jan@ti.com>
>> ---
>> arch/arm/mach-omap2/board-4430sdp-wifi.c | 3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-4430sdp-wifi.c
>> b/arch/arm/mach-omap2/board-4430sdp-wifi.c
>> index aa731ef..eea7cad 100644
>> --- a/arch/arm/mach-omap2/board-4430sdp-wifi.c
>> +++ b/arch/arm/mach-omap2/board-4430sdp-wifi.c
>> @@ -129,7 +129,8 @@ static int __init sdp4430_wifi_init(void)
>> }
>> gpio_direction_input(SDP4430_WIFI_IRQ_GPIO);
>> #ifdef CONFIG_WIFI_CONTROL_FUNC
>> - ret = platform_device_register(&sdp4430_wifi_device);
>> + if (machine_is_omap4_panda())
>> + ret = platform_device_register(&sdp4430_wifi_device);
>> #endif
>> out:
>> return ret;
>>
>
> Methinks y'all are forgetting the patch that defines
> machine_is_omap4_panda().
>
This kind of machine_is_xxx() functions is auto generated, as
"Generating include/generated/mach-types.h"
So this patch missed "#include <asm/mach-types.h>"
> /home/rtg/maverick/kern/ubuntu-maverick/arch/arm/mach-omap2/board-4430sdp-wifi.c:
> In function 'sdp4430_wifi_init':
> /home/rtg/maverick/kern/ubuntu-maverick/arch/arm/mach-omap2/board-4430sdp-wifi.c:132:
> error: implicit declaration of function 'machine_is_omap4_panda'
>
And Sebastien,
I'm afraid it's not enough we just ignore the
platform_devices_register(). how about we just return at the beginning
of sdp4430_wifi_init() if !machine_is_omap4_panda().
-Bryan
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
10-22-2010, 02:25 PM
Tim Gardner
SRU: Fix blaze board crash with tiwlan package installed
This is a multi-part message in MIME format.
Thusly ?
--
Tim Gardner tim.gardner@canonical.com
10-22-2010, 02:33 PM
"Jan, Sebastien"
SRU: Fix blaze board crash with tiwlan package installed
On Fri, Oct 22, 2010 at 4:25 PM, Tim Gardner <tim.gardner@canonical.com> wrote:
> Thusly ?
>
> --
> Tim Gardner tim.gardner@canonical.com
>
This shall be ok, but I'd like to give it a try on HW before ack
(there is a GPIO involved and would prefer to double check on blaze
HW).
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
10-22-2010, 03:29 PM
"Jan, Sebastien"
SRU: Fix blaze board crash with tiwlan package installed
On Fri, Oct 22, 2010 at 4:33 PM, Jan, Sebastien <s-jan@ti.com> wrote:
> On Fri, Oct 22, 2010 at 4:25 PM, Tim Gardner <tim.gardner@canonical.com> wrote:
>> Thusly ?
>>
>> --
>> Tim Gardner tim.gardner@canonical.com
>>
>
> This shall be ok, but I'd like to give it a try on HW before ack
> (there is a GPIO involved and would prefer to double check on blaze
> HW).
Boot-tested on OMAP4 blaze board.
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
10-22-2010, 03:58 PM
Tim Gardner
SRU: Fix blaze board crash with tiwlan package installed
On 10/22/2010 09:29 AM, Jan, Sebastien wrote:
> On Fri, Oct 22, 2010 at 4:33 PM, Jan, Sebastien<s-jan@ti.com> wrote:
>> On Fri, Oct 22, 2010 at 4:25 PM, Tim Gardner<tim.gardner@canonical.com> wrote:
>>> Thusly ?
>>>
>>> --
>>> Tim Gardner tim.gardner@canonical.com
>>>
>>
>> This shall be ok, but I'd like to give it a try on HW before ack
>> (there is a GPIO involved and would prefer to double check on blaze
>> HW).
>
> Boot-tested on OMAP4 blaze board.
pushed and uploaded
--
Tim Gardner tim.gardner@canonical.com
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team