targ = ahc_linux_alloc_target(ahc, starget->channel, starget->id); struct seeprom_config *sc = ahc->seep_config; 
struct seeprom_config *sc;  targ = ahc_linux_alloc_target(ahc, starget->channel, starget->id); sc = ahc->seep_config; 
ahc_linux_slave_alloc(struct scsi_device *device){	struct	ahc_softc *ahc;	struct ahc_linux_target *targ;	struct scsi_target *starget = device->sdev_target;	struct ahc_linux_device *dev;	unsigned int target_offset;	unsigned long flags;	int retval = -ENOMEM;	target_offset = starget->id;	if (starget->channel != 0)		target_offset += 8;	ahc = *((struct ahc_softc **)device->host->hostdata);	if (bootverbose)		printf("%s: Slave Alloc %d\n", ahc_name(ahc), device->id);	ahc_lock(ahc, &flags);	targ = ahc->platform_data->targets[target_offset];	if (targ == NULL) {		targ = ahc_linux_alloc_target(ahc, starget->channel, starget->id);		struct seeprom_config *sc = ahc->seep_config;		if (targ == NULL)			goto out;		if (sc) {			unsigned short scsirate;			struct ahc_devinfo devinfo;			struct ahc_initiator_tinfo *tinfo;			struct ahc_tmode_tstate *tstate;			char channel = starget->channel + 'A';			unsigned int our_id = ahc->our_id;			if (starget->channel)				our_id = ahc->our_id_b;			if ((ahc->features & AHC_ULTRA2) != 0) {				scsirate = sc->device_flags[target_offset] & CFXFER;			} else {				scsirate = (sc->device_flags[target_offset] & CFXFER) << 4;				if (sc->device_flags[target_offset] & CFSYNCH)					scsirate |= SOFS;			}			if (sc->device_flags[target_offset] & CFWIDEB) {				scsirate |= WIDEXFER;				spi_max_width(starget) = 1;			} else				spi_max_width(starget) = 0;			spi_min_period(starget) = 				ahc_find_period(ahc, scsirate, AHC_SYNCRATE_DT);			tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id,						    targ->target, &tstate);			ahc_compile_devinfo(&devinfo, our_id, targ->target,					    CAM_LUN_WILDCARD, channel,					    ROLE_INITIATOR);			ahc_set_syncrate(ahc, &devinfo, NULL, 0, 0, 0,					 AHC_TRANS_GOAL, /*paused*/FALSE);			ahc_set_width(ahc, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,				      AHC_TRANS_GOAL, /*paused*/FALSE);		}				}	dev = targ->devices[device->lun];	if (dev == NULL) {		dev = ahc_linux_alloc_device(ahc, targ, device->lun);		if (dev == NULL)			goto out;	}	retval = 0; out:	ahc_unlock(ahc, &flags);	return retval;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d981289627a7e2d8ef62dfcaa11fb60da68f30c6/aic7xxx_osm.c/clean/drivers/scsi/aic7xxx/aic7xxx_osm.c