Created attachment 45262 [details] Dmesg output 2.6.37 Hello, I have a Intel Classmate PC netbook with MeeGo installed on it and i've notice a problem with the jme driver. The network car is a JMicron JMC260. Once connect on wired network, i call the suspend with: echo "mem" >/sys/power/state The system goes on suspend. After resuming from suspend, the network card cannot be used anymore. The kernel keeps track of the link, showing when the cabble is connect or not, but it don't stabilish the connection. I've also tried to reconfigure the network with ifconfig and reload the driver with no success on connecting. I've attached the dmesg output right before the suspend until the resume. Please, let me know if i can provide more information on that.
Created attachment 45552 [details] jme: Do not use legacy PCI power management Please check if the attached patch helps.
I can't compile the kernel with this patch applied, this is the error: CC [M] drivers/net/jme.o drivers/net/jme.c:3083:8: error: 'nv_suspend' undeclared here (not in a function) drivers/net/jme.c:3083:8: error: 'nv_resume' undeclared here (not in a function) drivers/net/jme.c:3017:12: warning: 'jme_suspend' defined but not used drivers/net/jme.c:3058:1: warning: 'jme_resume' defined but not used make[4]: *** [drivers/net/jme.o] Error 1 make[3]: *** [drivers/net] Error 2 make[2]: *** [drivers] Error 2 make[1]: *** [binrpm-pkg] Error 2 make: *** [binrpm-pkg] Error 2 I will try to fix this issue, please, let me know if you solve the problem.
Hmm. It looks like I attached a wrong patch, sorry about that.
Created attachment 45662 [details] jme: Do not use legacy PCI power management Please try this one instead.
Hello Rafael, thanks for the update. The patch can now be correctly applied to the kernel, but it's not working. The behavior is the same, the connection is lost and don't come up again after resuming from suspend. I've also tried removing the driver by hand and adding it again on resume but with no success. The behavior is the same, the kernel still prints messages when i connect and disconnect the cable saying "Link up" and "Link down" Sometimes the dhclient print this message: SIOCSIFFLAGS: Cannot assign requested address Please, let me know if i can contribute with more information.
Hello, can i help with any other debug? Do you think this is an device issue or drivers issue? Thanks
Tested the behavior of the latest driver located in: http://bbs.cooldavid.org/git/?p=jme.git;a=summary and also the behavior of this driver with the suggested patch, but the jme card still lose the connection after resuming from suspend.
Some information that Guo-Fu Tseng asked me to provide. > 1. Does it make any difference if you ifconfig down/up the device again? No difference. > 2. What's the link status reported by ethtool? Before resuming: ------------- Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: pg Wake-on: g Current message level: 0x000020c6 (8390) Link detected: yes ------------- After resuming ------------- Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: pg Wake-on: g Current message level: 0x000020c6 (8390) Link detected: yes ------------- > 3. Does dmesg show any link changes after resume? Yes, it does. > 4. Please provide ethtool -d (register dump) > a. When it is working correctly. > b. After resume. > c. if "1." does makes any difference, please provide register dump > after ifconfig down and after ifconfig up. Before resuming: ------------- Offset Values -------- ----- 000: 35 00 00 00 00 80 ab 36 00 00 00 00 00 04 00 00 010: 88 ba ab 36 23 03 00 60 00 00 00 00 00 00 00 00 020: 05 08 00 3f 00 00 98 36 00 00 00 00 00 02 00 00 030: e4 1b 98 36 4f 07 00 00 00 26 9e d9 70 c9 00 00 040: 00 00 00 28 02 00 00 04 00 00 00 00 37 00 00 00 050: 40 f8 00 00 60 00 a0 00 00 00 00 00 00 00 00 00 060: 01 00 02 00 00 00 00 00 ab 0b 00 00 ba 2d 00 00 070: 00 00 00 00 00 00 00 00 80 00 80 00 00 00 00 00 080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 120: 00 00 00 00 00 00 00 00 00 00 00 70 00 00 00 00 130: 43 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 140: d0 01 00 50 00 00 00 00 00 00 00 00 00 00 00 00 150: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff 160: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 170: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 190: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 200: 62 8b fe 03 10 10 00 00 01 02 30 00 00 00 00 00 210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 220: 00 00 00 00 00 00 00 00 00 10 31 e2 00 10 31 e2 230: 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 240: 01 08 e8 03 00 22 00 00 00 00 00 00 00 00 00 00 250: 00 00 00 00 00 00 00 00 00 00 00 00 e0 00 00 00 260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 270: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0 00 280: 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 290: 00 00 01 01 00 01 00 00 ff ff ff ff ff ff ff ff 2a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 2b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 2c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 2d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 2e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 2f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 310: 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 360: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 400: 00 31 6d 78 6e 00 21 32 e1 0d e1 45 01 00 00 00 410: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 420: 00 00 40 6c 00 00 00 00 81 00 00 00 00 00 00 00 430: 00 2d 74 47 00 10 24 00 00 00 00 00 00 00 00 00 440: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 450: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 460: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 470: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 490: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 4a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 4b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 4c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 4d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 4e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 4f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ------------- After resuming ------------- Offset Values -------- ----- 000: 35 00 00 00 00 80 00 23 00 00 00 00 00 04 00 00 010: 48 80 00 23 23 03 00 60 00 00 00 00 00 00 00 00 020: 05 08 00 3f 00 40 3c 36 00 00 00 00 00 02 00 00 030: 04 44 3c 36 4f 07 00 00 ff fb df 6f fb ef 00 00 040: 00 00 00 28 00 00 00 04 00 00 00 00 00 00 00 00 050: 60 00 00 31 60 00 a0 00 00 00 00 00 00 00 00 00 060: 01 00 06 00 00 00 00 00 02 00 00 00 3d 00 00 00 070: 00 00 00 00 00 00 00 00 80 00 80 00 00 00 00 00 080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 120: 00 00 00 00 00 00 00 00 00 00 00 70 00 00 00 00 130: 03 7e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 140: d0 01 00 50 00 00 00 00 00 00 00 00 00 00 00 00 150: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff 160: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 170: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 190: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 200: 45 1f ff 03 10 10 00 00 01 00 30 00 00 00 00 00 210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 220: 00 00 00 00 00 00 00 00 00 10 31 e2 00 10 31 e2 230: 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 240: 01 08 e8 03 00 22 00 00 00 00 00 00 00 00 00 00 250: 00 00 00 00 00 00 00 00 00 00 00 00 e0 00 00 00 260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 270: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0 00 280: 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 290: 00 00 cf 03 00 01 00 00 ff ff ff ff ff ff ff ff 2a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 2b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 2c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 2d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 2e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 2f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 310: 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 360: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 400: 00 31 6d 78 6e 00 21 32 e1 0d e1 45 03 00 00 00 410: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 420: 00 00 00 6c 00 00 08 7c 01 00 00 00 00 00 00 00 430: 00 2d 74 47 00 10 24 00 00 00 00 00 00 00 00 00 440: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 450: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 460: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 470: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 490: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 4a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 4b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 4c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 4d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 4e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 4f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ------------- > > Thanks for your help and report. :) > > >
On Wed, Feb 9, 2011 at 2:01 PM, Guo-Fu Tseng: > Hi Aries: > > I recently received an issue about the link after JMC260 resume from suspend. > Could you help me conform that if the value of link status > is normal with "Page Received Status" bit set while "Link Status" and > "Auto-negotiation Complete" is also set. > > JME_PHY 0x30 [8:15] = 0x7e > (At user provided register dump: offset 130) > > For Leonardo: > Could you try "ethtool -r ethX" after resume, and see if dmesg shows any > link change. And see if you can see the LED of the NIC blinked? No different messages, only link down and link up. My hardware is a Intel Classmate netbook and there is no led indicator for the network card. > Please provide me another register dump after "ethtool -r ethX". > > If you can, try to connect the device to different peer. > See if you get the same error. > > Just to be sure, by link error you mentioned, I see the link is up. > Can you provide how you determined it's a link issue? route with no information and ping to router with no answer. > Dose tcpdump(remember to use -n, it'll be much faster) show any packet? One interesting thing, once i call tcpdump, the network card starts to receive the packages!!!! i think this will solve our mistery. > Dose ifconfig show any error count? no error count > Dose the peer receive any packet from your device? yes > > On Tue, 8 Feb 2011 18:43:41 -0200, Leonardo L. P. da Mata wrote >> Hello Guo-Fu Tseng, thanks for the help, maybe you can provide any >> interesting information on the bug, i will post the tests thtat you >> asked me to do here and there. >>
Hello, I had a slightly different problem with my JMC250 ethernet. I am commenting here because one of the code differences (discussed at the end) involves the suspend function. Background: I tried both the 2.6.38 an 2.6.38.3 vanilla kernels (unpatched, starting from the same configuration used by debian squeeze 2.6.32), loaded the jme module and brought up eth0. I was not able to get any sort of traffic to go over the ethernet wire. I am able to look at the router from where I'm sitting, and the light for the port didn't light up at all. Reboot to windows, and the light lit up and the network worked just fine. Reboot to linux, and total failure. I downloaded jme-1.0.7.1.tbz2 from here: ftp://driver.jmicron.com.tw/Ethernet/Linux/ compiled and installed the module, and performed the same test - the network connection worked! I diff'd the two jme.c files, and there are differences. Most of the difference involve #if (kernel version), but there are some where the code looks like it was incorrectly copied into the kernel trunk. I'll give one example, from the function jme_suspend() Note that the name of the function and the potential error leads me to suspect that this inconsistencies may be the source of the suspend/resume bug discussed in this bug report. this is from JMicron's jme.c, pci_save_state(pdev); jme_powersave_phy(jme); #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27) pci_enable_wake(pdev, PCI_D3hot, true); #else pci_pme_active(pdev, true); *** #endif pci_set_power_state(pdev, PCI_D3hot); and this is from the 2.6.38.3 kernel pci_save_state(pdev); jme_powersave_phy(jme); pci_enable_wake(jme->pdev, PCI_D3hot, true); *** pci_set_power_state(pdev, PCI_D3hot); Note the *** lines, to the untrained eye, it looks like the wrong bit of code was deleted... Assuming JMicron's original code is correct, the *** line in the kernel should read pci_pme_active(pdef, true); There are a couple of other differences along the same lines. Kind regards, Paul
Correction: * It failed with the 2.6.38 kernel vanilla, * I substituted in the JMicron's driver, which worked, * I compiled 3.6.38.3 vanilla, rebooted and it works. I am not sure if 38.3 is correct, or if something in the hardware just 'clicked' and if it will start failing again tomorrow. cheers Paul
Additional tests: Vanilla 2.6.38.3 DOES have a problem. It is able to create an eth0 connection via the jme module, however, when I attempt to download something like the 2.6.38.3.tar.bz2 from kernel.org, it manages to get 1.2mb and then stalls to a halt. I then: rmmod jme untarred JMicro's code; make make install modprobe jme let network-manager reconnect my eth0 (dhcp), and I was able to download the kernel tarball quickly and without fault. So I think there is definitely a bug in the jme.c code that is used in the baseline kernel. cheers Paul
Closing as obsolete, if this is still seen on modern kernels please update
I have a similar problem here: #Bug 112351 Can someone please help?