Re: Dell Inspiron 5558/0VNM2T and suspend/resume problem with r8169

2017-03-03 Thread Diego Viola
On Fri, Mar 3, 2017 at 12:40 PM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Fri, Mar 3, 2017 at 12:37 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>> On Wed, Mar 1, 2017 at 12:47 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>>> On Wed, Mar 1, 2017 at 12:44 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>>>> My machine (a Dell Inspiron 5558 laptop) fails to resume from suspend
>>>> unless I rmmod r8169 first.
>>>>
>>>> Another workaround is to do this before suspend:
>>>>
>>>> echo 0 > /sys/power/pm_async
>>>>
>>>> I've been reproducing the freeze like this:
>>>>
>>>> $ i3lock && systemctl suspend
>>>>
>>>> I would have to repeat this at least 5 times for the freeze to occur,
>>>> but it seems to be easily reproducible.
>>>>
>>>> If I don't invoke i3lock, I cannot get the freeze to happen, but it
>>>> seems to happen with other lockers also.
>>>>
>>>> I have tried Alt+SysRq+r and tried to switch to another TTY but the
>>>> machine is always unresponsive, which indicates that it's a kernel
>>>> panic.
>>>>
>>>> I have had a similar issue to this about a year ago with the jme
>>>> driver and this was the fix:
>>>>
>>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/net/ethernet/jme.c?id=ee50c130c82175eaa0820c96b6d3763928af2241
>>>>
>>>> I haven't tried getting a kernel trace yet, but all seems to indicate
>>>> the problem is caused by r8169, at least til now.
>>>>
>>>> Any ideas, please?
>>>>
>>>> Thanks,
>>>> Diego
>>>
>>> Sorry, I forgot to mention, I'm on Arch Linux (x86_64), kernel 
>>> 4.9.11-1-ARCH.
>>>
>>> Diego
>>
>> This is still a problem with Linux 4.10.1.
>>
>> Diego
>
> I got this trace in the journal while suspending, not sure if it's
> related to this problem:
>
> Mar 03 12:05:05 myhost kernel: PM: Preparing system for sleep (mem)
> Mar 03 12:05:05 myhost kernel: Freezing user space processes ...
> Mar 03 12:05:05 myhost kernel: usb 2-6: new full-speed USB device
> number 34 using xhci_hcd
> Mar 03 12:05:05 myhost kernel: sr 1:0:0:0: [sr0] tag#28
> UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
> Mar 03 12:05:05 myhost kernel: sr 1:0:0:0: [sr0] tag#28 Sense Key :
> 0x6 [current]
> Mar 03 12:05:05 myhost kernel: sr 1:0:0:0: [sr0] tag#28 ASC=0x28 ASCQ=0x0
> Mar 03 12:05:05 myhost kernel: sr 1:0:0:0: [sr0] tag#28 CDB:
> opcode=0x28 28 00 00 00 00 04 00 00 02 00
> Mar 03 12:05:05 myhost kernel: blk_update_request: I/O error, dev sr0, sector 
> 16
> Mar 03 12:05:05 myhost kernel: (elapsed 1.452 seconds) done.
> Mar 03 12:05:05 myhost kernel: Freezing remaining freezable tasks ...
> Mar 03 12:05:05 myhost kernel: [ cut here ]
> Mar 03 12:05:05 myhost kernel: WARNING: CPU: 3 PID: 2134 at
> drivers/base/firmware_class.c:1200 _request_firmware+0x2da/0xa70
> Mar 03 12:05:05 myhost kernel: Modules linked in: fuse nls_iso8859_1
> nls_cp437 vfat fat snd_hda_codec_hdmi rtsx_usb_ms memstick
> rtsx_usb_sdmmc dell_led snd_hda_codec_realtek snd_hda_codec_generic
> dell_laptop intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp
> kvm_int
> Mar 03 12:05:05 myhost kernel:  bluetooth cfg80211 aesni_intel
> aes_x86_64 crypto_simd glue_helper cryptd evdev intel_cstate
> input_leds intel_rapl_perf mac_hid i915 pcspkr snd snd_soc_sst_acpi
> thermal snd_soc_sst_match wmi battery ac97_bus soundcore fjes
> drm_kms_helper vide
> Mar 03 12:05:05 myhost kernel: CPU: 3 PID: 2134 Comm: kworker/3:5 Not
> tainted 4.10.1-ARCH #1
> Mar 03 12:05:05 myhost kernel: Hardware name: Dell Inc. Inspiron
> 5558/0VNM2T, BIOS A14 11/22/2016
> Mar 03 12:05:05 myhost kernel: Workqueue: usb_hub_wq hub_event [usbcore]
> Mar 03 12:05:05 myhost kernel: Call Trace:
> Mar 03 12:05:05 myhost kernel:  dump_stack+0x63/0x83
> Mar 03 12:05:05 myhost kernel:  __warn+0xcb/0xf0
> Mar 03 12:05:05 myhost kernel:  warn_slowpath_null+0x1d/0x20
> Mar 03 12:05:05 myhost kernel:  _request_firmware+0x2da/0xa70
> Mar 03 12:05:05 myhost kernel:  request_firmware+0x37/0x50
> Mar 03 12:05:05 myhost kernel:  ath3k_load_patch+0xc3/0x1e0 [ath3k]
> Mar 03 12:05:05 myhost kernel:  ath3k_probe+0x76/0x4ac [ath3k]
> Mar 03 12:05:05 myhost kernel:  ? __pm_runtime_set_status+0x1c0/0x2a0
> Mar 03 12:05:05 myhost kernel:  usb_probe_interface+0x159/0x2d0 [usbcore]
> Mar 03 12:05:05 myhost kernel:  driver_probe_device+0x2bb/0x460
> Mar 03 12:05:05 

Re: Dell Inspiron 5558/0VNM2T and suspend/resume problem with r8169

2017-03-03 Thread Diego Viola
On Fri, Mar 3, 2017 at 12:37 PM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Wed, Mar 1, 2017 at 12:47 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>> On Wed, Mar 1, 2017 at 12:44 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>>> My machine (a Dell Inspiron 5558 laptop) fails to resume from suspend
>>> unless I rmmod r8169 first.
>>>
>>> Another workaround is to do this before suspend:
>>>
>>> echo 0 > /sys/power/pm_async
>>>
>>> I've been reproducing the freeze like this:
>>>
>>> $ i3lock && systemctl suspend
>>>
>>> I would have to repeat this at least 5 times for the freeze to occur,
>>> but it seems to be easily reproducible.
>>>
>>> If I don't invoke i3lock, I cannot get the freeze to happen, but it
>>> seems to happen with other lockers also.
>>>
>>> I have tried Alt+SysRq+r and tried to switch to another TTY but the
>>> machine is always unresponsive, which indicates that it's a kernel
>>> panic.
>>>
>>> I have had a similar issue to this about a year ago with the jme
>>> driver and this was the fix:
>>>
>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/net/ethernet/jme.c?id=ee50c130c82175eaa0820c96b6d3763928af2241
>>>
>>> I haven't tried getting a kernel trace yet, but all seems to indicate
>>> the problem is caused by r8169, at least til now.
>>>
>>> Any ideas, please?
>>>
>>> Thanks,
>>> Diego
>>
>> Sorry, I forgot to mention, I'm on Arch Linux (x86_64), kernel 4.9.11-1-ARCH.
>>
>> Diego
>
> This is still a problem with Linux 4.10.1.
>
> Diego

I got this trace in the journal while suspending, not sure if it's
related to this problem:

