lkml.org 
[lkml]   [2001]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: "sr: unaligned transfer" in 2.5.2-pre1
If it shouldn't be used, it should be removed from the structure to force
people to change.

This is probably why usb-storage broke, and it wasn't obvious to me what
went wrong.

So now I guess I need to either (a) compute the address for the USB layer,
or (b) figure out how to pass the memory parameters directly, so we can use
highmem.

Matt

On Sun, Dec 30, 2001 at 12:27:56PM +0100, Jens Axboe wrote:
> On Sun, Dec 30 2001, Peter Osterlund wrote:
> > Greg KH <greg@kroah.com> writes:
> >
> > > On Sun, Dec 23, 2001 at 06:44:43PM +0100, Peter Osterlund wrote:
> > > >
> > > > So, what changes are needed to make CD support work?
> > >
> > > The usb-storage driver needs some changes to get it to work properly in
> > > the 2.5.1 kernel due to the changes in the SCSI and bio layer. I've
> > > gotten a few other reports of problems, so you aren't alone :)
> > >
> > > As for when the changes will be done, any volunteers?
> >
> > This patch seems to work for me. I hope it is correct. The ide-scsi
> > driver is basically doing the same thing already.
> >
> > --- linux-2.5-packet/drivers/usb/storage/scsiglue.c.old Sun Dec 30 02:10:01 2001
> > +++ linux-2.5-packet/drivers/usb/storage/scsiglue.c Sun Dec 30 02:09:05 2001
> > @@ -145,9 +145,19 @@
> > static int queuecommand( Scsi_Cmnd *srb , void (*done)(Scsi_Cmnd *))
> > {
> > struct us_data *us = (struct us_data *)srb->host->hostdata[0];
> > + struct scatterlist *sg;
> > + int i;
> >
> > US_DEBUGP("queuecommand() called\n");
> > srb->host_scribble = (unsigned char *)us;
> > +
> > + /* Set up address field in the scatterlist. HighMem pages have
> > + * already been bounced at this point. */
> > + sg = (struct scatterlist *) srb->request_buffer;
> > + for (i = 0; i < srb->use_sg; i++) {
> > + BUG_ON(PageHighMem(sg[i].page));
> > + sg[i].address = page_address(sg[i].page) + sg[i].offset;
> > + }
> >
> > /* get exclusive access to the structures we want */
> > down(&(us->queue_exclusion));
>
> That's not right, you shouldn't be using .address at all.
>
> --
> Jens Axboe

--
Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver

C: Why are you upgrading to NT?
AJ: It must be the sick, sadistic streak that runs through me.
-- Chief and A.J.
User Friendly, 5/12/1998
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:14    [W:0.274 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site