r8152 icon indicating copy to clipboard operation
r8152 copied to clipboard

fixes for building 2.06 driver for ESXi 6+

Open acjohnson opened this issue 5 years ago • 6 comments

Fixes the original issue reported by @CueDev in #1

acjohnson avatar Dec 06 '19 21:12 acjohnson

(...merge me)

acjohnson avatar Dec 17 '19 21:12 acjohnson

Hi Aaron,

Can you help me with altering the driver for the Club USB-A 3.1 GEN 1 TO RJ45 2.5Gb adapter. It would be great if we have support for 2.5 Gb usb adapters in the homelab on esxi. Bus 002 Device 002: ID 0bda:8156 Realtek Semiconductor Corp. It is not working on esxi 6.7, fragment of vmkernel.log: 2020-04-23T10:31:34.764Z cpu3:2097584)<6>usb 2-1: New USB device found, idVendor=0bda, idProduct=8156 2020-04-23T10:31:34.764Z cpu3:2097584)<6>usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6 2020-04-23T10:31:34.764Z cpu3:2097584)<6>usb 2-1: Product: USB 10/100/1G/2.5G LAN 2020-04-23T10:31:34.764Z cpu3:2097584)<6>usb 2-1: Manufacturer: Realtek 2020-04-23T10:31:34.764Z cpu3:2097584)<6>usb 2-1: SerialNumber: 000000001 2020-04-23T10:31:34.764Z cpu3:2097584)<6>xhci_hcd 0000:00:14.0: add ep 0x83, slot id 5, new drop flags = 0x0, new add flags = 0x80 2020-04-23T10:31:34.764Z cpu3:2097584)<6>xhci_hcd 0000:00:14.0: xhci_check_bandwidth called for udev 0x4307c35d9640 2020-04-23T10:31:34.764Z cpu3:2097584)<6>xhci_hcd 0000:00:14.0: New Input Control Context: 2020-04-23T10:31:34.765Z cpu3:2097584)<6>xhci_hcd 0000:00:14.0: Output context after successful config ep cmd: 2020-04-23T10:31:34.765Z cpu3:2097584)<6>usb 2-1: usbfs: registered usb0205 2020-04-23T10:31:34.765Z cpu3:2097584)<6>xhci_hcd 0000:00:14.0: clear port warm(BH) reset change, actual port 0 status = 0x1203 2020-04-23T10:31:34.765Z cpu3:2097584)<6>xhci_hcd 0000:00:14.0: clear port connect change, actual port 0 status = 0x2a0 2020-04-23T10:31:34.913Z cpu2:2097538)<6>xhci_hcd 0000:00:14.0: xhci_hub_status_data: stopping port polling. 2020-04-23T10:31:34.913Z cpu2:2097538)<6>xhci_hcd 0000:00:14.0: xhci_hub_status_data: stopping port polling. 2020-04-23T10:31:37.360Z cpu2:2097554)<6>usb usb1: suspended

Thanks in Advance,

Michel

michelhandleitnl avatar Apr 24 '20 12:04 michelhandleitnl

Hi Aaron,