Mar 03 12:05:05 myhost kernel: PM: Preparing system for sleep (mem)
Mar 03 12:05:05 myhost kernel: Freezing user space processes ...
Mar 03 12:05:05 myhost kernel: usb 2-6: new full-speed USB device
number 34 using xhci_hcd
Mar 03 12:05:05 myhost kernel: sr 1:0:0:0: [sr0] tag#28
UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Mar 03 12:05:05 myhost kernel: sr 1:0:0:0: [sr0] tag#28 Sense Key :
0x6 [current]
Mar 03 12:05:05 myhost kernel: sr 1:0:0:0: [sr0] tag#28 ASC=0x28 ASCQ=0x0
Mar 03 12:05:05 myhost kernel: sr 1:0:0:0: [sr0] tag#28 CDB:
opcode=0x28 28 00 00 00 00 04 00 00 02 00
Mar 03 12:05:05 myhost kernel: blk_update_request: I/O error, dev sr0, sector 16
Mar 03 12:05:05 myhost kernel: (elapsed 1.452 seconds) done.
Mar 03 12:05:05 myhost kernel: Freezing remaining freezable tasks ...
Mar 03 12:05:05 myhost kernel: [ cut here ]
Mar 03 12:05:05 myhost kernel: WARNING: CPU: 3 PID: 2134 at
drivers/base/firmware_class.c:1200 _request_firmware+0x2da/0xa70
Mar 03 12:05:05 myhost kernel: Modules linked in: fuse nls_iso8859_1
nls_cp437 vfat fat snd_hda_codec_hdmi rtsx_usb_ms memstick
rtsx_usb_sdmmc dell_led snd_hda_codec_realtek snd_hda_codec_generic
dell_laptop intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp
kvm_int
Mar 03 12:05:05 myhost kernel:  bluetooth cfg80211 aesni_intel
aes_x86_64 crypto_simd glue_helper cryptd evdev intel_cstate
input_leds intel_rapl_perf mac_hid i915 pcspkr snd snd_soc_sst_acpi
thermal snd_soc_sst_match wmi battery ac97_bus soundcore fjes
drm_kms_helper vide
Mar 03 12:05:05 myhost kernel: CPU: 3 PID: 2134 Comm: kworker/3:5 Not
tainted 4.10.1-ARCH #1
Mar 03 12:05:05 myhost kernel: Hardware name: Dell Inc. Inspiron
5558/0VNM2T, BIOS A14 11/22/2016
Mar 03 12:05:05 myhost kernel: Workqueue: usb_hub_wq hub_event [usbcore]
Mar 03 12:05:05 myhost kernel: Call Trace:
Mar 03 12:05:05 myhost kernel:  dump_stack+0x63/0x83
Mar 03 12:05:05 myhost kernel:  __warn+0xcb/0xf0
Mar 03 12:05:05 myhost kernel:  warn_slowpath_null+0x1d/0x20
Mar 03 12:05:05 myhost kernel:  _request_firmware+0x2da/0xa70
Mar 03 12:05:05 myhost kernel:  request_firmware+0x37/0x50
Mar 03 12:05:05 myhost kernel:  ath3k_load_patch+0xc3/0x1e0 [ath3k]
Mar 03 12:05:05 myhost kernel:  ath3k_probe+0x76/0x4ac [ath3k]
Mar 03 12:05:05 myhost kernel:  ? __pm_runtime_set_status+0x1c0/0x2a0
Mar 03 12:05:05 myhost kernel:  usb_probe_interface+0x159/0x2d0 [usbcore]
Mar 03 12:05:05 myhost kernel:  driver_probe_device+0x2bb/0x460
Mar 03 12:05:05 myhost kernel:  __device_attach_driver+0x8c/0x100
Mar 03 12:05:05 myhost kernel:  ? __driver_attach+0xf0/0xf0
Mar 03 12:05:05 myhost kernel:  bus_for_each_drv+0x67/0xb0
Mar 03 12:05:05 myhost kernel:  __device_attach+0xdd/0x160
Mar 03 12:05:05 myhost kernel:  device_initial_probe+0x13/0x20
Mar 03 12:05:05 myhost kernel:  bus_probe_device+0x92/0xa0
Mar 03 12:05:05 myhost kernel:  device_add+0x393/0x670
Mar 03 12:05:05 myhost kernel:  usb_set_configuration+0x5f9/0x910 [usbcore]
Mar 03 12:05:05 myhost kernel:  generic_pr

Re: Dell Inspiron 5558/0VNM2T and suspend/resume problem with r8169

2017-03-03 Thread Diego Viola
On Wed, Mar 1, 2017 at 12:47 PM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Wed, Mar 1, 2017 at 12:44 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>> My machine (a Dell Inspiron 5558 laptop) fails to resume from suspend
>> unless I rmmod r8169 first.
>>
>> Another workaround is to do this before suspend:
>>
>> echo 0 > /sys/power/pm_async
>>
>> I've been reproducing the freeze like this:
>>
>> $ i3lock && systemctl suspend
>>
>> I would have to repeat this at least 5 times for the freeze to occur,
>> but it seems to be easily reproducible.
>>
>> If I don't invoke i3lock, I cannot get the freeze to happen, but it
>> seems to happen with other lockers also.
>>
>> I have tried Alt+SysRq+r and tried to switch to another TTY but the
>> machine is always unresponsive, which indicates that it's a kernel
>> panic.
>>
>> I have had a similar issue to this about a year ago with the jme
>> driver and this was the fix:
>>
>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/net/ethernet/jme.c?id=ee50c130c82175eaa0820c96b6d3763928af2241
>>
>> I haven't tried getting a kernel trace yet, but all seems to indicate
>> the problem is caused by r8169, at least til now.
>>
>> Any ideas, please?
>>
>> Thanks,
>> Diego
>
> Sorry, I forgot to mention, I'm on Arch Linux (x86_64), kernel 4.9.11-1-ARCH.
>
> Diego

This is still a problem with Linux 4.10.1.

Diego


Dell Inspiron 5558/0VNM2T and suspend/resume problem with r8169

2017-03-01 Thread Diego Viola
My machine (a Dell Inspiron 5558 laptop) fails to resume from suspend
unless I rmmod r8169 first.

Another workaround is to do this before suspend:

echo 0 > /sys/power/pm_async

I've been reproducing the freeze like this:

$ i3lock && systemctl suspend

I would have to repeat this at least 5 times for the freeze to occur,
but it seems to be easily reproducible.

If I don't invoke i3lock, I cannot get the freeze to happen, but it
seems to happen with other lockers also.

I have tried Alt+SysRq+r and tried to switch to another TTY but the
machine is always unresponsive, which indicates that it's a kernel
panic.

I have had a similar issue to this about a year ago with the jme
driver and this was the fix:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/net/ethernet/jme.c?id=ee50c130c82175eaa0820c96b6d3763928af2241

I haven't tried getting a kernel trace yet, but all seems to indicate
the problem is caused by r8169, at least til now.

Any ideas, please?

Thanks,
Diego


Re: Dell Inspiron 5558/0VNM2T and suspend/resume problem with r8169

2017-03-01 Thread Diego Viola
On Wed, Mar 1, 2017 at 12:44 PM, Diego Viola <diego.vi...@gmail.com> wrote:
> My machine (a Dell Inspiron 5558 laptop) fails to resume from suspend
> unless I rmmod r8169 first.
>
> Another workaround is to do this before suspend:
>
> echo 0 > /sys/power/pm_async
>
> I've been reproducing the freeze like this:
>
> $ i3lock && systemctl suspend
>
> I would have to repeat this at least 5 times for the freeze to occur,
> but it seems to be easily reproducible.
>
> If I don't invoke i3lock, I cannot get the freeze to happen, but it
> seems to happen with other lockers also.
>
> I have tried Alt+SysRq+r and tried to switch to another TTY but the
> machine is always unresponsive, which indicates that it's a kernel
> panic.
>
> I have had a similar issue to this about a year ago with the jme
> driver and this was the fix:
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/net/ethernet/jme.c?id=ee50c130c82175eaa0820c96b6d3763928af2241
>
> I haven't tried getting a kernel trace yet, but all seems to indicate
> the problem is caused by r8169, at least til now.
>
> Any ideas, please?
>
> Thanks,
> Diego

Sorry, I forgot to mention, I'm on Arch Linux (x86_64), kernel 4.9.11-1-ARCH.

Diego


[PATCH TRIVIAL] drivers/net/usb/plusb.c: Fix typo

2016-03-27 Thread Diego Viola
Signed-off-by: Diego Viola <diego.vi...@gmail.com>
---
 drivers/net/usb/plusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/plusb.c b/drivers/net/usb/plusb.c
index 1bfe0fc..22e1a9a 100644
--- a/drivers/net/usb/plusb.c
+++ b/drivers/net/usb/plusb.c
@@ -38,7 +38,7 @@
  * HEADS UP:  this handshaking isn't all that robust.  This driver
  * gets confused easily if you unplug one end of the cable then
  * try to connect it again; you'll need to restart both ends. The
- * "naplink" software (used by some PlayStation/2 deveopers) does
+ * "naplink" software (used by some PlayStation/2 developers) does
  * the handshaking much better!   Also, sometimes this hardware
  * seems to get wedged under load.  Prolific docs are weak, and
  * don't identify differences between PL2301 and PL2302, much less
-- 
2.7.4



Re: Computer fails to resume from suspend unless I rmmod jme before initiating the suspend

2016-03-06 Thread Diego Viola
On Wed, Mar 2, 2016 at 2:04 AM, Guo-Fu Tseng  wrote:
> Dear Diego and who concerns about this driver:
>
> Thanks for reporting it. I can still provide some help, but it's just I'm 
> quite busy.
> So that you have not seem me sending patch for a long time.
>
> I wrote this driver when I wan an intern in JMicron during one of my summer 
> vacation
> while I'm still student in 2008. And form that point, I do the maintenance 
> just
> for fun, not taking any money from them.
>
> JMicron stopped contact me for a long time, and Diego told me that JMicron 
> told him
> this chip was EOL 6 years ago.
>
> I have a confidential spec of this chip. I can still provide some help.
>
> Diego is working closely with me for this issue right now.
>
> On Mon, 22 Feb 2016 11:09:07 +0100, Pavel Machek wrote
>> Hi!
>>
>> >  Every time I initiate a suspend (systemctl suspend) the machine hangs
>> >  at resume unless I unload the jme driver.
>>
>> It seems to have some kind of suspend/resume support. ... and it is
>> rather complex.
>>
>> Maybe jme_start_irq(jme) should be moved to the end of jme_resume
>> function?
>>
>> > > So I found that disabling async as in:
>> > >
>> > > $ echo 0 > /sys/power/pm_async
>> > >
>> > > Helps with my issue, I can't reproduce the hang anymore, tried
>> > > suspend/resume almost ~15 times.
>> > >
>> > > Diego
>> >
>> > Can someone please help?
>>
>>   Pavel
>> --
>> (english) http://www.livejournal.com/~pavelmachek
>> (cesky, pictures) 
>> http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
>
>
> Guo-Fu Tseng

Dear Guo,

I just wanted to say thank you for helping me fix the issues I had
with this driver. Thank you! You're awesome. :D

Diego


Re: [PATCH v3] net: jme: fix suspend/resume on JMC260

2016-03-04 Thread Diego Viola
On Fri, Mar 4, 2016 at 1:32 AM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Thu, Mar 3, 2016 at 6:19 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>> On Thu, Mar 3, 2016 at 6:14 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>>> On Thu, Mar 3, 2016 at 2:55 AM, Diego Viola <diego.vi...@gmail.com> wrote:
>>>> On Thu, Mar 3, 2016 at 12:19 AM, Diego Viola <diego.vi...@gmail.com> wrote:
>>>>> On Wed, Mar 2, 2016 at 2:14 AM, Guo-Fu Tseng <coolda...@cooldavid.org> 
>>>>> wrote:
>>>>>> On Wed, 24 Feb 2016 23:58:56 -0500 (EST), David Miller wrote
>>>>>>> From: Diego Viola <diego.vi...@gmail.com>
>>>>>>> Date: Tue, 23 Feb 2016 12:04:04 -0300
>>>>>>>
>>>>>>> > The JMC260 network card fails to suspend/resume because the call to
>>>>>>> > jme_start_irq() was too early, moving the call to jme_start_irq() 
>>>>>>> > after
>>>>>>> > the call to jme_reset_link() makes it work.
>>>>>>> >
>>>>>>> > Prior this change suspend/resume would fail unless 
>>>>>>> > /sys/power/pm_async=0
>>>>>>> > was explicitly specified.
>>>>>>> >
>>>>>>> > Relevant bug report: 
>>>>>>> > https://bugzilla.kernel.org/show_bug.cgi?id=112351
>>>>>>> >
>>>>>>> > Signed-off-by: Diego Viola <diego.vi...@gmail.com>
>>>>>>>
>>>>>>> Applied and queued up for -stable, thanks.
>>>>>>
>>>>>> Just reviewed it, it should have no side effect.
>>>>>>
>>>>>> Thanks David, Diego.
>>>>>>
>>>>>> Guo-Fu Tseng
>>>>>>
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm having another issue with jme and I'm not sure if it's related to
>>>>> the same issue with suspend/resume, but the problem now is WoL.
>>>>>
>>>>> Let me try to describe the problem a bit:
>>>>>
>>>>> I put my machine to sleep in S3 and I send WoL packets from a laptop,
>>>>> and the machine doesn't wake up at all, I tried inspecting packets
>>>>> with tcpdump and nothing shows up in the tcpdump output.
>>>>>
>>>>> When the machine is in working state, and I send WoL packets and I
>>>>> initiate a S3, it refuses to go in sleep mode.
>>>>>
>>>>> I tried the same in Windows (waking up from S3 via WoL) and it works 
>>>>> there.
>>>>>
>>>>> Does anyone have any ideas what the problem can be? I talked with Guo
>>>>> and he suspects the problem is motherboard failure, I also think the
>>>>> issue can be a BIOS bug since I hear so many horror stories about AMI
>>>>> BIOS issues with Linux.
>>>>>
>>>>> But it's still a mystery to me given all these conditions I mentioned.
>>>>>
>>>>> Diego
>>>>
>>>> The reason I believe that both problems might be connected
>>>> (suspend/resume & WoL) is that when I disable WoL with ethtool, e.g.
>>>>
>>>> sudo ethtool -s eth0 wol d
>>>>
>>>> The resume from suspend hang disappears, and there is no need for the
>>>> patch that moves the jme_start_irq() function call anymore, this also
>>>> regardless of pm_async being 1 or 0.
>>>>
>>>> Can someone experienced with power management help here please?
>>>>
>>>> Diego
>>>
>>> Actually, I just tried it now and I CAN read see the packets coming in
>>> in the tcpdump output.
>>>
>>> The machine just doesn't wake up from S3 after I send the packets.
>>>
>>> Any ideas?
>>>
>>> Diego
>>
>> I can see the packets in the tcpdump output*
>
> I just tried again and I can't capture those packets anymore,
> strangely ICMP packets with ping arrive fine but when I try to send
> WoL packets they don't arrive.
>
> Diego

It looks like the problem is ACPI after all, because I tried enabling
resume by keyboard/mouse/lan, etc. and none of these methods work.

I'd like to be able to debug the BIOS ACPI thing, but I don't know
where to start.

I've tried disassembling the DSDT and this is what I get: http://ix.io/oYY

Any ideas what to do next?

Diego


Re: [PATCH v3] net: jme: fix suspend/resume on JMC260

2016-03-03 Thread Diego Viola
On Thu, Mar 3, 2016 at 6:19 PM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Thu, Mar 3, 2016 at 6:14 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>> On Thu, Mar 3, 2016 at 2:55 AM, Diego Viola <diego.vi...@gmail.com> wrote:
>>> On Thu, Mar 3, 2016 at 12:19 AM, Diego Viola <diego.vi...@gmail.com> wrote:
>>>> On Wed, Mar 2, 2016 at 2:14 AM, Guo-Fu Tseng <coolda...@cooldavid.org> 
>>>> wrote:
>>>>> On Wed, 24 Feb 2016 23:58:56 -0500 (EST), David Miller wrote
>>>>>> From: Diego Viola <diego.vi...@gmail.com>
>>>>>> Date: Tue, 23 Feb 2016 12:04:04 -0300
>>>>>>
>>>>>> > The JMC260 network card fails to suspend/resume because the call to
>>>>>> > jme_start_irq() was too early, moving the call to jme_start_irq() after
>>>>>> > the call to jme_reset_link() makes it work.
>>>>>> >
>>>>>> > Prior this change suspend/resume would fail unless 
>>>>>> > /sys/power/pm_async=0
>>>>>> > was explicitly specified.
>>>>>> >
>>>>>> > Relevant bug report: https://bugzilla.kernel.org/show_bug.cgi?id=112351
>>>>>> >
>>>>>> > Signed-off-by: Diego Viola <diego.vi...@gmail.com>
>>>>>>
>>>>>> Applied and queued up for -stable, thanks.
>>>>>
>>>>> Just reviewed it, it should have no side effect.
>>>>>
>>>>> Thanks David, Diego.
>>>>>
>>>>> Guo-Fu Tseng
>>>>>
>>>>
>>>> Hi all,
>>>>
>>>> I'm having another issue with jme and I'm not sure if it's related to
>>>> the same issue with suspend/resume, but the problem now is WoL.
>>>>
>>>> Let me try to describe the problem a bit:
>>>>
>>>> I put my machine to sleep in S3 and I send WoL packets from a laptop,
>>>> and the machine doesn't wake up at all, I tried inspecting packets
>>>> with tcpdump and nothing shows up in the tcpdump output.
>>>>
>>>> When the machine is in working state, and I send WoL packets and I
>>>> initiate a S3, it refuses to go in sleep mode.
>>>>
>>>> I tried the same in Windows (waking up from S3 via WoL) and it works there.
>>>>
>>>> Does anyone have any ideas what the problem can be? I talked with Guo
>>>> and he suspects the problem is motherboard failure, I also think the
>>>> issue can be a BIOS bug since I hear so many horror stories about AMI
>>>> BIOS issues with Linux.
>>>>
>>>> But it's still a mystery to me given all these conditions I mentioned.
>>>>
>>>> Diego
>>>
>>> The reason I believe that both problems might be connected
>>> (suspend/resume & WoL) is that when I disable WoL with ethtool, e.g.
>>>
>>> sudo ethtool -s eth0 wol d
>>>
>>> The resume from suspend hang disappears, and there is no need for the
>>> patch that moves the jme_start_irq() function call anymore, this also
>>> regardless of pm_async being 1 or 0.
>>>
>>> Can someone experienced with power management help here please?
>>>
>>> Diego
>>
>> Actually, I just tried it now and I CAN read see the packets coming in
>> in the tcpdump output.
>>
>> The machine just doesn't wake up from S3 after I send the packets.
>>
>> Any ideas?
>>
>> Diego
>
> I can see the packets in the tcpdump output*

I just tried again and I can't capture those packets anymore,
strangely ICMP packets with ping arrive fine but when I try to send
WoL packets they don't arrive.

Diego


Re: [PATCH v3] net: jme: fix suspend/resume on JMC260

2016-03-03 Thread Diego Viola
On Thu, Mar 3, 2016 at 6:14 PM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Thu, Mar 3, 2016 at 2:55 AM, Diego Viola <diego.vi...@gmail.com> wrote:
>> On Thu, Mar 3, 2016 at 12:19 AM, Diego Viola <diego.vi...@gmail.com> wrote:
>>> On Wed, Mar 2, 2016 at 2:14 AM, Guo-Fu Tseng <coolda...@cooldavid.org> 
>>> wrote:
>>>> On Wed, 24 Feb 2016 23:58:56 -0500 (EST), David Miller wrote
>>>>> From: Diego Viola <diego.vi...@gmail.com>
>>>>> Date: Tue, 23 Feb 2016 12:04:04 -0300
>>>>>
>>>>> > The JMC260 network card fails to suspend/resume because the call to
>>>>> > jme_start_irq() was too early, moving the call to jme_start_irq() after
>>>>> > the call to jme_reset_link() makes it work.
>>>>> >
>>>>> > Prior this change suspend/resume would fail unless /sys/power/pm_async=0
>>>>> > was explicitly specified.
>>>>> >
>>>>> > Relevant bug report: https://bugzilla.kernel.org/show_bug.cgi?id=112351
>>>>> >
>>>>> > Signed-off-by: Diego Viola <diego.vi...@gmail.com>
>>>>>
>>>>> Applied and queued up for -stable, thanks.
>>>>
>>>> Just reviewed it, it should have no side effect.
>>>>
>>>> Thanks David, Diego.
>>>>
>>>> Guo-Fu Tseng
>>>>
>>>
>>> Hi all,
>>>
>>> I'm having another issue with jme and I'm not sure if it's related to
>>> the same issue with suspend/resume, but the problem now is WoL.
>>>
>>> Let me try to describe the problem a bit:
>>>
>>> I put my machine to sleep in S3 and I send WoL packets from a laptop,
>>> and the machine doesn't wake up at all, I tried inspecting packets
>>> with tcpdump and nothing shows up in the tcpdump output.
>>>
>>> When the machine is in working state, and I send WoL packets and I
>>> initiate a S3, it refuses to go in sleep mode.
>>>
>>> I tried the same in Windows (waking up from S3 via WoL) and it works there.
>>>
>>> Does anyone have any ideas what the problem can be? I talked with Guo
>>> and he suspects the problem is motherboard failure, I also think the
>>> issue can be a BIOS bug since I hear so many horror stories about AMI
>>> BIOS issues with Linux.
>>>
>>> But it's still a mystery to me given all these conditions I mentioned.
>>>
>>> Diego
>>
>> The reason I believe that both problems might be connected
>> (suspend/resume & WoL) is that when I disable WoL with ethtool, e.g.
>>
>> sudo ethtool -s eth0 wol d
>>
>> The resume from suspend hang disappears, and there is no need for the
>> patch that moves the jme_start_irq() function call anymore, this also
>> regardless of pm_async being 1 or 0.
>>
>> Can someone experienced with power management help here please?
>>
>> Diego
>
> Actually, I just tried it now and I CAN read see the packets coming in
> in the tcpdump output.
>
> The machine just doesn't wake up from S3 after I send the packets.
>
> Any ideas?
>
> Diego

I can see the packets in the tcpdump output*


Re: [PATCH v3] net: jme: fix suspend/resume on JMC260

2016-03-03 Thread Diego Viola
On Thu, Mar 3, 2016 at 2:55 AM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Thu, Mar 3, 2016 at 12:19 AM, Diego Viola <diego.vi...@gmail.com> wrote:
>> On Wed, Mar 2, 2016 at 2:14 AM, Guo-Fu Tseng <coolda...@cooldavid.org> wrote:
>>> On Wed, 24 Feb 2016 23:58:56 -0500 (EST), David Miller wrote
>>>> From: Diego Viola <diego.vi...@gmail.com>
>>>> Date: Tue, 23 Feb 2016 12:04:04 -0300
>>>>
>>>> > The JMC260 network card fails to suspend/resume because the call to
>>>> > jme_start_irq() was too early, moving the call to jme_start_irq() after
>>>> > the call to jme_reset_link() makes it work.
>>>> >
>>>> > Prior this change suspend/resume would fail unless /sys/power/pm_async=0
>>>> > was explicitly specified.
>>>> >
>>>> > Relevant bug report: https://bugzilla.kernel.org/show_bug.cgi?id=112351
>>>> >
>>>> > Signed-off-by: Diego Viola <diego.vi...@gmail.com>
>>>>
>>>> Applied and queued up for -stable, thanks.
>>>
>>> Just reviewed it, it should have no side effect.
>>>
>>> Thanks David, Diego.
>>>
>>> Guo-Fu Tseng
>>>
>>
>> Hi all,
>>
>> I'm having another issue with jme and I'm not sure if it's related to
>> the same issue with suspend/resume, but the problem now is WoL.
>>
>> Let me try to describe the problem a bit:
>>
>> I put my machine to sleep in S3 and I send WoL packets from a laptop,
>> and the machine doesn't wake up at all, I tried inspecting packets
>> with tcpdump and nothing shows up in the tcpdump output.
>>
>> When the machine is in working state, and I send WoL packets and I
>> initiate a S3, it refuses to go in sleep mode.
>>
>> I tried the same in Windows (waking up from S3 via WoL) and it works there.
>>
>> Does anyone have any ideas what the problem can be? I talked with Guo
>> and he suspects the problem is motherboard failure, I also think the
>> issue can be a BIOS bug since I hear so many horror stories about AMI
>> BIOS issues with Linux.
>>
>> But it's still a mystery to me given all these conditions I mentioned.
>>
>> Diego
>
> The reason I believe that both problems might be connected
> (suspend/resume & WoL) is that when I disable WoL with ethtool, e.g.
>
> sudo ethtool -s eth0 wol d
>
> The resume from suspend hang disappears, and there is no need for the
> patch that moves the jme_start_irq() function call anymore, this also
> regardless of pm_async being 1 or 0.
>
> Can someone experienced with power management help here please?
>
> Diego

Actually, I just tried it now and I CAN read see the packets coming in
in the tcpdump output.

The machine just doesn't wake up from S3 after I send the packets.

Any ideas?

Diego


Re: [PATCH v3] net: jme: fix suspend/resume on JMC260

2016-03-02 Thread Diego Viola
On Thu, Mar 3, 2016 at 12:19 AM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Wed, Mar 2, 2016 at 2:14 AM, Guo-Fu Tseng <coolda...@cooldavid.org> wrote:
>> On Wed, 24 Feb 2016 23:58:56 -0500 (EST), David Miller wrote
>>> From: Diego Viola <diego.vi...@gmail.com>
>>> Date: Tue, 23 Feb 2016 12:04:04 -0300
>>>
>>> > The JMC260 network card fails to suspend/resume because the call to
>>> > jme_start_irq() was too early, moving the call to jme_start_irq() after
>>> > the call to jme_reset_link() makes it work.
>>> >
>>> > Prior this change suspend/resume would fail unless /sys/power/pm_async=0
>>> > was explicitly specified.
>>> >
>>> > Relevant bug report: https://bugzilla.kernel.org/show_bug.cgi?id=112351
>>> >
>>> > Signed-off-by: Diego Viola <diego.vi...@gmail.com>
>>>
>>> Applied and queued up for -stable, thanks.
>>
>> Just reviewed it, it should have no side effect.
>>
>> Thanks David, Diego.
>>
>> Guo-Fu Tseng
>>
>
> Hi all,
>
> I'm having another issue with jme and I'm not sure if it's related to
> the same issue with suspend/resume, but the problem now is WoL.
>
> Let me try to describe the problem a bit:
>
> I put my machine to sleep in S3 and I send WoL packets from a laptop,
> and the machine doesn't wake up at all, I tried inspecting packets
> with tcpdump and nothing shows up in the tcpdump output.
>
> When the machine is in working state, and I send WoL packets and I
> initiate a S3, it refuses to go in sleep mode.
>
> I tried the same in Windows (waking up from S3 via WoL) and it works there.
>
> Does anyone have any ideas what the problem can be? I talked with Guo
> and he suspects the problem is motherboard failure, I also think the
> issue can be a BIOS bug since I hear so many horror stories about AMI
> BIOS issues with Linux.
>
> But it's still a mystery to me given all these conditions I mentioned.
>
> Diego

The reason I believe that both problems might be connected
(suspend/resume & WoL) is that when I disable WoL with ethtool, e.g.

sudo ethtool -s eth0 wol d

The resume from suspend hang disappears, and there is no need for the
patch that moves the jme_start_irq() function call anymore, this also
regardless of pm_async being 1 or 0.

Can someone experienced with power management help here please?

Diego


Re: [PATCH v3] net: jme: fix suspend/resume on JMC260

2016-03-02 Thread Diego Viola
On Wed, Mar 2, 2016 at 2:14 AM, Guo-Fu Tseng <coolda...@cooldavid.org> wrote:
> On Wed, 24 Feb 2016 23:58:56 -0500 (EST), David Miller wrote
>> From: Diego Viola <diego.vi...@gmail.com>
>> Date: Tue, 23 Feb 2016 12:04:04 -0300
>>
>> > The JMC260 network card fails to suspend/resume because the call to
>> > jme_start_irq() was too early, moving the call to jme_start_irq() after
>> > the call to jme_reset_link() makes it work.
>> >
>> > Prior this change suspend/resume would fail unless /sys/power/pm_async=0
>> > was explicitly specified.
>> >
>> > Relevant bug report: https://bugzilla.kernel.org/show_bug.cgi?id=112351
>> >
>> > Signed-off-by: Diego Viola <diego.vi...@gmail.com>
>>
>> Applied and queued up for -stable, thanks.
>
> Just reviewed it, it should have no side effect.
>
> Thanks David, Diego.
>
> Guo-Fu Tseng
>

