Received: by 10.192.165.156 with SMTP id m28csp1089747imm; Wed, 11 Apr 2018 12:12:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+6L0yPD6dfbsz1yZaiN+f49J1rzwHTF90WOTD9Tyh0IaK3ttIFWQoId8hKBGGXkUXMW2Dc X-Received: by 10.98.182.8 with SMTP id j8mr5086704pff.115.1523473954921; Wed, 11 Apr 2018 12:12:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523473954; cv=none; d=google.com; s=arc-20160816; b=LsnR4K7NiaLL48i60+ZWMe7ybH4DPgyWZ09uLypQXzWAUXl+ZnkYDe6K5VgMt+L2o2 UzeOQnaDP4i+KwNsNZFka41LEs8+OP0I8sVbU0A4CvDIg2xKhCDVqV4uFI5EaAggjqEg xg8M3IVKGf5XUfKu/Bl7Tc1fD2NKVqJRpmN39gVr7T21tB0/o5eLTtPSgKyReg0GYkCz GG79v4MLmtnALeZYAo2XiAYUM07GxI8X8qBISYc9vhZjvLDm5gA8+bKRIuxzK5lHDrEx uRzZ+fFRSSgGvMMXIwCN5lBh15Fckl3GibmmJkj19+b6x1+ZdwFK0ew7jZScYMEQLP0c ok9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=sRzzXHZ07VGrTMTPcoZMEj6HD85oJsOC9RvbWjrYfLk=; b=YJOmh73HNXFnh1oMnXrO3KRtxZJak2Mi2uhacdir/1RYRqoYfJlQDIxIg+XKNZK+nw LhkKpJyWcY1/9b3pSu00DF4bdXImeOlW3heeMkpEHPX5YVTbRGlzbwzrqEgBFHfM+xZF NMrSd4muN62XOs+LGrNwcSbZJMTvCieUrFXLcEnGfxnvXz3j8qtuMgcgDtuqULVgLxuV jUnnYt120IdIqRiDJSJKtg/8VRYO9Di3OcEOydmSP5+OVuxtChtxThwqQNGIkUFdrniP TKoZN9ITXplILfxQ33/wJsxQxBYrmLVJeZ5nhv1+IXqjrhQ5y10bbP0xOP4rxKfAYTTf i8Gg== ARC-Authentication-Results: i=1; mx.google.com; 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 s21si1337384pfi.87.2018.04.11.12.11.57; Wed, 11 Apr 2018 12:12:34 -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; 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 S1756416AbeDKTIV (ORCPT + 99 others); Wed, 11 Apr 2018 15:08:21 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41006 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935339AbeDKTHA (ORCPT ); Wed, 11 Apr 2018 15:07:00 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E55F4D8B; Wed, 11 Apr 2018 19:06:59 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Richard Cochran , Hangbin Liu , "David S. Miller" Subject: [PATCH 4.9 289/310] vlan: also check phy_driver ts_info for vlans real device Date: Wed, 11 Apr 2018 20:37:08 +0200 Message-Id: <20180411183635.035791479@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180411183622.305902791@linuxfoundation.org> References: <20180411183622.305902791@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hangbin Liu [ Upstream commit ec1d8ccb07deaf30fd0508af6755364ac47dc08d ] Just like function ethtool_get_ts_info(), we should also consider the phy_driver ts_info call back. For example, driver dp83640. Fixes: 37dd9255b2f6 ("vlan: Pass ethtool get_ts_info queries to real device.") Acked-by: Richard Cochran Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/8021q/vlan_dev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -658,8 +659,11 @@ static int vlan_ethtool_get_ts_info(stru { const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); const struct ethtool_ops *ops = vlan->real_dev->ethtool_ops; + struct phy_device *phydev = vlan->real_dev->phydev; - if (ops->get_ts_info) { + if (phydev && phydev->drv && phydev->drv->ts_info) { + return phydev->drv->ts_info(phydev, info); + } else if (ops->get_ts_info) { return ops->get_ts_info(vlan->real_dev, info); } else { info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |