Re: usb drivers & arches (Re: [4/4] Re: Add support for Meinberg DCF600USB to umbg(4))

2019-03-22 Thread Theo de Raadt
Paul de Weerd  wrote:

> On Fri, Mar 22, 2019 at 11:53:20AM +, Stuart Henderson wrote:
> | This is a more general thing actually, the list of USB drivers is rather
> | haphazard at the moment. List below (to fit <80 cols I've snipped i386
> | which has all drivers present in any other GENERIC config, amd64 which
> | is only missing umbg, and sgi with all its various different configs). 
> | 
> | Would it make sense to try unifying these for all/some arches? are
> | there particular space constraints for some (IIRC maybe the case on sgi,
> | not sure about others) or other reasons to restrict them?
> 
> One thing that could be considered is putting all USB devices into a
> separate file that gets included from the various arch-specific
> GENERIC config files.  That would look a bit like the below for amd64
> (although the 'USB' file would then probably move to sys/conf/).
> 
> This has some obvious downsides, so this is probably not such a hot
> idea.  There's some upsides too, though.  Obviously, this is above my
> pay-grade - I cannot oversee the full implications.

This has been looked at before, and we decided against it.



Re: usb drivers & arches (Re: [4/4] Re: Add support for Meinberg DCF600USB to umbg(4))

2019-03-22 Thread Paul de Weerd
On Fri, Mar 22, 2019 at 11:53:20AM +, Stuart Henderson wrote:
| This is a more general thing actually, the list of USB drivers is rather
| haphazard at the moment. List below (to fit <80 cols I've snipped i386
| which has all drivers present in any other GENERIC config, amd64 which
| is only missing umbg, and sgi with all its various different configs). 
| 
| Would it make sense to try unifying these for all/some arches? are
| there particular space constraints for some (IIRC maybe the case on sgi,
| not sure about others) or other reasons to restrict them?

One thing that could be considered is putting all USB devices into a
separate file that gets included from the various arch-specific
GENERIC config files.  That would look a bit like the below for amd64
(although the 'USB' file would then probably move to sys/conf/).

This has some obvious downsides, so this is probably not such a hot
idea.  There's some upsides too, though.  Obviously, this is above my
pay-grade - I cannot oversee the full implications.


Index: GENERIC
===
RCS file: /home/OpenBSD/cvs/src/sys/arch/amd64/conf/GENERIC,v
retrieving revision 1.467
diff -u -p -r1.467 GENERIC
--- GENERIC 22 Mar 2019 12:05:45 -  1.467
+++ GENERIC 22 Mar 2019 16:08:19 -
@@ -89,7 +89,6 @@ hvn*  at hyperv?  # Hyper-V NetVSC
 hvs*   at hyperv?  # Hyper-V StorVSC
 
 option PCIVERBOSE
-option USBVERBOSE
 
 pchb*  at pci? # PCI-Host bridges
 aapic* at pci? # AMD 8131 IO apic
@@ -211,120 +210,7 @@ usb*  at ehci?
 usb*   at uhci?
 usb*   at ohci?
 
