Received: by 10.192.165.156 with SMTP id m28csp32658imm; Tue, 10 Apr 2018 15:48:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx48LnjgvOOOXTj2V2sg+8fESy1yHlUGjL/G9HVOUC36VsaC/TowebD5i8csfps1Q3Wg9taPo X-Received: by 2002:a17:902:2862:: with SMTP id e89-v6mr2330235plb.348.1523400486105; Tue, 10 Apr 2018 15:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523400486; cv=none; d=google.com; s=arc-20160816; b=sMiC2jXULlG1o4x4FDrrRZDhcKxW5nDrjZ39KemkV5/J0HIAGvBv54VFosICNP2SQY 1gdg28mquRgYVOTh8PxNTd06tvuQpKjD4cM9V/cBGvLjaR0MWzAa2DcabFZ9SXCTWBZG o7vOWtSHPhDpfCjnuDJOIvht1I7S6E+m4aLCwzIFK0S72PIj4lGG982Y24cISGiNr2ur 5/6R0Zazo8K/NBpFR9lnxyiDED/9iYGGazDyguIM407aFFMUdpPVPgfzC6+b7qb8kMit GIOgbBqzD+Owhvz/PfsWgkaNkaQAwr76p/jNSSY8Ywu6l4fzDQw/pw4VwrdrYO7cn1iy 08pA== 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=SoFXbaXVNMI8Wo2nbL+bQEbQCPXeKizCa71BawKCosI=; b=Jblo62sLEeGLqymSFfbEXIACEhvi+LB0gwz6GNo1Q+acc0R/Xs2YvdIR0hhAOGgR3t 8TAWKDujjKN2xsw/PFc6zTrIbVdfY1pshxaYpH2aCZ3SGP2mJciwZxODxcdmJfJ0xmZ4 K9dpOlO7/KaaMZC08ndvQnFEnxQOKLyGdIDPwoohAGOiG/7FF3sTDwaLoApc/GdXeRTE CSg0WJ6r/Z/rNE9gKpcilNBuVLb6Sq72+MD80Jp0sth82Q9p1pYteS/IQjaRDmEuDfXS z0P/SLxykm+dCheeSVqvdBflfIMN4Qx1uPS2SX3cQcIzz9hDVsSC0Ik9eg47MlHFc2a3 myHw== 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 j9si2425699pgp.373.2018.04.10.15.47.29; Tue, 10 Apr 2018 15:48:06 -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 S1756100AbeDJWjm (ORCPT + 99 others); Tue, 10 Apr 2018 18:39:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45498 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756072AbeDJWjj (ORCPT ); Tue, 10 Apr 2018 18:39:39 -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 7CCC3DC9; Tue, 10 Apr 2018 22:39:38 +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.14 112/138] vlan: also check phy_driver ts_info for vlans real device Date: Wed, 11 Apr 2018 00:25:02 +0200 Message-Id: <20180410212915.191689569@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212902.121524696@linuxfoundation.org> References: <20180410212902.121524696@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.14-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 @@ -665,8 +666,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 |