]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/arm/scsi.h
[SCSI] scsi_transport_sas; fix user_scan
[linux-2.6-omap-h63xx.git] / drivers / scsi / arm / scsi.h
index 2f1b3f4bf954de455ff7bb23c6d93790d0a8f7d5..6dd544a5eb56a207f9918f33c1d20ce00e0cd7bd 100644 (file)
  *  Commonly used scsi driver functions.
  */
 
+#include <linux/scatterlist.h>
+
 #define BELT_AND_BRACES
 
 /*
  * 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;
 
        BUG_ON(bufs + 1 > max);
 
-       sg->page   = virt_to_page(SCp->ptr);
-       sg->offset = offset_in_page(SCp->ptr);
-       sg->length = SCp->this_residual;
+       sg_set_buf(sg, SCp->ptr, SCp->this_residual);
 
        if (bufs)
                memcpy(sg + 1, SCp->buffer + 1,
@@ -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,7 +59,7 @@ 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;
@@ -108,7 +108,7 @@ static inline void init_SCp(Scsi_Cmnd *SCpnt)
 #if 0 //def BELT_AND_BRACES
                printk(KERN_WARNING "scsi%d.%c: zero length buffer passed for "
                       "command ", SCpnt->host->host_no, '0' + SCpnt->target);
-               print_command(SCpnt->cmnd);
+               __scsi_print_command(SCpnt->cmnd);
 #endif
                SCpnt->SCp.ptr = NULL;
        }