Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Some updates for FreeBSD.
details: https://anonhg.NetBSD.org/src/rev/43c9277d05ef
branches: trunk
changeset: 522076:43c9277d05ef
user: augustss <augustss%NetBSD.org@localhost>
date: Mon Feb 11 10:04:28 2002 +0000
description:
Some updates for FreeBSD.
diffstat:
sys/dev/usb/ulpt.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diffs (66 lines):
diff -r 224aa4df9135 -r 43c9277d05ef sys/dev/usb/ulpt.c
--- a/sys/dev/usb/ulpt.c Mon Feb 11 09:21:46 2002 +0000
+++ b/sys/dev/usb/ulpt.c Mon Feb 11 10:04:28 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulpt.c,v 1.46 2001/12/31 12:15:21 augustss Exp $ */
+/* $NetBSD: ulpt.c,v 1.47 2002/02/11 10:04:28 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.24 1999/11/17 22:33:44 n_hibma Exp $ */
/*
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.46 2001/12/31 12:15:21 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.47 2002/02/11 10:04:28 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -149,7 +149,9 @@
/* dump */ nodump,
/* psize */ nopsize,
/* flags */ 0,
+#if !defined(__FreeBSD__) || (__FreeBSD__ < 5)
/* bmaj */ -1
+#endif
};
#endif
@@ -309,7 +311,7 @@
USETW(req.wValue, cd->bConfigurationValue);
USETW2(req.wIndex, id->bInterfaceNumber, id->bAlternateSetting);
USETW(req.wLength, sizeof devinfo - 1);
- err = usbd_do_request_flags(dev, &req, devinfo,USBD_SHORT_XFER_OK,
+ err = usbd_do_request_flags(dev, &req, devinfo, USBD_SHORT_XFER_OK,
&alen);
if (err) {
printf("%s: cannot get device id\n", USBDEVNAME(sc->sc_dev));
@@ -368,11 +370,11 @@
int s;
#if defined(__NetBSD__) || defined(__OpenBSD__)
int maj, mn;
+#elif defined(__FreeBSD__)
+ struct vnode *vp;
+#endif
- DPRINTF(("ulpt_detach: sc=%p flags=%d\n", sc, flags));
-#elif defined(__FreeBSD__)
DPRINTF(("ulpt_detach: sc=%p\n", sc));
-#endif
sc->sc_dying = 1;
if (sc->sc_out_pipe != NULL)
@@ -398,7 +400,12 @@
mn = self->dv_unit;
vdevgone(maj, mn, mn, VCHR);
#elif defined(__FreeBSD__)
- /* XXX not implemented yet */
+ vp = SLIST_FIRST(&sc->dev->si_hlist);
+ if (vp)
+ VOP_REVOKE(vp, REVOKEALL);
+ vp = SLIST_FIRST(&sc->dev_noprime->si_hlist);
+ if (vp)
+ VOP_REVOKE(vp, REVOKEALL);
destroy_dev(sc->dev);
destroy_dev(sc->dev_noprime);
Home |
Main Index |
Thread Index |
Old Index