From patchwork Sun Jul 12 09:42:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike McCormack X-Patchwork-Id: 29710 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id B2823B7069 for ; Sun, 12 Jul 2009 19:42:46 +1000 (EST) Received: by ozlabs.org (Postfix) id A1EA2DDE02; Sun, 12 Jul 2009 19:42:46 +1000 (EST) 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 191F4DDDFD for ; Sun, 12 Jul 2009 19:42:46 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752998AbZGLJmf (ORCPT ); Sun, 12 Jul 2009 05:42:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752683AbZGLJmf (ORCPT ); Sun, 12 Jul 2009 05:42:35 -0400 Received: from mail-yx0-f184.google.com ([209.85.210.184]:60432 "EHLO mail-yx0-f184.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751953AbZGLJme (ORCPT ); Sun, 12 Jul 2009 05:42:34 -0400 Received: by yxe14 with SMTP id 14so2214692yxe.33 for ; Sun, 12 Jul 2009 02:42:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=TECYyWtvGRdGB4o0R4ZlY7jWJwW9sHb6fLi8Ub3D7gE=; b=JGrgPb6rfEQrfD+WNzWOMmCsO3+EIgNudhDQRDYGIl9UBpWxnAtUnCZyE4WfPOvReV XLnLnuBs7BSaKdUlynV9429kVKmrd9BDf/Igj+USia7LvIA9NruiWDiafMFL+Zm+a2h5 RdRSubXc5542d2lmoDQSRJ9x82Wr8DhuDcV2o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=AJDx7KK2fQMoybQK6kEaPzxCLTuKgKke7dU6ugGDuLcGcoZlYrKm/RyHQaog+8hcY3 qodAs8Z0juqGpvhGlabW8P06dhQrxKeeBoM5gAp1A3ZPD5PyvMsaO6OXheACrwfYJIAi j223VCPj4ADipssTsXsXsfyb3fdpnnvTt8qYY= MIME-Version: 1.0 Received: by 10.100.133.20 with SMTP id g20mr5576502and.24.1247391752850; Sun, 12 Jul 2009 02:42:32 -0700 (PDT) Date: Sun, 12 Jul 2009 18:42:32 +0900 X-Google-Sender-Auth: 1b404119028b44a2 Message-ID: <392fb48f0907120242r438411ccm5507998c3fcad877@mail.gmail.com> Subject: [PATCH] sky2: Kick the transmit watchdog timer on transmit From: Mike McCormack To: netdev@vger.kernel.org, Stephen Hemminger Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Stephen, I was curious as to why sky2_tx_timeout() was being called once when the driver started, and never again (which originally caused the crash resolved by the previous patch). I might be missing something, but it looks like we the transmit watchdog needs to be kicked whenever a packet is transmitted. This patch has had a small amount of testing, but reviewing other drivers (e.g. net/atm/lec.c), this appears to be what is done. thanks, Mike --- If we don't kick the watchdog, it always triggers. Signed-off-by: Mike McCormack --- drivers/net/sky2.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) mapping_unwind: diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 77fd1b9..48d58ec 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -1708,6 +1708,8 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev) sky2_put_idx(hw, txqaddr[sky2->port], sky2->tx_prod); + dev->trans_start = jiffies; /* restart tx timeout */ + return NETDEV_TX_OK;