From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 3636 invoked from network); 3 Jul 1999 20:34:45 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 3 Jul 1999 20:34:45 -0000 Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net [194.217.242.20]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id QAA26939 for ; Sat, 3 Jul 1999 16:33:01 -0400 Received: from treblig.demon.co.uk ([194.222.210.232] helo=tardis) by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2) id 110WT5-0007Xx-0K for axp-list@redhat.com; Sat, 3 Jul 1999 20:33:00 +0000 Date: Sat, 3 Jul 1999 21:29:03 +0100 (BST) From: Dave Gilbert X-Sender: gilbertd@tardis.home.dave To: axp-list@redhat.com Subject: ppscsi patches Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 __/