- Dec 09, 2021
-
-
M Chetan Kumar authored
ev_cdev_write_pending flag is preventing a TX message post for AT port while MBIM transfer is ongoing. Removed the unnecessary check around control port TX transfer. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Reviewed-by:
Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
-
M Chetan Kumar authored
Devlink initialization flow was overwriting the IP traffic channel configuration. This was causing wwan0 network interface to be unusable after fw flash. When device boots to fully functional mode restore the IP channel configuration. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Reviewed-by:
Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
-
M Chetan Kumar authored
In TX packet accumulation flow transport layer is giving a doorbell to device even though there is no pending control TX transfer that needs immediate attention. Introduced a new hpda_ctrl_pending variable to keep track of pending control TX transfer. If there is a pending control TX transfer which needs an immediate attention only then give a doorbell to device. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Reviewed-by:
Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
-
- Nov 11, 2021
-
-
M Chetan Kumar authored
curr_phase is unused. Removed the dead code. Fixes: 8d9be063 ("net: wwan: iosm: transport layer support for fw flashing/cd") Reported-by:
kernel test robot <lkp@intel.com> Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Reviewed-by:
Loic Poulain <loic.poulain@linaro.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Oct 02, 2021
-
-
M Chetan Kumar authored
1. Removed driver specific extra params like download_region, address & region_count. The required information is passed as part of flash API. 2. IOSM Devlink documentation updated to reflect the same. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 27, 2021
-
-
Leon Romanovsky authored
This change prevents from users to access device before devlink is fully configured. Indirectly this change fixes the commit mentioned below where devlink_unregister() was prematurely removed. Fixes: db4278c5 ("devlink: Make devlink_register to be void") Signed-off-by:
Leon Romanovsky <leonro@nvidia.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 24, 2021
-
-
Thomas Gleixner authored
hrtimer_forward_now() is providing the same functionality. Preparation for making hrtimer_forward() timer core code only. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Cc: Loic Poulain <loic.poulain@linaro.org> Cc: netdev@vger.kernel.org Cc: Sergey Ryazanov <ryazanov.s.a@gmail.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: M Chetan Kumar <m.chetan.kumar@intel.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: "David S. Miller" <davem@davemloft.net> Cc: Intel Corporation <linuxwwan@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 22, 2021
-
-
M Chetan Kumar authored
1> Function comments moved to .c file. 2> Use literals in return to improve readability. 3> Do error handling check instead of success check. 4> Redundant ret assignment removed. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Leon Romanovsky authored
devlink_register() can't fail and always returns success, but all drivers are obligated to check returned status anyway. This adds a lot of boilerplate code to handle impossible flow. Make devlink_register() void and simplify the drivers that use that API call. Signed-off-by:
Leon Romanovsky <leonro@nvidia.com> Acked-by:
Simon Horman <simon.horman@corigine.com> Acked-by: Vladimir Oltean <olteanv@gmail.com> # dsa Reviewed-by:
Jiri Pirko <jiri@nvidia.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 20, 2021
-
-
M Chetan Kumar authored
IOSM Makefile & WWAN Kconfig changes to support fw flashing & cd collection module compliation. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
M Chetan Kumar authored
Implements transport layer protocol for fw flashing/coredump collection. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
M Chetan Kumar authored
Implements protocol for coredump collection. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
M Chetan Kumar authored
Implements protocol for fw flashing and PSI injection for coredump collection. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
M Chetan Kumar authored
Register with devlink framework and implment callbacks required for fw flashing and coredump collection. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 16, 2021
-
-
Jakub Kicinski authored
The devlink parameters are not the right mechanism to pass extra parameters to device flashing. The params added are also undocumented. This reverts commit 13bb8429 ("net: wwan: iosm: firmware flashing and coredump collection"). Signed-off-by:
Jakub Kicinski <kuba@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 14, 2021
-
-
M Chetan Kumar authored
Removed "stdbool.h" inclusion in iosm_ipc_imem.h Fixes: 13bb8429 ("net: wwan: iosm: firmware flashing and coredump collection") Reported-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 13, 2021
-
-
M Chetan Kumar authored
This patch brings-in support for M.2 7560 Device firmware flashing & coredump collection using devlink. - Driver Registers with Devlink framework. - Register devlink params callback for configuring device params required in flashing or coredump flow. - Implements devlink ops flash_update callback that programs modem firmware. - Creates region & snapshot required for device coredump log collection. On early detection of device in boot rom stage. Driver registers with Devlink framework and establish transport channel for PSI (Primary Signed Image) injection. Once PSI is injected to device, the device execution stage details are read to determine whether device is in flash or exception mode. The collected information is reported to devlink user space application & based on this informationi, application proceeds with either modem firmware flashing or coredump collection. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 06, 2021
-
-
Andy Shevchenko authored
Currently we have readl()/writel()/ioread*()/iowrite*() APIs in use. Let's unify to use only ioread*()/iowrite*() variants. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Andy Shevchenko authored
The io.*_lo_hi() variants are not strictly needed on the x86 hardware and especially the PCI bus. Replace them with regular accessors, but leave headers in place in case of 32-bit build. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 27, 2021
-
-
Greg Kroah-Hartman authored
This reverts commit 0092a1e3 This should be reverted in the char-misc-next branch to make merging with Linus's branch possible due to issues with the mhi code that was found in the networking tree. Link: https://lore.kernel.org/r/20210827175852.GB15018@thinkpad Reported-by:
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reported-by:
Stephen Rothwell <sfr@canb.auug.org.au> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Bhaumik Bhatt <bbhatt@codeaurora.org> Cc: Hemant Kumar <hemantk@codeaurora.org> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Kalle Valo <kvalo@codeaurora.org> Cc: Loic Poulain <loic.poulain@linaro.org> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- Aug 26, 2021
-
-
Kalle Valo authored
This reverts commit ce78ffa3. Wren and Nicolas reported that ath11k was failing to initialise QCA6390 Wi-Fi 6 device with error: qcom_mhi_qrtr: probe of mhi0_IPCR failed with error -22 Commit ce78ffa3 ("net: really fix the build..."), introduced in v5.14-rc5, caused this regression in qrtr. Most likely all ath11k devices are broken, but I only tested QCA6390. Let's revert the broken commit so that ath11k works again. Reported-by:
Wren Turkal <wt@penguintechs.org> Reported-by:
Nicolas Schichan <nschichan@freebox.fr> Signed-off-by:
Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210826172816.24478-1-kvalo@codeaurora.org Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
-
- Aug 23, 2021
-
-
Christophe JAILLET authored
The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. 'ipc_protocol_init()' can use GFP_KERNEL, because this flag is already used by a 'kzalloc()' call a few lines above. 'ipc_protocol_msg_prepipe_open()' must use GFP_ATOMIC, because this flag is already used by a 'kcalloc()' call a few lines above. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by:
Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 19, 2021
-
-
Alexey Dobriyan authored
Delete/fixup few includes in anticipation of global -isystem compile option removal. Note: crypto/aegis128-neon-inner.c keeps <stddef.h> due to redefinition of uintptr_t error (one definition comes from <stddef.h>, another from <linux/types.h>). Signed-off-by:
Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org>
-
- Aug 16, 2021
-
-
Dan Carpenter authored
The bounds check on "index" doesn't catch negative values. Using ARRAY_SIZE() directly is more readable and more robust because it prevents negative values for "index". Fortunately we only pass valid values to ipc_chnl_cfg_get() so this patch does not affect runtime. Reported-by:
Solomon Ucko <solly.ucko@gmail.com> Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by:
M Chetan Kumar <m.chetan.kumar@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 12, 2021
-
-
Andy Shevchenko authored
Make wwan_create_dev() to return either valid or error pointer, In some cases it may return NULL. Prevent this by converting it to the respective error pointer. Fixes: 9a44c1cc ("net: Add a WWAN subsystem") Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by:
Sergey Ryazanov <ryazanov.s.a@gmail.com> Reviewed-by:
Loic Poulain <loic.poulain@linaro.org> Link: https://lore.kernel.org/r/20210811124845.10955-1-andriy.shevchenko@linux.intel.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Andy Shevchenko authored
ida_alloc_range() may return other than -ENOMEM error code. Unshadow it in the wwan_create_port(). Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Sergey Ryazanov <ryazanov.s.a@gmail.com> Reviewed-by:
Loic Poulain <loic.poulain@linaro.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 09, 2021
-
-
Wei Yongjun authored
The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. Fixes: aa730a99 ("net: wwan: Add MHI MBIM network driver") Reported-by:
Hulk Robot <hulkci@huawei.com> Signed-off-by:
Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by:
Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 07, 2021
-
-
Loic Poulain authored
Lockdep detected possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mhiwwan->rx_lock); local_irq_disable(); lock(&mhi_cntrl->pm_lock); lock(&mhiwwan->rx_lock); <Interrupt> lock(&mhi_cntrl->pm_lock); *** DEADLOCK *** To prevent this we need to disable the soft-interrupts when taking the rx_lock. Cc: stable@vger.kernel.org Fixes: fa588eba ("net: Add Qcom WWAN control driver") Reported-by:
Thomas Perrot <thomas.perrot@bootlin.com> Signed-off-by:
Loic Poulain <loic.poulain@linaro.org> Reviewed-by:
Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 05, 2021
-
-
Loic Poulain authored
Currently, the MHI controller driver defines which channels should have their inbound buffers allocated and queued. But ideally, this is something that should be decided by the MHI device driver instead, which actually deals with that buffers. Add a flag parameter to mhi_prepare_for_transfer allowing to specify if buffers have to be allocated and queued by the MHI stack. Keep auto_queue flag for now, but should be removed at some point. Link: https://lore.kernel.org/r/1624566520-20406-1-git-send-email-loic.poulain@linaro.org Tested-by:
Bhaumik Bhatt <bbhatt@codeaurora.org> Reviewed-by:
Bhaumik Bhatt <bbhatt@codeaurora.org> Reviewed-by:
Hemant Kumar <hemantk@codeaurora.org> Reviewed-by:
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Acked-by:
Jakub Kicinski <kuba@kernel.org> Signed-off-by:
Loic Poulain <loic.poulain@linaro.org> Signed-off-by:
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20210802051255.5771-2-manivannan.sadhasivam@linaro.org Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
David S. Miller authored
This reverts commit ab996c42. Only aplicable when net is merged into net-next. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Reported-by:
Mark Brown <broonie@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
M Chetan Kumar authored
Calling unregister_netdevice() inside wwan del link is trying to acquire the held lock in ndo_stop_cb(). Instead, queue net dev to be unregistered later. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Reviewed-by:
Loic Poulain <loic.poulain@linaro.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
M Chetan Kumar authored
Correct ul/dl data protocol mask bit to know which protocol capability does device implement. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Reviewed-by:
Loic Poulain <loic.poulain@linaro.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
M Chetan Kumar authored
Endianness type correction for nr_of_bytes. This field is exchanged as part of host-device protocol communication. Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Reviewed-by:
Loic Poulain <loic.poulain@linaro.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
M Chetan Kumar authored
Correct td buffer type casting & format specifier to fix lkp buildbot warning. Reported-by:
kernel test robot <lkp@intel.com> Signed-off-by:
M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 04, 2021
-
-
Loic Poulain authored
Add new wwan driver for MBIM over MHI. MBIM is a transport protocol for IP packets, allowing packet aggregation and muxing. Initially designed for USB bus, it is also exposed through MHI bus for QCOM based PCIe wwan modems. This driver supports the new wwan rtnetlink interface for multi-link management and has been tested with Quectel EM120R-GL M2 module. Signed-off-by:
Loic Poulain <loic.poulain@linaro.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 03, 2021
-
-
David S. Miller authored
Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jul 23, 2021
-
-
Loic Poulain authored
A wwan link created via the wwan_create_default_link procedure is never notified to the user (RTM_NEWLINK), causing issues with user tools relying on such event to track network links (NetworkManager). This is because the procedure misses a call to rtnl_configure_link(), which sets the link as initialized and notifies the new link (cf proper usage in __rtnl_newlink()). Cc: stable@vger.kernel.org Fixes: ca374290 ("wwan: core: support default netdev creation") Suggested-by:
Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by:
Loic Poulain <loic.poulain@linaro.org> Acked-by:
Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Loic Poulain authored
A wwan link created via the wwan_create_default_link procedure is never notified to the user (RTM_NEWLINK), causing issues with user tools relying on such event to track network links (NetworkManager). This is because the procedure misses a call to rtnl_configure_link(), which sets the link as initialized and notifies the new link (cf proper usage in __rtnl_newlink()). Cc: stable@vger.kernel.org Fixes: ca374290 ("wwan: core: support default netdev creation") Suggested-by:
Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by:
Loic Poulain <loic.poulain@linaro.org> Acked-by:
Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jul 21, 2021
-
-
Andy Shevchenko authored
Eliminate some boilerplate code by using module_pci_driver() instead of init/exit, moving the salient bits from init into probe. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Loic Poulain <loic.poulain@linaro.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-