From patchwork Thu Sep 4 12:57:57 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Boyer X-Patchwork-Id: 208 X-Patchwork-Delegate: jwboyer@gmail.com Return-Path: X-Original-To: patchwork@ozlabs.org Delivered-To: patchwork@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 60E00DE11E for ; Mon, 8 Sep 2008 23:04:58 +1000 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.181]) by ozlabs.org (Postfix) with ESMTP id 9F803DDDFF for ; Mon, 8 Sep 2008 23:04:35 +1000 (EST) Received: by py-out-1112.google.com with SMTP id a29so928307pyi.27 for ; Mon, 08 Sep 2008 06:04:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:cc:mime-version:x-mailer :content-transfer-encoding:sender; bh=ibPCO2iuw5jXAlVhwOWSbXx4n6NGq8wYmmyrG7izBnA=; b=qA6dOWQ5V7bh334D/gtMRmobKZtV2KyVM13ZO8kv0ZwMpgQn5lYGtV/KMh+7oYIcA5 ShPJ0h7CzQtdCwJzRwqxbN+IQ/AykbMmLHPzClM4crAeXcoca9mKgoG+HeutycPYjpsC RJgfSwP+4CPT8dHFg0amx+jeB2rSGxqcoEzHA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:cc :mime-version:x-mailer:content-transfer-encoding:sender; b=PqVP+WstS4cXG1sQMYRDOv5ZzQw6abzcjlG0ivRjFAdzT6lXQhuNIewizGXv5GWdYf xX9ikduddTcurNm9n66NVJ3/UXHhD71xkKAvTfqAFUBY/JxYZMVpYgTgywcmynrLzRg5 qk0i2sVMemm+Yxi77hmowNQc8Wf2nhCylDPtc= Received: by 10.64.213.8 with SMTP id l8mr31321262qbg.69.1220879073878; Mon, 08 Sep 2008 06:04:33 -0700 (PDT) Received: from ?192.168.1.101? ( [24.247.237.59]) by mx.google.com with ESMTPS id 12sm5470771qbw.2.2008.09.08.06.04.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 08 Sep 2008 06:04:33 -0700 (PDT) Message-Id: <62e3d970a3bcb8158308bb645f99c75a41d177ff.1220877899.git.jwboyer@linux.vnet.ibm.com> In-Reply-To: References: From: Josh Boyer Date: Thu, 4 Sep 2008 08:57:57 -0400 Subject: [PATCH 1/3] ibm_newemac: Allow the "no flow control" EMAC feature to work To: benh@kernel.crashing.org, netdev@vger.kernel.org Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 (2.22.3.1-1.fc9) Cc: linuxppc-dev@ozlabs.org X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org Some PowerPC 40x chips have errata that force us not to use the integrated flow control. We have the feature defined, but it currently can't be used because it is never added to EMAC_FTRS_POSSIBLE. This adds a Kconfig option for affected platforms to select and puts the feature in the EMAC_FTRS_POSSIBLE list. This is set for PowerPC 405EZ platforms as well. Signed-off-by: Josh Boyer diff --git a/drivers/net/ibm_newemac/Kconfig b/drivers/net/ibm_newemac/Kconfig index 70a3272..dfb6547 100644 --- a/drivers/net/ibm_newemac/Kconfig +++ b/drivers/net/ibm_newemac/Kconfig @@ -62,3 +62,7 @@ config IBM_NEW_EMAC_TAH config IBM_NEW_EMAC_EMAC4 bool default n + +config IBM_NEW_EMAC_NO_FLOW_CTRL + bool + default n diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 2e720f2..2442361 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c @@ -2567,6 +2567,8 @@ static int __devinit emac_init_config(struct emac_instance *dev) if (of_device_is_compatible(np, "ibm,emac-440ep") || of_device_is_compatible(np, "ibm,emac-440gr")) dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; + if (of_device_is_compatible(np, "ibm,emac-405ez")) + dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x; } /* Fixup some feature bits based on the device tree */ diff --git a/drivers/net/ibm_newemac/core.h b/drivers/net/ibm_newemac/core.h index 6545e69..59e5a5d 100644 --- a/drivers/net/ibm_newemac/core.h +++ b/drivers/net/ibm_newemac/core.h @@ -341,6 +341,9 @@ enum { #ifdef CONFIG_IBM_NEW_EMAC_RGMII EMAC_FTR_HAS_RGMII | #endif +#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL + EMAC_FTR_NO_FLOW_CONTROL_40x | +#endif EMAC_FTR_440EP_PHY_CLK_FIX, };