linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 4/16] ps3: system bus minor mmio fix
Date: Sun, 28 Jan 2007 07:06:57 +1100	[thread overview]
Message-ID: <1169928417.24996.205.camel@localhost.localdomain> (raw)
In-Reply-To: <45BAC20A.8040107@am.sony.com>

On Fri, 2007-01-26 at 19:07 -0800, Geoff Levand wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> 
> Fix two minor bugs in the PS3 system bus mmio region code.  First, on error or
> when freeing a region, retain the bus_addr and len fields to allow subsequent
> calls to create the region.  Second, correct the region address argument to the
> lv1_unmap_device_mmio_region() call.

Note that I personally think that drivers/ps3 is a very wrong place for
the ps3 system bus. It should stay in arch/powerpc/platform/ps3

Ben.

> Fixes modprobe/rmmod of some drivers.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
> 
> ---
>  drivers/ps3/system-bus.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> --- ps3-linux-dev.orig/drivers/ps3/system-bus.c
> +++ ps3-linux-dev/drivers/ps3/system-bus.c
> @@ -50,7 +50,7 @@ int ps3_mmio_region_create(struct ps3_mm
>  	if (result) {
>  		pr_debug("%s:%d: lv1_map_device_mmio_region failed: %s\n",
>  			__func__, __LINE__, ps3_result(result));
> -		r->lpar_addr = r->len = r->bus_addr = 0;
> +		r->lpar_addr = 0;
>  	}
>  
>  	dump_mmio_region(r);
> @@ -62,13 +62,13 @@ int ps3_free_mmio_region(struct ps3_mmio
>  	int result;
>  
>  	result = lv1_unmap_device_mmio_region(r->did.bus_id, r->did.dev_id,
> -		r->bus_addr);
> +		r->lpar_addr);
>  
>  	if (result)
>  		pr_debug("%s:%d: lv1_unmap_device_mmio_region failed: %s\n",
>  			__func__, __LINE__, ps3_result(result));
>  
> -	r->lpar_addr = r->len = r->bus_addr = 0;
> +	r->lpar_addr = 0;
>  	return result;
>  }
>  
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

  reply	other threads:[~2007-01-27 20:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-27  3:07 [PATCH 4/16] ps3: system bus minor mmio fix Geoff Levand
2007-01-27 20:06 ` Benjamin Herrenschmidt [this message]
2007-01-28  8:42   ` Christoph Hellwig
2007-01-29 19:32     ` Geoff Levand
2007-01-29 20:16       ` Benjamin Herrenschmidt

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=1169928417.24996.205.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=geoffrey.levand@am.sony.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).