Skip to content

Commit

Permalink
[POWERPC] ps3: system bus minor mmio fix
Browse files Browse the repository at this point in the history
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.

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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Feb 7, 2007
1 parent 6c7be7d commit 43d8043
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/ps3/system-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int ps3_mmio_region_create(struct ps3_mmio_region *r)
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);
Expand All @@ -62,13 +62,13 @@ int ps3_free_mmio_region(struct ps3_mmio_region *r)
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;
}

Expand Down

0 comments on commit 43d8043

Please sign in to comment.