* [PATCH] remove geometry support from ps3 storage driver
@ 2007-05-21 12:53 Olaf Hering
2007-05-21 12:54 ` [PATCH] set module owner in ps3 modules Olaf Hering
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Olaf Hering @ 2007-05-21 12:53 UTC (permalink / raw)
To: Geoff Levand, linuxppc-dev
The old ps3_storage driver did not support DOS geometry, so there is no
point to start adding code for it.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Index: linux-2.6.22-rc2/drivers/block/ps3disk.c
===================================================================
--- linux-2.6.22-rc2.orig/drivers/block/ps3disk.c
+++ linux-2.6.22-rc2/drivers/block/ps3disk.c
@@ -43,10 +43,6 @@
#define KERNEL_SECTOR_SIZE 512
-// FIXME SCSI uses H=64, S=32. Can we still repartition disks partitioned using
-// the old driver?
-#define PS3DISK_HEADS 255
-#define PS3DISK_SECTORS 63
#define PS3DISK_NAME "ps3d%c"
@@ -70,21 +66,11 @@ static int ps3disk_open(struct inode *in
return 0;
}
-static int ps3disk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
-{
- geo->heads = PS3DISK_HEADS;
- geo->sectors = PS3DISK_SECTORS;
- geo->cylinders = min(65535UL,
- get_capacity(bdev->bd_disk) /
- (PS3DISK_HEADS * PS3DISK_SECTORS));
- return 0;
-}
static struct block_device_operations ps3disk_fops = {
.owner = THIS_MODULE,
.open = ps3disk_open,
- .getgeo = ps3disk_getgeo,
};
static void ps3disk_scatter_gather(struct ps3_storage_device *dev,
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] set module owner in ps3 modules
2007-05-21 12:53 [PATCH] remove geometry support from ps3 storage driver Olaf Hering
@ 2007-05-21 12:54 ` Olaf Hering
2007-05-21 15:52 ` Geoff Levand
2007-05-21 14:36 ` [PATCH] remove geometry support from ps3 storage driver Geert Uytterhoeven
2007-05-21 14:39 ` Christoph Hellwig
2 siblings, 1 reply; 8+ messages in thread
From: Olaf Hering @ 2007-05-21 12:54 UTC (permalink / raw)
To: Geoff Levand, linuxppc-dev
setting ->owner will help with refcounting (?) and it provides proper
symlinks in sysfs.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Index: linux-2.6.22-rc2/drivers/block/ps3disk.c
===================================================================
--- linux-2.6.22-rc2.orig/drivers/block/ps3disk.c
+++ linux-2.6.22-rc2/drivers/block/ps3disk.c
@@ -425,6 +411,7 @@ static int ps3disk_remove(struct ps3_sys
static struct ps3_system_bus_driver ps3disk = {
.match_id = PS3_MATCH_ID_STOR_DISK,
.core.name = DEVICE_NAME,
+ .core.owner = THIS_MODULE,
.probe = ps3disk_probe,
.remove = ps3disk_remove,
.shutdown = ps3disk_remove,
Index: linux-2.6.22-rc2/drivers/char/ps3flash.c
===================================================================
--- linux-2.6.22-rc2.orig/drivers/char/ps3flash.c
+++ linux-2.6.22-rc2/drivers/char/ps3flash.c
@@ -467,6 +467,7 @@ static int ps3flash_remove(struct ps3_sy
static struct ps3_system_bus_driver ps3flash = {
.match_id = PS3_MATCH_ID_STOR_FLASH,
.core.name = DEVICE_NAME,
+ .core.owner = THIS_MODULE,
.probe = ps3flash_probe,
.remove = ps3flash_remove,
.shutdown = ps3flash_remove,
Index: linux-2.6.22-rc2/drivers/net/gelic_net.c
===================================================================
--- linux-2.6.22-rc2.orig/drivers/net/gelic_net.c
+++ linux-2.6.22-rc2/drivers/net/gelic_net.c
@@ -1576,6 +1576,7 @@ static struct ps3_system_bus_driver ps3_
.shutdown = ps3_gelic_driver_remove,
.core = {
.name = "ps3_gelic_driver",
+ .owner = THIS_MODULE,
},
};
Index: linux-2.6.22-rc2/drivers/scsi/ps3rom.c
===================================================================
--- linux-2.6.22-rc2.orig/drivers/scsi/ps3rom.c
+++ linux-2.6.22-rc2/drivers/scsi/ps3rom.c
@@ -907,6 +907,7 @@ static int ps3rom_remove(struct ps3_syst
static struct ps3_system_bus_driver ps3rom = {
.match_id = PS3_MATCH_ID_STOR_ROM,
.core.name = DEVICE_NAME,
+ .core.owner = THIS_MODULE,
.probe = ps3rom_probe,
.remove = ps3rom_remove
};
Index: linux-2.6.22-rc2/drivers/usb/host/ehci-ps3.c
===================================================================
--- linux-2.6.22-rc2.orig/drivers/usb/host/ehci-ps3.c
+++ linux-2.6.22-rc2/drivers/usb/host/ehci-ps3.c
@@ -229,6 +229,7 @@ static struct ps3_system_bus_driver ps3_
.match_id = PS3_MATCH_ID_EHCI,
.core = {
.name = "ps3-ehci-driver",
+ .owner = THIS_MODULE,
},
.probe = ps3_ehci_probe,
.remove = ps3_ehci_remove,
Index: linux-2.6.22-rc2/drivers/usb/host/ohci-ps3.c
===================================================================
--- linux-2.6.22-rc2.orig/drivers/usb/host/ohci-ps3.c
+++ linux-2.6.22-rc2/drivers/usb/host/ohci-ps3.c
@@ -233,6 +233,7 @@ static struct ps3_system_bus_driver ps3_
.match_id = PS3_MATCH_ID_OHCI,
.core = {
.name = "ps3-ohci-driver",
+ .owner = THIS_MODULE,
},
.probe = ps3_ohci_probe,
.remove = ps3_ohci_remove,
Index: linux-2.6.22-rc2/sound/ppc/snd_ps3.c
===================================================================
--- linux-2.6.22-rc2.orig/sound/ppc/snd_ps3.c
+++ linux-2.6.22-rc2/sound/ppc/snd_ps3.c
@@ -1020,6 +1020,7 @@ static struct ps3_system_bus_driver snd_
.shutdown = snd_ps3_driver_remove,
.core = {
.name = SND_PS3_DRIVER_NAME,
+ .owner = THIS_MODULE,
},
};
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] remove geometry support from ps3 storage driver
2007-05-21 12:53 [PATCH] remove geometry support from ps3 storage driver Olaf Hering
2007-05-21 12:54 ` [PATCH] set module owner in ps3 modules Olaf Hering
@ 2007-05-21 14:36 ` Geert Uytterhoeven
2007-05-21 14:39 ` Christoph Hellwig
2 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2007-05-21 14:36 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev
Hi Olaf,
On Mon, 21 May 2007, Olaf Hering wrote:
> The old ps3_storage driver did not support DOS geometry, so there is no
> point to start adding code for it.
Thanks! I didn't know the .getgeo() routine is optional. I thought it was used
by disk partitioning software.
cfdisk seems to be happy after this change.
sfdisk complains it cannot get the geometry, but it continuous, assuming H=64
and S=32.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] remove geometry support from ps3 storage driver
2007-05-21 12:53 [PATCH] remove geometry support from ps3 storage driver Olaf Hering
2007-05-21 12:54 ` [PATCH] set module owner in ps3 modules Olaf Hering
2007-05-21 14:36 ` [PATCH] remove geometry support from ps3 storage driver Geert Uytterhoeven
@ 2007-05-21 14:39 ` Christoph Hellwig
2007-05-21 17:14 ` Olaf Hering
2007-05-29 9:15 ` Geert Uytterhoeven
2 siblings, 2 replies; 8+ messages in thread
From: Christoph Hellwig @ 2007-05-21 14:39 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev
On Mon, May 21, 2007 at 02:53:11PM +0200, Olaf Hering wrote:
>
> The old ps3_storage driver did not support DOS geometry, so there is no
> point to start adding code for it.
That's not quite true. sd applies some heuristics and has a default
geometry if there is no ->bios_param method. Then again this whole
gemetry thing really only makes sense on x86.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] set module owner in ps3 modules
2007-05-21 12:54 ` [PATCH] set module owner in ps3 modules Olaf Hering
@ 2007-05-21 15:52 ` Geoff Levand
0 siblings, 0 replies; 8+ messages in thread
From: Geoff Levand @ 2007-05-21 15:52 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev
Olaf Hering wrote:
> setting ->owner will help with refcounting (?) and it provides proper
> symlinks in sysfs.
Thanks. I'm in the middle of re-doing the system bus and drivers to
work as loadable modules, and this will help.
-Geoff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] remove geometry support from ps3 storage driver
2007-05-21 14:39 ` Christoph Hellwig
@ 2007-05-21 17:14 ` Olaf Hering
2007-05-29 9:15 ` Geert Uytterhoeven
1 sibling, 0 replies; 8+ messages in thread
From: Olaf Hering @ 2007-05-21 17:14 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linuxppc-dev
On Mon, May 21, Christoph Hellwig wrote:
> On Mon, May 21, 2007 at 02:53:11PM +0200, Olaf Hering wrote:
> >
> > The old ps3_storage driver did not support DOS geometry, so there is no
> > point to start adding code for it.
>
> That's not quite true. sd applies some heuristics and has a default
> geometry if there is no ->bios_param method. Then again this whole
> gemetry thing really only makes sense on x86.
Ok, if it really matters, the values should match sd.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] remove geometry support from ps3 storage driver
2007-05-21 14:39 ` Christoph Hellwig
2007-05-21 17:14 ` Olaf Hering
@ 2007-05-29 9:15 ` Geert Uytterhoeven
2007-05-30 10:12 ` Christoph Hellwig
1 sibling, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2007-05-29 9:15 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linuxppc-dev, Olaf Hering
On Mon, 21 May 2007, Christoph Hellwig wrote:
> On Mon, May 21, 2007 at 02:53:11PM +0200, Olaf Hering wrote:
> > The old ps3_storage driver did not support DOS geometry, so there is no
> > point to start adding code for it.
>
> That's not quite true. sd applies some heuristics and has a default
> geometry if there is no ->bios_param method. Then again this whole
> gemetry thing really only makes sense on x86.
Would it make sense to have a default implementation in block/ioctl.c?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] remove geometry support from ps3 storage driver
2007-05-29 9:15 ` Geert Uytterhoeven
@ 2007-05-30 10:12 ` Christoph Hellwig
0 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2007-05-30 10:12 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linuxppc-dev, Olaf Hering, Christoph Hellwig
On Tue, May 29, 2007 at 11:15:14AM +0200, Geert Uytterhoeven wrote:
> On Mon, 21 May 2007, Christoph Hellwig wrote:
> > On Mon, May 21, 2007 at 02:53:11PM +0200, Olaf Hering wrote:
> > > The old ps3_storage driver did not support DOS geometry, so there is no
> > > point to start adding code for it.
> >
> > That's not quite true. sd applies some heuristics and has a default
> > geometry if there is no ->bios_param method. Then again this whole
> > gemetry thing really only makes sense on x86.
>
> Would it make sense to have a default implementation in block/ioctl.c?
Maybe. Someone would have to look all over block drivers if there is
something common enough to be considered default. Also some drivers
that never ran on x86 never supported it so they'd need a new method
that always returns an error. I'm not sure whether it'll be worth it
in the end.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-05-30 10:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21 12:53 [PATCH] remove geometry support from ps3 storage driver Olaf Hering
2007-05-21 12:54 ` [PATCH] set module owner in ps3 modules Olaf Hering
2007-05-21 15:52 ` Geoff Levand
2007-05-21 14:36 ` [PATCH] remove geometry support from ps3 storage driver Geert Uytterhoeven
2007-05-21 14:39 ` Christoph Hellwig
2007-05-21 17:14 ` Olaf Hering
2007-05-29 9:15 ` Geert Uytterhoeven
2007-05-30 10:12 ` Christoph Hellwig
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).