From f15e7210a1d3236792cc40eedf50e2a4c41c344e Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Wed, 21 Jul 2004 07:48:05 +0000 Subject: from netbsd, umass.c 1.104 Do the quirk initialization earlier. ok krw@ --- sys/dev/usb/umass.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sys/dev/usb') diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index 94d982d1c2e..734cff93434 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass.c,v 1.30 2004/07/21 07:46:55 dlg Exp $ */ +/* $OpenBSD: umass.c,v 1.31 2004/07/21 07:48:04 dlg Exp $ */ /* $NetBSD: umass.c,v 1.98 2003/09/08 19:30:59 mycroft Exp $ */ /*- * Copyright (c) 1999 MAEKAWA Masahide , @@ -385,6 +385,14 @@ USB_ATTACH(umass) printf("%s: using %s over %s\n", USBDEVNAME(sc->sc_dev), sCommand, sWire); + if (quirk != NULL && quirk->uq_init != NULL) { + err = (*quirk->uq_init)(sc); + if (err) { + umass_disco(sc); + USB_ATTACH_ERROR_RETURN; + } + } + /* * In addition to the Control endpoint the following endpoints * are required: @@ -548,14 +556,6 @@ USB_ATTACH(umass) USB_ATTACH_ERROR_RETURN; } - if (quirk != NULL && quirk->uq_init != NULL) { - err = (*quirk->uq_init)(sc); - if (err) { - umass_disco(sc); - USB_ATTACH_ERROR_RETURN; - } - } - error = 0; switch (sc->sc_cmd) { case UMASS_CPROTO_RBC: -- cgit v1.2.3