Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / drivers / scsi / sun3_NCR5380.c
index 9081139..2f8073b 100644 (file)
@@ -69,6 +69,8 @@
  *   finally replaced that by the *_PRINTK() macros.
  *
  */
+#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_transport_spi.h>
 
 /*
  * Further development / testing that should be done : 
  */
 
 static struct Scsi_Host *first_instance = NULL;
-static Scsi_Host_Template *the_template = NULL;
+static struct scsi_host_template *the_template = NULL;
 
 /* Macros ease life... :-) */
 #define        SETUP_HOSTDATA(in)                              \
@@ -515,7 +517,7 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd)
      */
 
     if (cmd->use_sg) {
-       cmd->SCp.buffer = (struct scatterlist *) cmd->buffer;
+       cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer;
        cmd->SCp.buffers_residual = cmd->use_sg - 1;
        cmd->SCp.ptr = (char *) SGADDR(cmd->SCp.buffer);
        cmd->SCp.this_residual = cmd->SCp.buffer->length;
@@ -533,7 +535,6 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd)
     
 }
 
-#include <linux/config.h>
 #include <linux/delay.h>
 
 #if 1
@@ -2377,7 +2378,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
  * 3..length+1 arguments
  *
  * Start the extended message buffer with the EXTENDED_MESSAGE
- * byte, since print_msg() wants the whole thing.  
+ * byte, since spi_print_msg() wants the whole thing.  
  */
                    extended_msg[0] = EXTENDED_MESSAGE;
                    /* Accept first byte by clearing ACK */
@@ -2430,7 +2431,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
                default:
                    if (!tmp) {
                        printk(KERN_DEBUG "scsi%d: rejecting message ", HOSTNO);
-                       print_msg (extended_msg);
+                       spi_print_msg(extended_msg);
                        printk("\n");
                    } else if (tmp != EXTENDED_MESSAGE)
                        printk(KERN_DEBUG "scsi%d: rejecting unknown "
@@ -2565,7 +2566,7 @@ static void NCR5380_reselect (struct Scsi_Host *instance)
 
     if (!(msg[0] & 0x80)) {
        printk(KERN_DEBUG "scsi%d: expecting IDENTIFY message, got ", HOSTNO);
-       print_msg(msg);
+       spi_print_msg(msg);
        do_abort(instance);
        return;
     }
@@ -2691,7 +2692,7 @@ static int NCR5380_abort (Scsi_Cmnd *cmd)
     unsigned long flags;
 
     printk(KERN_NOTICE "scsi%d: aborting command\n", HOSTNO);
-    print_Scsi_Cmnd (cmd);
+    scsi_print_command(cmd);
 
     NCR5380_print_status (instance);