Received: by 10.213.65.68 with SMTP id h4csp3989074imn; Tue, 10 Apr 2018 07:38:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/PZreCYK00RDPi58fBmBT1abwo8ianyKclkrHz9ks8qNuj2stujD2eqaRJj2P8xwKZClD0 X-Received: by 10.101.97.165 with SMTP id i5mr480129pgv.449.1523371102528; Tue, 10 Apr 2018 07:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523371102; cv=none; d=google.com; s=arc-20160816; b=Ef59xYFFa4EnQb10wv/wLQNUEvs8sAkHGCi8CMeLr6BSZeSKeumE7wik03hpIZY6YO XJkh/y/A8bM4IPm9E+5LvReWNYX6SsNe2JLSIdpnur24SHaseBHP2Q2rQGZPCH/fIWEi DR9dlisPXQrEEAN5zNs1/6kkPBzT24AaexRDKi8ZiscLBUKgA8tgaeDrQuehIb7J4KGH R5QEQ5BXA/N/LcVUfy2qazdEW44XxKqDd3Cf1K2woL0jlr2iJnlUSkKwhh8Uw5GHYef/ 2cQkUAWlzqH+3yln/0XwLsxHxd3NTryAAgJCGIR1UxqMNzC2QRg+nlcNzPmJ2C0sMHYj RQPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature:dkim-signature :arc-authentication-results; bh=5av9Kznt9H8HSPKen+AZ9vbi3eqbfv/4PyYR61kiqSY=; b=f85yYTuTaVlxVkc81oXPBextUGCwAjH1ja3Mjqhib0+Ne4hEs+tZRmyD5ruIqBKUAY lDxbjtG/cYIbhaTnnlvaA+tZqMCXDY725Z0uN5q6dftFcVvO8pcoT+AO+tPeYBQ/vNuW 4TPN0pt0ny1Lmou+5a9u0DCoCFCXCs8vcYsML6ixiK7UsoWockFCfx0K4LI62f1TebVc gmZOE3KuatykEb/6+0O115zd5ynpGfpL6CL1pytK+bnPRtSPBn5wVeakEtm/mWt3LMtl kzVXjiqNI6eQeaizj8H2l9NmT1PXXjXznJeJeKuE0v4WJBGrliF+KkCikY0GgWH8v3x8 mYgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@raspberrypi.org header.s=pp header.b=bwd1IFMr; dkim=pass header.i=@raspberrypi-org.20150623.gappssmtp.com header.s=20150623 header.b=EBNT1jhB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si2104506pfh.60.2018.04.10.07.37.45; Tue, 10 Apr 2018 07:38:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@raspberrypi.org header.s=pp header.b=bwd1IFMr; dkim=pass header.i=@raspberrypi-org.20150623.gappssmtp.com header.s=20150623 header.b=EBNT1jhB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754155AbeDJOd6 (ORCPT + 99 others); Tue, 10 Apr 2018 10:33:58 -0400 Received: from mx07-00252a01.pphosted.com ([62.209.51.214]:26066 "EHLO mx07-00252a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753421AbeDJOd4 (ORCPT ); Tue, 10 Apr 2018 10:33:56 -0400 Received: from pps.filterd (m0102628.ppops.net [127.0.0.1]) by mx07-00252a01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3AESMiF009458 for ; Tue, 10 Apr 2018 15:33:55 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; h=subject : to : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp; bh=5av9Kznt9H8HSPKen+AZ9vbi3eqbfv/4PyYR61kiqSY=; b=bwd1IFMruBkim9WL2d4Vn9YE7a1vCXx8LM7sxj0QcF+Q7l+XdVC85JdTAHkytu2f35rR RJJujIKeeOlsCX2DpThwz3WoAP9IBQ6ZogcuFIhDDa4BpnInDAdsyd0a1TmiMpwkIxsC awyIDLXkCgJgQQf7YtuMonUX3SvYIYlptQvyiY2wGm2eRjHXctH9TgPJqH/GLe8sboKF S0X2C0ClCJ1UztHHyuMT56iURp7edrpySRwWJBUztlGtMHX7S5MoIKUbWCz9bQxzwkAg PZAvqQe2EVOqV85pIlMWEhCgXcg13NFmgqUHWtVhyooozUMPwnr1serMqhGh7nsoaRFs Yw== Received: from mail-wr0-f199.google.com (mail-wr0-f199.google.com [209.85.128.199]) by mx07-00252a01.pphosted.com with ESMTP id 2h6s4k9kry-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Tue, 10 Apr 2018 15:33:55 +0100 Received: by mail-wr0-f199.google.com with SMTP id o3so354990wri.5 for ; Tue, 10 Apr 2018 07:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi-org.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=5av9Kznt9H8HSPKen+AZ9vbi3eqbfv/4PyYR61kiqSY=; b=EBNT1jhBNu5pTR8MyumJ0ywLzRmBYWqVLWCmUKn/niMg9ht6au7L6yjrp1Raj8JPU1 sZhTvDr64MO2KxVsS0HiIMRiGoxJamzstmuCg0vK8ZYvr0emebCC+Q8izGcLJS6ICsAz Cgq83Sndxn/ct+nM8D9o9X8XkqIC/hlqSNpyd0dSOslTZltCmSsEUs37GCnLlkfxfAIP 1wOOhbV44kH5zxaMjF1nGR9TIzTnphpN2A+JfnooKMSbETZuYqkKaTvhFcPPqwiP7+es EJfOtTO7rkqrauSTqHkPvKR5dqjc6gkD5B9PWWrhwbmPDQlI2VNCVBFKiMhQQ24LXUhO AJ8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5av9Kznt9H8HSPKen+AZ9vbi3eqbfv/4PyYR61kiqSY=; b=l8IbYAWNSbtSkzO7lXeivmMI2VkzaP29S3fYaykSH1nzjGoEuzo1CB+A/a5ofBRcOQ hS0MRbWEVt+JtmwqQcZ3bfXRAkSNYH43+7YTTsELkXh73x+0vsh6/GNGLiPkpWd8a4Bj UAxQeJoaPhzBWRS2eHQjHJJdWKkP2uWxaZtCHpXedoPzcPwBEYpBgZn8Q7725w9kyQ7x bvcaN7VRHQYXgb0k6MmlPEBE84zznLd7AZDIUKzTmcRlDjcwkhFvV0GOJzDn/WNLR+Pm FQIco7Wna9YSfgi6FfbFw/K1gv6nzw+bd+gYsrjc0V12lhuh97nLJoXabt+orED8n2Br VtUg== X-Gm-Message-State: ALQs6tB2Ox3VXuIx1T3Ui3Z1uS9IpWZuEyOgNqKvbyvqVahAJosl5U0V 8eU9TugPYMm6YV313+R5IdDBEx2fs09+AhNZKTK04Ya3KLgfwWpq5qUCBPqFxghkFGvddfDyXRq OyjRuzPAV6YZ3a4k62342kJJ7 X-Received: by 10.28.236.76 with SMTP id k73mr1766509wmh.122.1523370834463; Tue, 10 Apr 2018 07:33:54 -0700 (PDT) X-Received: by 10.28.236.76 with SMTP id k73mr1766496wmh.122.1523370834210; Tue, 10 Apr 2018 07:33:54 -0700 (PDT) Received: from ?IPv6:2a00:2381:fdf7:14:803d:a195:ce56:b202? ([2a00:2381:fdf7:14:803d:a195:ce56:b202]) by smtp.gmail.com with ESMTPSA id y4sm2161511wrh.39.2018.04.10.07.33.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 07:33:53 -0700 (PDT) Subject: Re: [PATCH] lan78xx: Don't reset the interface on open To: Nisar.Sayed@microchip.com, Woojung.Huh@microchip.com, UNGLinuxDriver@microchip.com, agraf@suse.de, tbogendoerfer@suse.de, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <1523362705-30032-1-git-send-email-phil@raspberrypi.org> From: Phil Elwell Message-ID: Date: Tue, 10 Apr 2018 15:33:55 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-10_05:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nisar, On 10/04/2018 15:16, Nisar.Sayed@microchip.com wrote: > Thanks Phil, for identifying the issues. > >> - ret = lan78xx_reset(dev); >> - if (ret < 0) >> - goto done; >> - >> phy_start(net->phydev); >> >> netif_dbg(dev, ifup, dev->net, "phy initialised successfully"); >> -- > > You may need to start the interrupts before "phy_start" instead of suppressing call to "lan78xx_reset". > > + if (dev->domain_data.phyirq > 0) > + phy_start_interrupts(dev->net->phydev); Shouldn't phy_connect_direct, called from lan78xx_phy_init, already have enabled interrupts for us? This patch addresses two problems - time wasted by renegotiating the link after the reset and the missed interrupt - and I'd like both to be fixed. Unless you can come up with a good reason for performing the reset from the open handler I think it should be removed. Phil