aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rapidio
diff options
context:
space:
mode:
authorLiu Gang <b34182@freescale.com>2011-11-02 16:39:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-02 19:07:01 -0400
commita571259f4874023306db36e83054d093833b1902 (patch)
treefc2aa71ab687411e3413353fc0ed70463d929c3e /drivers/rapidio
parent79975f1327850ef198ada994c2fc44b7d1ea8935 (diff)
drivers/rapidio/rio-scan.c: use discovered bit to test if enumeration is complete
The discovered bit in PGCCSR register indicates if the device has been discovered by system host. In Rapidio systems, some agent devices can also be master devices. They can issue requests into the system. Signed-off-by: Liu Gang <Gang.Liu@freescale.com> Acked-by: Alexandre Bounine <alexandre.bounine@idt.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rapidio')
-rw-r--r--drivers/rapidio/rio-scan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index ebe77dd87daf..0914f49b0a53 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -923,7 +923,7 @@ static int __devinit rio_enum_peer(struct rio_net *net, struct rio_mport *port,
923 * rio_enum_complete- Tests if enumeration of a network is complete 923 * rio_enum_complete- Tests if enumeration of a network is complete
924 * @port: Master port to send transaction 924 * @port: Master port to send transaction
925 * 925 *
926 * Tests the Component Tag CSR for non-zero value (enumeration 926 * Tests the PGCCSR discovered bit for non-zero value (enumeration
927 * complete flag). Return %1 if enumeration is complete or %0 if 927 * complete flag). Return %1 if enumeration is complete or %0 if
928 * enumeration is incomplete. 928 * enumeration is incomplete.
929 */ 929 */
@@ -933,7 +933,7 @@ static int rio_enum_complete(struct rio_mport *port)
933 933
934 rio_local_read_config_32(port, port->phys_efptr + RIO_PORT_GEN_CTL_CSR, 934 rio_local_read_config_32(port, port->phys_efptr + RIO_PORT_GEN_CTL_CSR,
935 &regval); 935 &regval);
936 return (regval & RIO_PORT_GEN_MASTER) ? 1 : 0; 936 return (regval & RIO_PORT_GEN_DISCOVERED) ? 1 : 0;
937} 937}
938 938
939/** 939/**