Esempio n. 1
0
static int
ssmatch(device_t parent, cfdata_t match, void *aux)
{
	struct scsipibus_attach_args *sa = aux;
	int priority;

	(void)scsipi_inqmatch(&sa->sa_inqbuf,
	    ss_patterns, sizeof(ss_patterns) / sizeof(ss_patterns[0]),
	    sizeof(ss_patterns[0]), &priority);
	return priority;
}
Esempio n. 2
0
static void
ch_get_quirks(struct ch_softc *sc, struct scsipi_inquiry_pattern *inqbuf)
{
	const struct chquirk *match;
	int priority;

	sc->sc_settledelay = 0;

	match = scsipi_inqmatch(inqbuf, chquirks,
	    sizeof(chquirks) / sizeof(chquirks[0]),
	    sizeof(chquirks[0]), &priority);
	if (priority != 0)
		sc->sc_settledelay = match->cq_settledelay;
}
Esempio n. 3
0
static int
st_scsibus_match(struct device *parent, struct cfdata *match,
    void *aux)
{
	struct scsipibus_attach_args *sa = aux;
	int priority;

	if (scsipi_periph_bustype(sa->sa_periph) != SCSIPI_BUSTYPE_SCSI)
		return (0);

	(void)scsipi_inqmatch(&sa->sa_inqbuf,
	    st_scsibus_patterns,
	    sizeof(st_scsibus_patterns)/sizeof(st_scsibus_patterns[0]),
	    sizeof(st_scsibus_patterns[0]), &priority);
	return (priority);
}