Bug 47751 - rfkill: LTE modem Sierra MC7710 remains in low-power mode due to W_DISABLE on Sony Vaio SVZ1311Z9R/X
Summary: rfkill: LTE modem Sierra MC7710 remains in low-power mode due to W_DISABLE on...
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform_x86 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_platform_x86@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-21 16:56 UTC by Illya Klymov
Modified: 2014-11-27 12:01 UTC (History)
5 users (show)

See Also:
Kernel Version: 3.6.1
Tree: Mainline
Regression: No


Attachments
insmod sony-laptop debug=1 dmesg output (8.32 KB, application/octet-stream)
2012-09-24 14:21 UTC, Illya Klymov
Details
grep . /sys/class/rfkill/rfkill*/name output (164 bytes, application/octet-stream)
2012-09-24 14:22 UTC, Illya Klymov
Details
DSDT (33.74 KB, application/octet-stream)
2012-09-24 14:24 UTC, Illya Klymov
Details
change argument for rfkill control (477 bytes, patch)
2012-10-11 21:54 UTC, Mattia Dongili
Details | Diff

Description Illya Klymov 2012-09-21 16:56:52 UTC
I have a new SVZ1311Z9R/X notebook, which uses an MC7710 3G/LTE modem. 
rfkill list shows that all devices are neither soft nor hard blocked.
Modem is available via /dev/ttyUSB{0-2} devices, and responds to AT commands, but is unable to connect network. 

Digging with modem AT commands I revealed following:

> AT!PCINFO?
State: 0 (LPM)
LPM force flags - W_DISABLE:1, User:0, Temp:0, Volt:0
W_DISABLE: 1
Poweroff mode: 0
LPM Persistent: 0

OK

According to documention W_DISABLE is the PCIe input pin used by the rfkill switch, so rfkill output seems to be wrong in this case.
Comment 1 Mattia Dongili 2012-09-23 21:54:46 UTC
Do you have a sony-* entry for your modem in /sys/class/rfkill?
i.e.:
grep . /sys/class/rfkill/rfkill*/name

In either case could you attach the DSDT of your laptop and the kernel log after loading sony-laptop with debug=1?

Thanks
Comment 2 Illya Klymov 2012-09-24 14:21:48 UTC
Created attachment 80951 [details]
insmod sony-laptop debug=1 dmesg output
Comment 3 Illya Klymov 2012-09-24 14:22:13 UTC
Created attachment 80961 [details]
grep . /sys/class/rfkill/rfkill*/name output
Comment 4 Illya Klymov 2012-09-24 14:24:23 UTC
Created attachment 80971 [details]
DSDT
Comment 5 Illya Klymov 2012-09-24 14:25:45 UTC
Here comes all data you've requested. I've dumped DSDT via cat /proc/acpi/dsdt (path may be wrong, writing by memory from other computer)
Comment 6 Illya Klymov 2012-10-10 15:59:36 UTC
Additionally rfkill block wwan removes device from the system and it will not be back if I pass "rfkill unblock wwan". I need to reboot to windows in order for modem to appear
Comment 7 Mattia Dongili 2012-10-10 22:17:40 UTC
thanks for the additional info.
So we are likely missing some extra call to the SN07 method when enabling the modem.

can you see if you manage to find out which EC registers change when enabling/disabling the modem from windows?
You can probably use this tool
http://rweverything.myweb.hinet.net/download.html
(I haven't used it myself, use it at your own risk)
Comment 8 Illya Klymov 2012-10-11 10:34:05 UTC
> can you see if you manage to find out which EC registers change when
> enabling/disabling the modem from windows?

Thanks for a hint. Yes, I've found it, and tested approach in linux. The following hack (I've created a separated kernel module) does the trick (modem appears after rfkill block wwan and is not in LPM):

    u8 value = 0x07;
    int retval = ec_write(0x50, value);


With this hack my modem is working under linux, so it seems to be a correct EC register

Windows also initializes the modem by writing 0x07 to 0x50 in EC, and removes it by writing 0x00 to 0x50.
Comment 9 Mattia Dongili 2012-10-11 21:54:56 UTC
Created attachment 83001 [details]
change argument for rfkill control

Good catch.
can you see if the attached patch works for you?
Comment 10 Illya Klymov 2012-10-11 23:18:41 UTC
(In reply to comment #9)
> Good catch.
> can you see if the attached patch works for you?

Works. Tested with 3.6.1 kernel
Comment 11 Mattia Dongili 2012-10-14 21:44:53 UTC
Thanks Illya, I submitted the patch to Matthew for inclusion in the platform-x86 tree.
Comment 12 Len Brown 2013-02-08 17:44:41 UTC
moving to drivers/platform_x86
Comment 13 Florian Mickler 2013-03-04 21:20:37 UTC
A patch referencing this bug report has been merged in Linux v3.9-rc1:

commit 3ec1c3983d73b1e3d4cfd72afab94c34eceafe8a
Author: Mattia Dongili <malattia@linux.it>
Date:   Fri Dec 21 07:21:08 2012 +0900

    sony-laptop: fully enable SNY controlled modems

Note You need to log in before you can comment on or make changes to this bug.