mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH] Re: [OOPS] Linux 2.5 and Parallel Port Zip 100
@ 2002-02-17  1:28 Andries.Brouwer
  0 siblings, 0 replies; 2+ messages in thread
From: Andries.Brouwer @ 2002-02-17  1:28 UTC (permalink / raw)
  To: linux-kernel

I found that booting 2.5.* with a disk in the ZIP drive
causes an immediate crash. Also, that this is fixed by
the patch by Rich Baum from a few days ago.

Andries

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] Re: [OOPS] Linux 2.5 and Parallel Port Zip 100
  2002-02-14 23:49   ` John Weber
@ 2002-02-15  3:21     ` Rich Baum
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Baum @ 2002-02-15  3:21 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Jens Axboe, Tim Waugh

[-- 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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-02-17  1:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-17  1:28 [PATCH] Re: [OOPS] Linux 2.5 and Parallel Port Zip 100 Andries.Brouwer
  -- strict thread matches above, loose matches on Subject: below --
2002-02-07 19:51 John Weber
     [not found] ` <90D37E966D1@coral.indstate.edu>
2002-02-14 23:49   ` John Weber
2002-02-15  3:21     ` [PATCH] " Rich Baum

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®