From patchwork Mon Feb 6 13:48:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Henrik Rydberg X-Patchwork-Id: 139735 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 4B4C3B6F9C for ; Tue, 7 Feb 2012 00:47:47 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755079Ab2BFNrp (ORCPT ); Mon, 6 Feb 2012 08:47:45 -0500 Received: from smtprelay-b12.telenor.se ([62.127.194.21]:54606 "EHLO smtprelay-b12.telenor.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753420Ab2BFNro (ORCPT ); Mon, 6 Feb 2012 08:47:44 -0500 Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-b12.telenor.se (Postfix) with ESMTP id 1D2F7C797 for ; Mon, 6 Feb 2012 14:47:42 +0100 (CET) X-SENDER-IP: [85.230.170.239] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag1RAK7ZL09V5qrvPGdsb2JhbABBhQ+ER6VmGQEBAQE3MoFyAQEFIw8BIxMBDxAIAxEDAQIBAgImAgIUDRgKDA4KCYd/pXyKFROBHIZmg08BBQICHQQGAQQBAQkEFAcED4J8AgsDBBoEAoEVgikzYwSVJ4VohSOHUg X-IronPort-AV: E=Sophos;i="4.73,370,1325458800"; d="scan'208";a="262505446" Received: from c-efaae655.710-13-64736c12.cust.bredbandsbolaget.se (HELO polaris) ([85.230.170.239]) by ipb2.telenor.se with SMTP; 06 Feb 2012 14:47:31 +0100 Received: by polaris (sSMTP sendmail emulation); Mon, 06 Feb 2012 14:48:57 +0100 From: "Henrik Rydberg" Date: Mon, 6 Feb 2012 14:48:57 +0100 To: Arend van Spriel Cc: "John W. Linville" , "netdev@vger.kernel.org" , "Franky (Zhenhui) Lin" , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Subject: Re: [PATCH] bcma: don't fail for bad SPROM CRC Message-ID: <20120206134857.GA3636@polaris.bitmath.org> References: <1328534801-3477-1-git-send-email-rydberg@euromail.se> <4F2FD6D0.8070508@broadcom.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4F2FD6D0.8070508@broadcom.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Feb 06, 2012 at 02:34:08PM +0100, Arend van Spriel wrote: > On 02/06/2012 02:26 PM, Henrik Rydberg wrote: > > The brcmsmac driver is now checking the bcma SPROM CRCs, leaving some > > chipsets unrecognized that were functional prior to the switch. In > > particular, the current code bails out on recent Macbooks. This patch > > simply ignores the outcome of the CRC check, with the argument that an > > unrecognized SPROM should be treated similarly to a non-existing one. > > Suggestion: > > The brcmsmac driver is now registered as a bcma device driver. Some > chipsets fail on SPROM CRC check in the bcma bus driver. This leaves the > chipset unrecognized and the bcma bus is not registered so that brcmsmac > is not probed. In particular, the current code ....... All fine with me. To avoid confusion, here is the patch again, with the above inserted. Thanks, Henrik --- From 57a4fbd1767b3c2e7c32d288b713e1b06e597bd6 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Tue, 31 Jan 2012 14:22:15 -0500 Subject: [PATCH] bcma: don't fail for bad SPROM CRC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The brcmsmac driver is now registered as a bcma device driver. Some chipsets fail on SPROM CRC check in the bcma bus driver. This leaves the chipset unrecognized and the bcma bus is not registered so that brcmsmac is not probed. In particular, the current code bails out on recent Macbooks. This patch simply ignores the outcome of the CRC check, with the argument that an unrecognized SPROM should be treated similarly to a non-existing one. Cc: Arend van Spriel Cc: Franky (Zhenhui) Lin Cc: Rafał Miłecki Signed-off-by: Henrik Rydberg Signed-off-by: John W. Linville --- drivers/bcma/main.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index febbc0a..ec31f7d 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c @@ -169,10 +169,8 @@ int bcma_bus_register(struct bcma_bus *bus) err = bcma_sprom_get(bus); if (err == -ENOENT) { pr_err("No SPROM available\n"); - } else if (err) { + } else if (err) pr_err("Failed to get SPROM: %d\n", err); - return -ENOENT; - } /* Register found cores */ bcma_register_cores(bus);