Thread (70 messages) flat view 70 messages, 7 authors, 2011-08-31
STALE5489d

[PATCH 13/15] ps3disk: Use region flags

From: Andre Heider <hidden>
Date: 2011-08-01 20:03:04
Subsystem: block layer, ps3 platform support, the rest · Maintainers: Jens Axboe, Geoff Levand, Linus Torvalds

Provide a set of default region flags and make them overwritable via
a module parameter array.
Set PS3_STORAGE_FLAG_SKIP_ACL for region 0, so it can be accessed
from the GameOS lpar.

Signed-off-by: Andre Heider <redacted>
---
 drivers/block/ps3disk.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
index 30dae10..483806e 100644
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -39,6 +39,19 @@
 #define PS3DISK_NAME		"ps3d%c%c"
 
 
+static unsigned int region_flags[] = {
+	PS3_STORAGE_FLAG_SKIP_ACL,		/* raw disk */
+	PS3_STORAGE_FLAG_DEFAULT,		/* core os */
+	PS3_STORAGE_FLAG_DEFAULT,		/* gameos pup */
+	PS3_STORAGE_FLAG_DEFAULT,		/* n/a */
+	PS3_STORAGE_FLAG_DEFAULT,		/* n/a */
+	PS3_STORAGE_FLAG_DEFAULT,		/* n/a */
+	PS3_STORAGE_FLAG_DEFAULT,		/* n/a */
+	PS3_STORAGE_FLAG_DEFAULT,		/* n/a */
+};
+module_param_array(region_flags, uint, NULL, S_IRUGO);
+MODULE_PARM_DESC(region_flags, "Region flags");
+
 struct ps3disk_private {
 	spinlock_t lock;		/* Request queue spinlock */
 	struct request_queue *queue;
@@ -453,6 +466,9 @@ static int __devinit ps3disk_probe(struct ps3_system_bus_device *_dev)
 		goto fail_free_priv;
 	}
 
+	for (region_idx = 0; region_idx < dev->num_regions; region_idx++)
+		dev->regions[region_idx].flags = region_flags[region_idx];
+
 	error = ps3stor_setup(dev, ps3disk_interrupt);
 	if (error)
 		goto fail_free_bounce;
-- 
1.7.5.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help