Add support for Meinberg DCF600USB to umbg(4)

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Add support for Meinberg DCF600USB to umbg(4)

Paul de Weerd
Hi all,

After Peter J. Philipp asked about Meinberg DCF clock support on misc@
in https://marc.info/?l=openbsd-misc&m=155205024420585&w=2 I was also
interested in the question he asked.  After some consideration, I
decided to try, so I bought a Meinberg DCF600USB which was delivered
yesterday.  I unpacked it this morning and hooked it up to find the
kernel reporting:

2019-03-22T07:46:55.515Z pom /bsd: ugen0 at uhub3 port 2 "Meinberg DCF600USB" rev 2.00/1.13 addr 7

After that I

1/3: added the USB product ID (0x0302) to usbdevs
2/3: ran `make usbdevs` to update usbdevs{_data,}.h
3/3: updated the driver (and manpage) to support DCF600USB

Unfortunately, after a reboot I still got

2019-03-22T08:00:48.096Z pom /bsd: ugen0 at uhub3 port 2 "Meinberg DCF600USB" rev 2.00/1.13 addr 3

Turns out umbg(4) was never added to GENERIC for amd64.  So after

4/3: add umbg(4) to amd64 GENERIC kernel config

I now have

[weerd@pom] $ dmesg | grep umbg0
umbg0 at uhub3 port 2 configuration 1 interface 0 "Meinberg DCF600USB" rev 2.00/1.13 addr 3
umbg0: not synchronized, freerun

(full dmesg at the bottom of this mail)

Immediately after boot, it's not synced:

[weerd@pom] $ sysctl hw.sensors.umbg0
hw.sensors.umbg0.percent0=100.00% (Signal), WARNING, Fri Mar 22 09:39:18.964
hw.sensors.umbg0.timedelta0=-0.436787 secs (DCF600USB), OK, Fri Mar 22 09:39:18.964

but after some uptime:

[weerd@pom] $ sysctl hw.sensors.umbg0
hw.sensors.umbg0.percent0=100.00% (Signal), OK, Fri Mar 22 09:58:14.412
hw.sensors.umbg0.timedelta0=-0.008610 secs (DCF600USB), OK, Fri Mar 22 09:58:14.412

And ntpd is happy with this sensor:

[weerd@pom] $ ntpctl -s Sensors
sensor
   wt gd st  next  poll          offset  correction
umbg0  
    1  1  0   15s   15s         8.598ms     0.000ms

I'm sending the 4 diffs in separate e-mails; comments and/or commits
very welcome.

Paul

