[PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-17 Thread Guenter Roeck
Commit 0b50dc4fc971 ("Convert smsc911x to use ACPI as well as DT") makes the call to smsc911x_probe_config() unconditional, and no longer fails if there is no device node. device_get_phy_mode() is called unconditionally, and if there is no phy node configured returns an error code. This error code

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-17 Thread David Miller
From: Guenter Roeck Date: Mon, 17 Aug 2015 13:45:36 -0700 > Commit 0b50dc4fc971 ("Convert smsc911x to use ACPI as well as DT") makes > the call to smsc911x_probe_config() unconditional, and no longer fails if > there is no device node. device_get_phy_mode() is called unconditionally, > and if the

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-17 Thread Jeremy Linton
On 08/17/2015 03:45 PM, Guenter Roeck wrote: Commit 0b50dc4fc971 ("Convert smsc911x to use ACPI as well as DT") makes the call to smsc911x_probe_config() unconditional, and no longer fails if there is no device node. device_get_phy_mode() is called unconditionally, and if there is no phy node con

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-17 Thread Guenter Roeck
On 08/17/2015 02:19 PM, Jeremy Linton wrote: On 08/17/2015 03:45 PM, Guenter Roeck wrote: Commit 0b50dc4fc971 ("Convert smsc911x to use ACPI as well as DT") makes the call to smsc911x_probe_config() unconditional, and no longer fails if there is no device node. device_get_phy_mode() is called un

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-17 Thread Jeremy Linton
On 08/17/2015 05:14 PM, Guenter Roeck wrote: One nitpick I noticed after sending my patch: dev can never be NULL in smsc911x_probe_config(), so it does not really make sense to check if it is NULL. No, it doesn't... it should really be something like if (dev_fwnode(dev)) But dev_fwnode is st

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-26 Thread Tony Lindgren
Hi, * Guenter Roeck [150817 13:48]: > Commit 0b50dc4fc971 ("Convert smsc911x to use ACPI as well as DT") makes > the call to smsc911x_probe_config() unconditional, and no longer fails if > there is no device node. device_get_phy_mode() is called unconditionally, > and if there is no phy node conf

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-26 Thread Jeremy Linton
On 08/26/2015 12:04 PM, Tony Lindgren wrote: * Guenter Roeck [150817 13:48]: Commit 0b50dc4fc971 ("Convert smsc911x to use ACPI as well as DT") makes Looks like this change makes at least omap boards using smsc911x fail with -22 for me in Linux next. Do any of the the device tree configured s

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-26 Thread Guenter Roeck
Hi Tony, On 08/26/2015 10:04 AM, Tony Lindgren wrote: Hi, * Guenter Roeck [150817 13:48]: Commit 0b50dc4fc971 ("Convert smsc911x to use ACPI as well as DT") makes the call to smsc911x_probe_config() unconditional, and no longer fails if there is no device node. device_get_phy_mode() is called

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-26 Thread Tony Lindgren
* Jeremy Linton [150826 10:35]: > On 08/26/2015 12:04 PM, Tony Lindgren wrote: > >* Guenter Roeck [150817 13:48]: > >>Commit 0b50dc4fc971 ("Convert smsc911x to use ACPI as well as DT") makes > >Looks like this change makes at least omap boards using smsc911x > >fail with -22 for me in Linux next.

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-26 Thread Tony Lindgren
* Guenter Roeck [150826 10:40]: > Hi Tony, > > On 08/26/2015 10:04 AM, Tony Lindgren wrote: > >Hi, > > > >* Guenter Roeck [150817 13:48]: > >>Commit 0b50dc4fc971 ("Convert smsc911x to use ACPI as well as DT") makes > >>the call to smsc911x_probe_config() unconditional, and no longer fails if > >

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-26 Thread Guenter Roeck
On 08/26/2015 10:04 AM, Tony Lindgren wrote: Hi, * Guenter Roeck [150817 13:48]: Commit 0b50dc4fc971 ("Convert smsc911x to use ACPI as well as DT") makes the call to smsc911x_probe_config() unconditional, and no longer fails if there is no device node. device_get_phy_mode() is called unconditi

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-26 Thread Tony Lindgren
* Guenter Roeck [150826 11:37]: > On 08/26/2015 10:04 AM, Tony Lindgren wrote: > >Hi, > > > >* Guenter Roeck [150817 13:48]: > >>Commit 0b50dc4fc971 ("Convert smsc911x to use ACPI as well as DT") makes > >>the call to smsc911x_probe_config() unconditional, and no longer fails if > >>there is no d

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-26 Thread Guenter Roeck
Hi Tony, On 08/26/2015 01:16 PM, Tony Lindgren wrote: [ ... ] We may need two separate patches, one to fix up device_property_read_u32() to return -ENXIO, and one to fix smsc911x_probe_config() to ignore the error from device_get_phy_mode(), and to bail out if device_property_read_u32() returns

Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used

2015-08-26 Thread Tony Lindgren
* Guenter Roeck [150826 13:58]: > Hi Tony, > > On 08/26/2015 01:16 PM, Tony Lindgren wrote: > [ ... ] > > >>We may need two separate patches, one to fix up device_property_read_u32() > >>to return -ENXIO, and one to fix smsc911x_probe_config() to ignore the error > >>from device_get_phy_mode(),