[PATCH] making aha152x.c *really* compile in 2.5.5

From: Michel Eyckmans (MCE) (mce@pi.be)
Date: Fri Feb 22 2002 - 20:55:39 EST


Oops, I posted the wrong version of that patch. This is the one
that actually compiles. Sorry. It obviously is time to go catch
some sleep.

    MCE

=======================================================================
--- drivers/scsi/aha152x.c.old Wed Jan 30 23:15:24 2002
+++ drivers/scsi/aha152x.c Sat Feb 23 02:30:37 2002
@@ -1494,7 +1494,7 @@
            SCp.phase : current state of the command */
         if (SCpnt->use_sg) {
                 SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
- SCpnt->SCp.ptr = SCpnt->SCp.buffer->address;
+ SCpnt->SCp.ptr = page_address(SCpnt->SCp.buffer->page) + SCpnt->SCp.buffer->offset;
                 SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
                 SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
         } else {
@@ -2681,7 +2681,7 @@
                                                /* advance to next buffer */
                                                CURRENT_SC->SCp.buffers_residual--;
                                                CURRENT_SC->SCp.buffer++;
- CURRENT_SC->SCp.ptr = CURRENT_SC->SCp.buffer->address;
+ CURRENT_SC->SCp.ptr = page_address(CURRENT_SC->SCp.buffer->page) + CURRENT_SC->SCp.buffer->offset;
                                                CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length;
                                 }
                         }
@@ -2791,7 +2791,7 @@
                         /* advance to next buffer */
                         CURRENT_SC->SCp.buffers_residual--;
                         CURRENT_SC->SCp.buffer++;
- CURRENT_SC->SCp.ptr = CURRENT_SC->SCp.buffer->address;
+ CURRENT_SC->SCp.ptr = page_address(CURRENT_SC->SCp.buffer->page) + CURRENT_SC->SCp.buffer->offset;
                         CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length;
                 }
 
@@ -2821,13 +2821,13 @@
                 CURRENT_SC->resid += data_count;
 
                 if(CURRENT_SC->use_sg) {
- data_count -= CURRENT_SC->SCp.ptr - CURRENT_SC->SCp.buffer->address;
+ data_count -= CURRENT_SC->SCp.ptr - (char*) (page_address(CURRENT_SC->SCp.buffer->page) + CURRENT_SC->SCp.buffer->offset);
                         while(data_count>0) {
                                 CURRENT_SC->SCp.buffer--;
                                 CURRENT_SC->SCp.buffers_residual++;
                                 data_count -= CURRENT_SC->SCp.buffer->length;
                         }
- CURRENT_SC->SCp.ptr = CURRENT_SC->SCp.buffer->address - data_count;
+ CURRENT_SC->SCp.ptr = page_address(CURRENT_SC->SCp.buffer->page) + CURRENT_SC->SCp.buffer->offset - data_count;
                         CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length + data_count;
                 } else {
                         CURRENT_SC->SCp.ptr -= data_count;

-- 
========================================================================
M. Eyckmans (MCE)          Code of the Geeks v3.1       mce-at-pi-dot-be
GCS d+ s+:- a36 C+++$ UHLUASO+++$ P+ L+++ E--- W++ N+++ !o K w--- !O M--
 V-- PS+ PE+ Y+ PGP- t--- !5 !X R- tv- b+ DI++ D-- G++ e+++ h+(*) !r y?
========================================================================

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:48 EST