From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751493AbdFWEFx (ORCPT ); Fri, 23 Jun 2017 00:05:53 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:60642 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751077AbdFWEFw (ORCPT ); Fri, 23 Jun 2017 00:05:52 -0400 Date: Fri, 23 Jun 2017 06:05:44 +0200 From: Andrew Lunn To: Yunsheng Lin Cc: davem@davemloft.net, f.fainelli@gmail.com, huangdaode@hisilicon.com, xuwei5@hisilicon.com, liguozhu@hisilicon.com, Yisen.Zhuang@huawei.com, gabriele.paoloni@huawei.com, john.garry@huawei.com, linuxarm@huawei.com, salil.mehta@huawei.com, lipeng321@huawei.com, tremyfr@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH NET 2/2] net: hns: Use phy_driver to setup Phy loopback Message-ID: <20170623040544.GC5432@lunn.ch> References: <1498121613-64572-1-git-send-email-linyunsheng@huawei.com> <20170623032011.GB5432@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > what should the Mac driver do when it receive the error? I assume that it > will return it to userspace. because the rtnl_lock ensure only one ethtool > is executing, if the function return error, it means some bug in the mac > driver, am I right? Yes, return it. It could be there are other use cases of loopback, which are not protected by the rtnl_lock. Andrew