-# USB devices
-uhub*  at usb? # USB Hubs
-uhub*  at uhub?# USB Hubs
-urng*  at uhub?# USB Random Number Generator
-uonerng* at uhub?  # Moonbase Otago OneRNG
-umodem*at uhub?# USB Modems/Serial
-ucom*  at umodem?
-uvisor*at uhub?# Handspring Visor
-ucom*  at uvisor?
-uvscom*at uhub?# SUNTAC Slipper U VS-10U serial
-ucom*  at uvscom?
-ubsa*  at uhub?# Belkin serial adapter
-ucom*  at ubsa?
-uftdi* at uhub?# FTDI FT8U100AX serial adapter
-ucom*  at uftdi?
-uplcom* at uhub?   # I/O DATA USB-RSAQ2 serial adapter
-ucom*  at uplcom?
-umct*  at uhub?# MCT USB-RS232 serial adapter
-ucom*  at umct?
-uslcom*at uhub?# Silicon Laboratories CP210x serial
-ucom*  at uslcom?
-uscom* at uhub?# Simple USB serial adapters
-ucom*  at uscom?
-uark*  at uhub?# Arkmicro ARK3116 serial
-ucom*  at uark?
-moscom*at uhub?# MosChip MCS7703 serial
-ucom*  at moscom?
-umcs*  at uhub?# MosChip MCS78x0 serial
-ucom*  at umcs?
-uipaq* at uhub?# iPAQ serial adapter
-ucom*  at uipaq?
-umsm*  at uhub?# Qualcomm MSM EVDO
-ucom*  at umsm?
-uchcom*at uhub?# WinChipHead CH341/340 serial
-ucom*  at uchcom?
-uticom*at uhub?# TI serial
-ucom*  at uticom?
-uaudio* at uhub?   # USB Audio
-audio* at uaudio?
-umidi* at uhub?# USB MIDI
-midi*  at umidi?
-ulpt*  at uhub?# USB Printers
-umass* at uhub?# USB Mass Storage devices
-ubcmtp*at uhub?# Broadcom USB trackpad
-wsmouse* at ubcmtp? mux 0
-uhidev*at uhub?# Human Interface Devices
-ums*   at uhidev?  # USB mouse
-wsmouse* at ums? mux 0
-umt*   at uhidev?  # USB multitouch touchpad
-wsmouse* at umt? mux 0
-uts*   at uhub?# USB touchscreen
-wsmouse* at uts? mux 0
-uwacom*at uhidev?  # USB Wacom tablet
-wsmouse* at uwacom? mux 0
-ukbd*  at uhidev?  # USB keyboard
-wskbd* at ukbd? mux 1
-ucycom*at uhidev?  # Cypress serial
-ucom*  at ucycom?
-uslhcom* at uhidev?# Silicon Labs CP2110 USB HID UART
-ucom*  at uslhcom?
-uhid*  at uhidev?  # USB generic HID support
-upd*   at uhidev?  # USB Power Devices sensors
-aue*   at uhub?# ADMtek AN986 Pegasus Ethernet
-atu*   at uhub?# Atmel AT76c50x based 802.11b
-axe*   at uhub?# ASIX Electronics AX88172 USB Ethernet
-axen*  at uhub?# ASIX Electronics AX88179 USB Ethernet
-cue*   at uhub?# CATC USB-EL1201A based Ethernet
-kue*   at uhub?# Kawasaki KL5KUSB101B based Ethernet
-smsc*  at uhub?# SMSC LAN95xx Ethernet
-cdce*  at uhub?# CDC Ethernet
-urndis*at uhub?# Remote NDIS Ethernet
-upl*   at uhub?# Prolific PL2301/PL2302 host-to-host `network'
-ugl*   at uhub?# Genesys Logic GL620USB-A host-to-host 
`network'
-udav*  at uhub?  

Re: [4/4] Re: Add support for Meinberg DCF600USB to umbg(4)

2019-03-22 Thread Peter Hessler
OK

On 2019 Mar 22 (Fri) at 10:04:37 +0100 (+0100), Paul de Weerd wrote:
:Index: GENERIC
:===
:RCS file: /home/OpenBSD/cvs/src/sys/arch/amd64/conf/GENERIC,v
:retrieving revision 1.466
:diff -u -p -r1.466 GENERIC
:--- GENERIC19 Jan 2019 03:24:18 -  1.466
:+++ GENERIC22 Mar 2019 08:10:33 -
:@@ -306,6 +306,7 @@ urtw*  at uhub?# Realtek 8187
: rsu*  at uhub?# Realtek RTL8188SU/RTL8191SU/RTL8192SU
: urtwn*at uhub?# Realtek RTL8188CU/RTL8192CU
: udcf* at uhub?# Gude Expert mouseCLOCK
:+umbg* at uhub?# Meinberg Funkuhren USB5131/DCF600USB
: umb*  at uhub?# Mobile Broadband Interface Model
: uthum*at uhidev?  # TEMPerHUM sensor
: ugold*at uhidev?  # gold TEMPer sensor
:
:
:-- 
:>[<++>-]<+++.>+++[<-->-]<.>+++[<+
:+++>-]<.>++[<>-]<+.--.[-]
: http://www.weirdnet.nl/ 
:



usb drivers & arches (Re: [4/4] Re: Add support for Meinberg DCF600USB to umbg(4))

2019-03-22 Thread Stuart Henderson
On 2019/03/22 11:55, Paul de Weerd wrote:
> On Fri, Mar 22, 2019 at 10:22:15AM +, Stuart Henderson wrote:
> | $ for i in */conf/GENERIC; do grep -q ^udcf $i && grep -q ^umbg $i || echo 
> ${i%%/*}; done
> 
> Did you want to only find archs which DO have udcf(4) but not umbg(4)?
> Because not all of those in your list have udcf.  This adds ubmg where
> we already have udcf.

Oops yes, trying to be too clever.

$ for i in `grep -l ^udcf */conf/GENERIC`; do grep -q ^umbg $i || echo 
${i%%/*}; done 
amd64
arm64
armv7
landisk
loongson

:-)

> As mentioned, this has not been tested at all.

This is a more general thing actually, the list of USB drivers is rather
haphazard at the moment. List below (to fit <80 cols I've snipped i386
which has all drivers present in any other GENERIC config, amd64 which
is only missing umbg, and sgi with all its various different configs). 

Would it make sense to try unifying these for all/some arches? are
there particular space constraints for some (IIRC maybe the case on sgi,
not sure about others) or other reasons to restrict them?

ubcmtp (i386/amd64 only)
umb (i386/amd64 only)

athn:  arm64 armv7  landisk loongson macppc octeon socppc sparc64
atu:   arm64 armv7 hppa landisk loongson macppc octeonsparc64
aue: alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
bwfm:  arm64 armv7  loongson macppc
cdce:alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
cue: alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
kue: alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
mos:   arm64 armv7  loongson macppc octeon socppc sparc64
moscom:arm64 armv7  landisk loongson macppc octeon
mue:   arm64 armv7
otus:  arm64 armv7  loongson macppc octeon
rsu:   arm64 armv7 hppa landisk loongson macppc octeon socppc sparc64
uark:alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
uath:alpha arm64 armv7  landisk loongson macppc octeon socppc sparc64
uaudio:  alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
uberry:arm64 armv7  loongson macppc octeon
ubsa:alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
uchcom:  alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
udav:alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
udcf:  arm64 armv7  landisk loongson macppc octeonsparc64
udl:   arm64 armv7 hppa landisk loongson macppcsocppc
udsbr:   alpha arm64 armv7 hppa landisk  macppc octeonsparc64
uftdi:   alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
ugl: alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
uipaq:   alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
umbg:macppc octeonsparc64
umcs:  arm64 armv7  landisk loongson macppc octeon
umct:alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
umidi:   alpha arm64 armv7 hppa loongson macppc   sparc64
umodem:  alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
umsm:  arm64 armv7 hppa landisk loongson macppc octeon
uonerng: alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
uow: alpha arm64 armv7 hppa  macppc octeonsparc64
upgt:  arm64 armv7  loongson macppc octeon
upl: alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
uplcom:  alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
ure: alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
url: alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
urndis:  alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
urng:alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
urtw:  arm64 armv7  loongson macppc octeon
urtwn: arm64 armv7  landisk loongson macppc octeon socppc sparc64
uscom:   alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
uslcom:  alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
uticom:arm64 armv7  octeon
uts:   arm64 armv7   macppc
utvfu:   alpha arm64 armv7  loongson macppc octeonsparc64
uvideo:  alpha arm64 armv7  loongson macppc octeonsparc64
uvisor:  alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
uvscom:  alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
wi:  alpha arm64 armv7 hppa landisk loongson macppc octeonsparc64
zyd:   arm64 armv7 hppa landisk loongson macppc octeon socppc sparc64



Re: [4/4] Re: Add support for Meinberg DCF600USB to umbg(4)

2019-03-22 Thread Paul de Weerd
On Fri, Mar 22, 2019 at 10:22:15AM +, Stuart Henderson wrote:
| $ for i in */conf/GENERIC; do grep -q ^udcf $i && grep -q ^umbg $i || echo 
${i%%/*}; done

Did you want to only find archs which DO have udcf(4) but not umbg(4)?
Because not all of those in your list have udcf.  This adds ubmg where
we already have udcf.

As mentioned, this has not been tested at all.

Index: arm64/conf/GENERIC
===
RCS file: /home/OpenBSD/cvs/src/sys/arch/arm64/conf/GENERIC,v
retrieving revision 1.96
diff -u -p -r1.96 GENERIC
--- arm64/conf/GENERIC  3 Feb 2019 14:03:36 -   1.96
+++ arm64/conf/GENERIC  22 Mar 2019 10:50:20 -
@@ -299,6 +299,7 @@ urtw*   at uhub?# Realtek 8187
 rsu*   at uhub?# Realtek RTL8188SU/RTL8191SU/RTL8192SU
 urtwn* at uhub?# Realtek RTL8188CU/RTL8192CU
 udcf*  at uhub?# Gude Expert mouseCLOCK
+umbg*  at uhub?# Meinberg Funkuhren USB5131/DCF600USB
 uthum* at uhidev?  # TEMPerHUM sensor
 ugold* at uhidev?  # gold TEMPer sensor
 utrh*  at uhidev?  # USBRH sensor
Index: armv7/conf/GENERIC
===
RCS file: /home/OpenBSD/cvs/src/sys/arch/armv7/conf/GENERIC,v
retrieving revision 1.121
diff -u -p -r1.121 GENERIC
--- armv7/conf/GENERIC  12 Jan 2019 19:37:16 -  1.121
+++ armv7/conf/GENERIC  22 Mar 2019 10:50:34 -
@@ -326,6 +326,7 @@ urtw*   at uhub?# Realtek 8187
 rsu*   at uhub?# Realtek RTL8188SU/RTL8191SU/RTL8192SU
 urtwn* at uhub?# Realtek RTL8188CU/RTL8192CU
 udcf*  at uhub?# Gude Expert mouseCLOCK
+umbg*  at uhub?# Meinberg Funkuhren USB5131/DCF600USB
 uthum* at uhidev?  # TEMPerHUM sensor
 ugold* at uhidev?  # gold TEMPer sensor
 utrh*  at uhidev?  # USBRH sensor
Index: landisk/conf/GENERIC
===
RCS file: /home/OpenBSD/cvs/src/sys/arch/landisk/conf/GENERIC,v
retrieving revision 1.53
diff -u -p -r1.53 GENERIC
--- landisk/conf/GENERIC22 Aug 2018 15:38:46 -  1.53
+++ landisk/conf/GENERIC22 Mar 2019 10:50:53 -
@@ -162,6 +162,7 @@ rsu*at uhub?# Realtek 
RTL8188SU/RTL81
 urtwn* at uhub?# Realtek RTL8188CU/RTL8192CU
 zyd*   at uhub?# Zydas ZD1211
 udcf*  at uhub?# Gude Expert mouseCLOCK
+umbg*  at uhub?# Meinberg Funkuhren USB5131/DCF600USB
 uthum* at uhidev?  # TEMPerHUM sensor
 ugold* at uhidev?  # gold TEMPer sensor
 utwitch* at uhidev?# YUREX BBU sensor
Index: loongson/conf/GENERIC
===
RCS file: /home/OpenBSD/cvs/src/sys/arch/loongson/conf/GENERIC,v
retrieving revision 1.59
diff -u -p -r1.59 GENERIC
--- loongson/conf/GENERIC   22 Aug 2018 15:38:46 -  1.59
+++ loongson/conf/GENERIC   22 Mar 2019 10:51:09 -
@@ -192,6 +192,7 @@ wi* at uhub?# WaveLAN IEEE 802.11DS
 zyd*   at uhub?# Zydas ZD1211
 uberry*at uhub?# Research In Motion BlackBerry 
 udcf*  at uhub?# Gude Expert mouseCLOCK
+umbg*  at uhub?# Meinberg Funkuhren USB5131/DCF600USB
 uthum* at uhidev?  # TEMPerHUM sensor
 ugold* at uhidev?  # gold TEMPer sensor
 utwitch*   at uhidev?  # YUREX BBU sensor

-- 
>[<++>-]<+++.>+++[<-->-]<.>+++[<+
+++>-]<.>++[<>-]<+.--.[-]
 http://www.weirdnet.nl/ 



Re: [4/4] Re: Add support for Meinberg DCF600USB to umbg(4)

2019-03-22 Thread Paul de Weerd
On Fri, Mar 22, 2019 at 10:22:15AM +, Stuart Henderson wrote:
| it's missing on some others too;
| 
| $ for i in */conf/GENERIC; do grep -q ^udcf $i && grep -q ^umbg $i || echo 
${i%%/*}; done
| alpha
| amd64
| arm64
| armv7
| hppa
| landisk
| loongson
| luna88k
| socppc

Yes.  I have some of those (some even in a working condition), but
haven't tried yet.  My amd64 is the fastest machine (platform) I have,
the others I would first need to dig out, update and get a source tree
on.  That'll take me a lot more time - I wanted to send this out
before going down that route.

Paul

-- 
>[<++>-]<+++.>+++[<-->-]<.>+++[<+
+++>-]<.>++[<>-]<+.--.[-]
 http://www.weirdnet.nl/ 



Re: [4/4] Re: Add support for Meinberg DCF600USB to umbg(4)

2019-03-22 Thread Stuart Henderson
On 2019/03/22 10:04, Paul de Weerd wrote:
> Index: GENERIC
> ===
> RCS file: /home/OpenBSD/cvs/src/sys/arch/amd64/conf/GENERIC,v
> retrieving revision 1.466
> diff -u -p -r1.466 GENERIC
> --- GENERIC   19 Jan 2019 03:24:18 -  1.466
> +++ GENERIC   22 Mar 2019 08:10:33 -
> @@ -306,6 +306,7 @@ urtw* at uhub?# Realtek 8187
>  rsu* at uhub?# Realtek RTL8188SU/RTL8191SU/RTL8192SU
>  urtwn*   at uhub?# Realtek RTL8188CU/RTL8192CU
>  udcf*at uhub?# Gude Expert mouseCLOCK
> +umbg*at uhub?# Meinberg Funkuhren USB5131/DCF600USB
>  umb* at uhub?# Mobile Broadband Interface Model
>  uthum*   at uhidev?  # TEMPerHUM sensor
>  ugold*   at uhidev?  # gold TEMPer sensor
> 
> 
> -- 
> >[<++>-]<+++.>+++[<-->-]<.>+++[<+
> +++>-]<.>++[<>-]<+.--.[-]
>  http://www.weirdnet.nl/ 
> 

it's missing on some others too;

$ for i in */conf/GENERIC; do grep -q ^udcf $i && grep -q ^umbg $i || echo 
${i%%/*}; done
alpha
amd64
arm64
armv7
hppa
landisk
loongson
luna88k
socppc



[4/4] Re: Add support for Meinberg DCF600USB to umbg(4)

2019-03-22 Thread Paul de Weerd
Index: GENERIC
===
RCS file: /home/OpenBSD/cvs/src/sys/arch/amd64/conf/GENERIC,v
retrieving revision 1.466
diff -u -p -r1.466 GENERIC
--- GENERIC 19 Jan 2019 03:24:18 -  1.466
+++ GENERIC 22 Mar 2019 08:10:33 -
@@ -306,6 +306,7 @@ urtw*   at uhub?# Realtek 8187
 rsu*   at uhub?# Realtek RTL8188SU/RTL8191SU/RTL8192SU
 urtwn* at uhub?# Realtek RTL8188CU/RTL8192CU
 udcf*  at uhub?# Gude Expert mouseCLOCK
+umbg*  at uhub?# Meinberg Funkuhren USB5131/DCF600USB
 umb*   at uhub?# Mobile Broadband Interface Model
 uthum* at uhidev?  # TEMPerHUM sensor
 ugold* at uhidev?  # gold TEMPer sensor


-- 
>[<++>-]<+++.>+++[<-->-]<.>+++[<+
+++>-]<.>++[<>-]<+.--.[-]
 http://www.weirdnet.nl/