mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Osterlund <petero2@telia.com>
To: Greg KH <greg@kroah.com>
Cc: Jens Axboe <axboe@suse.de>,
	mdharm-usb@one-eyed-alien.net, linux-kernel@vger.kernel.org,
	linux-usb-devel@lists.sourceforge.net
Subject: Re: "sr: unaligned transfer" in 2.5.2-pre1
Date: 30 Dec 2001 10:31:11 +0100	[thread overview]
Message-ID: <m23d1trr4w.fsf@pengo.localdomain> (raw)
In-Reply-To: <m2vgexzv90.fsf@ppro.localdomain> <20011223112249.B4493@kroah.com>
In-Reply-To: <20011223112249.B4493@kroah.com>

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));

-- 
Peter Osterlund - petero2@telia.com
http://w1.894.telia.com/~u89404340

  reply	other threads:[~2001-12-30  9:34 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-23 17:44 Peter Osterlund
2001-12-23 19:22 ` Greg KH
2001-12-30  9:31   ` Peter Osterlund [this message]
2001-12-30 11:27     ` Jens Axboe
2001-12-31  5:27       ` Matthew Dharm
2001-12-31 11:51         ` Jens Axboe
2001-12-31 22:54           ` [linux-usb-devel] " Matthew Dharm
2001-12-31 23:59             ` Andre Hedrick
2002-01-01 17:39               ` Jens Axboe
2002-01-01 17:40             ` Jens Axboe
2002-01-01 19:53             ` David Brownell
2002-01-01 22:34               ` Jens Axboe
2002-01-01 23:28                 ` Matthew Dharm
2002-01-02  5:40                   ` [linux-usb-devel] Re: highmem and usb [was: "sr: unaligned transfer" in 2.5.2-pre1] David Brownell
2002-01-02  9:27                     ` [linux-usb-devel] Re: highmem and usb [was:"sr: unalignedtransfer" " Oliver.Neukum
2002-01-02 18:43                       ` David Brownell
2002-01-02  9:31                     ` [linux-usb-devel] Re: highmem and usb [was: "sr: unaligned transfer" " Jens Axboe
2002-01-02  9:30                   ` [linux-usb-devel] Re: "sr: unaligned transfer" in 2.5.2-pre1 Jens Axboe
2002-01-02  5:27                 ` [linux-usb-devel] Re: highmem and usb [was "sr: unaligned transfer" in 2.5.2-pre1] David Brownell
2002-01-02  9:32                   ` Jens Axboe
2002-01-02 18:37                     ` David Brownell
2002-01-02 18:44                       ` Jens Axboe
2002-01-02 18:55                         ` David Brownell
2002-01-02 20:23                           ` Jens Axboe
2002-01-02 22:32                         ` [linux-usb-devel] Re: highmem and usb [was "sr: unalignedtransfer" " Oliver.Neukum
2001-12-24  4:05 ` "sr: unaligned transfer" in 2.5.2-pre1 Bob_Tracy
2001-12-24  7:24   ` Peter Osterlund
2001-12-24 14:13   ` WHICH MACHINE????? Astinus
2001-12-24 15:37     ` Erik Mouw
2001-12-25 15:41       ` Svein Ove Aas
2001-12-26 13:56         ` Erik Mouw
2001-12-24 16:19     ` J.A. Magallon
2001-12-24 22:48   ` "sr: unaligned transfer" in 2.5.2-pre1 Peter Osterlund
2001-12-27  7:13 ` Petr Titera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m23d1trr4w.fsf@pengo.localdomain \
    --to=petero2@telia.com \
    --cc=axboe@suse.de \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=mdharm-usb@one-eyed-alien.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®