diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-01-26 22:07:54 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-06 22:03:17 -0500 |
commit | 43d80439c5f619446e174abdbdaff4fc0e539546 (patch) | |
tree | 8cf055ca91a1de67f6fda124ccb68e43ac28c8c5 /drivers | |
parent | 6c7be7d385f4911895877e0f0697c598f600136f (diff) |
[POWERPC] ps3: system bus minor mmio fix
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ps3/system-bus.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ps3/system-bus.c b/drivers/ps3/system-bus.c index d79f949bcb2a..468bdbcc722c 100644 --- a/drivers/ps3/system-bus.c +++ b/drivers/ps3/system-bus.c | |||
@@ -50,7 +50,7 @@ int ps3_mmio_region_create(struct ps3_mmio_region *r) | |||
50 | if (result) { | 50 | if (result) { |
51 | pr_debug("%s:%d: lv1_map_device_mmio_region failed: %s\n", | 51 | pr_debug("%s:%d: lv1_map_device_mmio_region failed: %s\n", |
52 | __func__, __LINE__, ps3_result(result)); | 52 | __func__, __LINE__, ps3_result(result)); |
53 | r->lpar_addr = r->len = r->bus_addr = 0; | 53 | r->lpar_addr = 0; |
54 | } | 54 | } |
55 | 55 | ||
56 | dump_mmio_region(r); | 56 | dump_mmio_region(r); |
@@ -62,13 +62,13 @@ int ps3_free_mmio_region(struct ps3_mmio_region *r) | |||
62 | int result; | 62 | int result; |
63 | 63 | ||
64 | result = lv1_unmap_device_mmio_region(r->did.bus_id, r->did.dev_id, | 64 | result = lv1_unmap_device_mmio_region(r->did.bus_id, r->did.dev_id, |
65 | r->bus_addr); | 65 | r->lpar_addr); |
66 | 66 | ||
67 | if (result) | 67 | if (result) |
68 | pr_debug("%s:%d: lv1_unmap_device_mmio_region failed: %s\n", | 68 | pr_debug("%s:%d: lv1_unmap_device_mmio_region failed: %s\n", |
69 | __func__, __LINE__, ps3_result(result)); | 69 | __func__, __LINE__, ps3_result(result)); |
70 | 70 | ||
71 | r->lpar_addr = r->len = r->bus_addr = 0; | 71 | r->lpar_addr = 0; |
72 | return result; | 72 | return result; |
73 | } | 73 | } |
74 | 74 | ||