]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/arm/scsi.h
eeprom_93cx6: shorten pulse timing to match spec (bis)
[linux-2.6-omap-h63xx.git] / drivers / scsi / arm / scsi.h
index 19937640e2e793da93b15046cb9f06ac0f7d127c..21ba57155beacd1617440b4e9b0506c708f72d01 100644 (file)
@@ -18,7 +18,7 @@
  * The scatter-gather list handling.  This contains all
  * the yucky stuff that needs to be fixed properly.
  */
-static inline int copy_SCp_to_sg(struct scatterlist *sg, Scsi_Pointer *SCp, int max)
+static inline int copy_SCp_to_sg(struct scatterlist *sg, struct scsi_pointer *SCp, int max)
 {
        int bufs = SCp->buffers_residual;
 
@@ -32,7 +32,7 @@ static inline int copy_SCp_to_sg(struct scatterlist *sg, Scsi_Pointer *SCp, int
        return bufs + 1;
 }
 
-static inline int next_SCp(Scsi_Pointer *SCp)
+static inline int next_SCp(struct scsi_pointer *SCp)
 {
        int ret = SCp->buffers_residual;
        if (ret) {
@@ -49,7 +49,7 @@ static inline int next_SCp(Scsi_Pointer *SCp)
        return ret;
 }
 
-static inline unsigned char get_next_SCp_byte(Scsi_Pointer *SCp)
+static inline unsigned char get_next_SCp_byte(struct scsi_pointer *SCp)
 {
        char c = *SCp->ptr;
 
@@ -59,14 +59,14 @@ static inline unsigned char get_next_SCp_byte(Scsi_Pointer *SCp)
        return c;
 }
 
-static inline void put_next_SCp_byte(Scsi_Pointer *SCp, unsigned char c)
+static inline void put_next_SCp_byte(struct scsi_pointer *SCp, unsigned char c)
 {
        *SCp->ptr = c;
        SCp->ptr += 1;
        SCp->this_residual -= 1;
 }
 
-static inline void init_SCp(Scsi_Cmnd *SCpnt)
+static inline void init_SCp(struct scsi_cmnd *SCpnt)
 {
        memset(&SCpnt->SCp, 0, sizeof(struct scsi_pointer));
 
@@ -74,12 +74,13 @@ static inline void init_SCp(Scsi_Cmnd *SCpnt)
                unsigned long len = 0;
                int buf;
 
-               SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->buffer;
+               SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
                SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
                SCpnt->SCp.ptr = (char *)
                         (page_address(SCpnt->SCp.buffer->page) +
                          SCpnt->SCp.buffer->offset);
                SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
+               SCpnt->SCp.phase = SCpnt->request_bufflen;
 
 #ifdef BELT_AND_BRACES
                /*
@@ -98,6 +99,7 @@ static inline void init_SCp(Scsi_Cmnd *SCpnt)
        } else {
                SCpnt->SCp.ptr = (unsigned char *)SCpnt->request_buffer;
                SCpnt->SCp.this_residual = SCpnt->request_bufflen;
+               SCpnt->SCp.phase = SCpnt->request_bufflen;
        }
 
        /*