Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndries E. Brouwer <andries.brouwer@cwi.nl>2002-02-20 20:18:49 -0800
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-02-20 20:18:49 -0800
commit3c45fbb3a37b20d90ad609cda2b33bdd2e15b6a3 (patch)
tree5e27dbe6b20df76ff727a7d1691e8c3d4700e0d8
parentb89ef956f1e7eb8f99be54c0cd4fbd108a4bbd7d (diff)
[PATCH] imm.c
2.5.5 Oopses at boot time with a disk in a zipdrive. With this patch all is fine. I have not read the patch, certainly not checked it for correctness, just observed that it works for me. I think the author is Rich Baum. Andries
-rw-r--r--drivers/scsi/imm.c2
-rw-r--r--drivers/scsi/ppa.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c
index 525544d8a5a6..161cf9799a40 100644
--- a/drivers/scsi/imm.c
+++ b/drivers/scsi/imm.c
@@ -1007,7 +1007,7 @@ static int imm_engine(imm_struct * tmp, Scsi_Cmnd * cmd)
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 --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
index 27fe3de505b5..fdcbca13cf53 100644
--- a/drivers/scsi/ppa.c
+++ b/drivers/scsi/ppa.c
@@ -738,7 +738,7 @@ static int ppa_completion(Scsi_Cmnd * cmd)
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 @@ static int ppa_engine(ppa_struct * tmp, Scsi_Cmnd * cmd)
/* 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 */