Detach uhub(4) and usb(4) at shutdown.

This commit is contained in:
dyoung 2009-04-07 18:15:45 +00:00
parent 2e264f4086
commit 227c03169a
2 changed files with 10 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: uhub.c,v 1.103 2008/08/18 18:03:21 kent Exp $ */
/* $NetBSD: uhub.c,v 1.104 2009/04/07 18:15:45 dyoung Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
/*
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.103 2008/08/18 18:03:21 kent Exp $");
__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.104 2009/04/07 18:15:45 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -100,8 +100,9 @@ void uhub_childdet(device_t, device_t);
int uhub_detach(device_t, int);
int uhub_activate(device_t, enum devact);
extern struct cfdriver uhub_cd;
CFATTACH_DECL2_NEW(uhub, sizeof(struct uhub_softc), uhub_match,
uhub_attach, uhub_detach, uhub_activate, uhub_rescan, uhub_childdet);
CFATTACH_DECL3_NEW(uhub, sizeof(struct uhub_softc), uhub_match,
uhub_attach, uhub_detach, uhub_activate, uhub_rescan, uhub_childdet,
DVF_DETACH_SHUTDOWN);
CFATTACH_DECL2_NEW(uroothub, sizeof(struct uhub_softc), uhub_match,
uhub_attach, uhub_detach, uhub_activate, uhub_rescan, uhub_childdet);

View File

@ -1,4 +1,4 @@
/* $NetBSD: usb.c,v 1.115 2008/05/26 18:00:33 drochner Exp $ */
/* $NetBSD: usb.c,v 1.116 2009/04/07 18:15:45 dyoung Exp $ */
/*
* Copyright (c) 1998, 2002, 2008 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.115 2008/05/26 18:00:33 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.116 2009/04/07 18:15:45 dyoung Exp $");
#include "opt_compat_netbsd.h"
@ -162,8 +162,9 @@ static void usb_doattach(device_t);
extern struct cfdriver usb_cd;
CFATTACH_DECL2_NEW(usb, sizeof(struct usb_softc),
usb_match, usb_attach, usb_detach, usb_activate, NULL, usb_childdet);
CFATTACH_DECL3_NEW(usb, sizeof(struct usb_softc),
usb_match, usb_attach, usb_detach, usb_activate, NULL, usb_childdet,
DVF_DETACH_SHUTDOWN);
USB_MATCH(usb)
{