LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Micha Nelissen <micha@neli.hopto.org>
To: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 2/7] RapidIO: Add switch locking during discovery
Date: Wed, 24 Feb 2010 20:15:13 +0100	[thread overview]
Message-ID: <4B857AC1.7020907@neli.hopto.org> (raw)
In-Reply-To: <20100224152050.GB13661@kaneng01.tundra.com>

Alexandre Bounine wrote:
> +				/* Attempt to acquire device lock */
> +				rio_mport_write_config_32(port, destid,
> +							  hopcount,
> +							  RIO_HOST_DID_LOCK_CSR,
> +							  port->host_deviceid);
> +				rio_mport_read_config_32(port, destid, hopcount,
> +					RIO_HOST_DID_LOCK_CSR, &result);
> +				while (result != port->host_deviceid) {

It's better to abstract the locking of a device into a new function,
rio_lock_device / rio_unlock_device.

Then you can use those in rio_get_route_entry and rio_add_route_entry.

> @@ -1027,6 +1090,13 @@ int __devinit rio_disc_mport(struct rio_
> +
> +		/* Read DestID assigned by enumerator */
> +		rio_local_read_config_32(mport, RIO_DID_CSR,
> +					 &mport->host_deviceid);
> +		mport->host_deviceid = RIO_GET_DID(mport->sys_size,
> +						   mport->host_deviceid);
> +

This fixes something else, should be a separate patch.

Regards, Micha

  reply	other threads:[~2010-02-24 19:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24 15:20 [PATCH 2/7] RapidIO: Add switch locking during discovery Alexandre Bounine
2010-02-24 19:15 ` Micha Nelissen [this message]
     [not found] ` <4B857A53.30106@neli.hopto.org>
2010-02-25 14:53   ` Bounine, Alexandre
2010-02-25 19:11     ` Micha Nelissen

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=4B857AC1.7020907@neli.hopto.org \
    --to=micha@neli.hopto.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