Also replace numbered list with - bulleted so the list entries do not
need to be renumbered as tasks are completed.
Sponsored by: The FreeBSD Foundation
On FDT-enabled platforms check if DTB blob has MAC address configured by
a boot loader. This information passed as a "local-mac-address" or
"mac-address" property of the device node. For USB NICs node
can be found by looking for compatibility string "usbVVV,PPP" where
VVV - vendor id (hex) and PPP - product id (hex)
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D16117
lan78xx_eeprom_read just checked for EEPROM presence then called
lan78xx_eeprom_read_raw if present, and had only one caller. Introduce
lan78xx_eeprom_present to check for EEPROM presence, and use it in the
one place it is needed.
This is used by r334964, which was accidentally committed out-of-order
from my work tree.
Reported by: markj
Sponsored by: The FreeBSD Foundation
Differences between LAN7800 and LAN7850 from the driver's perspective:
* The LAN7800 muxes EEPROM signals with LEDs, so LED mode needs to be
disabled when reading/writing EEPROM. The EEPROM is not muxed on the
LAN7850.
* The Linux driver enables automatic duplex and speed detection when
there is no EEPROM, for the LAN7800 only. With this FreeBSD driver
LAN7850-based adapters without a configuration EEPROM fail to link
(with or without the automatic duplex and speed detection code), so
I have just followed the example of the Linux driver for now.
Sponsored by: The FreeBSD Foundation
Sponsored by: Microchip (hardware)
This adds several vendors from NetBSD's copy of the same file (r1.749).
Prefer longer more "canonical" names where the names differed.
Sort while here.
Add USB product ID for two GENESYS LOGIC ICs, found in DELOCK
In-Desk-Hub 61991
PR: 228489
Submitted by: "Harald Schmalzbauer" <bugzilla.freebsd@omnilan.de>
MFC After: 3 weeks
The GMII control bit ETH_MAC_CR_GMII_EN_ is not documented in
LAN78xx datasheets, but from the permissively licensed header provided
by Microchip it is:
#define ETH_MAC_CR_GMII_EN (0x00080000UL ) // GMII/RGMII Selection
is that current one (mass storage device) doesn't work as it is - it
needs to be set to 0 after the LUN is configured, which is what the
cfumass rc script does. In other words: the current default does not
work, and to actually make it work it had to be set to -1 in
/boot/loader.conf.
Reviewed by: hselasky@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Previously lan78xx_chip_init locked the driver's mutex if not already
locked, but unlocked it only in the case of error. This provided a
fairly clear indication that the function is already called with the
lock held, so just replace it with a lock assertion.
Sponsored by: The FreeBSD Foundation
This driver was developed for the LAN7800 and the register-compatible
LAN7515 and has only been tested on those devices. Adding support for
other members of the family should be straightforward, once we have
devices to test.
With this change the driver will probe but fail to attach due to the
Chip ID check, but will leave a hint leading to the driver that needs
work.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D15537
This driver was developed for the LAN7800 and the register-compatible
LAN7515 (found on Raspberry Pi 3B+) and has only been tested on those
devices.
Sponsored by: The FreeBSD Foundation
This change adds support for a UBS<->RS232 adapter based on CH340 (or an
analogue) that I own. The device seems to have a newer internal version
(0x30) and the existing code incorrectly configures line control for it
resulting in garbled transmission. The changes are based on what I
learned in Linux drivers for the same hardware.
Additional changes:
- use UCHCOM_REG_LCR1 / UCHCOM_REG_LCR2 instead of explicit 0x18 and
0x25
- use NULL instead of 0 where a pointer is expected
Reviewed by: hselasky
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D15498
Also, add definitions for more bits of UCHCOM_REG_LCR1 as seen in the
Linux driver. UCHCOM_LCR1_PARENB definition was different from that in
the Linux driver and clashed with newly added UCHCOM_LCR1_RX. I took a
liberty to change UCHCOM_LCR1_PARENB to the Linux definition as it was
unused in the driver anyway. This change should make
uchcom_cfg_set_break() easier to understand.
Approved by: hselasky
MFC after: 2 weeks
Product IDs are specified in vendor documents. The previously used
device ID is not. This is a cosmetic change. No functionality depends
on those IDs.
Reviewed by: hselasky
MFC after: 2 weeks
muge was committed to the tree in r333713 but not yet connected to the
tree, and it crossed paths with the migration to using ck.
Sponsored by: The FreeBSD Foundation
Microchip provided a permissively-licensed lan78xx header, which has
an 'ETH_' prefix on most definitions. Follow suit in our driver.
Sponsored by: The FreeBSD Foundation
storage, CDC ACM (serial), and CDC ECM (ethernet) at the same time.
It's quite similar in function to Linux' "g_multi" gadget.
Reviewed by: hselasky@
MFC after: 2 weeks
Relnotes: yes
Sponsored by: The FreeBSD Foundation
one character too many. Note that this function is only used to decode
string descriptors generated by the kernel itself.
Reviewed by: hselasky@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
This driver supports two Microchip USB-Ethernet controllers:
LAN7800 USB 3.1 to 10/100/1000 Mbps Ethernet
LAN7515 USB 2 to 10/100/1000 Mbps Ethernet with built-in USB hub
The LAN7515 is the Ethernet controller on the Raspberry Pi 3B+.
At present there is no datasheet for the LAN7515, but it is effectively
a USB 2 hub combined with a LAN7800 controller. A comprehensive LAN7800
datasheet is at http://www.microchip.com/wwwproducts/en/LAN7800.
This driver is based on the structure of the smsc(4) driver which
supports Microchip/SMSC's LAN95xx family. (Microchip acquired SMSC
in May 2012.) The Linux lan78xx driver served as a reference for some
functionality and registers.
The 'muge' driver name comes from "Microchip USB Gigabit Ethernet".
I made some style adjustments and minor edits to Arshan's submission.
It will be connected to the build after additional review and testing.
Thanks to Microchip for providing a number of Evaluation Boards (EVBs)
for development and testing.
Submitted by: Arshan Khanifar
Reviewed by: hselasky (earlier)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D15168