summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNathan Binkert <nate@cvs.openbsd.org>2003-05-19 00:35:44 +0000
committerNathan Binkert <nate@cvs.openbsd.org>2003-05-19 00:35:44 +0000
commit50b56d53910f002c51fdbf0b763f30eef6b66d52 (patch)
tree28fce51a07c5715b1dfa49b9f70440bc261414cb /sys
parent5ec01df94c55c3e62f172c7b1ef42042bd0aa7e7 (diff)
don't use 1284 mode
When detaching a ulpt device, call vdevgone() for the corresponding NOPRIME minor device too. from NetBSD
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/ulpt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c
index 21e047416bd..c95c49787ff 100644
--- a/sys/dev/usb/ulpt.c
+++ b/sys/dev/usb/ulpt.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: ulpt.c,v 1.16 2003/05/07 04:33:33 deraadt Exp $ */
-/* $NetBSD: ulpt.c,v 1.55 2002/10/23 09:14:01 jdolecek Exp $ */
+/* $OpenBSD: ulpt.c,v 1.17 2003/05/19 00:35:43 nate Exp $ */
+/* $NetBSD: ulpt.c,v 1.57 2003/01/05 10:19:42 scw Exp $ */
/* $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.24 1999/11/17 22:33:44 n_hibma Exp $ */
/*
@@ -242,8 +242,8 @@ USB_ATTACH(ulpt)
id->bInterfaceNumber == ifcd->bInterfaceNumber) {
if (id->bInterfaceClass == UICLASS_PRINTER &&
id->bInterfaceSubClass == UISUBCLASS_PRINTER &&
- (id->bInterfaceProtocol == UIPROTO_PRINTER_BI ||
- id->bInterfaceProtocol == UIPROTO_PRINTER_1284))
+ (id->bInterfaceProtocol == UIPROTO_PRINTER_BI /*||
+ id->bInterfaceProtocol == UIPROTO_PRINTER_1284*/))
goto found;
altno++;
}
@@ -410,6 +410,7 @@ USB_DETACH(ulpt)
/* Nuke the vnodes for any open instances (calls close). */
mn = self->dv_unit;
vdevgone(maj, mn, mn, VCHR);
+ vdevgone(maj, mn | ULPT_NOPRIME , mn | ULPT_NOPRIME, VCHR);
#elif defined(__FreeBSD__)
vp = SLIST_FIRST(&sc->dev->si_hlist);
if (vp)