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
[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" > +