From patchwork Wed Oct 8 22:47:43 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 3405 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.176.167]) by ozlabs.org (Postfix) with ESMTP id A74E1DDF80 for ; Thu, 9 Oct 2008 09:48:14 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755573AbYJHWsJ (ORCPT ); Wed, 8 Oct 2008 18:48:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755639AbYJHWsI (ORCPT ); Wed, 8 Oct 2008 18:48:08 -0400 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:39208 "EHLO sunset.davemloft.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1755561AbYJHWsH (ORCPT ); Wed, 8 Oct 2008 18:48:07 -0400 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 2EA46C8C188; Wed, 8 Oct 2008 15:47:43 -0700 (PDT) Date: Wed, 08 Oct 2008 15:47:43 -0700 (PDT) Message-Id: <20081008.154743.187048380.davem@davemloft.net> To: tpiepho@freescale.com CC: afleming@freescale.com, netdev@vger.kernel.org Subject: Re: phylib: Wake PHY state machine on interrupt From: David Miller X-Mailer: Mew version 6.1 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org With a minor coding style fix, I've applied your patch as below. Thanks. commit 0acb28396728f42b6b1553c85d27c37513796043 Author: Trent Piepho Date: Wed Oct 8 15:46:57 2008 -0700 phylib: Wake PHY state machine on interrupt This way the phy layer will respond to a change in phy state immediately, instead of up to one second later when the state machine timer runs. Signed-off-by: Trent Piepho Acked-by: Andy Fleming Signed-off-by: David S. Miller --- 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 0433fcd..20cc82c 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -729,6 +729,12 @@ static void phy_change(struct work_struct *work) if (err) goto irq_enable_err; + /* Stop timer and run the state queue now. The work function for + * state_queue will start the timer up again. + */ + del_timer(&phydev->phy_timer); + schedule_work(&phydev->state_queue); + return; irq_enable_err: