RTL8153 Compile
-
Thanks for the reply. Well unfortunately Realtek's website is not functioning this morning. But it is the latest RTL8153 driver which is actually the RTL8152. So I made progress I just had to modify the file to get the make command to thecreate the .ko. How can I manually install the .ko on the host? I have both XCP 7.5 and XenServer 7.6 to test it on. I tried the sudo make install in the directory but it fails because it is looking for the build directory for mod.
[root@localhost tplink]# sudo make install
rmmod r8152
make -C /lib/modules/4.4.0+10/build SUBDIRS=/tplink INSTALL_MOD_DIR=kernel/drivers/net/usb modules_install
make: *** /lib/modules/4.4.0+10/build: No such file or directory. Stop.
make: *** [install] Error 2
[root@localhost tplink]#So any idea how to manually add the .ko if that is my next and only choice?
-
@geant90 You can copy your ko in
/lib/modules/4.4.0+10/updates/
Run
depmod -a
and thenmodprobe -v xxx
(without .ko) -
Dang you beat me to it! Thanks for thee help once again. So i actually figure out how to work with modprobe. I did it differently; however, I did get the usb device showing it was using the driver but it still was not functioning. Any ideas with that? or how I can check? the side usb ethx device would pop up but would say disconnected in xcenter. Could not force with pif plug. Any ideas? I will start fresh and try your commands to see if the input is any different. I will get the exact text later when i do a lsusb -t to see the drivers. When No drivers installed or when using the cdc_eth drivers the drivers for the usb device show if 0 and the drivers then if 1 the same driver. When I use the rtl driver it only uses one I believe if 0. What is that if command for? If present? Google fu did no justice. ;( Another great thing getting closer is I found usb3.0 nics on ebay using the same chip for 5 bucks. Can I order one for you as well as I am going to get one to test. The whole intention behind this is so ultimately I can just create a simple shell to copy the .ko to appropriate directory run the commands for modprobe and make it so the eth name is always the same. That way homelabbers or even an engineer in need can have a super cheap go to NIC that is easy to deploy. Sure its not plug and play but executing a shell aint a damn thing for the cost of 5 bucks and once done you are good to go.The friendlier usb nics start around 20USD and someone (hopefully I with the help of you guys) just got to get the dirty work out the way.
-
@geant90 do you have product name/URL? We can make a proper installer (rpm) for its driver then.
Its definitely important to have as large as hardware support available and I'm sure allowing USB NICs will help community to get along well.
-
I am currently using a TP-Link TL-UE300 USB3.0 to Gigabit adapter. it is a RTL8153 chipset. Something is going on with Realtek's website that it is showing up in Chinese with a 404 error. I guess they are having some server issues as of this week. Anyways I downloaded the driver previously and have uploaded it here:
The RTL8153 uses the updated RTL8152 driver and confirmed the Device IDs are in there.
When attempting to make the .ko it will fail on the virgin r8152.c
After untaring the file edit r8152.c
Edit the file in an editor and add in line 31 (diff command 31a32,36 to enter the 5 lines after 31)
Credit to Luiz Otavio de Lima Rodrigues comment on pcsuggest.com// missing in mii.h
#if !defined BMCR_SPEED10
#define BMCR_SPEED10 0x0000 /* Select 10Mbps */
#endifAs it is missing a defined BMCR_SPEED10
And the make in the DDK will create the .ko succesfully. PM your address or I can PayPal gift you and you could order it yourself.
Here is a generic ebay RTL8153 which is $8.61USD
RTL8153 EbayI am going to try some other things now.
-
@geant90 from the source I could build r8152.ko but its not packaged as rpm, will need a spec file, but thats optional atm. You can install this in updates and do a
# insmod /lib/modules/4.4.0+10/updates/r8152.ko
to load it. Default modprob will load a different newer driver.I saw
50-usb-realtek-net.rules
given in the source, which I think you are supposed to copy in/etc/udev/rules.d/
and reboot. -
I was checking what's available in the default kernel
[root@xcp-ng-kernel ~]# modinfo r8152 filename: /lib/modules/4.4.0+10/kernel/drivers/net/usb/r8152.ko license: GPL description: Realtek RTL8152/RTL8153 Based USB Ethernet Adapters author: Realtek linux nic maintainers <nic_swsd@realtek.com> srcversion: 275BB427D5468F1A7C4952D alias: usb:v0955p09FFd*dc*dsc*dp*ic02isc06ip00in* alias: usb:v0955p09FFd*dc*dsc*dp*icFFisc*ip*in* alias: usb:v17EFp304Fd*dc*dsc*dp*ic02isc06ip00in* alias: usb:v17EFp304Fd*dc*dsc*dp*icFFisc*ip*in* alias: usb:v17EFp7205d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v17EFp7205d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v04E8pA101d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v04E8pA101d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v0BDAp8153d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v0BDAp8153d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v0BDAp8152d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v0BDAp8152d*dc*dsc*dp*icFFisc*ip*in* depends: mii intree: Y vermagic: 4.4.0+10 SMP mod_unload modversions
And in an experimental kernel
[root@xcp-ng-rjv ~]# modinfo /lib/modules/4.9.0+0/kernel/drivers/net/usb/r8152.ko filename: /lib/modules/4.9.0+0/kernel/drivers/net/usb/r8152.ko version: v1.08.9 license: GPL description: Realtek RTL8152/RTL8153 Based USB Ethernet Adapters author: Realtek linux nic maintainers <nic_swsd@realtek.com> srcversion: AC6057A94C471403609426E alias: usb:v0955p09FFd*dc*dsc*dp*ic02isc06ip00in* alias: usb:v0955p09FFd*dc*dsc*dp*icFFisc*ip*in* alias: usb:v13B1p0041d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v13B1p0041d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v17EFp304Fd*dc*dsc*dp*ic02isc06ip00in* alias: usb:v17EFp304Fd*dc*dsc*dp*icFFisc*ip*in* alias: usb:v17EFp7205d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v17EFp7205d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v04E8pA101d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v04E8pA101d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v0BDAp8153d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v0BDAp8153d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v0BDAp8152d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v0BDAp8152d*dc*dsc*dp*icFFisc*ip*in* depends: mii intree: Y vermagic: 4.9.0+0 SMP mod_unload modversions
And in a may be possible future kernel
[root@f6029920339a wip-kernel-4.14.78]# modinfo /root/rpmbuild/BUILD/kernel-4.14.78/drivers/net/usb/r8152.ko filename: /root/rpmbuild/BUILD/kernel-4.14.78/drivers/net/usb/r8152.ko version: v1.09.9 license: GPL description: Realtek RTL8152/RTL8153 Based USB Ethernet Adapters author: Realtek linux nic maintainers <nic_swsd@realtek.com> srcversion: 0B28043322357B23314507D alias: usb:v2357p0601d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v2357p0601d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v0955p09FFd*dc*dsc*dp*ic02isc06ip00in* alias: usb:v0955p09FFd*dc*dsc*dp*icFFisc*ip*in* alias: usb:v13B1p0041d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v13B1p0041d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v17EFp7214d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v17EFp7214d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v17EFp720Cd*dc*dsc*dp*ic02isc06ip00in* alias: usb:v17EFp720Cd*dc*dsc*dp*icFFisc*ip*in* alias: usb:v17EFp7205d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v17EFp7205d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v17EFp3069d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v17EFp3069d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v17EFp3062d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v17EFp3062d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v17EFp304Fd*dc*dsc*dp*ic02isc06ip00in* alias: usb:v17EFp304Fd*dc*dsc*dp*icFFisc*ip*in* alias: usb:v04E8pA101d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v04E8pA101d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v045Ep07C6d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v045Ep07C6d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v045Ep07ABd*dc*dsc*dp*ic02isc06ip00in* alias: usb:v045Ep07ABd*dc*dsc*dp*icFFisc*ip*in* alias: usb:v0BDAp8153d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v0BDAp8153d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v0BDAp8152d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v0BDAp8152d*dc*dsc*dp*icFFisc*ip*in* alias: usb:v0BDAp8050d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v0BDAp8050d*dc*dsc*dp*icFFisc*ip*in* depends: mii intree: Y name: r8152 vermagic: 4.14.78 SMP mod_unload modversions
It looks like the product is 2357:0601 and its driver is natively available in 4.14.X kernel.
Check ->
alias: usb:v2357p0601d*dc*dsc*dp*ic02isc06ip00in* alias: usb:v2357p0601d*dc*dsc*dp*icFFisc*ip*in*
For now, you will have to continue using the compiled
r8152.ko
and tweaking udev rules to correctly detect it. -
Man I am here trying. I got the rules in aswell as the driver selected and loaded. pif-list says no for currently attached?
-
How can I get 4.14.78?
Can you send me that r8152.ko v1.09.9
-
Got a bit more progress. So it does not work in xCenter gui but looking at ifconfig I have statistic and after assign an ip address got it to respond to ping. It does not make a xenbridge though?
-
This post is deleted! -
Looks like it has been working all along just xCenter not showing it correctly.
![0_1541229437535_usbnic.PNG](Uploading 100%)
Where does xCenter pull these stats from?
-
@geant90 you will need to do a
xe pif-scan
if the NIC was not present during installation.Also, please share exact vendor id of your NIC. You can obtain it from
lspci -v
ordmesg
-
I did. I even deleted and reintroduce with mac but no luck. Where does the dash get that information the pif is showing connected in command with the uuid but not in gui.
-
@r1 Do you mean the already known 2357:0601?
-
@geant90 Just wanted to know that you are seeing the same ID 2357:0601.
If
#ifconfig
shows it correctly and the networking is working fine, you can scan it via XCP-NG-Center or# xe pif-introduce
to let XAPI know about it.Does your
#xsconsole
show it under "Display NICs"? -
@r1 I did do a scan. It detects it and adds to xcenter but list as disconnected. The console shows it but unknown and not connected. It does operate just fine as is but I would love for it to be as compatible as possible and we are so close.
Check out that link.
So Xen scans and detects the usbnic fine. Adds under device but no data is populated. pif-list command shows device is currently attatched. In xCenter I configure an addition network with ip as seen @ .92 and it works fine. When I do a pif-param-list I beleive xCenter gets the info from there. Most of it is missing. ifconfig shows all the right info. If I can somehow find out where does pif get this info I could modify it to call info from ifconfig and whatever else necesarry. After I get this figure out I will also have it always get same interface name.
So far to get this easily working on others it would just need a script that:
- copies rules and .ko appropriate places and updates
- PLAN: Persistent inf name for xen
3)PLAN: Get pif for device to get the needed info from ifconfig as it has all necesarry data. so it appears as any other NIC. So far it is working as it should
-
@geant90 I would ping @borzel to see if he knows about this behavior. Your
#ifconfig
shows correct info, can assign ip and works fine but XCP-NG-Center says its disconnected.
You say#xe pif-*
works fine.XCP-NG-Center gets data from XAPI, the same API used by xe, so it would be a very rare case that the info produced is mismatching.
Can you share screenshot of Host NICs from
- XCP-NG-Center
- #xsconsole -> Display NICS
- #xe pif-param-list
BTW, did you try XOA product, its a web based alternative to XCP-NG-Center with added automated functions?
-
[root@CNP-MOBILE ~]# xe pif-param-list uuid=f4cab341-1f20-d9e6-4164-627debe5f03f uuid ( RO) : f4cab341-1f20-d9e6-4164-627debe5f03f device ( RO): side-373-eth0 MAC ( RO): 50:3e:aa:85:a7:ac physical ( RO): true managed ( RO): true currently-attached ( RO): true MTU ( RO): 1500 VLAN ( RO): -1 bond-master-of ( RO): bond-slave-of ( RO): <not in database> sriov-physical-PIF-of ( RO): sriov-logical-PIF-of ( RO): tunnel-access-PIF-of ( RO): tunnel-transport-PIF-of ( RO): management ( RO): false network-uuid ( RO): 4f2d9638-59ae-6ce7-b36d-fea5eeb13d01 network-name-label ( RO): Pool-wide network associated with side-373-eth0 host-uuid ( RO): af183f35-2629-4472-9538-90c2b37dca85 host-name-label ( RO): CNP-MOBILE IP-configuration-mode ( RO): Static IP ( RO): 192.168.91.92 netmask ( RO): 255.255.255.0 gateway ( RO): 192.168.91.1 IPv6-configuration-mode ( RO): None IPv6 ( RO): IPv6-gateway ( RO): primary-address-type ( RO): IPv4 DNS ( RO): properties (MRO): gro: on capabilities (SRO): io_read_kbs ( RO): <unknown> io_write_kbs ( RO): <unknown> carrier ( RO): false vendor-id ( RO): vendor-name ( RO): device-id ( RO): device-name ( RO): speed ( RO): 0 Mbit/s duplex ( RO): unknown disallow-unplug ( RW): false pci-bus-path ( RO): other-config (MRW): management_purpose: Extra igmp-snooping-status ( RO): disabled
Heres the picture of NIC
xscone Display + xcenterI know about XOA, use it at work. For this test machine I built a fresh XenServer 7.6 As I hope to get it working as natural as possible. That way if it works in XS it'll work in XCP-NG and XOA. As again goal is so it works for everywhere after a script shell install.
Do you happen to have a usb nic woring in xen? Screen shots for comparison? -
@geant90 so its XAPI itself that does not recognize the interface being online.
Whats the
#ethtool -i ethX
andethtool ethX
output look like?Usually on pif-scan the interface (if online) should get registered. And does
#dmesg
shows that interface is now online when you plug a LAN into it?