From patchwork Sun Feb 4 16:47:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christian Zigotzky X-Patchwork-Id: 869057 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zZGs620Vjz9sPk for ; Mon, 5 Feb 2018 03:49:14 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=xenosoft.de header.i=@xenosoft.de header.b="taIFzgNz"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zZGs60SPmzF0qH for ; Mon, 5 Feb 2018 03:49:14 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=xenosoft.de header.i=@xenosoft.de header.b="taIFzgNz"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=mo6-p00-ob.smtp.rzone.de (client-ip=2a01:238:20a:202:5300::6; helo=mo6-p00-ob.smtp.rzone.de; envelope-from=chzigotzky@xenosoft.de; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=xenosoft.de header.i=@xenosoft.de header.b="taIFzgNz"; dkim-atps=neutral Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zZGps3PJ4zF0rJ for ; Mon, 5 Feb 2018 03:47:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1517762827; s=strato-dkim-0002; d=xenosoft.de; h=Content-Type:In-Reply-To:Date:Message-ID:From:References:To:Subject: X-RZG-CLASS-ID:X-RZG-AUTH; bh=qlqGvN/Bwj1ISwlrhjgQLL5WtD9HH2MqheKzm0NT1yI=; b=taIFzgNzv3HfVKRg8SI23FMlnyx6x0ZpDN9pC2G0hE9tOewoWR6PXJZ3uEv2WDHWwp YDF5MHsX0g8ZltHoGj82RBW4qfvfRgjWsHMyZX4l944TKcvxs99hmu8h19c7kJBAqoyI Lrur1c0LPl/xbmkgKkVI7YuYFJyvFsvFMt41xs5jO6I1rAZS4/aWFuN9l9GOisLFSJQp mVjP9AAjoMxRfPVHg4o2Du/aPdALbF2jTPz2vniufZJC9oCLZQgcvt9zCtEixgHnl6RM 9dHtnd1BOexEDQDcU40o5IG2PW/OQJVWuyv6E7LwhPIGbgA6wjExfZLUqt9oQTRK5+nl CJbw== X-RZG-AUTH: :L2QefEenb+UdBJSdRCXu93KJ1bmSGnhMdmOod1DhGM4l4Hio94KKxRySf+VvAflxJtId5Uwmw9Mi X-RZG-CLASS-ID: mo00 Received: from [192.168.1.134] (ppp-188-174-77-168.dynamic.mnet-online.de [188.174.77.168]) by smtp.strato.de (RZmta 42.18 DYNA|AUTH) with ESMTPSA id 006e50u14Gl31bO (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Sun, 4 Feb 2018 17:47:03 +0100 (CET) Subject: PA Semi PWRficient Gigabit Ethernet doesn't work anymore since the first networking updates for the kernel 4.16 To: "netdev@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" References: <1516035556.18795.71.camel@infinera.com> <20180116143836.GC22903@lunn.ch> <1516125454.18795.87.camel@infinera.com> <1516348851.4730.15.camel@infinera.com> <20180119132251.GJ32299@lunn.ch> From: Christian Zigotzky Message-ID: <9e8e906d-b2b7-f11c-30ed-ccdf91ac563c@xenosoft.de> Date: Sun, 4 Feb 2018 17:47:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180119132251.GJ32299@lunn.ch> Content-Language: de-DE X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hello, The PA Semi PWRficient Gigabit Ethernet doesn't work anymore since the first networking updates [1] for the kernel 4.16. Error messages: [    0.634241] libphy: pasemi gpio mdio bus: probed [    0.634749] pasemi gpio mdio bus: Cannot register as MDIO bus, err -38 [    2.311496] pasemi_mac 0000:00:14.0: runtime IRQ mapping not provided by arch [    2.311554] pasemi_mac 0000:00:14.1: runtime IRQ mapping not provided by arch [    2.311599] pasemi_mac 0000:00:14.2: runtime IRQ mapping not provided by arch [    2.311641] pasemi_mac 0000:00:14.3: runtime IRQ mapping not provided by arch [    2.312276] pasemi_mac 0000:00:15.0: runtime IRQ mapping not provided by arch [    2.312903] pasemi_mac 0000:00:15.1: runtime IRQ mapping not provided by arch [    3.817420] i2c-pasemi 0000:00:1c.0: runtime IRQ mapping not provided by arch [    3.817616] i2c-pasemi 0000:00:1c.1: runtime IRQ mapping not provided by arch [    3.817809] i2c-pasemi 0000:00:1c.2: runtime IRQ mapping not provided by arch [    4.299984] pasemi_edac 0000:00:04.0: runtime IRQ mapping not provided by arch [    4.300281] pasemi_edac 0000:00:05.0: runtime IRQ mapping not provided by arch [   39.633565] pasemi_mac 0000:00:14.3: PHY init failed: -19. [   39.633569] pasemi_mac 0000:00:14.3: Defaulting to 1Gbit full duplex I figured out that the problematic code is in the mdio bus changes of the networking updates. [1] I found the problematic code in the file 'drivers/net/phy/mdio_bus.c'. I created a patch which solves the problem with the PA Semi PWRficient Gigabit Ethernet. (attached) Could you please check the changes in the file 'drivers/net/phy/mdio_bus.c'? Thanks, Christian [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b2fe5fa68642860e7de76167c3111623aa0d5de1 Reported-by: Christian Zigotzky Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- a/drivers/net/phy/mdio_bus.c 2018-02-03 17:34:46.973045321 +0100 +++ b/drivers/net/phy/mdio_bus.c 2018-02-04 11:03:14.909093360 +0100 @@ -47,41 +47,11 @@ #include "mdio-boardinfo.h" -static int mdiobus_register_gpiod(struct mdio_device *mdiodev) -{ - struct gpio_desc *gpiod = NULL; - - /* Deassert the optional reset signal */ - if (mdiodev->dev.of_node) - gpiod = fwnode_get_named_gpiod(&mdiodev->dev.of_node->fwnode, - "reset-gpios", 0, GPIOD_OUT_LOW, - "PHY reset"); - if (PTR_ERR(gpiod) == -ENOENT) - gpiod = NULL; - else if (IS_ERR(gpiod)) - return PTR_ERR(gpiod); - - mdiodev->reset = gpiod; - - /* Assert the reset signal again */ - mdio_device_reset(mdiodev, 1); - - return 0; -} - int mdiobus_register_device(struct mdio_device *mdiodev) { - int err; - if (mdiodev->bus->mdio_map[mdiodev->addr]) return -EBUSY; - if (mdiodev->flags & MDIO_DEVICE_FLAG_PHY) { - err = mdiobus_register_gpiod(mdiodev); - if (err) - return err; - } - mdiodev->bus->mdio_map[mdiodev->addr] = mdiodev; return 0;