Skip to contentSkip to conversation

Linux 2.5 and Parallel Port Zip 100

OOPS John Weber 3 participants 4 messages Feb 7, 2002 – Feb 15, 2002 SCSI

lore
Share & tools
lore

John Weber

author
#0 lore raw

Loading the ppa module causes a kernel oops... apparently it causes some trouble for the interrupt handler. It is a bit difficult to provide the
oops here since it freezes the entire machine, but I will try to break
my test box with this later today.

I am running 2.5 on an Intel PIII.

Affected kernels:
Linux 2.5.4-pre2 (and probably 2.5.3 and 2.5.4-pre1 since these both
have Evgeniy Polyakov's updates to "various SCSI drivers to new locking" which includes ppa.c)

Who is maintaining the linux iomega stuff?

#1 lore raw
Quoted 1 line · John Weber

Who is maintaining the linux iomega stuff?

For 2.4.x, me (in theory). I don't have time for 2.5.x at the moment.

Tim.
*/

author
#2 lore raw
In reply to John Weber
Quoted 7 lines

I was wondering if you had received my patch. I had mail problems on Monday and lost messages.

Rich

I did try out the patch.

The first time I used the driver there was major damage to the fs on one of my zip disks (so the "mv bigassfile /mnt/zip/" failed miserably), but I couldn't be sure that the driver was the root cause so I didn't email you about it.

Thereafter, I tried mounting/unmounting, writing new filesystems, writing/reading large files... everything checked out fine.

You should definitely forward your patch to LKML and Linus.

#3 lore raw
In reply to John Weber

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

drivers/scsi/imm.c +1 -1
diff -urN -X dontdiff linux/drivers/scsi/imm.c linux-rb/drivers/scsi/imm.c
@@ -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++;
drivers/scsi/ppa.c +3 -3
diff -urN -X dontdiff linux/drivers/scsi/ppa.c linux-rb/drivers/scsi/ppa.c
@@ -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 */