On Wed, Nov 28 2001, Jens Axboe wrote:
> On Wed, Nov 28 2001, Sebastian Dröge wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Am Mittwoch, 28. November 2001 14:58 schrieben Sie:
> > > On Wed, Nov 28 2001, Sebastian Dröge wrote:
> > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > Hash: SHA1
> > > >
> > > > Hi Jens,
> > > > your patch doesn't work for ide-scsi
> > > > I get this oops when trying to mount a CD:
> > >
> > > [oops in sr_scatter_pad]
> > >
> > > Hmm ok, and 2.5.1-pre1 works for you right?
> >
> > Yes it works very well
>
> Ok, thanks for confirming that. Going to take a look at it now.
Does this work for you? Apply on top of what you already have.
-- Jens Axboe
--neYutvxvOLaeuPCA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=sr-sg-1
--- /opt/kernel/linux-2.5.1-pre2/drivers/scsi/sr.c Wed Nov 28 09:13:59 2001 +++ drivers/scsi/sr.c Wed Nov 28 15:33:25 2001 @@ -326,11 +326,14 @@ } if (old_sg) { memcpy(sg + i, old_sg, SCpnt->use_sg * sizeof(struct scatterlist)); - memcpy(bbpnt + i, old_bbpnt, SCpnt->use_sg * sizeof(void *)); + if (old_bbpnt) + memcpy(bbpnt + i, old_bbpnt, SCpnt->use_sg * sizeof(void *)); scsi_free(old_sg, (((SCpnt->use_sg * sizeof(struct scatterlist)) + (SCpnt->use_sg * sizeof(void *))) + 511) & ~511); } else { - sg[i].address = SCpnt->request_buffer; + sg[i].address = NULL; + sg[i].page = virt_to_page(SCpnt->request_buffer); + sg[i].offset = (unsigned long) SCpnt->request_buffer&~PAGE_MASK; sg[i].length = SCpnt->request_bufflen; } @@ -340,7 +343,9 @@ SCpnt->use_sg += i; if (bsize) { - sg[SCpnt->use_sg].address = back; + sg[SCpnt->use_sg].address = NULL; + sg[SCpnt->use_sg].page = virt_to_page(back); + sg[SCpnt->use_sg].offset = (unsigned long) back & ~PAGE_MASK; bbpnt[SCpnt->use_sg] = back; sg[SCpnt->use_sg].length = bsize; SCpnt->use_sg++;
--neYutvxvOLaeuPCA-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/