Skip to content

Commit

Permalink
drivers/rapidio/rio-scan.c: use discovered bit to test if enumeration…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Liu Gang authored and Linus Torvalds committed Nov 2, 2011
1 parent 79975f1 commit a571259
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/rapidio/rio-scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,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.
*/
Expand All @@ -933,7 +933,7 @@ static int rio_enum_complete(struct rio_mport *port)

rio_local_read_config_32(port, port->phys_efptr + RIO_PORT_GEN_CTL_CSR,
&regval);
return (regval & RIO_PORT_GEN_MASTER) ? 1 : 0;
return (regval & RIO_PORT_GEN_DISCOVERED) ? 1 : 0;
}

/**
Expand Down

0 comments on commit a571259

Please sign in to comment.