Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-30 Thread Geoff Levand
Benjamin Herrenschmidt wrote: > On Wed, 2007-05-30 at 12:13 +0200, Christoph Hellwig wrote: >> >> For any sane hypervisor or hardware the copy should be worth >> than that. Then again a sane hardware or hypervisor would support >> SG requests.. > > Agreed... Sony should fix that, it's a bit ridi

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-30 Thread Benjamin Herrenschmidt
On Wed, 2007-05-30 at 12:13 +0200, Christoph Hellwig wrote: > > For any sane hypervisor or hardware the copy should be worth > than that. Then again a sane hardware or hypervisor would support > SG requests.. Agreed... Sony should fix that, it's a bit ridiculous. Ben. - To unsubscribe from th

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-30 Thread Christoph Hellwig
On Tue, May 29, 2007 at 01:11:41PM +0200, Geert Uytterhoeven wrote: > > This looks very inefficient. Just set sg_tablesize of your driver > > to 1 to avoid getting mutiple segments. > > The disadvantage of setting sg_tablesize = 1 is that the driver will get small > requests (PAGE_SIZE) most of t

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-30 Thread Christoph Hellwig
On Tue, May 29, 2007 at 06:21:36PM +0200, Geert Uytterhoeven wrote: > On Tue, 29 May 2007, Christoph Hellwig wrote: > > > +/* > > > + * copy data from device into scatter/gather buffer > > > + */ > > > +static int fill_from_dev_buffer(struct scsi_cmnd *cmd, const void *buf, > > > +

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-29 Thread Geert Uytterhoeven
On Tue, 29 May 2007, Christoph Hellwig wrote: > > +/* > > + * copy data from device into scatter/gather buffer > > + */ > > +static int fill_from_dev_buffer(struct scsi_cmnd *cmd, const void *buf, > > + int buflen) > > +{ > > + int k, req_len, act_len, len, active; > > +

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-29 Thread Benjamin Herrenschmidt
On Tue, 2007-05-29 at 13:11 +0200, Geert Uytterhoeven wrote: > > This looks very inefficient. Just set sg_tablesize of your driver > > to 1 to avoid getting mutiple segments. > > The disadvantage of setting sg_tablesize = 1 is that the driver will > get small > requests (PAGE_SIZE) most of the ti

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-29 Thread Geert Uytterhoeven
On Tue, 29 May 2007, Christoph Hellwig wrote: > [Note that all scsi lldds should go to linux-scsi] I'll Cc linux-scsi next time. > > + sgpnt = cmd->request_buffer; > > + active = 1; > > + for (k = 0, req_len = 0, act_len = 0; k < cmd->use_sg; ++k, ++sgpnt) { > > + if (active) { >

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-29 Thread Christoph Hellwig
On Fri, May 25, 2007 at 11:04:29PM +0200, Arnd Bergmann wrote: > On Friday 25 May 2007, Geert Uytterhoeven wrote: > > > > > What is the problem? Is there infrastructure missing in the > > > CD-ROM layer? > > > > As the CD/DVD/BD part just accepts SCSI/ATAPI commands (except for plain > > read/wri

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-29 Thread Christoph Hellwig
[Note that all scsi lldds should go to linux-scsi] > +config PS3_ROM > + tristate "PS3 ROM Storage Driver" > + depends on PPC_PS3 && BLK_DEV_SR > + select PS3_STORAGE > + default y please don't put any default y statements in. > +#define DEVICE_NAME "ps3rom" > +

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-29 Thread Christoph Hellwig
On Sun, May 27, 2007 at 08:18:43AM +1000, Benjamin Herrenschmidt wrote: > > > > linux/highmem.h is not included to get the kmap_* prototypes. > > > > > > Beside, I don't see the point of using kmap on ppc64... > > > > So what should I use instead? > > you don't need to map ... the linear mapping

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-26 Thread Benjamin Herrenschmidt
On Sat, 2007-05-26 at 10:52 +0200, Geert Uytterhoeven wrote: > On Sat, 26 May 2007, Benjamin Herrenschmidt wrote: > > On Fri, 2007-05-25 at 13:24 +0200, Olaf Hering wrote: > > > On Fri, May 25, [EMAIL PROTECTED] wrote: > > > > > > > +++ b/drivers/scsi/ps3rom.c > > > > > > > +

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-26 Thread Geert Uytterhoeven
On Sat, 26 May 2007, Benjamin Herrenschmidt wrote: > On Fri, 2007-05-25 at 13:24 +0200, Olaf Hering wrote: > > On Fri, May 25, [EMAIL PROTECTED] wrote: > > > > > +++ b/drivers/scsi/ps3rom.c > > > > > + kaddr = kmap_atomic(sgpnt->page, KM_USER0); > > > > linux/highmem.h is not inc

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-25 Thread Benjamin Herrenschmidt
On Fri, 2007-05-25 at 13:24 +0200, Olaf Hering wrote: > On Fri, May 25, [EMAIL PROTECTED] wrote: > > > +++ b/drivers/scsi/ps3rom.c > > > + kaddr = kmap_atomic(sgpnt->page, KM_USER0); > > linux/highmem.h is not included to get the kmap_* prototypes. Beside, I don't see the poin

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-25 Thread Arnd Bergmann
On Friday 25 May 2007, Geert Uytterhoeven wrote: > > > What is the problem? Is there infrastructure missing in the > > CD-ROM layer? > > As the CD/DVD/BD part just accepts SCSI/ATAPI commands (except for plain > read/write), I was suggested to keep it as a SCSI driver. Ok, so I guess the tradeof

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-25 Thread Geert Uytterhoeven
On Fri, 25 May 2007, Arnd Bergmann wrote: > On Friday 25 May 2007, [EMAIL PROTECTED] wrote: > > Add a CD/DVD/BD Storage Driver for the PS3: > > - Implemented as a SCSI device driver > > I assume you tried implementing it as a block device driver, > like you PS3 disk driver does, and failed for s

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-25 Thread Arnd Bergmann
On Friday 25 May 2007, [EMAIL PROTECTED] wrote: > Add a CD/DVD/BD Storage Driver for the PS3: > - Implemented as a SCSI device driver I assume you tried implementing it as a block device driver, like you PS3 disk driver does, and failed for some reason. What is the problem? Is there infrastruct

Re: [patch 6/7] ps3: ROM Storage Driver

2007-05-25 Thread Olaf Hering
On Fri, May 25, [EMAIL PROTECTED] wrote: > +++ b/drivers/scsi/ps3rom.c > + kaddr = kmap_atomic(sgpnt->page, KM_USER0); linux/highmem.h is not included to get the kmap_* prototypes. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a mess

[patch 6/7] ps3: ROM Storage Driver

2007-05-25 Thread Geert . Uytterhoeven
Add a CD/DVD/BD Storage Driver for the PS3: - Implemented as a SCSI device driver - Uses software scatter-gather with a 64 KiB bounce buffer as the hypervisor doesn't support scatter-gather Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- arch/powerpc/platforms/ps3/Kconfig | 11