From patchwork Mon Mar 9 00:30:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Friedrich Oslage X-Patchwork-Id: 24183 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.176.167]) by ozlabs.org (Postfix) with ESMTP id 919D9DDFB9 for ; Mon, 9 Mar 2009 11:30:46 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752054AbZCIAao (ORCPT ); Sun, 8 Mar 2009 20:30:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752322AbZCIAao (ORCPT ); Sun, 8 Mar 2009 20:30:44 -0400 Received: from v32062.1blu.de ([88.84.153.122]:52841 "EHLO v32062.1blu.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752054AbZCIAao (ORCPT ); Sun, 8 Mar 2009 20:30:44 -0400 X-Greylist: delayed 3936 seconds by postgrey-1.27 at vger.kernel.org; Sun, 08 Mar 2009 20:30:43 EDT Received: from ppp-62-216-217-174.dynamic.mnet-online.de ([62.216.217.174] helo=[10.254.3.50]) by v32062.1blu.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1LgTOA-0007IQ-4w for sparclinux@vger.kernel.org; Mon, 09 Mar 2009 01:30:40 +0100 Message-ID: <49B4632D.7010606@gentoo.org> Date: Mon, 09 Mar 2009 01:30:37 +0100 From: Friedrich Oslage Reply-To: bluebird@gentoo.org User-Agent: Thunderbird 2.0.0.19 (X11/20090104) MIME-Version: 1.0 To: sparclinux@vger.kernel.org Subject: sunhme: SBUS QFE not detected anymore X-Enigmail-Version: 0.95.7 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org Hi, my Ultra 2 has a SBUS Happy Meal and a SBUS Quad FastEthernet, both used to work fine but the qfe is no longer detected since: 0b492fce3d72d982a7981905f85484a1e1ba7fde sunhme: Don't match PCI devices in SBUS probe. The parent node, sbus_dp, seems not to be set correctly. And the sbus_dp->name == "sbus" check fails. According to prtconf [0] the tree looks like this: SUNW,Ultra-2 sbus SUNW,hme SUNW,qfe SUNW,qfe SUNW,qfe SUNW,qfe Setting sbus_dp = to_of_device(op->dev.parent->parent)->node will therefore get "SUNW,Ultra-2" instead of "sbus". This also makes reading the burst sizes fail and end up with the default, 0x0. I attached a patch :) [0]http://git.kernel.org/?p=linux/kernel/git/davem/prtconfs.git;a=blob_plain;f=ultra2_2 Cheers, Friedrich sunhme: Fix qfe parent detection. Signed-off-by: Friedrich Oslage diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index d4fb4ac..4e9bd38 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c @@ -2649,8 +2649,6 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) int err = -ENODEV; sbus_dp = to_of_device(op->dev.parent)->node; - if (is_qfe) - sbus_dp = to_of_device(op->dev.parent->parent)->node; /* We can match PCI devices too, do not accept those here. */ if (strcmp(sbus_dp->name, "sbus"))