#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) TAILQ_FOREACH(ahd, &ahd_tailq, links) { if (ahd->platform_data->host->host_no == hostno) break; } #else 
ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start,		    off_t offset, int length, int inout)#endif{	struct	ahd_softc *ahd;	struct	info_str info;	char	ahd_info[256];	u_long	l;	u_int	max_targ;	u_int	i;	int	retval;	retval = -EINVAL;	ahd_list_lock(&l);#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)	TAILQ_FOREACH(ahd, &ahd_tailq, links) {		if (ahd->platform_data->host->host_no == hostno)			break;	}#else	ahd = ahd_find_softc(*(struct ahd_softc **)shost->hostdata);#endif	if (ahd == NULL)		goto done;	 /* Has data been written to the file? */ 	if (inout == TRUE) {		retval = ahd_proc_write_seeprom(ahd, buffer, length);		goto done;	}	if (start)		*start = buffer;	info.buffer	= buffer;	info.length	= length;	info.offset	= offset;	info.pos	= 0;	copy_info(&info, "Adaptec AIC79xx driver version: %s\n",		  AIC79XX_DRIVER_VERSION);	copy_info(&info, "%s\n", ahd->description);	ahd_controller_info(ahd, ahd_info);	copy_info(&info, "%s\n", ahd_info);	copy_info(&info, "Allocated SCBs: %d, SG List Length: %d\n\n",		  ahd->scb_data.numscbs, AHD_NSEG);	max_targ = 15;	if (ahd->seep_config == NULL)		copy_info(&info, "No Serial EEPROM\n");	else {		copy_info(&info, "Serial EEPROM:\n");		for (i = 0; i < sizeof(*ahd->seep_config)/2; i++) {			if (((i % 8) == 0) && (i != 0)) {				copy_info(&info, "\n");			}			copy_info(&info, "0x%.4x ",				  ((uint16_t*)ahd->seep_config)[i]);		}		copy_info(&info, "\n");	}	copy_info(&info, "\n");	if ((ahd->features & AHD_WIDE) == 0)		max_targ = 7;	for (i = 0; i <= max_targ; i++) {		ahd_dump_target_state(ahd, &info, ahd->our_id, 'A',				      /*target_id*/i, /*target_offset*/i);	}	retval = info.pos > info.offset ? info.pos - info.offset : 0;done:	ahd_list_unlock(&l);	return (retval);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/60a13213840296b1e32d6781653a0eaa83d04382/aic79xx_proc.c/buggy/drivers/scsi/aic7xxx/aic79xx_proc.c