PERFORCE change 144570 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Jul 3 20:52:42 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=144570
Change 144570 by hselasky at hselasky_laptop001 on 2008/07/03 20:52:27
The USB NDIS module is complete.
- symbol renaming
NOTE: The module is not complete and there is an ongoing
project at FreeBSD P4 to fix this.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb2/ndis/if_ndis_usb2.c#2 edit
.. //depot/projects/usb/src/sys/dev/usb2/ndis/usb2_ndis.c#1 add
.. //depot/projects/usb/src/sys/dev/usb2/ndis/usb2_ndis.h#1 add
.. //depot/projects/usb/src/sys/modules/usb2/ndis/Makefile#2 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb2/ndis/if_ndis_usb2.c#2 (text+ko) ====
@@ -33,20 +33,14 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis_usb.c,v 1.9 2007/06/18 22:24:32 imp Exp $");
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/sockio.h>
-#include <sys/module.h>
-#include <sys/malloc.h>
-#include <sys/kernel.h>
+#include <dev/usb2/include/usb2_mfunc.h>
+#include <dev/usb2/include/usb2_error.h>
+
+#include <dev/usb2/core/usb2_core.h>
+
#include <sys/socket.h>
-#include <sys/sysctl.h>
+#include <sys/rman.h>
-#include <dev/usb/usb_port.h>
-#include <dev/usb/usb.h>
-#include <dev/usb/usb_subr.h>
-#include <dev/usb/usb_quirks.h>
-
#include <net/if.h>
#include <net/if_arp.h>
#include <net/ethernet.h>
@@ -62,14 +56,13 @@
#include <compat/ndis/resource_var.h>
#include <compat/ndis/ntoskrnl_var.h>
#include <compat/ndis/ndis_var.h>
+
#include <dev/if_ndis/if_ndisvar.h>
-__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis_usb.c,v 1.5 2005/04/24 20:21:22 wpaul Exp $");
+MODULE_DEPEND(ndis, usb2_core, 1, 1, 1);
-MODULE_DEPEND(ndis, usb, 1, 1, 1);
-
-static device_probe_t ndisusb_probe;
-static device_attach_t ndisusb_attach;
+static device_probe_t ndisusb2_probe;
+static device_attach_t ndisusb2_attach;
static struct resource_list *ndis_get_resource_list(device_t, device_t);
extern device_attach_t ndis_attach;
@@ -83,8 +76,8 @@
static device_method_t ndis_methods[] = {
/* Device interface */
- DEVMETHOD(device_probe, ndisusb_probe),
- DEVMETHOD(device_attach, ndisusb_attach),
+ DEVMETHOD(device_probe, ndisusb2_probe),
+ DEVMETHOD(device_attach, ndisusb2_attach),
DEVMETHOD(device_detach, ndis_detach),
DEVMETHOD(device_shutdown, ndis_shutdown),
@@ -104,27 +97,24 @@
static devclass_t ndis_devclass;
-DRIVER_MODULE(ndis, uhub, ndis_driver, ndis_devclass, ndisdrv_modevent, 0);
+DRIVER_MODULE(ndis, ushub, ndis_driver, ndis_devclass, ndisdrv_modevent, 0);
static int
-ndisusb_probe(device_t dev)
+ndisusb2_probe(device_t dev)
{
- struct usb_attach_arg *uaa = device_get_ivars(dev);
+ struct usb2_attach_arg *uaa = device_get_ivars(dev);
if (windrv_lookup(0, "USB Bus") == NULL) {
- return (UMATCH_NONE);
+ return (ENXIO);
}
- if (uaa->usb_mode != USB_MODE_HOST) {
- return (UMATCH_NONE);
+ if (uaa->usb2_mode != USB_MODE_HOST) {
+ return (ENXIO);
}
- if (uaa->iface != NULL) {
- return (UMATCH_NONE);
- }
- return (UMATCH_NONE);
+ return (ENXIO);
}
static int
-ndisusb_attach(device_t dev)
+ndisusb2_attach(device_t dev)
{
struct ndis_softc *sc = device_get_softc(dev);
driver_object *drv;
==== //depot/projects/usb/src/sys/modules/usb2/ndis/Makefile#2 (text+ko) ====
@@ -1,0 +1,13 @@
+S= ${.CURDIR}/../../..
+
+.PATH: $S/dev/usb2/ndis
+
+KMOD= usb2_ndis
+SRCS=
+SRCS+= bus_if.h usb2_if.h device_if.h vnode_if.h
+SRCS+= opt_usb.h opt_bus.h
+
+SRCS+= usb2_ndis.c
+SRCS+= if_ndis_usb2.c
+
+.include <bsd.kmod.mk>
More information about the p4-projects
mailing list