summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorws <ws@NetBSD.org>2018-03-05 09:35:01 +0000
committerws <ws@NetBSD.org>2018-03-05 09:35:01 +0000
commitb0b0faf36dcb8c0cb2aec6d4bb46c238d3a953a6 (patch)
tree28ba7f3a99178c5131d20d83380d8ef1c0a312d6 /sys/dev
parent4bfe2692abc815738db61e41c42137f1280f6f2c (diff)
Fix last:
Since config(1) could not distinguish between device and interface attachments, it was generating only the latter. Thus devices without their own driver wouldn't match the ugen driver anymore. Fix this by using a different device name for interface attachments.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/files.usb7
-rw-r--r--sys/dev/usb/ugen.c10
2 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/usb/files.usb b/sys/dev/usb/files.usb
index 8b38ca3dee5..0073b0a3123 100644
--- a/sys/dev/usb/files.usb
+++ b/sys/dev/usb/files.usb
@@ -1,4 +1,4 @@
-# $NetBSD: files.usb,v 1.149 2018/02/20 15:48:37 ws Exp $
+# $NetBSD: files.usb,v 1.150 2018/03/05 09:35:01 ws Exp $
#
# Config file and device description for machine-independent USB code.
# Included by ports that need it. Ports that use it must provide
@@ -138,8 +138,9 @@ file dev/usb/ucom.c ucom | ucombus needs-flag
# Generic devices
device ugen
attach ugen at usbdevif
-attach ugen at usbifif with ugenif
-file dev/usb/ugen.c ugen needs-flag
+device ugenif
+attach ugenif at usbifif
+file dev/usb/ugen.c ugen | ugenif needs-flag
# HID
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index fb2cc67361a..a044785af06 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ugen.c,v 1.138 2018/02/20 15:48:37 ws Exp $ */
+/* $NetBSD: ugen.c,v 1.139 2018/03/05 09:35:01 ws Exp $ */
/*
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.138 2018/02/20 15:48:37 ws Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.139 2018/03/05 09:35:01 ws Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -218,10 +218,8 @@ ugen_match(device_t parent, cfdata_t match, void *aux)
int
ugenif_match(device_t parent, cfdata_t match, void *aux)
{
- if (match->cf_flags & 1)
- return UMATCH_HIGHEST;
- else
- return UMATCH_NONE;
+ /* Assume that they knew what they configured! (see ugenif(4)) */
+ return UMATCH_HIGHEST;
}
void