From: Alexandre Bounine <alexandre.bounine@idt.com>
To: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Cc: Alexandre Bounine <alexandre.bounine@idt.com>
Subject: [PATCH RESEND] rapidio: apply RX/TX enable to active switch ports only
Date: Tue, 18 Sep 2012 14:27:13 -0400 [thread overview]
Message-ID: <1347992833-13744-1-git-send-email-alexandre.bounine@idt.com> (raw)
Apply port RX/TX enable operations only to active switch ports.
RapidIO specification (Part 6: LP-Serial Physical Layer)
recommends to keep Output Port Enable (TX) and Input Port Enable (RX)
control bits in disabled state (0b0) after device reset. It also allows
to have implementation specific reset state for these bits.
This patch ensures that TX/RX enable action is applied only to active
switch's ports while preserving an initial state of inactive ones.
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
---
RESEND: Initial submission of this patch was dropped due to feedback
comment which raised concern about some RapidIO switch implementations
that may be affected by the change. After specification and device details
review this patch declared to be safe because it preserves any combination
of initial states of RX/TX enable for inactive port.
drivers/rapidio/rio-scan.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index 2bebd79..02e686b 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -839,12 +839,10 @@ static int __devinit rio_enum_peer(struct rio_net *net, struct rio_mport *port,
for (port_num = 0;
port_num < RIO_GET_TOTAL_PORTS(rdev->swpinfo);
port_num++) {
- /*Enable Input Output Port (transmitter reviever)*/
- rio_enable_rx_tx_port(port, 0,
+ if (sw_inport == port_num) {
+ rio_enable_rx_tx_port(port, 0,
RIO_ANY_DESTID(port->sys_size),
hopcount, port_num);
-
- if (sw_inport == port_num) {
rdev->rswitch->port_ok |= (1 << port_num);
continue;
}
@@ -857,6 +855,9 @@ static int __devinit rio_enum_peer(struct rio_net *net, struct rio_mport *port,
pr_debug(
"RIO: scanning device on port %d\n",
port_num);
+ rio_enable_rx_tx_port(port, 0,
+ RIO_ANY_DESTID(port->sys_size),
+ hopcount, port_num);
rdev->rswitch->port_ok |= (1 << port_num);
rio_route_add_entry(rdev, RIO_GLOBAL_TABLE,
RIO_ANY_DESTID(port->sys_size),
--
1.7.8.4
reply other threads:[~2012-09-18 18:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1347992833-13744-1-git-send-email-alexandre.bounine@idt.com \
--to=alexandre.bounine@idt.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox