summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2004-07-21 07:48:05 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2004-07-21 07:48:05 +0000
commitf15e7210a1d3236792cc40eedf50e2a4c41c344e (patch)
treecd0edbb7b87575ea098a45dab855d37d94ebe601
parentc6a09768ac0ec3676bb5ab6b937e0b076ceb4635 (diff)
from netbsd, umass.c 1.104
Do the quirk initialization earlier. ok krw@
-rw-r--r--sys/dev/usb/umass.c18
1 files changed, 9 insertions, 9 deletions
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 <bishop@rr.iij4u.or.jp>,
@@ -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: