Received: by 10.192.165.156 with SMTP id m28csp78078imm; Tue, 10 Apr 2018 16:50:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx48J/Qrb6mpQJxdcLo7QaUeNpp6IGOU+Vxg+e01PYWfG35nIM8uWFZRe/qFj09FW8icUK0Fe X-Received: by 2002:a17:902:887:: with SMTP id 7-v6mr2517836pll.319.1523404208432; Tue, 10 Apr 2018 16:50:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523404208; cv=none; d=google.com; s=arc-20160816; b=0iXDCry6bRbiNGypi6bFFxbxAMg4+qhLrgUUhB30yNlP/9359Vx0jO7d6xdeLQUJKY 7aRfsX7tKRP8otPyk5FiuZvPZ5ugTIqjds+qARYD6Oox6/9Y5qZqh4KYz7K91lowogIU Mf80CKV0l/cqCSDT9kmbnvOijF1Q9teTqjirhH5Go/VAb5laf+rwEv81ix1PZQ2nm993 FA56ibYvaZbBk5DtrQ2wCzPPIqiomatAs3JObDMluucpewsoOTL6hIXM7ts4nMwm5oYC hPHYX/AW040jKitZfaK94LuW4WI+qDJVb3dqqj9OKU0PkvMLJa8jxFhvQGs+Jx1BTcIf rTtg== 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=eJ1esvG7L/feK4r2lwtoCvvvEZV5P08nyXKwMyAYp90=; b=b2gp3DE7NQyVRoHTWTS0O87Bi9FKC+2/HLN7ZyOa66b5WmSwTmFPWm1OoKq6PKcnug lzHd+Ajd+W6Xd4oXfy5tCSJA5RusNRNmcRZmp7G4Bse4ZM7wC3z3BM54Rudy0UvZx9FS Aggu3m4eAa2bY8mhTYz7GM27rBQFQIvLnDlwafOnrSK6PyJqnxK3+khp39dNvnoZKbGE WunJLb3H/Rz8Vo06QBOvjq0hYNqe3beFu9MyfQGDCbx7NDkTr1MXM2Nrl5hVbhoU2lwC 2WdqKU/dCeyhiN532W23A99TeqFHuZ9nxJG0ewCXG/Qxv1ZAsmA1mhjFOi586bp6d9hO +6Jg== 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 p85si2820725pfk.77.2018.04.10.16.49.31; Tue, 10 Apr 2018 16:50:08 -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 S1752656AbeDJWYn (ORCPT + 99 others); Tue, 10 Apr 2018 18:24:43 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36826 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752401AbeDJWYm (ORCPT ); Tue, 10 Apr 2018 18:24:42 -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 5F293D25; Tue, 10 Apr 2018 22:24:41 +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.16 10/18] vlan: also check phy_driver ts_info for vlans real device Date: Wed, 11 Apr 2018 00:23:45 +0200 Message-Id: <20180410212759.123735460@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212758.564682823@linuxfoundation.org> References: <20180410212758.564682823@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.16-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 |