Hi all,

I'm having another issue with jme and I'm not sure if it's related to
the same issue with suspend/resume, but the problem now is WoL.

Let me try to describe the problem a bit:

I put my machine to sleep in S3 and I send WoL packets from a laptop,
and the machine doesn't wake up at all, I tried inspecting packets
with tcpdump and nothing shows up in the tcpdump output.

When the machine is in working state, and I send WoL packets and I
initiate a S3, it refuses to go in sleep mode.

I tried the same in Windows (waking up from S3 via WoL) and it works there.

Does anyone have any ideas what the problem can be? I talked with Guo
and he suspects the problem is motherboard failure, I also think the
issue can be a BIOS bug since I hear so many horror stories about AMI
BIOS issues with Linux.

But it's still a mystery to me given all these conditions I mentioned.

Diego


Re: [PATCH v3] net: jme: fix suspend/resume on JMC260

2016-02-25 Thread Diego Viola
On Thu, Feb 25, 2016 at 1:58 AM, David Miller <da...@davemloft.net> wrote:
> From: Diego Viola <diego.vi...@gmail.com>
> Date: Tue, 23 Feb 2016 12:04:04 -0300
>
>> The JMC260 network card fails to suspend/resume because the call to
>> jme_start_irq() was too early, moving the call to jme_start_irq() after
>> the call to jme_reset_link() makes it work.
>>
>> Prior this change suspend/resume would fail unless /sys/power/pm_async=0
>> was explicitly specified.
>>
>> Relevant bug report: https://bugzilla.kernel.org/show_bug.cgi?id=112351
>>
>> Signed-off-by: Diego Viola <diego.vi...@gmail.com>
>
> Applied and queued up for -stable, thanks.

Thanks.

Diego


Re: [PATCH v3] net: jme: fix suspend/resume on JMC260

2016-02-24 Thread Diego Viola
On Tue, Feb 23, 2016 at 1:34 PM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Tue, Feb 23, 2016 at 12:04 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>> The JMC260 network card fails to suspend/resume because the call to
>> jme_start_irq() was too early, moving the call to jme_start_irq() after
>> the call to jme_reset_link() makes it work.
>>
>> Prior this change suspend/resume would fail unless /sys/power/pm_async=0
>> was explicitly specified.
>>
>> Relevant bug report: https://bugzilla.kernel.org/show_bug.cgi?id=112351
>>
>> Signed-off-by: Diego Viola <diego.vi...@gmail.com>
>> ---
>>  drivers/net/ethernet/jme.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
>> index b1de7af..8adbe8f 100644
>> --- a/drivers/net/ethernet/jme.c
>> +++ b/drivers/net/ethernet/jme.c
>> @@ -3312,13 +3312,14 @@ jme_resume(struct device *dev)
>> jme_reset_phy_processor(jme);
>> jme_phy_calibration(jme);
>> jme_phy_setEA(jme);
>> -   jme_start_irq(jme);
>> netif_device_attach(netdev);
>>
>> atomic_inc(>link_changing);
>>
>> jme_reset_link(jme);
>>
>> +   jme_start_irq(jme);
>> +
>> return 0;
>>  }
>>
>> --
>> 2.7.1
>>
>
> I've sent this v3 patch and I think it's better than v2 and v1, as it
> includes the link to my bug report and the description is better.
>
> Diego

Hi guys,

I just wanted to say that there's another user that have reported
success with the JMC250 (different card) using the jme driver with the
fix.

He was also getting hangs apparently.

I got an email from him, see his response here: http://ix.io/oBA

It's the same user that have posted this:
http://ubuntuforums.org/showthread.php?t=2301294

Thanks,
Diego


Re: [PATCH v3] net: jme: fix suspend/resume on JMC260

2016-02-23 Thread Diego Viola
On Tue, Feb 23, 2016 at 12:04 PM, Diego Viola <diego.vi...@gmail.com> wrote:
> The JMC260 network card fails to suspend/resume because the call to
> jme_start_irq() was too early, moving the call to jme_start_irq() after
> the call to jme_reset_link() makes it work.
>
> Prior this change suspend/resume would fail unless /sys/power/pm_async=0
> was explicitly specified.
>
> Relevant bug report: https://bugzilla.kernel.org/show_bug.cgi?id=112351
>
> Signed-off-by: Diego Viola <diego.vi...@gmail.com>
> ---
>  drivers/net/ethernet/jme.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
> index b1de7af..8adbe8f 100644
> --- a/drivers/net/ethernet/jme.c
> +++ b/drivers/net/ethernet/jme.c
> @@ -3312,13 +3312,14 @@ jme_resume(struct device *dev)
> jme_reset_phy_processor(jme);
> jme_phy_calibration(jme);
> jme_phy_setEA(jme);
> -   jme_start_irq(jme);
> netif_device_attach(netdev);
>
> atomic_inc(>link_changing);
>
> jme_reset_link(jme);
>
> +   jme_start_irq(jme);
> +
> return 0;
>  }
>
> --
> 2.7.1
>

I've sent this v3 patch and I think it's better than v2 and v1, as it
includes the link to my bug report and the description is better.

Diego


[PATCH v3] net: jme: fix suspend/resume on JMC260

2016-02-23 Thread Diego Viola
The JMC260 network card fails to suspend/resume because the call to
jme_start_irq() was too early, moving the call to jme_start_irq() after
the call to jme_reset_link() makes it work.

Prior this change suspend/resume would fail unless /sys/power/pm_async=0
was explicitly specified.

Relevant bug report: https://bugzilla.kernel.org/show_bug.cgi?id=112351

Signed-off-by: Diego Viola <diego.vi...@gmail.com>
---
 drivers/net/ethernet/jme.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
index b1de7af..8adbe8f 100644
--- a/drivers/net/ethernet/jme.c
+++ b/drivers/net/ethernet/jme.c
@@ -3312,13 +3312,14 @@ jme_resume(struct device *dev)
jme_reset_phy_processor(jme);
jme_phy_calibration(jme);
jme_phy_setEA(jme);
-   jme_start_irq(jme);
netif_device_attach(netdev);
 
atomic_inc(>link_changing);
 
jme_reset_link(jme);
 
+   jme_start_irq(jme);
+
return 0;
 }
 
-- 
2.7.1



[PATCH v2] net: jme: fix suspend/resume on JMC260

2016-02-22 Thread Diego Viola
The JMC260 network card fails to suspend/resume because the call to
jme_start_irq() was too early, moving the call to jme_start_irq() after
the jme_reset_link() function makes it work.

Prior this change suspend/resume would fail unless /sys/power/pm_async=0
was explicitly specified.

Signed-off-by: Diego Viola <diego.vi...@gmail.com>
---
 drivers/net/ethernet/jme.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
index b1de7af..8adbe8f 100644
--- a/drivers/net/ethernet/jme.c
+++ b/drivers/net/ethernet/jme.c
@@ -3312,13 +3312,14 @@ jme_resume(struct device *dev)
jme_reset_phy_processor(jme);
jme_phy_calibration(jme);
jme_phy_setEA(jme);
-   jme_start_irq(jme);
netif_device_attach(netdev);
 
atomic_inc(>link_changing);
 
jme_reset_link(jme);
 
+   jme_start_irq(jme);
+
return 0;
 }
 
-- 
2.7.1



Re: [PATCH] net: jme: fix suspend/resume on JMC260

2016-02-22 Thread Diego Viola
On Tue, Feb 23, 2016 at 2:11 AM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Tue, Feb 23, 2016 at 1:42 AM, David Miller <da...@davemloft.net> wrote:
>> From: Diego Viola <diego.vi...@gmail.com>
>> Date: Mon, 22 Feb 2016 22:58:48 -0300
>>
>>> On Mon, Feb 22, 2016 at 10:46 PM, Fabio Estevam <feste...@gmail.com> wrote:
>>>> On Mon, Feb 22, 2016 at 9:32 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>>>>> Signed-off-by: Diego Viola <diego.vi...@gmail.com>
>>>>
>>>> You should write a commit log.
>>>
>>> I thought about including the link to my bug report:
>>> https://bugzilla.kernel.org/show_bug.cgi?id=112351
>>>
>>> What else would you suggest I add to the commit message?
>>
>> The commit message is where you describe the change you are making.
>>
>> This includes exactly what you are fixing, how you are doing it, and why
>> you are doing it that way.
>>
>> Empty commit log messages are %99.9 of the time completely
>> inappropriate.
>
> David,
>
> I understand and appreciate your advice, thanks.
>
> However, please consider that I'm not a kernel developer, so I don't
> understand much or anything about how this driver works internally,
> this is why I came here to report about problem in the first place.
>
> All I can tell you for certain is that this change makes my
> suspend/resume work and it doesn't hang anymore while resuming from
> suspend.
>
> I apologize for the empty commit message and for not being able to
> explain things deeper, but Pavel Machek is the person who suggested I
> make this change in the code, so maybe he can provide some help?
>
> Diego

I will try sending a V2 patch again with a proper commit message, sorry.

Diego


Re: [PATCH] net: jme: fix suspend/resume on JMC260