Can you help me with altering the driver for the Club USB-A 3.1 GEN 1 TO RJ45 2.5Gb adapter. It would be great if we have support for 2.5 Gb usb adapters in the homelab on esxi. Bus 002 Device 002: ID 0bda:8156 Realtek Semiconductor Corp. It is not working on esxi 6.7, fragment of vmkernel.log: 2020-04-23T10:31:34.764Z cpu3:2097584)<6>usb 2-1: New USB device found, idVendor=0bda, idProduct=8156 2020-04-23T10:31:34.764Z cpu3:2097584)<6>usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6 2020-04-23T10:31:34.764Z cpu3:2097584)<6>usb 2-1: Product: USB 10/100/1G/2.5G LAN 2020-04-23T10:31:34.764Z cpu3:2097584)<6>usb 2-1: Manufacturer: Realtek 2020-04-23T10:31:34.764Z cpu3:2097584)<6>usb 2-1: SerialNumber: 000000001 2020-04-23T10:31:34.764Z cpu3:2097584)<6>xhci_hcd 0000:00:14.0: add ep 0x83, slot id 5, new drop flags = 0x0, new add flags = 0x80 2020-04-23T10:31:34.764Z cpu3:2097584)<6>xhci_hcd 0000:00:14.0: xhci_check_bandwidth called for udev 0x4307c35d9640 2020-04-23T10:31:34.764Z cpu3:2097584)<6>xhci_hcd 0000:00:14.0: New Input Control Context: 2020-04-23T10:31:34.765Z cpu3:2097584)<6>xhci_hcd 0000:00:14.0: Output context after successful config ep cmd: 2020-04-23T10:31:34.765Z cpu3:2097584)<6>usb 2-1: usbfs: registered usb0205 2020-04-23T10:31:34.765Z cpu3:2097584)<6>xhci_hcd 0000:00:14.0: clear port warm(BH) reset change, actual port 0 status = 0x1203 2020-04-23T10:31:34.765Z cpu3:2097584)<6>xhci_hcd 0000:00:14.0: clear port connect change, actual port 0 status = 0x2a0 2020-04-23T10:31:34.913Z cpu2:2097538)<6>xhci_hcd 0000:00:14.0: xhci_hub_status_data: stopping port polling. 2020-04-23T10:31:34.913Z cpu2:2097538)<6>xhci_hcd 0000:00:14.0: xhci_hub_status_data: stopping port polling. 2020-04-23T10:31:37.360Z cpu2:2097554)<6>usb usb1: suspended

Thanks in Advance,

Michel

Hi Michael,

I do not have access to the hardware, so wouldn't be able to test such set-up.

Regards'

Jose

gomesjj avatar Apr 24 '20 14:04 gomesjj

Hi Jose,

I think it has to do by the missing of 50-usb-realtek-net.rules. This needs to be included but I don't have a clue how to do that. The Realtek device is detected by you're driver but not as a nic but as a filesystem. The file underneath seems to solve that problem, only I don't know if it needs to be compiled/linked into the driver or if it is a file that needs to exist on an esxi host on a my unknown location.

_This is used to change the default configuration of Realtek USB ethernet adapters

ACTION!="add", GOTO="usb_realtek_net_end"
SUBSYSTEM!="usb", GOTO="usb_realtek_net_end"
ENV{DEVTYPE}!="usb_device", GOTO="usb_realtek_net_end"

# Modify this to change the default value
ENV{REALTEK_NIC_MODE}="1"

# Realtek
ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}"
ATTR{idVendor}=="0bda", ATTR{idProduct}=="8153", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}"
ATTR{idVendor}=="0bda", ATTR{idProduct}=="8152", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}"_

michelhandleitnl avatar Apr 25 '20 16:04 michelhandleitnl

Hi Jose,

I think it has to do by the missing of 50-usb-realtek-net.rules. This needs to be included but I don't have a clue how to do that. The Realtek device is detected by you're driver but not as a nic but as a filesystem. The file underneath seems to solve that problem, only I don't know if it needs to be compiled/linked into the driver or if it is a file that needs to exist on an esxi host on a my unknown location.

_This is used to change the default configuration of Realtek USB ethernet adapters

ACTION!="add", GOTO="usb_realtek_net_end"
SUBSYSTEM!="usb", GOTO="usb_realtek_net_end"
ENV{DEVTYPE}!="usb_device", GOTO="usb_realtek_net_end"

# Modify this to change the default value
ENV{REALTEK_NIC_MODE}="1"

# Realtek
ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}"
ATTR{idVendor}=="0bda", ATTR{idProduct}=="8153", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}"
ATTR{idVendor}=="0bda", ATTR{idProduct}=="8152", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}"_

The rules file (50-usb-realtek-net.rules) is for use with Linux distros with "udev" support, so you cannot use it with ESXi. As far as I can tell, the rules file is not required anyway, unless you want to change the default mode.

What's important, however, is that device ID 0x8156 is only available on the latest version of the driver (2.12.0). Furthermore, the new adapter requires functionality available on the latest Linux kernel, which I believe is not available for the ESXi kernel shim.

Note also that any Linux based drivers are not supported on ESXi version 7 (latest), as the drivers have all been ported to a BSD base.

gomesjj avatar Apr 26 '20 14:04 gomesjj

Thank you for your code, I compiled successfully and got r8152.o and vmklinux_module.o, how to use them on esxi ?

llxiaoyuan avatar Dec 30 '22 14:12 llxiaoyuan