From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752447AbbHZUza (ORCPT ); Wed, 26 Aug 2015 16:55:30 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:35797 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752036AbbHZUz2 (ORCPT ); Wed, 26 Aug 2015 16:55:28 -0400 Message-ID: <55DE27BD.600@roeck-us.net> Date: Wed, 26 Aug 2015 13:55:25 -0700 From: Guenter Roeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Tony Lindgren CC: Steve Glendinning , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jeremy Linton , linux-omap@vger.kernel.org Subject: Re: [PATCH -next] smsc911x: Fix crash seen if neither ACPI nor OF is configured or used References: <1439844336-21596-1-git-send-email-linux@roeck-us.net> <20150826170410.GP4215@atomide.com> <55DE069C.7000402@roeck-us.net> <20150826201628.GU4215@atomide.com> In-Reply-To: <20150826201628.GU4215@atomide.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -ENXIO. > > I guess the device_property_read_u32() change needs to be discussed > separately.. So probably best to fix up the regression to smsc911x > first. > Not sure myself. Jeremy has a point - we don't really know for sure how safe it is to check for -ENODATA (in addition to -ENXIO). Also, fixing device_property_read_u32() turned out to be much easier than I thought. >> The simpler alternative would be to check the return value from >> device_property_read_u32() for both -ENXIO and -ENODATA. >> This would make the code independent of the necessary core changes >> (which may take a while). I tested this variant, and it works, at least >> for the non-DT case. >> >> Does this make sense ? > > Yeh I think that would allow fixing up the smsc911x regression while > discussing the device_property_read_u32() change. Got a test patch > for me to try? > You should have two by now to choose from. Guenter