From patchwork Sun Dec 27 13:26:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roel kluin X-Patchwork-Id: 41845 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 00997B7BF2 for ; Mon, 28 Dec 2009 00:23:52 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751999AbZL0NXY (ORCPT ); Sun, 27 Dec 2009 08:23:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751956AbZL0NXX (ORCPT ); Sun, 27 Dec 2009 08:23:23 -0500 Received: from mail-ew0-f219.google.com ([209.85.219.219]:42066 "EHLO mail-ew0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751831AbZL0NXW (ORCPT ); Sun, 27 Dec 2009 08:23:22 -0500 Received: by ewy19 with SMTP id 19so1144112ewy.21 for ; Sun, 27 Dec 2009 05:23:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=NwS3kuwihYVnwzNDb9ilqtj/2Ds50utL1i/mfSEdZkg=; b=aSOUIhAZMFm93BF9b9hZYAYpmJM4ebERjMEO+QJtzVCdgpxzTXJXBgAUbgDaYT9wW2 4zlPI+ka+u7M/6Rv3mpi1IkaMAWLxZ0s/L95WCVOyRHZASVdTRqSH8LvdB9adfqNC0Yy 57EuHP8lx3EcLC1+GvP1SNcRjp3hZ+39Vr35I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=oEGretqWeA6XffZ4muMB2gohcopDKgQxtShz7w42HofF13sReGHs8glRZpZfnYU+xk pri3Fb3/indygkqL93GheJYb6/EzkKaZJbQU8x/W7KckOSRiMqZvqFeYDetXG6jZcDJO fLo37Cr8yvPXQuA5kGZGEaWj5/oNUIsX6syJE= Received: by 10.213.41.13 with SMTP id m13mr4151487ebe.69.1261920201263; Sun, 27 Dec 2009 05:23:21 -0800 (PST) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 10sm15242829eyd.21.2009.12.27.05.23.20 (version=SSLv3 cipher=RC4-MD5); Sun, 27 Dec 2009 05:23:20 -0800 (PST) Message-ID: <4B376074.2060305@gmail.com> Date: Sun, 27 Dec 2009 14:26:12 +0100 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0 MIME-Version: 1.0 To: netdev@vger.kernel.org, Andrew Morton , LKML Subject: [PATCH] atarilance: timeout ignored in lance_open() Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org With `while (--i > 0)' i reaches 0 after the loop, so upon timeout the error was not issued. Signed-off-by: Roel Kluin --- drivers/net/atarilance.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/atarilance.c b/drivers/net/atarilance.c index c5721cb..cc9ed86 100644 --- a/drivers/net/atarilance.c +++ b/drivers/net/atarilance.c @@ -663,7 +663,7 @@ static int lance_open( struct net_device *dev ) while (--i > 0) if (DREG & CSR0_IDON) break; - if (i < 0 || (DREG & CSR0_ERR)) { + if (i <= 0 || (DREG & CSR0_ERR)) { DPRINTK( 2, ( "lance_open(): opening %s failed, i=%d, csr0=%04x\n", dev->name, i, DREG )); DREG = CSR0_STOP;