2016-02-22 Thread Diego Viola
On Tue, Feb 23, 2016 at 1:42 AM, David Miller <da...@davemloft.net> wrote:
> From: Diego Viola <diego.vi...@gmail.com>
> Date: Mon, 22 Feb 2016 22:58:48 -0300
>
>> On Mon, Feb 22, 2016 at 10:46 PM, Fabio Estevam <feste...@gmail.com> wrote:
>>> On Mon, Feb 22, 2016 at 9:32 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>>>> Signed-off-by: Diego Viola <diego.vi...@gmail.com>
>>>
>>> You should write a commit log.
>>
>> I thought about including the link to my bug report:
>> https://bugzilla.kernel.org/show_bug.cgi?id=112351
>>
>> What else would you suggest I add to the commit message?
>
> The commit message is where you describe the change you are making.
>
> This includes exactly what you are fixing, how you are doing it, and why
> you are doing it that way.
>
> Empty commit log messages are %99.9 of the time completely
> inappropriate.

David,

I understand and appreciate your advice, thanks.

However, please consider that I'm not a kernel developer, so I don't
understand much or anything about how this driver works internally,
this is why I came here to report about problem in the first place.

All I can tell you for certain is that this change makes my
suspend/resume work and it doesn't hang anymore while resuming from
suspend.

I apologize for the empty commit message and for not being able to
explain things deeper, but Pavel Machek is the person who suggested I
make this change in the code, so maybe he can provide some help?

Diego


Re: [PATCH] net: jme: fix suspend/resume on JMC260

2016-02-22 Thread Diego Viola
On Mon, Feb 22, 2016 at 10:58 PM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Mon, Feb 22, 2016 at 10:46 PM, Fabio Estevam <feste...@gmail.com> wrote:
>> On Mon, Feb 22, 2016 at 9:32 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>>> Signed-off-by: Diego Viola <diego.vi...@gmail.com>
>>
>> You should write a commit log.
>
> I thought about including the link to my bug report:
> https://bugzilla.kernel.org/show_bug.cgi?id=112351
>
> What else would you suggest I add to the commit message?
>
> Diego

I probably should have explained also that this patch fixes my
suspend/resume problem even when /sys/power/pm_async is set to 1,
because before that, suspend/resume only worked when pm_async was 0.

I had a chat with Guo a few minutes ago on Hangouts and he said he
will look into this problem. :)

Diego


Re: [PATCH] net: jme: fix suspend/resume on JMC260

2016-02-22 Thread Diego Viola
On Mon, Feb 22, 2016 at 10:46 PM, Fabio Estevam <feste...@gmail.com> wrote:
> On Mon, Feb 22, 2016 at 9:32 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>> Signed-off-by: Diego Viola <diego.vi...@gmail.com>
>
> You should write a commit log.

I thought about including the link to my bug report:
https://bugzilla.kernel.org/show_bug.cgi?id=112351

What else would you suggest I add to the commit message?

Diego


Re: [PATCH] jme: remove the jme driver as it is no longer maintained

2016-02-22 Thread Diego Viola
On Sun, Feb 21, 2016 at 2:17 PM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Sun, Feb 21, 2016 at 9:45 AM, One Thousand Gnomes
> <gno...@lxorguk.ukuu.org.uk> wrote:
>>> I would appreciate some hint from someone who is more experienced with 
>>> drivers.
>>
>> Start by testing
>>
>> - loading the driver as a module
>> - using the networking
>> - unloading the module (and checking it stays unloaded!)
>>
>> then suspend/resume
>>
>> If that works then you have a good starting point because you know a
>> sequence of actions that suspends properly. If it fails then it's going
>> to be rather more fun because it implies something in the hardware has
>> not been properly shut down.
>>
>> Alan
>
> Hi Alan,
>
> Thanks for your email, did you see my bug report? Because I tried all
> this already.
>
> The only workarounds I've found to work is one of these:
>
> $ rmmod jme # before suspend
>
> or
>
> $ ip link set ens34 down
>
> or
>
> $ echo 0 > /sys/power/pm_async # disable async power management
>
> Then resume works fine (I can't reproduce the hang).
>
> I'm not a C developer nor a kernel developer, I tried looking at the
> jme.c driver code but it's not clear what is broken and what needs
> fixing, so I would appreciate someone more experienced looking at the
> issue and giving me an idea or two.
>
> Thanks,
> Diego

Please disregard this patch, I feel like an idiot for sending it.

I've found a fix already and sent a patch.

Diego


Re: Computer fails to resume from suspend unless I rmmod jme before initiating the suspend

2016-02-22 Thread Diego Viola
On Mon, Feb 22, 2016 at 4:20 PM, Pavel Machek <pa...@ucw.cz> wrote:
> On Mon 2016-02-22 15:59:48, Diego Viola wrote:
>> On Mon, Feb 22, 2016 at 7:09 AM, Pavel Machek <pa...@ucw.cz> wrote:
>> > Hi!
>> >
>> >> >>>> Every time I initiate a suspend (systemctl suspend) the machine hangs
>> >> >>>> at resume unless I unload the jme driver.
>> >
>> > It seems to have some kind of suspend/resume support. ... and it is
>> > rather complex.
>> >
>> > Maybe jme_start_irq(jme) should be moved to the end of jme_resume
>> > function?
>> >
>> >> > So I found that disabling async as in:
>> >> >
>> >> > $ echo 0 > /sys/power/pm_async
>> >> >
>> >> > Helps with my issue, I can't reproduce the hang anymore, tried
>> >> > suspend/resume almost ~15 times.
>> >> >
>> >> > Diego
>> >>
>> >> Can someone please help?
>>
>> Hi Pavel,
>>
>> This did the trick, suspend/resume is now working perfectly for me
>> (tried more than 10 times). :)
>>
>> Thank you so much, should I send a patch?
>
> Yes please.
>
> Pavel
>
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) 
> http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Sent, thank you.

Diego


[PATCH] net: jme: fix suspend/resume on JMC260

2016-02-22 Thread Diego Viola
Signed-off-by: Diego Viola <diego.vi...@gmail.com>
---
 drivers/net/ethernet/jme.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
index b1de7af..8adbe8f 100644
--- a/drivers/net/ethernet/jme.c
+++ b/drivers/net/ethernet/jme.c
@@ -3312,13 +3312,14 @@ jme_resume(struct device *dev)
jme_reset_phy_processor(jme);
jme_phy_calibration(jme);
jme_phy_setEA(jme);
-   jme_start_irq(jme);
netif_device_attach(netdev);
 
atomic_inc(>link_changing);
 
jme_reset_link(jme);
 
+   jme_start_irq(jme);
+
return 0;
 }
 
-- 
2.7.1



Re: Computer fails to resume from suspend unless I rmmod jme before initiating the suspend

2016-02-22 Thread Diego Viola
On Mon, Feb 22, 2016 at 7:09 AM, Pavel Machek  wrote:
> Hi!
>
>>  Every time I initiate a suspend (systemctl suspend) the machine hangs
>>  at resume unless I unload the jme driver.
>
> It seems to have some kind of suspend/resume support. ... and it is
> rather complex.
>
> Maybe jme_start_irq(jme) should be moved to the end of jme_resume
> function?
>
>> > So I found that disabling async as in:
>> >
>> > $ echo 0 > /sys/power/pm_async
>> >
>> > Helps with my issue, I can't reproduce the hang anymore, tried
>> > suspend/resume almost ~15 times.
>> >
>> > Diego
>>
>> Can someone please help?
>
> Pavel
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) 
> http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Hi Pavel,

This did the trick, suspend/resume is now working perfectly for me
(tried more than 10 times). :)

Thank you so much, should I send a patch?

Diego


Re: [PATCH] jme: remove the jme driver as it is no longer maintained

2016-02-21 Thread Diego Viola
On Sun, Feb 21, 2016 at 9:45 AM, One Thousand Gnomes
 wrote:
>> I would appreciate some hint from someone who is more experienced with 
>> drivers.
>
> Start by testing
>
> - loading the driver as a module
> - using the networking
> - unloading the module (and checking it stays unloaded!)
>
> then suspend/resume
>
> If that works then you have a good starting point because you know a
> sequence of actions that suspends properly. If it fails then it's going
> to be rather more fun because it implies something in the hardware has
> not been properly shut down.
>
> Alan

Hi Alan,

Thanks for your email, did you see my bug report? Because I tried all
this already.

The only workarounds I've found to work is one of these:

$ rmmod jme # before suspend

or

$ ip link set ens34 down

or

$ echo 0 > /sys/power/pm_async # disable async power management

