Opened 15 years ago
Closed 15 years ago
#5180 closed bug (fixed)
RTL8101E/RTL8102E Wired Ethernet not working on Dell Inspiron Mini 10v
Reported by: | Lynton | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Drivers/Network | Version: | R1/Development |
Keywords: | RTL8101E/RTL8102E | Cc: | kallisti5@…, vegarwa@… |
Blocked By: | Blocking: | ||
Platform: | x86 |
Description
In build hrev34776 listdev shows the device as:-
device Network controller (Ethernet controller) [2|0|0]
vendor 10ec: Realtek Semiconductor Co., Ltd. device 8136: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
In FreeBSD the re(4) driver supports RealTek RTL8139C+, RTL8169, RTL816xS, RTL811xS, and RTL8101E based Fast Ethernet and Gigabit Ethernet adapters
Haiku apparently has the "re" driver already but doesn't appear to have support for the RTL8101E with the device id shown by listdev.
Please could the Haiku driver be updated to support this Network Adapter?
Attachments (4)
Change History (45)
comment:1 by , 15 years ago
by , 15 years ago
Output from KDL as requested. Bit blurry but hope its OK ?
comment:2 by , 15 years ago
Type: | enhancement → bug |
---|
Lynton, I recall you saying on your forum post:
"No wired or wireless LAN adapters can be seen in Prefs->Network"
Can you provide listing of files and folders under /dev/net. This is where the network driver gets loaded and should be checked.
Please attach /boot/var/log/syslog to this ticket if it exists to see what is going on.
*Changing ticket to bug since Haiku has rtl81xx (FreeBSD re) driver.
comment:3 by , 15 years ago
Indeed, Prefs->Network shows no adapters whatsoever. No devices are listed in /dev/net Please find attached /boot/var/log/syslog as requested.
Thanks
comment:4 by , 15 years ago
Just looked through the attached syslog and found this:-
KERN: rtl81xx: init_driver(0xcdde5e74) 785 KERN: [rtl81xx] (re) bus_alloc_resource(3, [24], 0x0, 0xffffffff, 0x1,0x2) 786 KERN: [rtl81xx] (re) MSI count : 0 787 KERN: [rtl81xx] (re) bus_alloc_resource(1, [0], 0x0, 0xffffffff, 0x1,0x6) 788 KERN: [rtl81xx] (re) Chip rev. 0x24800000 789 KERN: [rtl81xx] (re) MAC rev. 0x00400000 790 KERN: [rtl81xx] (re) Unknown H/W revision: 0x24c00000
A similar problem is mentioned at http://forums.pcbsd.org/viewtopic.php?f=27&t=14788
comment:5 by , 15 years ago
OK going on from the info above I have modified if_re.c and if_rlreg.h ready to put into my local source tree for testing later today.
comment:6 by , 15 years ago
yes, looks like you may have found the issue as listed in syslog. Your H/W revision is missing and likely why your network card is not detected and initialized.
KERN: [rtl81xx] (re) Unknown H/W revision: 0x24c00000
The other ones are listed here except for your network card revision - you should add it in.
if_re.c already has 8101 & 8102 defined:
208 { RL_HWREV_8101E, RL_8169, "8101E"}, 209 { RL_HWREV_8102E, RL_8169, "8102E"}, 210 { RL_HWREV_8102EL, RL_8169, "8102EL"},
Just define your hardware revision in if_rlreg.h and hopefully it works for you afterwards.
comment:7 by , 15 years ago
I can confirm that after adding the H/W revision my network adapter initializes and appears in Prefs->Network as /dev/net/rtl81xx/0 and works just fine. Please find attached a couple of diffs, maybe a dev could do the honours once its approved?
comment:8 by , 15 years ago
I have no idea how you created these patches. I could manually apply them, but instead, could you use "svn diff src/add-ons/kernel/drivers/network/rtl81xx" from within the Haiku source code root? Then name the patch with ".diff" at the end. That will make Trac display it properly. Thanks a lot!
comment:9 by , 15 years ago
It would probably make more sense to just update the re driver with the current FreeBSD version. It also includes these ids.
follow-up: 11 comment:10 by , 15 years ago
mmlr is right, that for if_re.c it should be updated from FreeBSD instead of making changes to this file. FreeBSD 8 if_re.c can be found here:
http://svn.freebsd.org/viewvc/base/stable/8/sys/dev/re/
if_rlreg.h I believe is Haiku file and should be updated/changed manually to match with FreeBSD 8 if_re.c
Regards,
comment:11 by , 15 years ago
Replying to tonestone57:
if_rlreg.h I believe is Haiku file and should be updated/changed manually to match with FreeBSD 8 if_re.c
No it isn't. For whatever reason it is under sys/dev/pci:
comment:12 by , 15 years ago
I was just getting ready to post my mistake about if_rlreg.h but you beat me to it mmlr. Thanks for the correction.
I had neglected to check the start of if_rlreg.h but did so only a few minutes ago and saw that it is FreeBSD and found it too on their site. I was guessing in my previous reply and was wrong.(tired from waking up too early). Bye.
follow-up: 14 comment:13 by , 15 years ago
I may have messed something up, sorry. I only saw the new diff (thanks!) and straight went to deleting the previous attachments. Was that premature? Please attach them again, if so.
There is probably a proper procedure for updating FreeBSD drivers in our repo to a new version? Should I ignore the patches here and figure out how to do that instead? Or were the attachments I deleted already a properly merged version of the files?
comment:14 by , 15 years ago
Replying to stippi:
There is probably a proper procedure for updating FreeBSD drivers in our repo to a new version? Should I ignore the patches here and figure out how to do that instead?
Definitely. The proper way would be to update the FreeBSD vendor branch version, tag it with 8.0 release if you take the sources from there, and then copy the branch version into trunk, applying Haiku specific changes if there are any (which you could examine by diffing the vendor branch and the trunk versions).
comment:15 by , 15 years ago
OK I have the two FreeBSD files if_rlreg.h and if_re.c here in my local repo. Once I've double checked it all compiles up and works (It did last time) I then do a svn diff src/add-ons/kernel/drivers/network/rtl81xx as suggested by stippi to obtain my diff then post that? I think I'm making this more difficult than it need be but as a newbie its all in the name of learning so hope you don't mind?
comment:16 by , 15 years ago
Took the latest FreeBSD driver and plugged it straight in to the source tree and compiled OK. Network adapter on my machine works fine with the diff applied. Is there anything else I need to do or should have done?
comment:17 by , 15 years ago
Well, if the Haiku version contained any Haiku specific changes, those should be lost now, but if the adapter works for you, it seems unlikely, that it contained any changes. I will check myself, if I have some time, but maybe someone beats me to it. As mmlr explained, the driver needs to be checked against the vendor version in the respective branch of the Haiku repository to see if any changes were made.
comment:18 by , 15 years ago
A problem I see with these changes is that the patch adds back the (commented) ids for cards which are handled by other drivers, like rtl8139 and rtl8169.
follow-up: 20 comment:19 by , 15 years ago
yes, but I believe the 8139 code should be unblocked from this driver to allow support for 8139C+.
This driver is meant to handle the 8139C+ which is not handled by rtl8139 (rl) driver. ). The 8139C+ is closer to 8169 in hardware design.
From what I see, this driver loads when it detects any 8139 but is supposed to unload itself if revision is less than that of 8139C+.
comment:20 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
Replying to tonestone57:
yes, but I believe the 8139 code should be unblocked from this driver to allow support for 8139C+.
This driver is meant to handle the 8139C+ which is not handled by rtl8139 (rl) driver. ). The 8139C+ is closer to 8169 in hardware design.
From what I see, this driver loads when it detects any 8139 but is supposed to unload itself if revision is less than that of 8139C+.
Ok, makes sense. I think this device is also the one emulated in XenServer, and that explains why I wasn't getting network working in there. I'll try getting the patch in the trunk in the next days.
comment:21 by , 15 years ago
Version: | R1/alpha1 → R1/Development |
---|
follow-up: 23 comment:22 by , 15 years ago
@ Jackburton
Can you provide an update of your progress in getting the driver updated in Haiku? Already had two other people who need it because this is a popular network chipset used on netbooks/laptops. I would also like to test and use this in Qemu (8139C+) instead of the older Realtek 8029(?) driver.
comment:23 by , 15 years ago
Replying to tonestone57:
@ Jackburton
Can you provide an update of your progress in getting the driver updated in Haiku? Already had two other people who need it because this is a popular network chipset used on netbooks/laptops. I would also like to test and use this in Qemu (8139C+) instead of the older Realtek 8029(?) driver.
I'm going to commit only the added 8139C+ change. Updating the driver correctly would require importing it in the vendor tree and then updating. Currently I'm not able to do that. Just by adding back the 8139C+ id I was able to use the network in XenServer, though.
comment:25 by , 15 years ago
Hi there,
I've got a ricatech netbook (never heard of that brand before, this device was 'donated' to me). It has a similar problem:
On hrev35274, gcc2 hybrid,
from listdev: vendorID 10ec, deviceID 8136, RTL8101E/02E PCI express fast ethernet controller
from syslog: chiprev 0x34800000, MAC rev. 0x00400000, Unknown H/W revision: 0x34c00000.
Hope this can be fixed :-)
Bye!
Rudolf.
comment:26 by , 15 years ago
Priority: | normal → high |
---|
@Jack Burton
Not to sound rude but please unassign (remove) yourself from this bug since you are unable to get it fixed. This will allow another developer to work on it. Or resolve the issue why you cannot import to vendor tree & update and fix it yourself. Choose one or the other. I would really like to see this easy bug closed soon.
I say this because 1) an easy fix ( replace with newer FreeBSD driver ) and 2) many newer laptops coming with newer Realtek network chipsets which are currently unsupported. People starting to run into this bug & have no networking.
@Rudolfc
The fix is simple. Replace two FreeBSD files in Haiku source & comment out the IDs for 8168/8169 since already have a Haiku driver for those. Compile & should work. Location of files listed above in ticket.
comment:27 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | in-progress → assigned |
comment:28 by , 15 years ago
Priority: | high → normal |
---|
Please don't adjust ticket priorities if you're not a developer.
comment:29 by , 15 years ago
OK, I won't change ticket priorities on any bugs. In the future, would be good to disable or remove or gray out Priority field for non-developers so others don't do the same.
Thank you Jack. Can a developer also change status back to New (available) since it is no longer Assigned to any developer. Regards.
comment:30 by , 15 years ago
Just a quick note, I am seeing random functionality of the rtl8101e/rtl8102e driver on my Acer Aspire one (10ec:8136)
On some boots the driver loads and works fine, on some boots the NIC is not present in ifconfig -a
Tested on hrev35580
kdl ints when working...
rtl81xx:re_intr (0x80d47e80), data 0xcd3df000, handled <unknown>
as soon as I see the interface disappear again I'll grab an ints.. rebooted 6 times and of course the darn thing won't break again.
comment:31 by , 15 years ago
interface disappeared when I changed the network properties to dhpc and restarted. on hrev35580 still.
kdl ints when not working...
rtl81xx:re_intr (0x80fd9e80), data 0x821a7000, handled <unknown>
Other things on interrupt 11 on my Aspire one...
intel_extreme x1, ehci x1, uhci x4, atheroswifi x1
The atheros and rtl81xx devices have 'handled <unknown>' in the ints, the rest of the interrupt 11 items have integer after handled.
I wonder if disabling the atheroswifi driver will fix this issue in my case? That <unknown> handled item only shows up for these two network devices.
comment:32 by , 15 years ago
removing atheroswifi driver seems to make the wired interface more stable to load.. but it is not working.
Noticed the following message in syslog every 30 seconds or so:
KERN: [rtl81xx] (re) watchdog timeout
comment:33 by , 15 years ago
Cc: | added |
---|
comment:34 by , 15 years ago
@Rudolfc The fix is simple. Replace two FreeBSD files in Haiku source & comment out the IDs for 8168/8169 since already have a Haiku driver for those. Compile & should work. Location of files listed above in ticket.
Hmm; I tried that removing the 81xx driver, and the 8139 driver: nogo. otoh, replacing the 8102e entry in the 81xx headerfile did the d trick: I am writing this from the netbook. It seems this card is not supported out of the box by either 3 drivers. it's hwrev should be added to the 81xx or maybe the 8169 driver..
I hope someone will update this stuff somehow. Is this the downside of having (old) bsd drivers inside haiku?
Bye!
Rudolf.
comment:35 by , 15 years ago
Cc: | added |
---|
by , 15 years ago
Attachment: | RTL8101E.patch added |
---|
comment:36 by , 15 years ago
patch: | 0 → 1 |
---|
comment:38 by , 15 years ago
The patch I just added was applied to current SVN and I have the device working currently.
comment:39 by , 15 years ago
I went finally with the update approach with hrev37041. Please comment/test. Thanks!
comment:41 by , 15 years ago
Hi there,
I just installed hrev37068 on the Ricatech netbook. Wired net now works out of the box. Thanks!
Rudolf.
comment:42 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Closing this as fixed. If not please reopen.
The device id is mentioned in the rtl81xx driver. Would you provide the output of
ints
from KDL (ReportingBugs)? If you're using a usb keyboard on OHCI usb, plug in a PS/2 keyboard first -- usb+ohci+KDL doesn't work yet.