From patchwork Tue Sep 13 10:49:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 4042 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3F89523EF6 for ; Tue, 13 Sep 2011 10:49:53 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 25A24A183F2 for ; Tue, 13 Sep 2011 10:49:53 +0000 (UTC) Received: by fxe23 with SMTP id 23so550981fxe.11 for ; Tue, 13 Sep 2011 03:49:52 -0700 (PDT) Received: by 10.223.5.76 with SMTP id 12mr1734539fau.103.1315910992774; Tue, 13 Sep 2011 03:49:52 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.11.8 with SMTP id m8cs2876lab; Tue, 13 Sep 2011 03:49:52 -0700 (PDT) Received: by 10.227.200.12 with SMTP id eu12mr1403459wbb.108.1315910991973; Tue, 13 Sep 2011 03:49:51 -0700 (PDT) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id fd19si15563wbb.32.2011.09.13.03.49.50 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Sep 2011 03:49:51 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) smtp.mail=dave.martin@linaro.org Received: by wyf23 with SMTP id 23so391406wyf.37 for ; Tue, 13 Sep 2011 03:49:50 -0700 (PDT) Received: by 10.216.133.5 with SMTP id p5mr727318wei.87.1315910990628; Tue, 13 Sep 2011 03:49:50 -0700 (PDT) Received: from e103592.peterhouse.linaro.org (fw-lnat.cambridge.arm.com. [217.140.96.63]) by mx.google.com with ESMTPS id r27sm15896wbn.10.2011.09.13.03.49.48 (version=SSLv3 cipher=OTHER); Tue, 13 Sep 2011 03:49:49 -0700 (PDT) From: Dave Martin To: netdev@vger.kernel.org Cc: patches@linaro.org, Steve Glendinning , Shawn Guo , devicetree-discuss@lists.ozlabs.org, Dave Martin Subject: [PATCH] net/smsc911x: Correctly configure 16-bit register access from DT Date: Tue, 13 Sep 2011 11:49:29 +0100 Message-Id: <1315910969-4018-1-git-send-email-dave.martin@linaro.org> X-Mailer: git-send-email 1.7.4.1 The SMSC911X_USE_16BIT needs to be set when using 16-bit register access. However, currently no flag is set if the device tree doesn't specify 32-bit access, resulting in a BUG() and a non- working driver when 16-bit register access is configured for smsc911x in the DT. This patch should set the SMSC911X_USE_16BIT flag in a manner consistent with the documented DT bindings. Signed-off-by: Dave Martin Acked-by: Grant Likely --- drivers/net/ethernet/smsc/smsc911x.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 788c4fd..a3aa4c0 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c @@ -2121,6 +2121,8 @@ static int __devinit smsc911x_probe_config_dt( of_property_read_u32(np, "reg-io-width", &width); if (width == 4) config->flags |= SMSC911X_USE_32BIT; + else + config->flags |= SMSC911X_USE_16BIT; if (of_get_property(np, "smsc,irq-active-high", NULL)) config->irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH;