Commit 3c45fbb3 authored by Andries E. Brouwer's avatar Andries E. Brouwer Committed by Linus Torvalds

[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
parent b89ef956
......@@ -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++;
......
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment