/* Returns : 0 on success, non zero on a failure such as a watchdog timeout.  */
static int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, int len)
/* Returns : 0 on success, non zero on a failure such as a watchdog timeout.  */
static int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, int len)
{
    register unsigned char  *d = dst;
    register unsigned short reg = (unsigned short) (instance->io_port + 
	P_DATA_REG_OFFSET);
    register int i = len;
    int ii = 0;
    while ( !(inb(instance->io_port + P_STATUS_REG_OFFSET) & P_ST_RDY) )
	 ++ii;
    insb( reg, d, i );
    if ( inb(instance->io_port + P_TIMEOUT_STATUS_REG_OFFSET) & P_TS_TIM) {
	outb( P_TS_CT, instance->io_port + P_TIMEOUT_STATUS_REG_OFFSET);
	printk("scsi%d : watchdog timer fired in NCR5380_pread()\n",
	    instance->host_no);
	return -1;
    }
   if (ii > pas_maxi)
      pas_maxi = ii;
    return 0;
}