Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* ppscsi patches
@ 1999-07-03 20:29 Dave Gilbert
  0 siblings, 0 replies; only message in thread
From: Dave Gilbert @ 1999-07-03 20:29 UTC (permalink / raw)
  To: axp-list

Hi,
  I've just got the ppscsi patches (that you need to use if you want
parallel port scanners such as the HP ScanJet 5100C) to work on Alpha.
Below are the patches.

It recognises my scanner and sane scans it - although something is not
fully 100% yet because I'm seeing odd image artifacts - however it is a
start.

The problem I fixed was that ppscsi was using the scsi Host structure
unique_id to hold a pointer - unique_id was only 32 bits.

Good luck,

Dave

--- ppscsi.c	Sat Jul  3 20:42:16 1999
+++ ppscsi.c-orig	Sat Jul  3 20:14:52 1999
@@ -338,7 +338,7 @@
 
 int	ppsc_command(Scsi_Cmnd *cmd)
 
-{	PHA	*pha = (PHA *) cmd->host->hostdata[0];
+{	PHA	*pha = (PHA *) cmd->host->unique_id;
 
         pha->cur_cmd = cmd;
         pha->done = NULL;
@@ -353,7 +353,7 @@
 
 int ppsc_queuecommand(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
 
-{	PHA 	*pha = (PHA *) cmd->host->hostdata[0];
+{	PHA 	*pha = (PHA *) cmd->host->unique_id;
 
 	if (pha->cur_cmd) {
 		printk("%s: Driver is busy\n",pha->device);
@@ -843,7 +843,7 @@
 
 int	ppsc_abort( Scsi_Cmnd * cmd)
 
-{	PHA *pha = (PHA *)cmd->host->hostdata[0];
+{	PHA *pha = (PHA *)cmd->host->unique_id;
 
 	printk("%s: Command abort not supported\n",pha->device);
 	return FAILED;
@@ -868,7 +868,7 @@
 
 int     ppsc_reset( Scsi_Cmnd * cmd)
 
-{       PHA     *pha = (PHA *)cmd->host->hostdata[0];
+{       PHA     *pha = (PHA *)cmd->host->unique_id;
 	int	k = 0;
 
 	if (!pha->proto->reset_bus)
@@ -911,7 +911,7 @@
 
 	while (p && (p->host_no != hostno)) p = p->next;
 	if (!p) return 0;  /* should never happen */
-	pha = (PHA *)p->hostdata[0];
+	pha = (PHA *)p->unique_id;
 
 	if (inout) {
 
@@ -1151,12 +1151,11 @@
 
 	    pha->tmo = PPSC_PROBE_TMO;
 
-	    hreg = scsi_register(tpnt,sizeof(PHA*));
+	    hreg = scsi_register(tpnt,0);
 	    hreg->dma_channel = -1;
 	    hreg->n_io_port = 0;
-	    hreg->unique_id = (int) pha; /* What should we put in here??? */
+	    hreg->unique_id = (int) pha;
 	    hreg->sg_tablesize = s;
-      hreg->hostdata[0]=(unsigned long)pha; /* Will be our pointer */
 
 	    pha->host_ptr = hreg;
 
@@ -1204,7 +1203,7 @@
 
 int ppsc_release(struct Scsi_Host *host)
 
-{	PHA *pha = (PHA *) host->hostdata[0];
+{	PHA *pha = (PHA *) host->unique_id;
 
 	return ppsc_release_pha(pha);
 }

 --------------------------------------------------------------------   
/ Dr. David Alan Gilbert      | Running Linux on           |  Happy  \ 
\   gro.gilbert @ treblig.org |  Alpha, x86, ARM and SPARC |  In Hex /
 ____________________________|___ http://www.treblig.demon.co.uk __/


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-07-03 20:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-07-03 20:29 ppscsi patches Dave Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox