fix drivers/scsi/imm.c in 2.5.3pre2

fix drivers/scsi/imm.c in 2.5.3pre2

Post by Rich Bau » Wed, 23 Jan 2002 14:10:06

I've finally got the imm driver to work.  I have based this patch a patch

it works for me.  Please test this and send me any questions or comments you
may have.  If no one has any problems I'll send it to Linus.

Also, I have a longer patch that gets rid of some #includes in imm.c that are
also in imm.h.  I moved them to imm.h.  Let me know if I should post that
patch as well.  It is mainly cosmetic and also works for me.


diff -urN -X dontdiff linux/drivers/scsi/imm.c linux-rb/drivers/scsi/imm.c
--- linux/drivers/scsi/imm.c    Sat Dec  8 23:02:47 2001

     case 4:
        if (cmd->use_sg) {
            /* if many buffers are available, start filling the first */
-           cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer;
+           cmd->SCp.buffer = (struct scatterlist *) cmd->buffer;
            cmd->SCp.this_residual = cmd->SCp.buffer->length;
            cmd->SCp.ptr = page_address(cmd->SCp.buffer->page) +

            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;
        if (cmd->SCp.this_residual & 0x01)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at
Please read the FAQ at