From patchwork Tue Aug 9 02:17:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Gang X-Patchwork-Id: 109112 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id BF862B7235 for ; Tue, 9 Aug 2011 12:16:47 +1000 (EST) Received: by ozlabs.org (Postfix) id C7F9BB6F83; Tue, 9 Aug 2011 12:16:37 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from DB3EHSOBE005.bigfish.com (db3ehsobe005.messaging.microsoft.com [213.199.154.143]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Microsoft Secure Server Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 23960B6F82 for ; Tue, 9 Aug 2011 12:16:36 +1000 (EST) Received: from mail55-db3-R.bigfish.com (10.3.81.249) by DB3EHSOBE005.bigfish.com (10.3.84.25) with Microsoft SMTP Server id 14.1.225.22; Tue, 9 Aug 2011 02:16:31 +0000 Received: from mail55-db3 (localhost.localdomain [127.0.0.1]) by mail55-db3-R.bigfish.com (Postfix) with ESMTP id 4A92F7D023C; Tue, 9 Aug 2011 02:16:31 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail55-db3 (localhost.localdomain [127.0.0.1]) by mail55-db3 (MessageSwitch) id 1312856190728218_21653; Tue, 9 Aug 2011 02:16:30 +0000 (UTC) Received: from DB3EHSMHS003.bigfish.com (unknown [10.3.81.250]) by mail55-db3.bigfish.com (Postfix) with ESMTP id AE97018A804B; Tue, 9 Aug 2011 02:16:30 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB3EHSMHS003.bigfish.com (10.3.87.103) with Microsoft SMTP Server (TLS) id 14.1.225.22; Tue, 9 Aug 2011 02:16:30 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.323.2; Mon, 8 Aug 2011 21:16:29 -0500 Received: from udp143655uds.ap.freescale.net (udp143655uds.ap.freescale.net [10.192.208.115]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p792GPNP002916; Mon, 8 Aug 2011 21:16:28 -0500 (CDT) Received: from udp143655uds.ap.freescale.net (localhost.localdomain [127.0.0.1]) by udp143655uds.ap.freescale.net (8.13.8/8.13.8) with ESMTP id p792HN7M003744; Tue, 9 Aug 2011 10:17:23 +0800 Received: (from mylinux@localhost) by udp143655uds.ap.freescale.net (8.13.8/8.13.8/Submit) id p792HEcQ003729; Tue, 9 Aug 2011 10:17:14 +0800 From: Liu Gang To: Subject: [PATCH] rio: Use discovered bit to test if enumeration is complete Date: Tue, 9 Aug 2011 10:17:06 +0800 Message-ID: <1312856226-3695-1-git-send-email-b34182@freescale.com> X-Mailer: git-send-email 1.7.3.1 MIME-Version: 1.0 X-OriginatorOrg: freescale.net Cc: r58472@freescale.com, Liu Gang , r61911@freescale.com, linuxppc-dev@ozlabs.org, Liu Gang , akpm@linux-foundation.org, B11780@freescale.com X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org The discovered bit in PGCCSR register indicates if the device has been discovered by system host. In Rapidio system, some agent devices can also be master devices. They can issue requests into the system. Signed-off-by: Liu Gang Acked-by: Alexandre Bounine --- drivers/rapidio/rio-scan.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index ee89358..2dac1f0 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c @@ -924,7 +924,7 @@ static int __devinit rio_enum_peer(struct rio_net *net, struct rio_mport *port, * rio_enum_complete- Tests if enumeration of a network is complete * @port: Master port to send transaction * - * Tests the Component Tag CSR for non-zero value (enumeration + * Tests the PGCCSR discovered bit for non-zero value (enumeration * complete flag). Return %1 if enumeration is complete or %0 if * enumeration is incomplete. */ @@ -934,7 +934,7 @@ static int rio_enum_complete(struct rio_mport *port) rio_local_read_config_32(port, port->phys_efptr + RIO_PORT_GEN_CTL_CSR, ®val); - return (regval & RIO_PORT_GEN_MASTER) ? 1 : 0; + return (regval & RIO_PORT_GEN_DISCOVERED) ? 1 : 0; } /**