[patch] Delete outdated warning about HiFive Unmatched onboard ethernet device from riscv64 installation notes

2022-10-31 Thread Miguel Landaeta
Hi,

I just installed 7.2 successfully on a HiFive Unmatched box and the
onboard cad(4) device is working as expected. I think installation
notes should be updated.

Cheers,


diff --git a/distrib/notes/riscv64/prep b/distrib/notes/riscv64/prep
index c5443f8587f..ae63bc6cab7 100644
--- a/distrib/notes/riscv64/prep
+++ b/distrib/notes/riscv64/prep
@@ -7,8 +7,7 @@ HiFive Unmatched
 Copy install{:--:}OSrev.img to a USB stick, and boot with both it and the
 vendor provided uSD card (unmodified) inserted. This should enable firmware
 and U-Boot to be loaded from uSD and OpenBSD bootloader and kernel to be
-loaded from USB stick. At this time onboard Ethernet is not well supported,
-so PCIe or USB Ethernet device will be required.
+loaded from USB stick.

 QEMU with OpenSBI and U-Boot



-- 
Miguel Landaeta, miguel at miguel.cc
secure email with PGP 0x6E608B637D8967E9 available at http://keyserver.pgp.com/
"Faith means not wanting to know what is true." -- Nietzsche



urtwn(4): Add support for D-Link DWA-121 rev B1

2020-07-06 Thread Miguel Landaeta
Hi,

The patch at the end should add support for USB wifi dongle
DWA-121 from D-Link [1].

The USB id of such device is 2001:331b.

lykke$ usbdevs
Controller /dev/usb0:
addr 01: : Generic, EHCI root hub
Controller /dev/usb1:
addr 01: : Generic, EHCI root hub
addr 02: 05e3:0608 Genesys Logic, USB2.0 Hub
addr 03: 0c45:6321 Sonix Technology Co., Ltd., USB Camera
Controller /dev/usb2:
addr 01: : Generic, xHCI root hub
Controller /dev/usb3:
addr 01: : Generic, xHCI root hub
addr 02: 2001:331b Realtek\r,
Controller /dev/usb4:
addr 01: : Generic, OHCI root hub
addr 02: 258a:001e HAILUCK CO.,LTD, USB KEYBOARD
Controller /dev/usb5:
addr 01: : Generic, OHCI root hub

Relevant dmesg message (full dmesg is attached):

urtwn0 at uhub3 port 1 configuration 1 interface 0 "Realtek " rev 2.00/0.00 
addr 2
urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R, address 60:63:4c:xx:xx:xx

Thanks,
Miguel.

1. https://eu.dlink.com/uk/en/products/dwa-121-wireless-n-150-pico-usb-adapter


Index: sys/dev/usb/if_urtwn.c
===
RCS file: /cvs/src/sys/dev/usb/if_urtwn.c,v
retrieving revision 1.90
diff -u -p -r1.90 if_urtwn.c
--- sys/dev/usb/if_urtwn.c  11 Jun 2020 00:56:12 -  1.90
+++ sys/dev/usb/if_urtwn.c  6 Jul 2020 08:26:30 -
@@ -328,6 +328,7 @@ static const struct urtwn_type {
URTWN_DEV_8188EU(REALTEK,   RTL8188ETV),
URTWN_DEV_8188EU(REALTEK,   RTL8188EU),
URTWN_DEV_8188EU(TPLINK,RTL8188EUS),
+   URTWN_DEV_8188EU(DLINK, DWA121B1),
/* URTWN_RTL8192EU */
URTWN_DEV_8192EU(DLINK, DWA131E1),
URTWN_DEV_8192EU(REALTEK,   RTL8192EU),
Index: sys/dev/usb/usbdevs
===
RCS file: /cvs/src/sys/dev/usb/usbdevs,v
retrieving revision 1.717
diff -u -p -r1.717 usbdevs
--- sys/dev/usb/usbdevs 22 Jun 2020 15:49:37 -  1.717
+++ sys/dev/usb/usbdevs 6 Jul 2020 08:26:30 -
@@ -1565,6 +1565,7 @@ product DLINK DWA125D10x330f  DWA-125 r
 product DLINK DWA123D1 0x3310  DWA-123 rev D1
 product DLINK DWA137A1 0x3317  DWA-137 rev A1
 product DLINK DWA131E1 0x3319  DWA-131 rev E1
+product DLINK DWA121B1 0x331b  DWA-121 rev B1
 product DLINK DWA182D1 0x331c  DWA-182 rev D1
 product DLINK DWA171C1 0x331d  DWA-171 rev C1
 product DLINK DWL122   0x3700  DWL-122
Index: sys/dev/usb/usbdevs.h
===
RCS file: /cvs/src/sys/dev/usb/usbdevs.h,v
retrieving revision 1.729
diff -u -p -r1.729 usbdevs.h
--- sys/dev/usb/usbdevs.h   22 Jun 2020 15:52:39 -  1.729
+++ sys/dev/usb/usbdevs.h   6 Jul 2020 08:26:30 -
@@ -1570,6 +1570,7 @@
 #defineUSB_PRODUCT_DLINK_DWA131B   0x330d  /* DWA-131 rev 
B */
 #defineUSB_PRODUCT_DLINK_DWA125D1  0x330f  /* DWA-125 rev 
D1 */
 #defineUSB_PRODUCT_DLINK_DWA123D1  0x3310  /* DWA-123 rev 
D1 */
+#defineUSB_PRODUCT_DLINK_DWA121B1  0x331b  /* DWA-121 rev 
B1 */
 #defineUSB_PRODUCT_DLINK_DWA137A1  0x3317  /* DWA-137 rev 
A1 */
 #defineUSB_PRODUCT_DLINK_DWA131E1  0x3319  /* DWA-131 rev 
E1 */
 #defineUSB_PRODUCT_DLINK_DWA182D1  0x331c  /* DWA-182 rev 
D1 */
Index: sys/dev/usb/usbdevs_data.h
===
RCS file: /cvs/src/sys/dev/usb/usbdevs_data.h,v
retrieving revision 1.723
diff -u -p -r1.723 usbdevs_data.h
--- sys/dev/usb/usbdevs_data.h  22 Jun 2020 15:52:39 -  1.723
+++ sys/dev/usb/usbdevs_data.h  6 Jul 2020 08:26:31 -
@@ -2618,6 +2618,10 @@ const struct usb_known_product usb_known
"DWA-123 rev D1",
},
{
+   USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DWA121B1,
+   "DWA-121 rev B1",
+   },
+   {
USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DWA137A1,
"DWA-137 rev A1",
},


-- 
Miguel Landaeta, nomadium at debian.org
secure email with PGP 0x6E608B637D8967E9 available at http://miguel.cc/key.
"Faith means not wanting to know what is true." -- Nietzsche
OpenBSD 6.7-current (CUSTOM) #0: Fri Jul  3 14:18:45 IST 2020
mig...@lykke.nomadium.net:/sys/arch/arm64/compile/CUSTOM
real mem  = 4092612608 (3903MB)
avail mem = 3891392512 (3711MB)
random: good seed from bootblocks
mainbus0 at root: Pine64 Pinebook Pro
psci0 at mainbus0: PSCI 1.1, SMCCC 1.1
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 512KB 64b/line 16-way L2 cache
cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu1: 512KB 64b/line 16-way L2 cache
cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4
cpu2: 32KB 64b/