Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Fix last:
details: https://anonhg.NetBSD.org/src/rev/bcb4cbdf7a35
branches: trunk
changeset: 360047:bcb4cbdf7a35
user: ws <ws%NetBSD.org@localhost>
date: Mon Mar 05 09:35:01 2018 +0000
description:
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:
sys/dev/usb/files.usb | 7 ++++---
sys/dev/usb/ugen.c | 10 ++++------
2 files changed, 8 insertions(+), 9 deletions(-)
diffs (52 lines):
diff -r d5f5f6271b14 -r bcb4cbdf7a35 sys/dev/usb/files.usb
--- a/sys/dev/usb/files.usb Mon Mar 05 09:17:42 2018 +0000
+++ b/sys/dev/usb/files.usb Mon Mar 05 09:35:01 2018 +0000
@@ -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 @@
# 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 -r d5f5f6271b14 -r bcb4cbdf7a35 sys/dev/usb/ugen.c
--- a/sys/dev/usb/ugen.c Mon Mar 05 09:17:42 2018 +0000
+++ b/sys/dev/usb/ugen.c Mon Mar 05 09:35:01 2018 +0000
@@ -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 @@
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
Home |
Main Index |
Thread Index |
Old Index