linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rich Baum <richbaum@acm.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org, Jens Axboe <axboe@suse.de>,
	Tim Waugh <twaugh@redhat.com>
Subject: [PATCH] Re: [OOPS] Linux 2.5 and Parallel Port Zip 100
Date: Thu, 14 Feb 2002 22:21:13 -0500	[thread overview]
Message-ID: <91EC2F73141@coral.indstate.edu> (raw)
In-Reply-To: <3C62DABF.5040303@nyc.rr.com> <90D37E966D1@coral.indstate.edu> <3C6C4D12.4080701@nyc.rr.com>
In-Reply-To: <3C6C4D12.4080701@nyc.rr.com>

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

The following patch allows parallel port zip drives to work with 2.5 kernels. 
 This patch has been tested with both imm and ppa drives.  Thanks to John 
Weber for testing the ppa part of this patch.

Rich

[-- Attachment #2: rb2.diff --]
[-- Type: text/x-diff, Size: 1701 bytes --]

diff -urN -X dontdiff linux/drivers/scsi/imm.c linux-rb/drivers/scsi/imm.c
--- linux/drivers/scsi/imm.c	Sun Feb 10 16:04:43 2002
+++ linux-rb/drivers/scsi/imm.c	Thu Feb  7 22:22:38 2002
@@ -1007,7 +1007,7 @@
 	    cmd->SCp.this_residual = cmd->request_bufflen;
 	    cmd->SCp.ptr = cmd->request_buffer;
 	}
-	cmd->SCp.buffers_residual = cmd->use_sg;
+	cmd->SCp.buffers_residual = cmd->use_sg - 1;
 	cmd->SCp.phase++;
 	if (cmd->SCp.this_residual & 0x01)
 	    cmd->SCp.this_residual++;
diff -urN -X dontdiff linux/drivers/scsi/ppa.c linux-rb/drivers/scsi/ppa.c
--- linux/drivers/scsi/ppa.c	Sun Feb 10 16:04:44 2002
+++ linux-rb/drivers/scsi/ppa.c	Sun Feb 10 22:36:20 2002
@@ -738,7 +738,7 @@
 	    if (cmd->SCp.buffers_residual--) {
 		cmd->SCp.buffer++;
 		cmd->SCp.this_residual = cmd->SCp.buffer->length;
-		cmd->SCp.ptr = cmd->SCp.buffer->address;
+		cmd->SCp.ptr = page_address(cmd->SCp.buffer->page) + cmd->SCp.buffer->offset;
 	    }
 	}
 	/* Now check to see if the drive is ready to comunicate */
@@ -923,14 +923,14 @@
 	    /* if many buffers are available, start filling the first */
 	    cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer;
 	    cmd->SCp.this_residual = cmd->SCp.buffer->length;
-	    cmd->SCp.ptr = cmd->SCp.buffer->address;
+	    cmd->SCp.ptr = page_address(cmd->SCp.buffer->page) + cmd->SCp.buffer->offset;
 	} else {
 	    /* else fill the only available buffer */
 	    cmd->SCp.buffer = NULL;
 	    cmd->SCp.this_residual = cmd->request_bufflen;
 	    cmd->SCp.ptr = cmd->request_buffer;
 	}
-	cmd->SCp.buffers_residual = cmd->use_sg;
+	cmd->SCp.buffers_residual = cmd->use_sg - 1;
 	cmd->SCp.phase++;
 
     case 5:			/* Phase 5 - Data transfer stage */

  reply	other threads:[~2002-02-15 10:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-07 19:51 [OOPS] Linux 2.5 and Parallel Port Zip 100 John Weber
2002-02-07 19:58 ` Tim Waugh
     [not found] ` <8A8F64D3BD7@coral.indstate.edu>
     [not found]   ` <3C670E0D.2040402@nyc.rr.com>
     [not found]     ` <90D37E966D1@coral.indstate.edu>
2002-02-14 23:49       ` John Weber
2002-02-15  3:21         ` Rich Baum [this message]
2002-02-17  1:28 [PATCH] " Andries.Brouwer

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=91EC2F73141@coral.indstate.edu \
    --to=richbaum@acm.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=twaugh@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).