diff options
| author | Jakub Kicinski <[email protected]> | 2022-11-11 01:43:53 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2022-11-11 01:43:53 +0000 |
| commit | 966a9b49033b472dcfb453abdc34bca7df17adce (patch) | |
| tree | c47919dd0be3db0d04bb272e39eee209de355eac /drivers/net/wwan/iosm/iosm_ipc_pcie.c | |
| parent | genetlink: fix single op policy dump when do is present (diff) | |
| parent | Merge tag 'net-6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff) | |
| download | kernel-966a9b49033b472dcfb453abdc34bca7df17adce.tar.gz kernel-966a9b49033b472dcfb453abdc34bca7df17adce.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/can/pch_can.c
ae64438be192 ("can: dev: fix skb drop check")
1dd1b521be85 ("can: remove obsolete PCH CAN driver")
https://lore.kernel.org/all/[email protected]/
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/wwan/iosm/iosm_ipc_pcie.c')
| -rw-r--r-- | drivers/net/wwan/iosm/iosm_ipc_pcie.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/wwan/iosm/iosm_ipc_pcie.c b/drivers/net/wwan/iosm/iosm_ipc_pcie.c index 31f57b986df2..d3d34d1c4704 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_pcie.c +++ b/drivers/net/wwan/iosm/iosm_ipc_pcie.c @@ -232,6 +232,7 @@ static void ipc_pcie_config_init(struct iosm_pcie *ipc_pcie) */ static enum ipc_pcie_sleep_state ipc_pcie_read_bios_cfg(struct device *dev) { + enum ipc_pcie_sleep_state sleep_state = IPC_PCIE_D0L12; union acpi_object *object; acpi_handle handle_acpi; @@ -242,18 +243,23 @@ static enum ipc_pcie_sleep_state ipc_pcie_read_bios_cfg(struct device *dev) } object = acpi_evaluate_dsm(handle_acpi, &wwan_acpi_guid, 0, 3, NULL); + if (!object) + goto default_ret; + + if (object->integer.value == 3) + sleep_state = IPC_PCIE_D3L2; - if (object && object->integer.value == 3) - return IPC_PCIE_D3L2; + kfree(object); default_ret: - return IPC_PCIE_D0L12; + return sleep_state; } static int ipc_pcie_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { struct iosm_pcie *ipc_pcie = kzalloc(sizeof(*ipc_pcie), GFP_KERNEL); + int ret; pr_debug("Probing device 0x%X from the vendor 0x%X", pci_id->device, pci_id->vendor); @@ -286,6 +292,12 @@ static int ipc_pcie_probe(struct pci_dev *pci, goto pci_enable_fail; } + ret = dma_set_mask(ipc_pcie->dev, DMA_BIT_MASK(64)); + if (ret) { + dev_err(ipc_pcie->dev, "Could not set PCI DMA mask: %d", ret); + return ret; + } + ipc_pcie_config_aspm(ipc_pcie); dev_dbg(ipc_pcie->dev, "PCIe device enabled."); |
