<div dir="ltr">Hello Bjorn, thank you for reply<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 9, 2017 at 10:28 PM, Bjørn Mork <span dir="ltr"><<a href="mailto:bjorn@mork.no" target="_blank">bjorn@mork.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">Dan Williams <<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>> writes:<br>
<br>
> On Fri, 2017-06-09 at 01:25 +0200, Dominik Strnad wrote:<br>
>> Hello Bjorn,<br>
>><br>
>> thank you. I meanwhile succeeded to get car into online mode by<br>
>> isolating<br>
>> pin20 on minPCIe card. But I at least confirm, that after using<br>
>> ENTERCND<br>
>> the PCOFFEN do not report error anymore (but the card was already not<br>
>> in<br>
>> disable state because of pin isolation. But I have a question - what<br>
>> is<br>
>> better? To use your command (probably as part of some udev rule?) or<br>
>> keep<br>
>> that pin isolated? Thank you.<br>
><br>
> Ideally figure out why BIOS isn't letting the card be enabled :)<br>
<br>
</span>I still think this is a BIOS flag which needs to be set or cleared, but<br>
I don't know the exact magic spell. Looking at the thinkpad_acpi driver<br>
now, I get a distinct deja vu feeling... If I only had taken some notes<br>
:-(<br></blockquote><div><br></div><div>I maybe remembered something.... I think the key was to:<br><br></div><div>1. reload BIOS default, save boot<br></div><div>2. disable WWAN or WIMAX? card in Security I/O ports, save BIOS, boot<br></div><div>3. enable WWAN or WIMAX? card in Security I/O ports, save BIOS, boot</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I wonder if I simply might have temporarily disabled the "HWPRESENT"<br>
test in the driver, and let the default wan_shutdown() just update the<br>
state? In any case, I do believe the solution is hidden somewhere here:<br>
<br>
<br>
<br>
static void wan_shutdown(void)<br>
{<br>
/* Order firmware to save current state to NVRAM */<br>
if (!acpi_evalf(NULL, NULL, "\\WGSV", "vd",<br>
TP_ACPI_WGSV_SAVE_STATE))<br>
pr_notice("failed to save WWAN state to NVRAM\n");<br>
else<br>
vdbg_printk(TPACPI_DBG_RFKILL,<br>
"WWAN state saved to NVRAM\n");<br>
}<br>
<br>
static void wan_exit(void)<br>
{<br>
sysfs_remove_group(&tpacpi_<wbr>pdev->dev.kobj,<br>
&wan_attr_group);<br>
<br>
tpacpi_destroy_rfkill(TPACPI_<wbr>RFK_WWAN_SW_ID);<br>
<br>
wan_shutdown();<br>
}<br>
<br>
static int __init wan_init(struct ibm_init_struct *iibm)<br>
{<br>
int res;<br>
int status = 0;<br>
<br>
vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_RFKILL,<br>
"initializing wan subdriver\n");<br>
<br>
TPACPI_ACPIHANDLE_INIT(hkey);<br>
<br>
tp_features.wan = hkey_handle &&<br>
acpi_evalf(hkey_handle, &status, "GWAN", "qd");<br>
<br>
vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_RFKILL,<br>
"wan is %s, status 0x%02x\n",<br>
str_supported(tp_features.wan)<wbr>,<br>
status);<br>
<br>
#ifdef CONFIG_THINKPAD_ACPI_<wbr>DEBUGFACILITIES<br>
if (dbg_wwanemul) {<br>
tp_features.wan = 1;<br>
pr_info("wwan switch emulation enabled\n");<br>
} else<br>
#endif<br>
if (tp_features.wan &&<br>
!(status & TP_ACPI_WANCARD_HWPRESENT)) {<br>
/* no wan hardware present in system */<br>
tp_features.wan = 0;<br>
dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_RFKILL,<br>
"wan hardware not installed\n");<br>
}<br>
<br>
if (!tp_features.wan)<br>
return 1;<br>
<br>
..<br>
<span class="gmail-"><br>
<br>
> But failing that, either PCOFFEN or the taping of pin20 are probably<br>
> fine. PCOFFEN is likely the better solution, though that may be reset<br>
> on firmware updates.<br>
<br>
</span>I don't think it will be reset. NVRAM settings are usually kept, unless<br>
the firmware upgrade includes a specific setting. And they normally<br>
don't touch PCOFFEN.<br></blockquote><div><br></div><div>So it seems that time comes to remove isolation on PIN20 and test again:<br><br></div><div>- BIOS hack (Should I revert somehow PCOFFEN to previous value to be able to see if bios enabling card now? Which value?)<br></div><div>- PCOFFEN only<br><br></div><div>Dominik<br></div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
Bjørn<br>
<br>
</font></span></blockquote></div><br></div></div></div>