Opened 12 years ago

Closed 9 years ago

#1609 closed bug (fixed)

NetworkStatus -> No Link

Reported by: atomozero Owned by: axeld
Priority: normal Milestone: R1
Component: Drivers/Network Version: R1/pre-alpha1
Keywords: Cc: zharik@…
Blocked By: Blocking:
Has a Patch: no Platform: x86

Description

The NetworkStatus report no network link but i can ping!

the net works and i can surf

Rev: 22864 Driver: rtl8139

Attachments (6)

screen1.png (96.8 KB ) - added by atomozero 12 years ago.
No Link Fake
screen1.2.png (96.8 KB ) - added by atomozero 12 years ago.
No Link Fake
screen1.3.png (96.8 KB ) - added by atomozero 12 years ago.
No Link Fake
syslog (94.5 KB ) - added by atomozero 12 years ago.
screen2.png (121.1 KB ) - added by atomozero 11 years ago.
rtl8139.fix-NoInternalPHY.patch (980 bytes ) - added by siarzhuk 11 years ago.
possible solution for "no PHY" problem.

Download all attachments as: .zip

Change History (25)

by atomozero, 12 years ago

Attachment: screen1.png added

No Link Fake

by atomozero, 12 years ago

Attachment: screen1.2.png added

No Link Fake

by atomozero, 12 years ago

Attachment: screen1.3.png added

No Link Fake

comment:1 by axeld, 12 years ago

Component: - GeneralDrivers/Network

This is probably a problem of a missing PHY. Can you add the relevant serial debug output? You may also find the info in the /var/log/syslog file on your HD :-)

comment:2 by atomozero, 12 years ago

this info?

KERN: get_device_interface: ask "network/devices/ethernet/v1" for /dev/net/rtl8139/0 KERN: ipv4_datalink_init(/dev/net/rtl8139/0) KERN: [rtl8139] compat_open(net/rtl8139/0, 0x2) KERN: [rtl8139] (net/rtl8139/0) bus_alloc_resource(4, [16], 0x0, 0xffffffff, 0x1, 0x2) KERN: [rtl8139] (net/rtl8139/0) bus_alloc_resource(1, [0], 0x0, 0xffffffff, 0x1, 0x6) KERN: [rtl8139] (contig:src/libs/compat/freebsd_network/fbsd_busdma_x86.c:521) addr = 0x905b2000, area = 515, size = 67054 KERN: [rtl8139] (miibus) No PHY module found (0/0)! KERN: if_initname(0x90916e00, net/rtl8139/0, 0) KERN: [rtl8139] ... status = 0x0

by atomozero, 12 years ago

Attachment: syslog added

comment:3 by scottmc, 11 years ago

Does this still happen? My 8139 shows as :Ready in hrev25673 at least.

comment:4 by atomozero, 11 years ago

now work fine :) thx!!

comment:5 by emitrax, 11 years ago

Resolution: fixed
Status: newclosed

comment:6 by atomozero, 11 years ago

Resolution: fixed
Status: closedreopened

by atomozero, 11 years ago

Attachment: screen2.png added

comment:7 by siarzhuk, 11 years ago

Cc: zharik@… added

comment:8 by siarzhuk, 11 years ago

2 Axel:

This problem is reproducible on hrev27627 with rtl8139. Looks like your suspection about "missing" PHY is right. Where can I trace more detailed information about this problem? :-)

...
KERN: nforce: init_hardware(0x806f8cb8)
KERN: nforce: no hardware found.
KERN: rtl8139: init_hardware(0x806f4d6c)
KERN: [rtl8139] (rl) bus_alloc_resource(4, [16], 0x0, 0xffffffff, 0x1, 0x2)
KERN: rtl8139, found RealTek 8139 10/100BaseTX at 9
KERN: rtl8139: init_driver(0x806f4d6c)
KERN: [rtl8139] (rl) bus_alloc_resource(4, [16], 0x0, 0xffffffff, 0x1, 0x2)
Last message repeated 1 time
KERN: [rtl8139] (rl) bus_alloc_resource(1, [0], 0x0, 0xffffffff, 0x1, 0x6)
KERN: [rtl8139] (miibus) No PHY module found (0/0)!
KERN: if_initname(0x91371ba0, rl, 3)
KERN: [rtl8139] rtl8139: /dev/net/rtl8139/0
KERN: loaded driver /boot/beos/system/add-ons/kernel/drivers/dev/net/rtl8139
KERN: syskonnect: init_hardware(0x8079f2b8)
KERN: syskonnect: no hardware found.
KERN: [33musb_asix:[0m54.38.737:init_driver
KERN: [33musb_asix:[0m54.38.737:usb_asix_device_added
KERN: Last message repeated 3 times.
KERN: [33musb_asix:[0m54.38.737:publish_devices
KERN: [33musb_asix:[0m54.38.738:uninit_driver
KERN: loaded driver /boot/beos/system/add-ons/kernel/drivers/dev/net/usb_asix
KERN: loaded driver /boot/beos/system/add-ons/kernel/drivers/dev/net/usb_ecm
KERN: via_rhine: init_hardware(0x807991f8)
KERN: via_rhine: no hardware found.
KERN: bfs: bfs_open_dir:1499: Invalid Argument
KERN: get_device_interface: ask "network/devices/ethernet/v1" for /dev/net/rtl8139/0
KERN: ipv4_datalink_init(/dev/net/rtl8139/0)
KERN: [net/rtl8139/0] compat_open(0x2)
KERN: ifmedia_ioctl: no media found for 0x20
KERN: /dev/net/rtl8139/0: media change, media 0x22 quality 1000 speed 10000
KERN: get_device_interface: ask "network/devices/ethernet/v1" for loop
KERN: get_device_interface: ask "network/devices/loopback/v1" for loop
...

comment:9 by axeld, 11 years ago

There apparently is no PHY module (ID 0/0), or it uses a different mechanism. Maybe the ukphy.c (unknown PHY, IIRC) can help here, it's already used in other drivers, but not in the RTL 8139.

by siarzhuk, 11 years ago

possible solution for "no PHY" problem.

comment:10 by siarzhuk, 11 years ago

Link state detection is broken on my system beginning with hrev27401. It was synchronization with FreeBSD7 code. Looks like internal PHY probing is not performed in case probe for external PHYs failed. Attached patch fix that problem on my system.

PS: I wonder how it works on FreeBSD 7 ??? ;-)

comment:11 by axeld, 11 years ago

This change isn't correct, though: BUS_PROBE_DEFAULT (-20) means success in FreeBSD (errors are positive), while under Haiku it's +20 (errors are negative). So it's the old "errors are positive" assumption that causes us pain again. That code like this appears in FreeBSD is pretty unfortunate.

In other words, the correct change would look like this:

    if (rv >= 0)

or

    if (rv == BUS_PROBE_DEFAULT)

The latter would have the advantage that it would also still work on FreeBSD.

comment:12 by jackburton, 11 years ago

Can we in some way try to tell the freeBSD people of that ?

comment:13 by siarzhuk, 11 years ago

I have checked with hrev27708 on my system: link status information is updated correctly.

comment:14 by axeld, 11 years ago

Resolution: fixed
Status: reopenedclosed

So I guess we can close this bug, then. Thanks Shiarzuk!

To Stefano: I'm not sure if they would care, but we could certainly try that.

comment:15 by axeld, 11 years ago

Oops, sorry for writing your name wrong, Siarzhuk...

comment:16 by siarzhuk, 11 years ago

To Stefano: Yesterday I tried to boot FreeBSD 7 from install CD and observe that internal PHY was found correctly, so looks like it works OK for FreeBSD.

To Axel: no problem, just yet another nickname for using. ;-)

in reply to:  16 comment:17 by jackburton, 11 years ago

Replying to siarzhuk:

To Stefano: Yesterday I tried to boot FreeBSD 7 from install CD and observe that internal PHY was found correctly, so looks like it works OK for FreeBSD.

I meant: tell them not to assume that error codes are positive.

comment:18 by alban, 10 years ago

Platform: Allx86
Resolution: fixed
Status: closedreopened

There seems to be an issue with link status in the network status app.

/dev/net/rtl8169/0

Hardware Type: Ethernet, Address: 00:21:70:29:f5:c4 inet addr: 10.10.10.61, Bcast: 10.10.10.255, Mask: 255.255.255.0 MTU: 1500, Metric: 0, up broadcast auto-configured Receive: 353 packets, 0 errors, 180486 bytes, 0 mcasts, 0 dropped Transmit: 356 packets, 0 errors, 89508 bytes, 0 mcasts, 0 dropped Collisions: 0

The link is up; the interface has an address etc; the link is working; but the network status app says that there is no link - rev 30830.

comment:19 by luroh, 9 years ago

Resolution: fixed
Status: reopenedclosed

alban, please open a new ticket if the issue is still present in a recent version of Haiku. Your ethernet device and driver are different than the ones mentioned in this ticket.

Note: See TracTickets for help on using tickets.