Patchwork -next Apr 30: OOPS during eHEA driver initialization

login
register
mail settings
Submitter Grant Likely
Date April 30, 2010, 5:43 p.m.
Message ID <g2mfa686aa41004301043i138ffb2dmac5b641fa3d512c4@mail.gmail.com>
Download mbox | patch
Permalink /patch/51364/
State Not Applicable
Headers show

Comments

Grant Likely - April 30, 2010, 5:43 p.m.
On Fri, Apr 30, 2010 at 11:35 AM, Grant Likely
<grant.likely@secretlab.ca> wrote:
> On Fri, Apr 30, 2010 at 11:27 AM, Sachin Sant <sachinp@in.ibm.com> wrote:
>> Sachin Sant wrote:
>>>
>>> With today's next eHEA drivers fails to initialize.
>>
>> If i revert the following patch eHEA network interface is initialized
>> properly.
>>
>> commit cebfe0b6709abdab997c1a00499d67efa32ee1f0
>> drivercore: Add of_match_table to the common device drivers
>
> That is an easy one to fix.  I'll get it updated today and send you the result.

Let me know if this patch fixes it:

Cheers,
g.
Sachin P. Sant - May 1, 2010, 9:54 a.m.
Grant Likely wrote:
> On Fri, Apr 30, 2010 at 11:35 AM, Grant Likely
> <grant.likely@secretlab.ca> wrote:
>   
>> On Fri, Apr 30, 2010 at 11:27 AM, Sachin Sant <sachinp@in.ibm.com> wrote:
>>     
>>> Sachin Sant wrote:
>>>       
>>>> With today's next eHEA drivers fails to initialize.
>>>>         
>>> If i revert the following patch eHEA network interface is initialized
>>> properly.
>>>
>>> commit cebfe0b6709abdab997c1a00499d67efa32ee1f0
>>> drivercore: Add of_match_table to the common device drivers
>>>       
>> That is an easy one to fix.  I'll get it updated today and send you the result.
>>     
>
> Let me know if this patch fixes it:
>   
Works for me. Thanks Grant. 

Tested-by : Sachin Sant <sachinp@in.ibm.com>

Regards
-Sachin


> Cheers,
> g.
>
> diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
> index ce957a4..693b0e6 100644
> --- a/arch/powerpc/kernel/ibmebus.c
> +++ b/arch/powerpc/kernel/ibmebus.c
> @@ -201,6 +201,9 @@ static int ibmebus_create_devices(const struct
> of_device_id *matches)
>
>  int ibmebus_register_driver(struct of_platform_driver *drv)
>  {
> +	if (!drv->driver.of_match_table)
> +		drv->driver.of_match_table = drv->match_table;
> +
>  	/* If the driver uses devices that ibmebus doesn't know, add them */
>  	ibmebus_create_devices(drv->driver.of_match_table);
>
>
>
>

Patch

diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index ce957a4..693b0e6 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -201,6 +201,9 @@  static int ibmebus_create_devices(const struct
of_device_id *matches)

 int ibmebus_register_driver(struct of_platform_driver *drv)
 {
+	if (!drv->driver.of_match_table)
+		drv->driver.of_match_table = drv->match_table;
+
 	/* If the driver uses devices that ibmebus doesn't know, add them */
 	ibmebus_create_devices(drv->driver.of_match_table);