rv = 1;
rv = 0; }
sti_sgc_probe(parent, match, aux)	struct device *parent;	void *match, *aux;{	register struct confargs *ca = aux;	bus_space_handle_t ioh, romh;	u_int rom;	u_char devtype;	int rv = 0, romunmapped = 0;	if (ca->ca_type.iodc_type != HPPA_TYPE_FIO ||	    (ca->ca_type.iodc_sv_model != HPPA_FIO_GSGC &&	     ca->ca_type.iodc_sv_model != HPPA_FIO_SGC))		return 0;	if ((rv = bus_space_map(ca->ca_iot, ca->ca_hpa, STI_MEMSIZE, 0, &ioh))) {#ifdef STIDEBUG		printf("st: cannot map io space (%d)\n", rv);#endif		return 0;	}	/*	 * Locate STI ROM.	 * On some machines it may not be part of the HPA space.	 */	if (PAGE0->pd_resv2[1] < HPPA_IOBEGIN) {		rom = ca->ca_hpa;		romh = ioh;		romunmapped++;	} else		rom = PAGE0->pd_resv2[1];#ifdef STIDEBUG	printf ("sti: hpa=%x, rom=%x\n", ca->ca_hpa, rom);#endif	/* if it does not map, probably part of the lasi space */	if (rom != ca->ca_hpa &&	    (rv = bus_space_map(ca->ca_iot, rom, IOMOD_HPASIZE, 0, &romh))) {#ifdef STIDEBUG		printf ("sti: cannot map rom space (%d)\n", rv);#endif		if ((rom & HPPA_IOBEGIN) == HPPA_IOBEGIN) {			romh = rom;			romunmapped++;		} else {			/* in this case i have no freaking idea */			bus_space_unmap(ca->ca_iot, ioh,  STI_MEMSIZE);			return 0;		}	}#ifdef STIDEBUG	printf("sti: ioh=%x, romh=%x\n", ioh, romh);#endif	devtype = bus_space_read_1(ca->ca_iot, romh, 3);#ifdef STIDEBUG	printf("sti: devtype=%d\n", devtype);#endif#if 0 /* ignore this for now */	if ((ca->ca_type.iodc_sv_model == HPPA_FIO_SGC &&	     STI_ID_HI(STI_TYPE_BWGRF, rioh) == STI_ID_FDDI) ||	    (devtype != STI_TYPE_BWGRF && devtype != STI_TYPE_WWGRF)) {#ifdef STIDEBUG		printf("sti: not a graphics device (%x)\n", devtype);#endif	} else#endif		rv = 1;	bus_space_unmap(ca->ca_iot, ioh,  STI_MEMSIZE);	if (!romunmapped)		bus_space_unmap(ca->ca_iot, romh, IOMOD_HPASIZE);	return rv;}