Skip to contentSkip to conversation

ps3: system bus minor mmio fix

PATCH In review Geoff Levand 2 participants 2 messages Jan 25, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/14 ps3: system bus minor mmio fix

From: Benjamin Herrenschmidt <[email protected]>

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.

---
 drivers/ps3/system-bus.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/ps3/system-bus.c +3 -3
@@ -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;
 }
 
Acked-by on v1 3/14
#1 lore raw
Quoted 3 lines · Geoff Levand

From: Benjamin Herrenschmidt <[email protected]>
=20
Fix two minor bugs in the PS3 system bus mmio region code. =A0First, on e=

rror or

Quoted 1 line

when freeing a region, retain the bus_addr and len fields to allow subseq=

uent

Quoted 1 line

calls to create the region. =A0Second, correct the region address argumen=

t to the

Quoted 7 lines

lv1_unmap_device_mmio_region() call.
=20
Fixes modprobe/rmmod of some drivers.
=20

=20