grant@torque.net
Tue, 16 Jun 1998 08:13:29 -0400 (EDT)
After a week of silence, I've got a flood of very useful messages concerning
pg and cdrecord. I believe that most of the problems have now been identified
and fixed.
> pg0: HP CD-Writer+ 7200, slave
>
> to load it I had to change PG_TMO to 100.
Actually, PG_TMO should be == HZ (which is == 100) but the timeout in
pg_reset should be more like 10*HZ. I will define a new constant for
that.
Other minor problems:
- PI_PG is not defined in the pg-beta patch kit, but is if you use
2.1.106. PI_PG should be defined to 4 in paride.h
- There's an Ugh when you load pg - and probably the other paride
high level drivers - on some systems. The temporary patch for this
is to comment out the two "cli()" calls in the module initialisation
code - they are paranoid programming only. I will find the correct
patch ASAP.
- The macro MAX may not be defined in your header files when you go
to build scsi-linux-pg.c - Joerg's makefiles rather hide the cause,
too. If necessary, put
#define MAX(a,b) ((a)>(b)?(a):(b))
just before MAX is used in scsi-linux-pg.c.
And there is one more serious bug that shows up when you do a write on
the HP 7xxx drives.
> Blocks total: 333750 Blocks remaining: 333750
> resid: 48
> cdrecord: Timer expired. Cannot send SCSI cmd via ioctl
To fix this you need to make some changes in pg.c in the pg_completion
function. It should read:
static int pg_completion( int unit, char * buf, int tmo)
{ int r, d, n, p;
r = pg_wait(unit,STAT_BUSY,STAT_DRQ|STAT_READY|STAT_ERR,
tmo,"completion");
PG.dlen = 0;
while (RR(0,7)&STAT_DRQ) {
d = (RR(0,4)+256*RR(0,5));
n = ((d+3)&0xfffc);
p = RR(0,2)&3;
if (p == 0) pi_write_block(PI,buf,n);
if (p == 2) pi_read_block(PI,buf,n);
if (verbose > 1) printk("%s: %s %d bytes\n",PG.name,
p?"Read":"Write",n);
PG.dlen += (1-p)*d;
buf += d;
r = pg_wait(unit,STAT_BUSY,STAT_DRQ|STAT_READY|STAT_ERR,
tmo,"completion");
}
pi_disconnect(PI);
return r;
}
Basically, this puts a loop back that used to be in a different
function that got eliminated :-(
I'm going to submit the kernel patches to repair these things and
do a new pg_beta.tar as soon as I can, but that might not be today.
--------------------------------------------------------------------------
Grant R. Guenther grant@torque.net
--------------------------------------------------------------------------
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:17:51 EST