OpenBSD 6.5-beta (GENERIC.MP) #14: Fri Mar 22 09:32:08 CET 2019
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 34243903488 (32657MB)
avail mem = 33195778048 (31657MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xec410 (88 entries)
bios0: vendor Dell Inc. version "A22" date 02/01/2018
bios0: Dell Inc. OptiPlex 9020
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT SLIC LPIT SSDT SSDT SSDT HPET SSDT MCFG SSDT ASF! DMAR
acpi0: wakeup devices UAR1(S3) PXSX(S4) RP01(S4) PXSX(S4) PXSX(S4) PXSX(S4) RP05(S4) PXSX(S4) PXSX(S4) PXSX(S4) GLAN(S4) EHC1(S3) EHC2(S3) XHC_(S4) HDEF(S4) PEG0(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 3692.03 MHz, 06-3c-03
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 3691.46 MHz, 06-3c-03
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 3691.46 MHz, 06-3c-03
cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 3691.46 MHz, 06-3c-03
cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 8 pa 0xfec00000, version 20, 24 pins
acpihpet0 at acpi0: 14318179 Hz
acpimcfg0 at acpi0
acpimcfg0: addr 0xf8000000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (RP01)
acpiprt2 at acpi0: bus 2 (RP05)
acpiprt3 at acpi0: bus -1 (PEG0)
acpiprt4 at acpi0: bus -1 (PEG1)
acpiprt5 at acpi0: bus -1 (PEG2)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpitz0 at acpi0: critical temperature is 105 degC
acpitz1 at acpi0: critical temperature is 105 degC
acpipci0 at acpi0 PCI0: 0x00000010 0x00000011 0x00000000
acpicmos0 at acpi0
acpibtn0 at acpi0: PWRB
"PNP0C14" at acpi0 not configured
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 3692 MHz: speeds: 3401, 3400, 3200, 3000, 2800, 2700, 2500, 2300, 2100, 1900, 1700, 1500, 1400, 1200, 1000, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x06
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 4600" rev 0x06
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1920x1080, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 3 function 0 "Intel Core 4G HD Audio" rev 0x06: msi
azalia0: No codecs found
xhci0 at pci0 dev 20 function 0 "Intel 8 Series xHCI" rev 0x04: msi, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 8 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
puc0 at pci0 dev 22 function 3 "Intel 8 Series KT" rev 0x04: ports: 16 com
com4 at puc0 port 0 apic 8 int 19: ns16550a, 16 byte fifo
com4: probed fifo depth: 0 bytes
em0 at pci0 dev 25 function 0 "Intel I217-LM" rev 0x04: msi, address b8:ca:3a:93:03:e8
ehci0 at pci0 dev 26 function 0 "Intel 8 Series USB" rev 0x04: apic 8 int 16
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia1 at pci0 dev 27 function 0 "Intel 8 Series HD Audio" rev 0x04: msi
azalia1: codecs: Realtek/0x0280
audio0 at azalia1
ppb0 at pci0 dev 28 function 0 "Intel 8 Series PCIE" rev 0xd4
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 4 "Intel 8 Series PCIE" rev 0xd4: msi
pci2 at ppb1 bus 2
ahci0 at pci2 dev 0 function 0 vendor "Marvell", unknown product 0x9128 rev 0x20: msi, AHCI 1.2
ahci0: port 7: 1.5Gb/s
scsibus1 at ahci0: 32 targets
uk0 at scsibus1 targ 7 lun 0: <Marvell, 91xx Config, 1.01> ATAPI 3/processor fixed
ehci1 at pci0 dev 29 function 0 "Intel 8 Series USB" rev 0x04: apic 8 int 23
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel Q87 LPC" rev 0x04
ahci1 at pci0 dev 31 function 2 "Intel 8 Series AHCI" rev 0x04: msi, AHCI 1.3
ahci1: port 0: 6.0Gb/s
ahci1: port 1: 1.5Gb/s
ahci1: port 2: 6.0Gb/s
scsibus2 at ahci1: 32 targets
sd0 at scsibus2 targ 0 lun 0: <ATA, Samsung SSD 850, EMT0> SCSI3 0/direct fixed naa.5002538d41b86e4d
sd0: 953869MB, 512 bytes/sector, 1953525168 sectors, thin
cd0 at scsibus2 targ 1 lun 0: <HL-DT-ST, DVD+-RW GT80N, A103> ATAPI 5/cdrom removable
sd1 at scsibus2 targ 2 lun 0: <ATA, WDC WD60EFRX-68L, 82.0> SCSI3 0/direct fixed naa.50014ee2b81f4111
sd1: 5723166MB, 512 bytes/sector, 11721045168 sectors
ichiic0 at pci0 dev 31 function 3 "Intel 8 Series SMBus" rev 0x04: apic 8 int 18
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800
spdmem1 at iic0 addr 0x51: 8GB DDR3 SDRAM PC3-12800
spdmem2 at iic0 addr 0x52: 8GB DDR3 SDRAM PC3-12800
spdmem3 at iic0 addr 0x53: 8GB DDR3 SDRAM PC3-12800
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
uhub3 at uhub0 port 3 configuration 1 interface 0 "VIA Labs, Inc. USB2.0 Hub" rev 2.10/d.a0 addr 2
umbg0 at uhub3 port 2 configuration 1 interface 0 "Meinberg DCF600USB" rev 2.00/1.13 addr 3
umbg0: not synchronized, freerun
uhidev0 at uhub3 port 4 configuration 1 interface 0 "Metadot - Das Keyboard Das Keyboard" rev 2.00/1.00 addr 4
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub3 port 4 configuration 1 interface 1 "Metadot - Das Keyboard Das Keyboard" rev 2.00/1.00 addr 4
uhidev1: iclass 3/0, 3 report ids
uhid0 at uhidev1 reportid 1: input=0, output=0, feature=7
uhid1 at uhidev1 reportid 2: input=1, output=0, feature=0
uhid2 at uhidev1 reportid 3: input=3, output=0, feature=0
uhidev2 at uhub0 port 5 configuration 1 interface 0 "Logitech USB Gaming Mouse" rev 2.00/46.00 addr 5
uhidev2: iclass 3/1
ums0 at uhidev2: 16 buttons, Z and W dir
wsmouse0 at ums0 mux 0
uhidev3 at uhub0 port 5 configuration 1 interface 1 "Logitech USB Gaming Mouse" rev 2.00/46.00 addr 5
uhidev3: iclass 3/0, 17 report ids
uhid3 at uhidev3 reportid 16: input=6, output=6, feature=0
uhid4 at uhidev3 reportid 17: input=19, output=19, feature=0
uvideo0 at uhub0 port 6 configuration 1 interface 0 "Logitech QuickCam Pro 9000" rev 2.00/0.08 addr 6
video0 at uvideo0
uaudio0 at uhub0 port 6 configuration 1 interface 3 "Logitech QuickCam Pro 9000" rev 2.00/0.08 addr 6
uaudio0: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
audio1 at uaudio0
uhidev4 at uhub0 port 10 configuration 1 interface 0 "RDing TEMPERHUM1V1.2" rev 2.00/0.01 addr 7
uhidev4: iclass 3/1, 1 report id
ukbd1 at uhidev4 reportid 1: 8 variable keys, 5 key codes
wskbd2 at ukbd1 mux 1
wskbd2: connecting to wsdisplay0
uhidev5 at uhub0 port 10 configuration 1 interface 1 "RDing TEMPERHUM1V1.2" rev 2.00/0.01 addr 7
uhidev5: iclass 3/1
ugold0 at uhidev5
uhub4 at uhub0 port 20 configuration 1 interface 0 "VIA Labs, Inc. USB3.0 Hub" rev 3.00/d.a1 addr 8
uhub5 at uhub1 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.04 addr 2
uhub6 at uhub2 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.04 addr 2
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
sd2 at scsibus4 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006> SCSI2 0/direct fixed
sd2: 953866MB, 512 bytes/sector, 1953519473 sectors
root on sd2a (a0b80508b6693ba1.a) swap on sd2b dump on sd2b
ugold0: 2 sensors type si7006 (temperature and humidity)

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

Reply | Threaded
Open this post in threaded view
|

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

Paul de Weerd

Index: usbdevs
===================================================================
RCS file: /home/OpenBSD/cvs/src/sys/dev/usb/usbdevs,v
retrieving revision 1.695
diff -u -p -r1.695 usbdevs
--- usbdevs 24 Feb 2019 17:35:29 -0000 1.695
+++ usbdevs 20 Mar 2019 11:55:44 -0000
@@ -2924,6 +2924,7 @@ product MEI S2000 0x1101 Series 2000
 
 /* Meinberg Funkuhren products */
 product MEINBERG USB5131 0x0301 USB 5131 DCF77 - Radio Clock
+product MEINBERG DCF600USB 0x0302 DCF600USB - Radio Clock
 
 /* Melco, Inc products */
 product MELCO LUATX1 0x0001 LUA-TX Ethernet

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

Reply | Threaded
Open this post in threaded view
|

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

Paul de Weerd
In reply to this post by Paul de Weerd

Index: usbdevs.h
===================================================================
RCS file: /home/OpenBSD/cvs/src/sys/dev/usb/usbdevs.h,v
retrieving revision 1.707
diff -u -p -r1.707 usbdevs.h
--- usbdevs.h 24 Feb 2019 17:35:44 -0000 1.707
+++ usbdevs.h 22 Mar 2019 07:48:28 -0000
@@ -1,10 +1,10 @@
-/* $OpenBSD: usbdevs.h,v 1.707 2019/02/24 17:35:44 patrick Exp $ */
+/* $OpenBSD$ */
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- * OpenBSD: usbdevs,v 1.694 2019/01/14 03:28:03 jmatthew Exp
+ * OpenBSD: usbdevs,v 1.695 2019/02/24 17:35:29 patrick Exp
  */
 /* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */
 
@@ -2931,6 +2931,7 @@
 
 /* Meinberg Funkuhren products */
 #define USB_PRODUCT_MEINBERG_USB5131 0x0301 /* USB 5131 DCF77 - Radio Clock */
+#define USB_PRODUCT_MEINBERG_DCF600USB 0x0302 /* DCF600USB - Radio Clock */
 
 /* Melco, Inc products */
 #define USB_PRODUCT_MELCO_LUATX1 0x0001 /* LUA-TX Ethernet */
Index: usbdevs_data.h
===================================================================
RCS file: /home/OpenBSD/cvs/src/sys/dev/usb/usbdevs_data.h,v
retrieving revision 1.701
diff -u -p -r1.701 usbdevs_data.h
--- usbdevs_data.h 24 Feb 2019 17:35:44 -0000 1.701
+++ usbdevs_data.h 22 Mar 2019 07:48:28 -0000
@@ -1,10 +1,10 @@
-/* $OpenBSD: usbdevs_data.h,v 1.701 2019/02/24 17:35:44 patrick Exp $ */
+/* $OpenBSD$ */
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- * OpenBSD: usbdevs,v 1.694 2019/01/14 03:28:03 jmatthew Exp
+ * OpenBSD: usbdevs,v 1.695 2019/02/24 17:35:29 patrick Exp
  */
 /* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */
 
@@ -7016,6 +7016,10 @@ const struct usb_known_product usb_known
  {
     USB_VENDOR_MEINBERG, USB_PRODUCT_MEINBERG_USB5131,
     "USB 5131 DCF77 - Radio Clock",
+ },
+ {
+    USB_VENDOR_MEINBERG, USB_PRODUCT_MEINBERG_DCF600USB,
+    "DCF600USB - Radio Clock",
  },
  {
     USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX1,

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

Reply | Threaded
Open this post in threaded view
|

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

Paul de Weerd
In reply to this post by Paul de Weerd

Index: share/man/man4/umbg.4
===================================================================
RCS file: /home/OpenBSD/cvs/src/share/man/man4/umbg.4,v
retrieving revision 1.4
diff -u -p -r1.4 umbg.4
--- share/man/man4/umbg.4 16 Jul 2013 16:05:49 -0000 1.4
+++ share/man/man4/umbg.4 20 Mar 2019 12:16:03 -0000
@@ -19,7 +19,7 @@
 .Os
 .Sh NAME
 .Nm umbg
-.Nd Meinberg Funkuhren USB5131 timedelta sensor
+.Nd Meinberg Funkuhren USB5131 and DCF600USB timedelta sensors
 .Sh SYNOPSIS
 .Cd "umbg* at uhub?"
 .Sh DESCRIPTION
Index: sys/dev/usb/umbg.c
===================================================================
RCS file: /home/OpenBSD/cvs/src/sys/dev/usb/umbg.c,v
retrieving revision 1.25
diff -u -p -r1.25 umbg.c
--- sys/dev/usb/umbg.c 30 Dec 2017 20:47:00 -0000 1.25
+++ sys/dev/usb/umbg.c 22 Mar 2019 08:29:40 -0000
@@ -156,8 +156,9 @@ umbg_match(struct device *parent, void *
  if (uaa->iface == NULL)
  return UMATCH_NONE;
 
- return uaa->vendor == USB_VENDOR_MEINBERG &&
-    uaa->product == USB_PRODUCT_MEINBERG_USB5131 ?
+ return uaa->vendor == USB_VENDOR_MEINBERG && (
+    uaa->product == USB_PRODUCT_MEINBERG_USB5131 ||
+    uaa->product == USB_PRODUCT_MEINBERG_DCF600USB) ?
     UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
 }
 
@@ -172,6 +173,7 @@ umbg_attach(struct device *parent, struc
  usb_endpoint_descriptor_t *ed;
  usbd_status err;
  int signal;
+ const char *desc;
 #ifdef UMBG_DEBUG
  char fw_id[MBG_ID_LEN];
 #endif
@@ -182,7 +184,18 @@ umbg_attach(struct device *parent, struc
 
  sc->sc_timedelta.type = SENSOR_TIMEDELTA;
  sc->sc_timedelta.status = SENSOR_S_UNKNOWN;
- strlcpy(sc->sc_timedelta.desc, "USB5131",
+
+ switch (uaa->product) {
+ case USB_PRODUCT_MEINBERG_DCF600USB:
+ desc = "DCF600USB";
+ break;
+ case USB_PRODUCT_MEINBERG_USB5131:
+ desc = "USB5131";
+ break;
+ default:
+ desc = "Unspecified Radio clock";
+ }
+ strlcpy(sc->sc_timedelta.desc, desc,
     sizeof(sc->sc_timedelta.desc));
  sensor_attach(&sc->sc_sensordev, &sc->sc_timedelta);
 

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

Reply | Threaded
Open this post in threaded view
|

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

Paul de Weerd
In reply to this post by 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 -0000 1.466
+++ GENERIC 22 Mar 2019 08:10:33 -0000
@@ -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/                 

Reply | Threaded
Open this post in threaded view
|

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

Paul de Weerd
In reply to this post by Paul de Weerd
Bonus diff - make explicit in the GENERIC configs that already have
umbg(4), that this driver now supports DCF600USB too


Index: i386/conf/GENERIC
===================================================================
RCS file: /home/OpenBSD/cvs/src/sys/arch/i386/conf/GENERIC,v
retrieving revision 1.839
diff -u -p -r1.839 GENERIC
--- i386/conf/GENERIC 18 Jan 2019 01:34:50 -0000 1.839
+++ i386/conf/GENERIC 22 Mar 2019 09:08:51 -0000
@@ -318,7 +318,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
+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
Index: macppc/conf/GENERIC
===================================================================
RCS file: /home/OpenBSD/cvs/src/sys/arch/macppc/conf/GENERIC,v
retrieving revision 1.266
diff -u -p -r1.266 GENERIC
--- macppc/conf/GENERIC 21 Sep 2018 12:42:34 -0000 1.266
+++ macppc/conf/GENERIC 22 Mar 2019 09:08:56 -0000
@@ -293,7 +293,7 @@ zyd* at uhub? # Zydas ZD1211
 upgt* at uhub? # Conexant/Intersil PrismGT SoftMAC USB
 urtw* at uhub? # Realtek 8187
 udcf* at uhub? # Gude Expert mouseCLOCK
-umbg* at uhub? # Meinberg Funkuhren USB5131
+umbg* at uhub? # Meinberg Funkuhren USB5131/DCF600USB
 uthum* at uhidev? # TEMPerHUM sensor
 ugold* at uhidev? # gold TEMPer sensor
 utrh* at uhidev? # USBRH sensor
Index: octeon/conf/GENERIC
===================================================================
RCS file: /home/OpenBSD/cvs/src/sys/arch/octeon/conf/GENERIC,v
retrieving revision 1.45
diff -u -p -r1.45 GENERIC
--- octeon/conf/GENERIC 12 Jan 2019 16:59:38 -0000 1.45
+++ octeon/conf/GENERIC 22 Mar 2019 09:08:58 -0000
@@ -175,7 +175,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
+umbg* at uhub? # Meinberg Funkuhren USB5131/DCF600USB
 uthum* at uhidev? # TEMPerHUM sensor
 ugold* at uhidev? # gold TEMPer sensor
 utrh* at uhidev? # USBRH sensor
Index: sparc64/conf/GENERIC
===================================================================
RCS file: /home/OpenBSD/cvs/src/sys/arch/sparc64/conf/GENERIC,v
retrieving revision 1.309
diff -u -p -r1.309 GENERIC
--- sparc64/conf/GENERIC 29 Jan 2019 02:43:05 -0000 1.309
+++ sparc64/conf/GENERIC 22 Mar 2019 09:09:04 -0000
@@ -247,7 +247,7 @@ udsbr* at uhub? # D-Link DSB-R100 radio
 radio* at udsbr? # USB radio
 ugen* at uhub? # USB Generic driver
 udcf* at uhub? # Gude Expert mouseCLOCK
-umbg* at uhub? # Meinberg Funkuhren USB5131
+umbg* at uhub? # Meinberg Funkuhren USB5131/DCF600USB
 uthum* at uhidev? # TEMPerHUM sensor
 ugold* at uhidev? # gold TEMPer sensor
 utwitch* at uhidev? # UYUREX BBU sensor

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

Reply | Threaded
Open this post in threaded view
|

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

Stuart Henderson
In reply to this post by Paul de Weerd
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 -0000 1.466
> +++ GENERIC 22 Mar 2019 08:10:33 -0000
> @@ -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

Reply | Threaded
Open this post in threaded view
|

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

Paul de Weerd
On Fri, Mar 22, 2019 at 10:22:15AM +0000, 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/                 

Reply | Threaded
Open this post in threaded view
|

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

Paul de Weerd
In reply to this post by Stuart Henderson
On Fri, Mar 22, 2019 at 10:22:15AM +0000, 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 -0000 1.96
+++ arm64/conf/GENERIC 22 Mar 2019 10:50:20 -0000
@@ -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 -0000 1.121
+++ armv7/conf/GENERIC 22 Mar 2019 10:50:34 -0000
@@ -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/GENERIC 22 Aug 2018 15:38:46 -0000 1.53
+++ landisk/conf/GENERIC 22 Mar 2019 10:50:53 -0000
@@ -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 -0000 1.59
+++ loongson/conf/GENERIC 22 Mar 2019 10:51:09 -0000
@@ -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/                 

Reply | Threaded
Open this post in threaded view
|

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

Stuart Henderson
On 2019/03/22 11:55, Paul de Weerd wrote:
> On Fri, Mar 22, 2019 at 10:22:15AM +0000, 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 octeon        sparc64
aue:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
bwfm:          arm64 armv7              loongson macppc
cdce:    alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
cue:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
kue:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
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 octeon        sparc64
uath:    alpha arm64 armv7      landisk loongson macppc octeon socppc sparc64
uaudio:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
uberry:        arm64 armv7              loongson macppc octeon
ubsa:    alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
uchcom:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
udav:    alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
udcf:          arm64 armv7      landisk loongson macppc octeon        sparc64
udl:           arm64 armv7 hppa landisk loongson macppc        socppc
udsbr:   alpha arm64 armv7 hppa landisk          macppc octeon        sparc64
uftdi:   alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
ugl:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
uipaq:   alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
umbg:                                            macppc octeon        sparc64
umcs:          arm64 armv7      landisk loongson macppc octeon
umct:    alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
umidi:   alpha arm64 armv7 hppa         loongson macppc               sparc64
umodem:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
umsm:          arm64 armv7 hppa landisk loongson macppc octeon
uonerng: alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
uow:     alpha arm64 armv7 hppa                  macppc octeon        sparc64
upgt:          arm64 armv7              loongson macppc octeon
upl:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
uplcom:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
ure:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
url:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
urndis:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
urng:    alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
urtw:          arm64 armv7              loongson macppc octeon
urtwn:         arm64 armv7      landisk loongson macppc octeon socppc sparc64
uscom:   alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
uslcom:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
uticom:        arm64 armv7                              octeon
uts:           arm64 armv7                       macppc
utvfu:   alpha arm64 armv7              loongson macppc octeon        sparc64
uvideo:  alpha arm64 armv7              loongson macppc octeon        sparc64
uvisor:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
uvscom:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
wi:      alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
zyd:           arm64 armv7 hppa landisk loongson macppc octeon socppc sparc64

Reply | Threaded
Open this post in threaded view
|

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

Peter Hessler
In reply to this post by Paul de Weerd
OK


On 2019 Mar 22 (Fri) at 10:03:26 +0100 (+0100), Paul de Weerd wrote:
:
:Index: usbdevs
:===================================================================
:RCS file: /home/OpenBSD/cvs/src/sys/dev/usb/usbdevs,v
:retrieving revision 1.695
:diff -u -p -r1.695 usbdevs
:--- usbdevs 24 Feb 2019 17:35:29 -0000 1.695
:+++ usbdevs 20 Mar 2019 11:55:44 -0000
:@@ -2924,6 +2924,7 @@ product MEI S2000 0x1101 Series 2000
:
: /* Meinberg Funkuhren products */
: product MEINBERG USB5131 0x0301 USB 5131 DCF77 - Radio Clock
:+product MEINBERG DCF600USB 0x0302 DCF600USB - Radio Clock
:
: /* Melco, Inc products */
: product MELCO LUATX1 0x0001 LUA-TX Ethernet
:
:--
:>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
:+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
:                 http://www.weirdnet.nl/                 
:

Reply | Threaded
Open this post in threaded view
|

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

Peter Hessler
In reply to this post by Paul de Weerd
OK


On 2019 Mar 22 (Fri) at 10:04:19 +0100 (+0100), Paul de Weerd wrote:
:
:Index: share/man/man4/umbg.4
:===================================================================
:RCS file: /home/OpenBSD/cvs/src/share/man/man4/umbg.4,v
:retrieving revision 1.4
:diff -u -p -r1.4 umbg.4
:--- share/man/man4/umbg.4 16 Jul 2013 16:05:49 -0000 1.4
:+++ share/man/man4/umbg.4 20 Mar 2019 12:16:03 -0000
:@@ -19,7 +19,7 @@
: .Os
: .Sh NAME
: .Nm umbg
:-.Nd Meinberg Funkuhren USB5131 timedelta sensor
:+.Nd Meinberg Funkuhren USB5131 and DCF600USB timedelta sensors
: .Sh SYNOPSIS
: .Cd "umbg* at uhub?"
: .Sh DESCRIPTION
:Index: sys/dev/usb/umbg.c
:===================================================================
:RCS file: /home/OpenBSD/cvs/src/sys/dev/usb/umbg.c,v
:retrieving revision 1.25
:diff -u -p -r1.25 umbg.c
:--- sys/dev/usb/umbg.c 30 Dec 2017 20:47:00 -0000 1.25
:+++ sys/dev/usb/umbg.c 22 Mar 2019 08:29:40 -0000
:@@ -156,8 +156,9 @@ umbg_match(struct device *parent, void *
: if (uaa->iface == NULL)
: return UMATCH_NONE;
:
:- return uaa->vendor == USB_VENDOR_MEINBERG &&
:-    uaa->product == USB_PRODUCT_MEINBERG_USB5131 ?
:+ return uaa->vendor == USB_VENDOR_MEINBERG && (
:+    uaa->product == USB_PRODUCT_MEINBERG_USB5131 ||
:+    uaa->product == USB_PRODUCT_MEINBERG_DCF600USB) ?
:    UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
: }
:
:@@ -172,6 +173,7 @@ umbg_attach(struct device *parent, struc
: usb_endpoint_descriptor_t *ed;
: usbd_status err;
: int signal;
:+ const char *desc;
: #ifdef UMBG_DEBUG
: char fw_id[MBG_ID_LEN];
: #endif
:@@ -182,7 +184,18 @@ umbg_attach(struct device *parent, struc
:
: sc->sc_timedelta.type = SENSOR_TIMEDELTA;
: sc->sc_timedelta.status = SENSOR_S_UNKNOWN;
:- strlcpy(sc->sc_timedelta.desc, "USB5131",
:+
:+ switch (uaa->product) {
:+ case USB_PRODUCT_MEINBERG_DCF600USB:
:+ desc = "DCF600USB";
:+ break;
:+ case USB_PRODUCT_MEINBERG_USB5131:
:+ desc = "USB5131";
:+ break;
:+ default:
:+ desc = "Unspecified Radio clock";
:+ }
:+ strlcpy(sc->sc_timedelta.desc, desc,
:    sizeof(sc->sc_timedelta.desc));
: sensor_attach(&sc->sc_sensordev, &sc->sc_timedelta);
:
:
:--
:>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
:+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
:                 http://www.weirdnet.nl/                 
:

Reply | Threaded
Open this post in threaded view
|

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

Peter Hessler
In reply to this post by Paul de Weerd
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
:--- GENERIC 19 Jan 2019 03:24:18 -0000 1.466
:+++ GENERIC 22 Mar 2019 08:10:33 -0000
:@@ -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/                 
:

Reply | Threaded
Open this post in threaded view
|

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

Paul de Weerd
In reply to this post by Paul de Weerd
Whoops.  I had missed one change to the manpage that's still needed:
the DESCRIPTION section also mentions the supported devices.  This now
supports two models, but I don't think it makes sense to turn this
into a list of supported hardware just yet.


Index: umbg.4
===================================================================
RCS file: /home/OpenBSD/cvs/src/share/man/man4/umbg.4,v
retrieving revision 1.5
diff -u -p -r1.5 umbg.4
--- umbg.4 22 Mar 2019 12:04:25 -0000 1.5
+++ umbg.4 22 Mar 2019 14:47:14 -0000
@@ -25,8 +25,9 @@
 .Sh DESCRIPTION
 The
 .Nm
-driver provides support for the Meinberg Funkuhren USB5131, a time signal
-station receiver for the German DCF77 station.
+driver provides support for the Meinberg Funkuhren USB5131 and the
+Meinberg Funkuhren DCF600USB, two time signal station receivers for
+the German DCF77 station.
 .Nm
 implements a timedelta sensor and the delta (in nanoseconds) between the
 received time information and the local time can be accessed through the


On Fri, Mar 22, 2019 at 10:04:19AM +0100, Paul de Weerd wrote:
|
| Index: share/man/man4/umbg.4
| ===================================================================
| RCS file: /home/OpenBSD/cvs/src/share/man/man4/umbg.4,v
| retrieving revision 1.4
| diff -u -p -r1.4 umbg.4
| --- share/man/man4/umbg.4 16 Jul 2013 16:05:49 -0000 1.4
| +++ share/man/man4/umbg.4 20 Mar 2019 12:16:03 -0000
| @@ -19,7 +19,7 @@
|  .Os
|  .Sh NAME
|  .Nm umbg
| -.Nd Meinberg Funkuhren USB5131 timedelta sensor
| +.Nd Meinberg Funkuhren USB5131 and DCF600USB timedelta sensors
|  .Sh SYNOPSIS
|  .Cd "umbg* at uhub?"
|  .Sh DESCRIPTION
| Index: sys/dev/usb/umbg.c
| ===================================================================
| RCS file: /home/OpenBSD/cvs/src/sys/dev/usb/umbg.c,v
| retrieving revision 1.25
| diff -u -p -r1.25 umbg.c
| --- sys/dev/usb/umbg.c 30 Dec 2017 20:47:00 -0000 1.25
| +++ sys/dev/usb/umbg.c 22 Mar 2019 08:29:40 -0000
| @@ -156,8 +156,9 @@ umbg_match(struct device *parent, void *
|   if (uaa->iface == NULL)
|   return UMATCH_NONE;
|  
| - return uaa->vendor == USB_VENDOR_MEINBERG &&
| -    uaa->product == USB_PRODUCT_MEINBERG_USB5131 ?
| + return uaa->vendor == USB_VENDOR_MEINBERG && (
| +    uaa->product == USB_PRODUCT_MEINBERG_USB5131 ||
| +    uaa->product == USB_PRODUCT_MEINBERG_DCF600USB) ?
|      UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
|  }
|  
| @@ -172,6 +173,7 @@ umbg_attach(struct device *parent, struc
|   usb_endpoint_descriptor_t *ed;
|   usbd_status err;
|   int signal;
| + const char *desc;
|  #ifdef UMBG_DEBUG
|   char fw_id[MBG_ID_LEN];
|  #endif
| @@ -182,7 +184,18 @@ umbg_attach(struct device *parent, struc
|  
|   sc->sc_timedelta.type = SENSOR_TIMEDELTA;
|   sc->sc_timedelta.status = SENSOR_S_UNKNOWN;
| - strlcpy(sc->sc_timedelta.desc, "USB5131",
| +
| + switch (uaa->product) {
| + case USB_PRODUCT_MEINBERG_DCF600USB:
| + desc = "DCF600USB";
| + break;
| + case USB_PRODUCT_MEINBERG_USB5131:
| + desc = "USB5131";
| + break;
| + default:
| + desc = "Unspecified Radio clock";
| + }
| + strlcpy(sc->sc_timedelta.desc, desc,
|      sizeof(sc->sc_timedelta.desc));
|   sensor_attach(&sc->sc_sensordev, &sc->sc_timedelta);
|  
|
| --
| >++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
| +++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
|                  http://www.weirdnet.nl/                 
|

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

Reply | Threaded
Open this post in threaded view
|

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

Paul de Weerd
In reply to this post by Stuart Henderson
On Fri, Mar 22, 2019 at 11:53:20AM +0000, 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 -0000 1.467
+++ GENERIC 22 Mar 2019 16:08:19 -0000
@@ -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? # Davicom DM9601 based Ethernet
-mos* at uhub? # MOSCHIP MCS7730/7830 10/100 Ethernet
-mue* at uhub? # Microchip LAN75xx/LAN78xx Ethernet
-url* at uhub? # Realtek RTL8150L based adapters
-ure* at uhub? # Realtek RTL8152 based adapters
-wi* at uhub? # WaveLAN IEEE 802.11DS
-udsbr* at uhub? # D-Link DSB-R100 radio
-radio* at udsbr? # USB radio
-uberry* at uhub? # Research In Motion BlackBerry
-ugen* at uhub? # USB Generic driver
-uath* at uhub? # Atheros AR5005UG/AR5005UX
-ural* at uhub? # Ralink RT2500USB
-rum* at uhub? # Ralink RT2501USB/RT2601USB
-run* at uhub? # Ralink RT2700U/RT2800U/RT3000U
-otus* at uhub? # Atheros AR9001U
-athn* at uhub? # Atheros AR9002U
-zyd* at uhub? # Zydas ZD1211
-upgt* at uhub? # Conexant/Intersil PrismGT SoftMAC USB
-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
-utrh* at uhidev? # USBRH sensor
-utwitch* at uhidev? # YUREX BBU sensor
-uow* at uhub? # Maxim/Dallas DS2490 1-Wire adapter
-uoakrh* at uhidev? # Toradex OAK temp and rel humidity
-uoaklux* at uhidev? # Toradex OAK LUX
-uoakv* at uhidev? # Toradex OAK 10V sensor
-onewire* at uow?
-uvideo* at uhub? # USB Video
-video* at uvideo?
-utvfu* at uhub? # Fushicai Audio-Video Grabber
-video* at utvfu?
-audio* at utvfu?
-udl* at uhub? # DisplayLink USB displays
-wsdisplay* at udl?
-bwfm* at uhub? # Broadcom FullMAC
+include "USB"
 
 puc* at pci? # PCI "universal" communication device
 com* at cardbus?
@@ -629,7 +515,6 @@ audio* at auixp?
 audio* at auvia?
 audio* at azalia?
 #audio* at fms?
-audio* at uaudio?
 #audio* at maestro?
 #audio* at esa?
 audio* at yds?
Index: USB
===================================================================
RCS file: USB
diff -N USB
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ USB 22 Mar 2019 16:07:01 -0000
@@ -0,0 +1,118 @@
+option USBVERBOSE
+
+# 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? # Davicom DM9601 based Ethernet
+mos* at uhub? # MOSCHIP MCS7730/7830 10/100 Ethernet
+mue* at uhub? # Microchip LAN75xx/LAN78xx Ethernet
+url* at uhub? # Realtek RTL8150L based adapters
+ure* at uhub? # Realtek RTL8152 based adapters
+wi* at uhub? # WaveLAN IEEE 802.11DS
+udsbr* at uhub? # D-Link DSB-R100 radio
+radio* at udsbr? # USB radio
+uberry* at uhub? # Research In Motion BlackBerry
+ugen* at uhub? # USB Generic driver
+uath* at uhub? # Atheros AR5005UG/AR5005UX
+ural* at uhub? # Ralink RT2500USB
+rum* at uhub? # Ralink RT2501USB/RT2601USB
+run* at uhub? # Ralink RT2700U/RT2800U/RT3000U
+otus* at uhub? # Atheros AR9001U
+athn* at uhub? # Atheros AR9002U
+zyd* at uhub? # Zydas ZD1211
+upgt* at uhub? # Conexant/Intersil PrismGT SoftMAC USB
+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
+utrh* at uhidev? # USBRH sensor
+utwitch* at uhidev? # YUREX BBU sensor
+uow* at uhub? # Maxim/Dallas DS2490 1-Wire adapter
+uoakrh* at uhidev? # Toradex OAK temp and rel humidity
+uoaklux* at uhidev? # Toradex OAK LUX
+uoakv* at uhidev? # Toradex OAK 10V sensor
+onewire* at uow?
+uvideo* at uhub? # USB Video
+video* at uvideo?
+utvfu* at uhub? # Fushicai Audio-Video Grabber
+video* at utvfu?
+audio* at utvfu?
+udl* at uhub? # DisplayLink USB displays
+wsdisplay* at udl?
+bwfm* at uhub? # Broadcom FullMAC
+audio* at uaudio?

| ubcmtp (i386/amd64 only)
| umb (i386/amd64 only)
|
| athn:          arm64 armv7      landisk loongson macppc octeon socppc sparc64
| atu:           arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| aue:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| bwfm:          arm64 armv7              loongson macppc
| cdce:    alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| cue:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| kue:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| 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 octeon        sparc64
| uath:    alpha arm64 armv7      landisk loongson macppc octeon socppc sparc64
| uaudio:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| uberry:        arm64 armv7              loongson macppc octeon
| ubsa:    alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| uchcom:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| udav:    alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| udcf:          arm64 armv7      landisk loongson macppc octeon        sparc64
| udl:           arm64 armv7 hppa landisk loongson macppc        socppc
| udsbr:   alpha arm64 armv7 hppa landisk          macppc octeon        sparc64
| uftdi:   alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| ugl:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| uipaq:   alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| umbg:                                            macppc octeon        sparc64
| umcs:          arm64 armv7      landisk loongson macppc octeon
| umct:    alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| umidi:   alpha arm64 armv7 hppa         loongson macppc               sparc64
| umodem:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| umsm:          arm64 armv7 hppa landisk loongson macppc octeon
| uonerng: alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| uow:     alpha arm64 armv7 hppa                  macppc octeon        sparc64
| upgt:          arm64 armv7              loongson macppc octeon
| upl:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| uplcom:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| ure:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| url:     alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| urndis:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| urng:    alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| urtw:          arm64 armv7              loongson macppc octeon
| urtwn:         arm64 armv7      landisk loongson macppc octeon socppc sparc64
| uscom:   alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| uslcom:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| uticom:        arm64 armv7                              octeon
| uts:           arm64 armv7                       macppc
| utvfu:   alpha arm64 armv7              loongson macppc octeon        sparc64
| uvideo:  alpha arm64 armv7              loongson macppc octeon        sparc64
| uvisor:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| uvscom:  alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| wi:      alpha arm64 armv7 hppa landisk loongson macppc octeon        sparc64
| zyd:           arm64 armv7 hppa landisk loongson macppc octeon socppc sparc64
|

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

Reply | Threaded
Open this post in threaded view
|

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

Theo de Raadt-2
Paul de Weerd <[hidden email]> wrote:

> On Fri, Mar 22, 2019 at 11:53:20AM +0000, 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.

Reply | Threaded
Open this post in threaded view
|

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

Paul de Weerd
In reply to this post by Paul de Weerd
This may have gotten lost in the noise - but I forgot to update the
DESCRIPTION section of the umbg(4) manpage.

Diff again:

Index: umbg.4
===================================================================
RCS file: /home/OpenBSD/cvs/src/share/man/man4/umbg.4,v
retrieving revision 1.5
diff -u -p -r1.5 umbg.4
--- umbg.4 22 Mar 2019 12:04:25 -0000 1.5
+++ umbg.4 22 Mar 2019 14:47:14 -0000
@@ -25,8 +25,9 @@
 .Sh DESCRIPTION
 The
 .Nm
-driver provides support for the Meinberg Funkuhren USB5131, a time signal
-station receiver for the German DCF77 station.
+driver provides support for the Meinberg Funkuhren USB5131 and the
+Meinberg Funkuhren DCF600USB, two time signal station receivers for
+the German DCF77 station.
 .Nm
 implements a timedelta sensor and the delta (in nanoseconds) between the
 received time information and the local time can be accessed through the


Thanks,

Paul

On Fri, Mar 22, 2019 at 04:00:06PM +0100, Paul de Weerd wrote:
| Whoops.  I had missed one change to the manpage that's still needed:
| the DESCRIPTION section also mentions the supported devices.  This now
| supports two models, but I don't think it makes sense to turn this
| into a list of supported hardware just yet.
|
|
| Index: umbg.4
| ===================================================================
| RCS file: /home/OpenBSD/cvs/src/share/man/man4/umbg.4,v
| retrieving revision 1.5
| diff -u -p -r1.5 umbg.4
| --- umbg.4 22 Mar 2019 12:04:25 -0000 1.5
| +++ umbg.4 22 Mar 2019 14:47:14 -0000
| @@ -25,8 +25,9 @@
|  .Sh DESCRIPTION
|  The
|  .Nm
| -driver provides support for the Meinberg Funkuhren USB5131, a time signal
| -station receiver for the German DCF77 station.
| +driver provides support for the Meinberg Funkuhren USB5131 and the
| +Meinberg Funkuhren DCF600USB, two time signal station receivers for
| +the German DCF77 station.
|  .Nm
|  implements a timedelta sensor and the delta (in nanoseconds) between the
|  received time information and the local time can be accessed through the
|
|
| On Fri, Mar 22, 2019 at 10:04:19AM +0100, Paul de Weerd wrote:
| |
| | Index: share/man/man4/umbg.4
| | ===================================================================
| | RCS file: /home/OpenBSD/cvs/src/share/man/man4/umbg.4,v
| | retrieving revision 1.4
| | diff -u -p -r1.4 umbg.4
| | --- share/man/man4/umbg.4 16 Jul 2013 16:05:49 -0000 1.4
| | +++ share/man/man4/umbg.4 20 Mar 2019 12:16:03 -0000
| | @@ -19,7 +19,7 @@
| |  .Os
| |  .Sh NAME
| |  .Nm umbg
| | -.Nd Meinberg Funkuhren USB5131 timedelta sensor
| | +.Nd Meinberg Funkuhren USB5131 and DCF600USB timedelta sensors
| |  .Sh SYNOPSIS
| |  .Cd "umbg* at uhub?"
| |  .Sh DESCRIPTION
| | Index: sys/dev/usb/umbg.c
| | ===================================================================
| | RCS file: /home/OpenBSD/cvs/src/sys/dev/usb/umbg.c,v
| | retrieving revision 1.25
| | diff -u -p -r1.25 umbg.c
| | --- sys/dev/usb/umbg.c 30 Dec 2017 20:47:00 -0000 1.25
| | +++ sys/dev/usb/umbg.c 22 Mar 2019 08:29:40 -0000
| | @@ -156,8 +156,9 @@ umbg_match(struct device *parent, void *
| |   if (uaa->iface == NULL)
| |   return UMATCH_NONE;
| |  
| | - return uaa->vendor == USB_VENDOR_MEINBERG &&
| | -    uaa->product == USB_PRODUCT_MEINBERG_USB5131 ?
| | + return uaa->vendor == USB_VENDOR_MEINBERG && (
| | +    uaa->product == USB_PRODUCT_MEINBERG_USB5131 ||
| | +    uaa->product == USB_PRODUCT_MEINBERG_DCF600USB) ?
| |      UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
| |  }
| |  
| | @@ -172,6 +173,7 @@ umbg_attach(struct device *parent, struc
| |   usb_endpoint_descriptor_t *ed;
| |   usbd_status err;
| |   int signal;
| | + const char *desc;
| |  #ifdef UMBG_DEBUG
| |   char fw_id[MBG_ID_LEN];
| |  #endif
| | @@ -182,7 +184,18 @@ umbg_attach(struct device *parent, struc
| |  
| |   sc->sc_timedelta.type = SENSOR_TIMEDELTA;
| |   sc->sc_timedelta.status = SENSOR_S_UNKNOWN;
| | - strlcpy(sc->sc_timedelta.desc, "USB5131",
| | +
| | + switch (uaa->product) {
| | + case USB_PRODUCT_MEINBERG_DCF600USB:
| | + desc = "DCF600USB";
| | + break;
| | + case USB_PRODUCT_MEINBERG_USB5131:
| | + desc = "USB5131";
| | + break;
| | + default:
| | + desc = "Unspecified Radio clock";
| | + }
| | + strlcpy(sc->sc_timedelta.desc, desc,
| |      sizeof(sc->sc_timedelta.desc));
| |   sensor_attach(&sc->sc_sensordev, &sc->sc_timedelta);
| |  
| |
| | --
| | >++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
| | +++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
| |                  http://www.weirdnet.nl/                 
| |
|
| --
| >++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
| +++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
|                  http://www.weirdnet.nl/                 
|

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

Reply | Threaded
Open this post in threaded view
|

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

Jason McIntyre-2
On Tue, Mar 26, 2019 at 08:34:11AM +0100, Paul de Weerd wrote:

> This may have gotten lost in the noise - but I forgot to update the
> DESCRIPTION section of the umbg(4) manpage.
>
> Diff again:
>
> Index: umbg.4
> ===================================================================
> RCS file: /home/OpenBSD/cvs/src/share/man/man4/umbg.4,v
> retrieving revision 1.5
> diff -u -p -r1.5 umbg.4
> --- umbg.4 22 Mar 2019 12:04:25 -0000 1.5
> +++ umbg.4 22 Mar 2019 14:47:14 -0000
> @@ -25,8 +25,9 @@
>  .Sh DESCRIPTION
>  The
>  .Nm
> -driver provides support for the Meinberg Funkuhren USB5131, a time signal
> -station receiver for the German DCF77 station.
> +driver provides support for the Meinberg Funkuhren USB5131 and the
> +Meinberg Funkuhren DCF600USB, two time signal station receivers for
> +the German DCF77 station.
>  .Nm
>  implements a timedelta sensor and the delta (in nanoseconds) between the
>  received time information and the local time can be accessed through the
>

you could shorten this a little:

        The
        .Nm
        driver provides support for Meinberg Funkuhren USB5131 and
        DCF600USB time signal receivers for the German DCF77 station.

but i'm ok either way.

jmc