From patchwork Wed Sep 12 11:23:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 183327 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 837432C0089 for ; Wed, 12 Sep 2012 21:23:44 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751995Ab2ILLXm (ORCPT ); Wed, 12 Sep 2012 07:23:42 -0400 Received: from mail1.sysgo.com ([176.9.26.183]:33718 "EHLO mail1.sysgo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751302Ab2ILLXl (ORCPT ); Wed, 12 Sep 2012 07:23:41 -0400 Received: from lantia.sysgo.com (unknown [172.22.2.7]) by mail1.sysgo.com (Postfix) with ESMTP id AE582462C2; Wed, 12 Sep 2012 13:23:40 +0200 (CEST) Received: by lantia.sysgo.com (Postfix, from userid 113) id 774F42660C3; Wed, 12 Sep 2012 13:23:40 +0200 (CEST) Received: from [IPv6:::1] (unknown [172.16.10.11]) by lantia.sysgo.com (Postfix) with ESMTP id 33FF12660BF; Wed, 12 Sep 2012 13:23:39 +0200 (CEST) Message-ID: <505070B9.90402@sysgo.com> Date: Wed, 12 Sep 2012 13:23:37 +0200 From: Alexander Sverdlin User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Lightning/1.0b2 Thunderbird/3.1.20 MIME-Version: 1.0 To: netdev@vger.kernel.org, Andy Fleming , davem@davemloft.net Subject: [PATCH] Replace genphy_update_link() call with phy_read_status() Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Alexander Sverdlin Replace genphy_update_link() call with phy_read_status() Code in phy.c should not call genphy_*() functions directly, this breaks PHY layer abstraction. Some drivers may re-implement "read_status" callback and it's not being called in one place of PHY state machine, where genphy_update_link() is called instead. So fix it. For drivers that rely on genphy_* implementation nothing changed, as genphy_read_status() calls genphy_update_link() anyway. Signed-off-by: Alexander Sverdlin --- drivers/net/phy/phy.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index dfca51d..cfed41c 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -839,7 +839,7 @@ void phy_state_machine(struct work_struct *work) } break; case PHY_FORCING: - err = genphy_update_link(phydev); + err = phy_read_status(phydev); if (err) break;