Then resume works fine (I can't reproduce the hang).

I'm not a C developer nor a kernel developer, I tried looking at the
jme.c driver code but it's not clear what is broken and what needs
fixing, so I would appreciate someone more experienced looking at the
issue and giving me an idea or two.

Thanks,
Diego


Re: [PATCH] jme: remove the jme driver as it is no longer maintained

2016-02-20 Thread Diego Viola
On Sat, Feb 20, 2016 at 10:16 PM, David Miller  wrote:
>
> Sorry, this is not how things work.
>
> You can suggest marking the driver unmaintained in MAINTAINERS if the
> listed developer has been unresponsive for a very long time.
>
> But removing the driver altogether is not prudent at all.
>
> Just because it doesn't work %100 the way you like, and nobody
> has worked on fixing your specific problems, isn't a reason to
> remove an entire driver _nor_ move it to -staging.
>
> In fact, this driver is quite cleanly written, follows all of the
> various coding style rules we have, and uses the vast majority of the
> kernel APIs properly.
>
> And those are the criteria for having something in staging, not that
> it has bugs.
>
> In fact it is so cleanly written, that you should be able to read it
> and figure out what the suspend/resume problem might be.  These are
> exactly the kind of drivers we want to keep in the tree.
>
> I'm sorry that your bugs didn't get fixed, but your response to that
> happening is not reasonable at all.

OK my sincere apologies.

I've been very frustrated trying to deal with this bug and I couldn't
find a solution yet, but I will continue to see what I can do to fix
it.

I would appreciate some hint from someone who is more experienced with drivers.

Anyways, sorry about my behavior.

Diego


[PATCH] jme: remove the jme driver as it is no longer maintained

2016-02-20 Thread Diego Viola
This driver also breaks my suspend/resume support, see the link below
for details:

https://bugzilla.kernel.org/show_bug.cgi?id=112351

If you choose to keep this garbage, move it to staging at least, where
it belongs.

Signed-off-by: Diego Viola <diego.vi...@gmail.com>
---
 MAINTAINERS  |6 -
 drivers/net/ethernet/Kconfig |   12 -
 drivers/net/ethernet/jme.c   | 3368 --
 drivers/net/ethernet/jme.h   | 1278 
 4 files changed, 4664 deletions(-)
 delete mode 100644 drivers/net/ethernet/jme.c
 delete mode 100644 drivers/net/ethernet/jme.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 4978dc1..a29e960 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6014,12 +6014,6 @@ S:   Maintained
 F: Documentation/filesystems/jfs.txt
 F: fs/jfs/
 
-JME NETWORK DRIVER
-M: Guo-Fu Tseng <coolda...@cooldavid.org>
-L: netdev@vger.kernel.org
-S: Maintained
-F: drivers/net/ethernet/jme.*
-
 JOURNALLING FLASH FILE SYSTEM V2 (JFFS2)
 M: David Woodhouse <dw...@infradead.org>
 L: linux-...@lists.infradead.org
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index 0b13af8..4a6b747 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -80,18 +80,6 @@ source "drivers/net/ethernet/intel/Kconfig"
 source "drivers/net/ethernet/i825xx/Kconfig"
 source "drivers/net/ethernet/xscale/Kconfig"
 
-config JME
-   tristate "JMicron(R) PCI-Express Gigabit Ethernet support"
-   depends on PCI
-   select CRC32
-   select MII
-   ---help---
- This driver supports the PCI-Express gigabit ethernet adapters
- based on JMicron JMC250 chipset.
-
- To compile this driver as a module, choose M here. The module
- will be called jme.
-
 config KORINA
tristate "Korina (IDT RC32434) Ethernet support"
depends on MIKROTIK_RB532
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
deleted file mode 100644
index b1de7af..000
--- a/drivers/net/ethernet/jme.c
+++ /dev/null
@@ -1,3368 +0,0 @@
-/*
- * JMicron JMC2x0 series PCIe Ethernet Linux Device Driver
- *
- * Copyright 2008 JMicron Technology Corporation
- * http://www.jmicron.com/
- * Copyright (c) 2009 - 2010 Guo-Fu Tseng <coolda...@cooldavid.org>
- *
- * Author: Guo-Fu Tseng <coolda...@cooldavid.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "jme.h"
-
-static int force_pseudohp = -1;
-static int no_pseudohp = -1;
-static int no_extplug = -1;
-module_param(force_pseudohp, int, 0);
-MODULE_PARM_DESC(force_pseudohp,
-   "Enable pseudo hot-plug feature manually by driver instead of BIOS.");
-module_param(no_pseudohp, int, 0);
-MODULE_PARM_DESC(no_pseudohp, "Disable pseudo hot-plug feature.");
-module_param(no_extplug, int, 0);
-MODULE_PARM_DESC(no_extplug,
-   "Do not use external plug signal for pseudo hot-plug.");
-
-static int
-jme_mdio_read(struct net_device *netdev, int phy, int reg)
-{
-   struct jme_adapter *jme = netdev_priv(netdev);
-   int i, val, again = (reg == MII_BMSR) ? 1 : 0;
-
-read_again:
-   jwrite32(jme, JME_SMI, SMI_OP_REQ |
-   smi_phy_addr(phy) |
-   smi_reg_addr(reg));
-
-   wmb();
-   for (i = JME_PHY_TIMEOUT * 50 ; i > 0 ; --i) {
-   udelay(20);
-   val = jread32(jme, JME_SMI);
-   if ((val & SMI_OP_REQ) == 0)
-   break;
-   }
-
-   if (i == 0) {
-   pr_err("phy(%d) read timeout : %d\n", phy, reg);
-   return 0;
-   }
-
-   if (again--)
-   goto read_again;
-
-   return (val & SMI_DATA_MASK) >> SMI_DATA_SHIFT;
-}
-
-static void
-jme_mdio_write(struct net_device *netdev,
-   int phy, int reg, int val)
-{
-   struct jme_adapter *jme = netdev_priv(netdev);
-   int i;
-
-   jw

Re: Computer fails to resume from suspend unless I rmmod jme before initiating the suspend

2016-02-14 Thread Diego Viola
On Sat, Feb 13, 2016 at 6:38 PM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Fri, Feb 12, 2016 at 6:17 AM, Diego Viola <diego.vi...@gmail.com> wrote:
>> On Wed, Feb 10, 2016 at 7:36 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>>> On Wed, Feb 10, 2016 at 2:19 AM, Diego Viola <diego.vi...@gmail.com> wrote:
>>>> Hi Guo,
>>>>
>>>> I have an x86 computer with this network card:
>>>>
>>>> 02:00.0 Ethernet controller: JMicron Technology Corp. JMC260 PCI
>>>> Express Fast Ethernet Controller (rev 03)
>>>>
>>>> Every time I initiate a suspend (systemctl suspend) the machine hangs
>>>> at resume unless I unload the jme driver.
>>>>
>>>> Here is a Call Trace I was able to get after it hanged:
>>>>
>>>> 
>>>> tasklet_action+0xb0/0xd0
>>>> __do_softirq+0xcf/0x290
>>>> irq_exit+0xa3/0xb0
>>>> do_IRQ+0x54/0xd0
>>>> common_interrupt+0x82/0x82
>>>>
>>>> 
>>>> jme_start_irq+0x84/0xa0 [jme]
>>>> jme_resume+0x12f/0x210 [jme]
>>>> pci_pm_resume+0x64/0xa0
>>>> ? pci_pm_thaw+0x90/0x90
>>>> dpm_run_callback+0x4e/0x130
>>>> device_resume+0xd3/0x1f0
>>>> async_resume+0x1d/0x50
>>>> async_run_entry_fn+0x48/0x150
>>>> process_one_work+0x14b/0x440
>>>> worker_thread+0x48/0x4a0
>>>> ? process_one_work+0x440/0x440
>>>> kthread+0xd8/0xf0
>>>> ? kthread_worker_fn+0x170/0x170
>>>> ret_from_fork+0x3f/0x70
>>>> ? kthread_worker_fn+0x170/0x170
>>>>
>>>> Please note that I had to type the calltrace above as I don't have a
>>>> serial cable and netconsole didn't work for me for some reason, so
>>>> there could be typos I didn't notice.
>>>>
>>>> I run Arch Linux (x86-64), my uname is:
>>>>
>>>> $ uname -a
>>>> Linux myhost 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016
>>>> x86_64 GNU/Linux
>>>>
>>>> Please let me know if you have any questions or need any other information.
>>>>
>>>> Thanks,
>>>>
>>>> Diego
>>>
>>> I found something interesting, I can suspend/resume just fine when the
>>> module is loaded and when I do this:
>>>
>>> $ ip link set ens34 down
>>>
>>> When I bring the device up again the hang still occurs.
>>>
>>> Diego
>>
>> I have tried to reproduce this problem with the latest git
>> (torvalds/linux.git) and also went back to Linux 3.11 and I still got
>> the hang with both, my plan was to run git bisect, but the problem
>> still occurs.
>>
>> I opened this bug in bugzilla if it's preferred to deal with the problem 
>> there:
>>
>> https://bugzilla.kernel.org/show_bug.cgi?id=112351
>>
>> Thanks,
>> Diego
>
> So I found that disabling async as in:
>
> $ echo 0 > /sys/power/pm_async
>
> Helps with my issue, I can't reproduce the hang anymore, tried
> suspend/resume almost ~15 times.
>
> Diego

Can someone please help?


Re: Computer fails to resume from suspend unless I rmmod jme before initiating the suspend

2016-02-13 Thread Diego Viola
On Fri, Feb 12, 2016 at 6:17 AM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Wed, Feb 10, 2016 at 7:36 PM, Diego Viola <diego.vi...@gmail.com> wrote:
>> On Wed, Feb 10, 2016 at 2:19 AM, Diego Viola <diego.vi...@gmail.com> wrote:
>>> Hi Guo,
>>>
>>> I have an x86 computer with this network card:
>>>
>>> 02:00.0 Ethernet controller: JMicron Technology Corp. JMC260 PCI
>>> Express Fast Ethernet Controller (rev 03)
>>>
>>> Every time I initiate a suspend (systemctl suspend) the machine hangs
>>> at resume unless I unload the jme driver.
>>>
>>> Here is a Call Trace I was able to get after it hanged:
>>>
>>> 
>>> tasklet_action+0xb0/0xd0
>>> __do_softirq+0xcf/0x290
>>> irq_exit+0xa3/0xb0
>>> do_IRQ+0x54/0xd0
>>> common_interrupt+0x82/0x82
>>>
>>> 
>>> jme_start_irq+0x84/0xa0 [jme]
>>> jme_resume+0x12f/0x210 [jme]
>>> pci_pm_resume+0x64/0xa0
>>> ? pci_pm_thaw+0x90/0x90
>>> dpm_run_callback+0x4e/0x130
>>> device_resume+0xd3/0x1f0
>>> async_resume+0x1d/0x50
>>> async_run_entry_fn+0x48/0x150
>>> process_one_work+0x14b/0x440
>>> worker_thread+0x48/0x4a0
>>> ? process_one_work+0x440/0x440
>>> kthread+0xd8/0xf0
>>> ? kthread_worker_fn+0x170/0x170
>>> ret_from_fork+0x3f/0x70
>>> ? kthread_worker_fn+0x170/0x170
>>>
>>> Please note that I had to type the calltrace above as I don't have a
>>> serial cable and netconsole didn't work for me for some reason, so
>>> there could be typos I didn't notice.
>>>
>>> I run Arch Linux (x86-64), my uname is:
>>>
>>> $ uname -a
>>> Linux myhost 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016
>>> x86_64 GNU/Linux
>>>
>>> Please let me know if you have any questions or need any other information.
>>>
>>> Thanks,
>>>
>>> Diego
>>
>> I found something interesting, I can suspend/resume just fine when the
>> module is loaded and when I do this:
>>
>> $ ip link set ens34 down
>>
>> When I bring the device up again the hang still occurs.
>>
>> Diego
>
> I have tried to reproduce this problem with the latest git
> (torvalds/linux.git) and also went back to Linux 3.11 and I still got
> the hang with both, my plan was to run git bisect, but the problem
> still occurs.
>
> I opened this bug in bugzilla if it's preferred to deal with the problem 
> there:
>
> https://bugzilla.kernel.org/show_bug.cgi?id=112351
>
> Thanks,
> Diego

So I found that disabling async as in:

$ echo 0 > /sys/power/pm_async

Helps with my issue, I can't reproduce the hang anymore, tried
suspend/resume almost ~15 times.

Diego


Re: Computer fails to resume from suspend unless I rmmod jme before initiating the suspend

2016-02-12 Thread Diego Viola
On Wed, Feb 10, 2016 at 7:36 PM, Diego Viola <diego.vi...@gmail.com> wrote:
> On Wed, Feb 10, 2016 at 2:19 AM, Diego Viola <diego.vi...@gmail.com> wrote:
>> Hi Guo,
>>
>> I have an x86 computer with this network card:
>>
>> 02:00.0 Ethernet controller: JMicron Technology Corp. JMC260 PCI
>> Express Fast Ethernet Controller (rev 03)
>>
>> Every time I initiate a suspend (systemctl suspend) the machine hangs
>> at resume unless I unload the jme driver.
>>
>> Here is a Call Trace I was able to get after it hanged:
>>
>> 
>> tasklet_action+0xb0/0xd0
>> __do_softirq+0xcf/0x290
>> irq_exit+0xa3/0xb0
>> do_IRQ+0x54/0xd0
>> common_interrupt+0x82/0x82
>>
>> 
>> jme_start_irq+0x84/0xa0 [jme]
>> jme_resume+0x12f/0x210 [jme]
>> pci_pm_resume+0x64/0xa0
>> ? pci_pm_thaw+0x90/0x90
>> dpm_run_callback+0x4e/0x130
>> device_resume+0xd3/0x1f0
>> async_resume+0x1d/0x50
>> async_run_entry_fn+0x48/0x150
>> process_one_work+0x14b/0x440
>> worker_thread+0x48/0x4a0
>> ? process_one_work+0x440/0x440
>> kthread+0xd8/0xf0
>> ? kthread_worker_fn+0x170/0x170
>> ret_from_fork+0x3f/0x70
>> ? kthread_worker_fn+0x170/0x170
>>
>> Please note that I had to type the calltrace above as I don't have a
>> serial cable and netconsole didn't work for me for some reason, so
>> there could be typos I didn't notice.
>>
>> I run Arch Linux (x86-64), my uname is:
>>
>> $ uname -a
>> Linux myhost 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016
>> x86_64 GNU/Linux
>>
>> Please let me know if you have any questions or need any other information.
>>
>> Thanks,
>>
>> Diego
>
> I found something interesting, I can suspend/resume just fine when the
> module is loaded and when I do this:
>
> $ ip link set ens34 down
>
> When I bring the device up again the hang still occurs.
>
> Diego

I have tried to reproduce this problem with the latest git
(torvalds/linux.git) and also went back to Linux 3.11 and I still got
the hang with both, my plan was to run git bisect, but the problem
still occurs.

I opened this bug in bugzilla if it's preferred to deal with the problem there:

https://bugzilla.kernel.org/show_bug.cgi?id=112351

Thanks,
Diego


Re: Computer fails to resume from suspend unless I rmmod jme before initiating the suspend

2016-02-10 Thread Diego Viola
On Wed, Feb 10, 2016 at 2:19 AM, Diego Viola <diego.vi...@gmail.com> wrote:
> Hi Guo,
>
> I have an x86 computer with this network card:
>
> 02:00.0 Ethernet controller: JMicron Technology Corp. JMC260 PCI
> Express Fast Ethernet Controller (rev 03)
>
> Every time I initiate a suspend (systemctl suspend) the machine hangs
> at resume unless I unload the jme driver.
>
> Here is a Call Trace I was able to get after it hanged:
>
> 
> tasklet_action+0xb0/0xd0
> __do_softirq+0xcf/0x290
> irq_exit+0xa3/0xb0
> do_IRQ+0x54/0xd0
> common_interrupt+0x82/0x82
>
> 
> jme_start_irq+0x84/0xa0 [jme]
> jme_resume+0x12f/0x210 [jme]
> pci_pm_resume+0x64/0xa0
> ? pci_pm_thaw+0x90/0x90
> dpm_run_callback+0x4e/0x130
> device_resume+0xd3/0x1f0
> async_resume+0x1d/0x50
> async_run_entry_fn+0x48/0x150
> process_one_work+0x14b/0x440
> worker_thread+0x48/0x4a0
> ? process_one_work+0x440/0x440
> kthread+0xd8/0xf0
> ? kthread_worker_fn+0x170/0x170
> ret_from_fork+0x3f/0x70
> ? kthread_worker_fn+0x170/0x170
>
> Please note that I had to type the calltrace above as I don't have a
> serial cable and netconsole didn't work for me for some reason, so
> there could be typos I didn't notice.
>
> I run Arch Linux (x86-64), my uname is:
>
> $ uname -a
> Linux myhost 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016
> x86_64 GNU/Linux
>
> Please let me know if you have any questions or need any other information.
>
> Thanks,
>
> Diego

I found something interesting, I can suspend/resume just fine when the
module is loaded and when I do this:

$ ip link set ens34 down

When I bring the device up again the hang still occurs.

Diego


Computer fails to resume from suspend unless I rmmod jme before initiating the suspend

2016-02-09 Thread Diego Viola
Hi Guo,

I have an x86 computer with this network card:

02:00.0 Ethernet controller: JMicron Technology Corp. JMC260 PCI
Express Fast Ethernet Controller (rev 03)

Every time I initiate a suspend (systemctl suspend) the machine hangs
at resume unless I unload the jme driver.

Here is a Call Trace I was able to get after it hanged:


tasklet_action+0xb0/0xd0
__do_softirq+0xcf/0x290
irq_exit+0xa3/0xb0
do_IRQ+0x54/0xd0
common_interrupt+0x82/0x82


jme_start_irq+0x84/0xa0 [jme]
jme_resume+0x12f/0x210 [jme]
pci_pm_resume+0x64/0xa0
? pci_pm_thaw+0x90/0x90
dpm_run_callback+0x4e/0x130
device_resume+0xd3/0x1f0
async_resume+0x1d/0x50
async_run_entry_fn+0x48/0x150
process_one_work+0x14b/0x440
worker_thread+0x48/0x4a0
? process_one_work+0x440/0x440
kthread+0xd8/0xf0
? kthread_worker_fn+0x170/0x170
ret_from_fork+0x3f/0x70
? kthread_worker_fn+0x170/0x170

Please note that I had to type the calltrace above as I don't have a
serial cable and netconsole didn't work for me for some reason, so
there could be typos I didn't notice.

I run Arch Linux (x86-64), my uname is:

$ uname -a
Linux myhost 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016
x86_64 GNU/Linux

Please let me know if you have any questions or need any other information.

Thanks,

Diego