From: Dave Gilbert <gilbertd@treblig.org>
To: axp-list@redhat.com
Subject: ppscsi patches
Date: Sat, 3 Jul 1999 21:29:03 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.10.9907032126590.7174-100000@tardis.home.dave> (raw)
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 __/
reply other threads:[~1999-07-03 20:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox