---
 drivers/scsi/Makefile  |    2 +-
 drivers/scsi/ppscsi.c  |   22 ++++++++++++----------
 drivers/scsi/ppscsi.h  |   34 ++++++++++++++++++----------------
 drivers/scsi/sparcsi.c |    6 +++---
 4 files changed, 34 insertions(+), 30 deletions(-)

--- a/drivers/scsi/ppscsi.c
+++ b/drivers/scsi/ppscsi.c
@@ -57,6 +57,7 @@
 #include <linux/string.h>
 #include <linux/spinlock.h>
 #include <linux/ioport.h>
+#include <linux/workqueue.h>
 
 #include <linux/parport.h>
 
@@ -95,7 +96,8 @@ static void ppsc_attach (struct parport 
 		return;
 	}
 
-	add->port = parport_get_port (port);
+	atomic_inc(&port->ref_count);
+	add->port = port;
 	add->next = ppsc_port_list;
 	wmb ();
 	ppsc_port_list = add;
@@ -187,11 +189,11 @@ static void ppsc_set_intr (PHA *pha, voi
 	spin_unlock_irqrestore(&ppsc_spinlock,flags);
 }
 
-static void ppsc_tq_int (void *data)
+static void ppsc_tq_int (struct work_struct *work)
 {
 	void (*con)(PHA *);
 	unsigned long flags;
-	PHA *pha = (PHA *)data;
+	PHA *pha = container_of(work, PHA, wq);
 
 	spin_lock_irqsave(&ppsc_spinlock,flags);
 
@@ -377,7 +379,7 @@ int ppsc_command (struct scsi_cmnd *cmd)
 
 	ppsc_do_claimed(pha,ppsc_start);
 
-	while (pha->cur_cmd) scsi_sleep(1);
+	while (pha->cur_cmd) ssleep(1);
 
 	return cmd->result;
 }
@@ -886,7 +888,7 @@ static void ppsc_reset_pha (PHA *pha)
 	ppsc_claim(pha);
 	pha->proto->connect(pha);
 	pha->proto->reset_bus(pha);
-	scsi_sleep(4*HZ);
+	ssleep(4*HZ);
 	pha->proto->disconnect(pha);
 	ppsc_unclaim(pha);
 
@@ -905,7 +907,7 @@ int ppsc_reset (struct scsi_cmnd * cmd)
 		pha->abort_flag = PPSC_DO_RESET;
 
 	while (pha->cur_cmd && (k < PPSC_RESET_TMO)) {
-		scsi_sleep(HZ/10);
+		ssleep(HZ/10);
 		k += HZ/10;
 	}
 
@@ -992,11 +994,11 @@ int ppsc_biosparam (struct scsi_device *
 {
 	ip[0] = 0x40;
 	ip[1] = 0x20;
-	ip[2] = (capacity +1) / (ip[0] * ip[1]);
+	ip[2] = (unsigned int)(capacity +1) >> 11;
 	if (ip[2] > 1024) {
 		ip[0] = 0xff;
 		ip[1] = 0x3f;
-		ip[2] = (capacity +1) / (ip[0] * ip[1]);
+		ip[2] = (unsigned int)(capacity +1) / (0xff * 0x3f);
 		if (ip[2] > 1023)
 			ip[2] = 1023;
 	}
@@ -1084,7 +1086,7 @@ int ppsc_release_pha (PHA *pha)
 }
 
 
-int ppsc_detect (PSP *proto, Scsi_Host_Template *tpnt, int verbose)
+int ppsc_detect (PSP *proto, struct scsi_host_template *tpnt, int verbose)
 {
 	int i, m, p, d, n, s, z;
 	struct ppsc_port_list_struct *next_port = NULL; /* shut gcc up */
@@ -1146,7 +1148,7 @@ int ppsc_detect (PSP *proto, Scsi_Host_T
 		pha->device[p+1] = '0' + i;
 		pha->device[p+2] = 0;
 
-		INIT_WORK(&pha->wq, ppsc_tq_int, pha);
+		INIT_WORK(&pha->wq, ppsc_tq_int);
 
 		init_timer (&pha->timer);
 		pha->timer.data = (unsigned long) pha;
--- a/drivers/scsi/sparcsi.c
+++ b/drivers/scsi/sparcsi.c
@@ -165,7 +165,7 @@ static int sparcsi_test_proto (PHA *pha)
 
 		WR(1,0x80); udelay(60);
 		WR(1,0);
-		scsi_sleep(5*HZ);
+		ssleep(5*HZ);
 		pha->private[0] = 1;
 	}
 
@@ -363,14 +363,14 @@ static struct ppsc_protocol sparcsi_psp 
 	sparcsi_reset_bus
 };
 
-int sparcsi_detect (Scsi_Host_Template *tpnt)
+int sparcsi_detect (struct scsi_host_template *tpnt)
 {
 	return ppsc_detect( &sparcsi_psp, tpnt, verbose);
 }
 
 #ifdef MODULE
 
-Scsi_Host_Template	driver_template = PPSC_TEMPLATE(sparcsi);
+struct scsi_host_template	driver_template = PPSC_TEMPLATE(sparcsi);
 
 #include "scsi_module.c"
 
--- a/drivers/scsi/ppscsi.h
+++ b/drivers/scsi/ppscsi.h
@@ -13,14 +13,16 @@
 #define	PPSC_H_VERSION	"0.92"
 
 #include <linux/module.h>
-#include <linux/config.h>
+#include <linux/version.h>
 #include <linux/stddef.h>
 #include <linux/types.h>
 #include <asm/io.h>
 #include <linux/blkdev.h>
 
-#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
 
 
 /* ppscsi global functions */
@@ -40,31 +42,31 @@ extern int ppsc_release(struct Scsi_Host
 /* imports for hosts.c */
 
 #ifdef CONFIG_PPSCSI_T348
-extern int t348_detect( Scsi_Host_Template *);
+extern int t348_detect( struct scsi_host_template *);
 #endif
 
 #ifdef CONFIG_PPSCSI_T358
-extern int t358_detect( Scsi_Host_Template *);
+extern int t358_detect( struct scsi_host_template *);
 #endif
 
 #ifdef CONFIG_PPSCSI_ONSCSI
-extern int onscsi_detect( Scsi_Host_Template *);
+extern int onscsi_detect( struct scsi_host_template *);
 #endif
 
 #ifdef CONFIG_PPSCSI_EPST
-extern int epst_detect( Scsi_Host_Template *);
+extern int epst_detect( struct scsi_host_template *);
 #endif
 
 #ifdef CONFIG_PPSCSI_EPSA2
-extern int epsa2_detect( Scsi_Host_Template *);
+extern int epsa2_detect( struct scsi_host_template *);
 #endif
 
 #ifdef CONFIG_PPSCSI_VPI0
-extern int vpi0_detect( Scsi_Host_Template *);
+extern int vpi0_detect( struct scsi_host_template *);
 #endif
 
 #ifdef CONFIG_PPSCSI_SPARCSI
-extern int sparcsi_detect( Scsi_Host_Template *);
+extern int sparcsi_detect( struct scsi_host_template *);
 #endif
 
 #endif
@@ -303,7 +305,7 @@ struct ppsc_protocol {
 
 typedef struct ppsc_protocol PSP;
 
-extern int ppsc_detect( PSP *, Scsi_Host_Template *, int);
+extern int ppsc_detect( PSP *, struct scsi_host_template *, int);
 
 #ifdef PPSC_HA_MODULE
 
@@ -322,11 +324,11 @@ static STT stt[4] = { {"host0",8,host0},
 		      {"host3",8,host3} };
 #endif
 
-MODULE_PARM(host0,"1-8i");
-MODULE_PARM(host1,"1-8i");
-MODULE_PARM(host2,"1-8i");
-MODULE_PARM(host3,"1-8i");
-MODULE_PARM(verbose,"i");
+module_param_array(host0, int, NULL, 0);
+module_param_array(host1, int, NULL, 0);
+module_param_array(host2, int, NULL, 0);
+module_param_array(host3, int, NULL, 0);
+module_param(verbose, int, 0);
 
 static struct ppsc_host_adapter host_structs[4];
 
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -136,7 +136,7 @@ obj-$(CONFIG_PPSCSI_ONSCSI)	+= onscsi.o
 obj-$(CONFIG_PPSCSI_EPSA2)	+= epsa2.o
 obj-$(CONFIG_PPSCSI_EPST)	+= epst.o
 obj-$(CONFIG_PPSCSI_VPI0)	+= vpi0.o
-obj-$(CONFIG_PPSCSI_VPI2)	+= vpi2.o
+obj-n				+= vpi2.o
 obj-$(CONFIG_PPSCSI_SPARCSI)	+= sparcsi.o
 
 obj-$(CONFIG_CHR_DEV_ST)	+= st.o
