ahc_force_neg(ahc);
ahc_isa_attach(parent, self, aux)	struct device *parent, *self;	void *aux;{	struct ahc_softc *ahc = (void *)self;	struct isa_attach_args *ia = aux;	bus_space_tag_t iot = ia->ia_iot;	bus_space_handle_t ioh;	int irq;	char idstring[EISA_IDSTRINGLEN];	const char *model;	u_int intdef;	/* 	 * We really don't allocate our softc, but 	 * we need to do the initialization. And this 	 * also allocates the platform_data structure.	 */	ahc_alloc(ahc, ahc->sc_dev.dv_xname);		ahc_set_name(ahc, ahc->sc_dev.dv_xname);	ahc_set_unit(ahc, ahc->sc_dev.dv_unit);		/* set dma tags */	ahc->parent_dmat = ia->ia_dmat;	ahc->buffer_dmat = ia->ia_dmat;        ahc->shared_data_dmat = ia->ia_dmat;		ahc->chip = AHC_VL; /* We are a VL Bus Controller */  		if (bus_space_map(iot, ia->ia_iobase, ia->ia_iosize, 0, &ioh))		panic("ahc_isa_attach: could not map slot I/O addresses");	if (!ahc_isa_idstring(iot, ioh, idstring))		panic("ahc_isa_attach: could not read ID string");	if ((irq = ahc_isa_irq(iot, ioh)) < 0)		panic("ahc_isa_attach: ahc_isa_irq failed!");	if (strcmp(idstring, "ADP7756") == 0) {		model = EISA_PRODUCT_ADP7756;	} else if (strcmp(idstring, "ADP7757") == 0) {		model = EISA_PRODUCT_ADP7757;	} else {		panic("ahc_isa_attach: Unknown device type %s", idstring);	}	printf(": %s\n", model);		ahc->channel = 'A';	ahc->channel_b = 'B';	ahc->chip = AHC_AIC7770;	ahc->features = AHC_AIC7770_FE;	ahc->bugs |= AHC_TMODE_WIDEODD_BUG;	ahc->flags |= AHC_PAGESCBS;		/* set tag and handle */	ahc->tag = iot;	ahc->bsh = ioh;#ifdef DEBUG	/*	 * Tell the user what type of interrupts we're using.	 * usefull for debugging irq problems	 */	printf( "%s: Using %s Interrupts\n", ahc_name(ahc),	    ahc->pause & IRQMS ?  "Level Sensitive" : "Edge Triggered");#endif	if (ahc_reset(ahc) != 0)		return;		/* See if we are edge triggered */	intdef = ahc_inb(ahc, INTDEF);	if ((intdef & EDGE_TRIG) != 0)		ahc->flags |= AHC_EDGE_INTERRUPT;	/*	 * Now that we know we own the resources we need, do the 	 * card initialization.	 */	aha2840_load_seeprom(ahc);	/*      	 * See if we have a Rev E or higher aic7770. Anything below a	 * Rev E will have a R/O autoflush disable configuration bit.	 * It's still not clear exactly what is differenent about the Rev E.	 * We think it allows 8 bit entries in the QOUTFIFO to support	 * "paging" SCBs so you can have more than 4 commands active at	 * once.	 */     	{		char *id_string;		u_char sblkctl;		u_char sblkctl_orig;		sblkctl_orig = ahc_inb(ahc, SBLKCTL);		sblkctl = sblkctl_orig ^ AUTOFLUSHDIS;		ahc_outb(ahc, SBLKCTL, sblkctl);		sblkctl = ahc_inb(ahc, SBLKCTL);		if(sblkctl != sblkctl_orig)		{			id_string = "aic7770 >= Rev E, ";			/*			 * Ensure autoflush is enabled			 */			sblkctl &= ~AUTOFLUSHDIS;			ahc_outb(ahc, SBLKCTL, sblkctl);			/* Allow paging on this adapter */			ahc->flags |= AHC_PAGESCBS;		}		else			id_string = "aic7770 <= Rev C, ";		printf("%s: %s", ahc_name(ahc), id_string);	}	/* Setup the FIFO threshold and the bus off time */	{		u_char hostconf = ahc_inb(ahc, HOSTCONF);		ahc_outb(ahc, BUSSPD, hostconf & DFTHRSH);		ahc_outb(ahc, BUSTIME, (hostconf << 2) & BOFF);	}	/*	 * Generic aic7xxx initialization.	 */	if(ahc_init(ahc)){		ahc_free(ahc);		return;	}		/* Special func to force negotiation */	ahc_force_neg(ahc);		/*	 * Link this softc in with all other ahc instances.	 */	ahc_softc_insert(ahc);	/*	 * Enable the board's BUS drivers	 */	ahc_outb(ahc, BCTL, ENABLE);	/*	 * The IRQMS bit enables level sensitive interrupts only allow	 * IRQ sharing if its set.	 */	ahc->platform_data->ih = isa_intr_establish(ia->ia_ic, irq,	    ahc->pause & IRQMS ? IST_LEVEL : IST_EDGE, IPL_BIO, ahc_platform_intr,	    ahc, ahc->sc_dev.dv_xname);	if (ahc->platform_data->ih == NULL) {		printf("%s: couldn't establish interrupt\n",		       ahc->sc_dev.dv_xname);		ahc_free(ahc);		return;	}	ahc_intr_enable(ahc, TRUE);		/* Attach sub-devices - always succeeds */	ahc_attach(ahc);}