2016-03-12 00:47:09

by Reinoud Koornstra

[permalink] [raw]
Subject: splx->package.count

Hi Everybody,

The message Unsupported splx structure annoyed me so I started looking.
My instrumentation shows this:

Mar 11 00:24:32 kernel: [ 7.263415] iwlwifi 0000:04:00.0:
drivers/net/wireless/iwlwifi/pcie/drv.c, splx_get_pwr_limit:
splx->type is 0x04
Mar 11 00:24:32 kernel: [ 7.263416] iwlwifi 0000:04:00.0:
drivers/net/wireless/iwlwifi/pcie/drv.c, splx_get_pwr_limit:
splx->package.count is 4
Mar 11 00:24:32 kernel: [ 7.263417] iwlwifi 0000:04:00.0:
drivers/net/wireless/iwlwifi/pcie/drv.c, splx_get_pwr_limit:
splx->package.elements[0].type is 0x01
Mar 11 00:24:32 kernel: [ 7.263418] iwlwifi 0000:04:00.0:
drivers/net/wireless/iwlwifi/pcie/drv.c, splx_get_pwr_limit:
splx->package.elements[0].integer.value is 0

Ok, so:

splx->type is ACPI_TYPE_PACKAGE
splx->package.count is 4
splx->package.elements[0].type is ACPI_TYPE_INTEGER
splx->package.elements[0].integer.value is 0

Looking at the code:

if (splx->type != ACPI_TYPE_PACKAGE ||
splx->package.count != 2 ||
splx->package.elements[0].type != ACPI_TYPE_INTEGER ||
splx->package.elements[0].integer.value != 0)

Meaning, the package.count isn't 2, why does it need to be 2?
[
[ 7.495340] iwlwifi 0000:04:00.0:
drivers/net/wireless/iwlwifi/pcie/drv.c, splx_get_pwr_limit:
limits->type is 0x04
[ 7.495341] iwlwifi 0000:04:00.0:
drivers/net/wireless/iwlwifi/pcie/drv.c, splx_get_pwr_limit:
limits->package.count is 3
[ 7.495342] iwlwifi 0000:04:00.0:
drivers/net/wireless/iwlwifi/pcie/drv.c, splx_get_pwr_limit:
limits->package.elements[0].type is 0x01
[ 7.495342] iwlwifi 0000:04:00.0:
drivers/net/wireless/iwlwifi/pcie/drv.c, splx_get_pwr_limit:
limits->package.elements[1].type is 0x01
So limits->type is ACPI_TYPE_PACKAGE
limits->package.count is 3 (not ok) Why does this need to be < 2?
package.elements[0].type is ACPI_TYPE_INTEGER
limits->package.elements[1].type is ACPI_TYPE_INTEGER

[ 7.495343] iwlwifi 0000:04:00.0:
drivers/net/wireless/iwlwifi/pcie/drv.c, splx_get_pwr_limit: WiFi
power is not limited, domain_type->integer.value is 0

Ok, so the last check also doesn't pass.
In any case, this isn't something I'm worried about, I'm just
wondering why the counts are so specific.
Thanks,

Reinoud.