e3d6d152 | 26-Jan-2023 |
Kornel Dulęba <mindal@semihalf.com> |
net: wwan: t7xx: Fix Runtime PM initialization
For PCI devices the Runtime PM refcount is incremented twice: 1. During device enumeration with a call to pm_runtime_forbid. 2. Just before a driver pr
net: wwan: t7xx: Fix Runtime PM initialization
For PCI devices the Runtime PM refcount is incremented twice: 1. During device enumeration with a call to pm_runtime_forbid. 2. Just before a driver probe logic is called. Because of that in order to enable Runtime PM on a given device we have to call both pm_runtime_allow and pm_runtime_put_noidle, once it's ready to be runtime suspended. The former was missing causing the pm refcount to never reach 0.
Fixes: d10b3a695ba0 ("net: wwan: t7xx: Runtime PM") Signed-off-by: Kornel Dulęba <mindal@semihalf.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
5545b7b9 | 03-Nov-2022 |
Haijun Liu <haijun.liu@mediatek.com> |
net: wwan: t7xx: Add NAPI support
Replace the work queue based RX flow with a NAPI implementation Remove rx_thread and dpmaif_rxq_work. Enable GRO on RX path. Introduce dummy network device. its res
net: wwan: t7xx: Add NAPI support
Replace the work queue based RX flow with a NAPI implementation Remove rx_thread and dpmaif_rxq_work. Enable GRO on RX path. Introduce dummy network device. its responsibility is - Binds one NAPI object for each DL HW queue and acts as the agent of all those network devices. - Use NAPI object to poll DL packets. - Helps to dispatch each packet to the network interface.
Signed-off-by: Haijun Liu <haijun.liu@mediatek.com> Co-developed-by: Sreehari Kancharla <sreehari.kancharla@linux.intel.com> Signed-off-by: Sreehari Kancharla <sreehari.kancharla@linux.intel.com> Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com> Acked-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Acked-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
3349e4a4 | 28-Oct-2022 |
M Chetan Kumar <m.chetan.kumar@linux.intel.com> |
net: wwan: t7xx: Add port for modem logging
The Modem Logging (MDL) port provides an interface to collect modem logs for debugging purposes. MDL is supported by the relay interface, and the mtk_t7xx
net: wwan: t7xx: Add port for modem logging
The Modem Logging (MDL) port provides an interface to collect modem logs for debugging purposes. MDL is supported by the relay interface, and the mtk_t7xx port infrastructure. MDL allows user-space apps to control logging via mbim command and to collect logs via the relay interface, while port infrastructure facilitates communication between the driver and the modem.
Signed-off-by: Moises Veleta <moises.veleta@linux.intel.com> Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by: Devegowda Chandrashekar <chandrashekar.devegowda@intel.com> Acked-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
87dae9e7 | 16-Aug-2022 |
M Chetan Kumar <m.chetan.kumar@linux.intel.com> |
net: wwan: t7xx: Enable devlink based fw flashing and coredump collection
This patch brings-in support for t7xx wwan device firmware flashing & coredump collection using devlink.
Driver Registers w
net: wwan: t7xx: Enable devlink based fw flashing and coredump collection
This patch brings-in support for t7xx wwan device firmware flashing & coredump collection using devlink.
Driver Registers with Devlink framework. Implements devlink ops flash_update callback that programs modem firmware. Creates region & snapshot required for device coredump log collection. On early detection of wwan device in fastboot mode driver sets up CLDMA0 HW tx/rx queues for raw data transfer then registers with devlink framework. Upon receiving firmware image & partition details driver sends fastboot commands for flashing the firmware.
In this flow the fastboot command & response gets exchanged between driver and device. Once firmware flashing is success completion status is reported to user space application.
Below is the devlink command usage for firmware flashing
$devlink dev flash pci/$BDF file ABC.img component ABC
Note: ABC.img is the firmware to be programmed to "ABC" partition.
In case of coredump collection when wwan device encounters an exception it reboots & stays in fastboot mode for coredump collection by host driver. On detecting exception state driver collects the core dump, creates the devlink region & reports an event to user space application for dump collection. The user space application invokes devlink region read command for dump collection.
Below are the devlink commands used for coredump collection.
devlink region new pci/$BDF/mr_dump devlink region read pci/$BDF/mr_dump snapshot $ID address $ADD length $LEN devlink region del pci/$BDF/mr_dump snapshot $ID
Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by: Devegowda Chandrashekar <chandrashekar.devegowda@intel.com> Signed-off-by: Mishra Soumya Prakash <soumya.prakash.mishra@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
140424d9 | 16-Aug-2022 |
Haijun Liu <haijun.liu@mediatek.com> |
net: wwan: t7xx: PCIe reset rescan
PCI rescan module implements "rescan work queue". In firmware flashing or coredump collection procedure WWAN device is programmed to boot in fastboot mode and a wo
net: wwan: t7xx: PCIe reset rescan
PCI rescan module implements "rescan work queue". In firmware flashing or coredump collection procedure WWAN device is programmed to boot in fastboot mode and a work item is scheduled for removal & detection. The WWAN device is reset using APCI call as part driver removal flow. Work queue rescans pci bus at fixed interval for device detection, later when device is detect work queue exits.
Signed-off-by: Haijun Liu <haijun.liu@mediatek.com> Co-developed-by: Madhusmita Sahu <madhusmita.sahu@intel.com> Signed-off-by: Madhusmita Sahu <madhusmita.sahu@intel.com> Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by: Devegowda Chandrashekar <chandrashekar.devegowda@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
007f26f0 | 16-Aug-2022 |
Haijun Liu <haijun.liu@mediatek.com> |
net: wwan: t7xx: Infrastructure for early port configuration
To support cases such as FW update or Core dump, the t7xx device is capable of signaling the host that a special port needs to be created
net: wwan: t7xx: Infrastructure for early port configuration
To support cases such as FW update or Core dump, the t7xx device is capable of signaling the host that a special port needs to be created before the handshake phase.
This patch adds the infrastructure required to create the early ports which also requires a different configuration of CLDMA queues.
Signed-off-by: Haijun Liu <haijun.liu@mediatek.com> Co-developed-by: Madhusmita Sahu <madhusmita.sahu@intel.com> Signed-off-by: Madhusmita Sahu <madhusmita.sahu@intel.com> Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Signed-off-by: Devegowda Chandrashekar <chandrashekar.devegowda@intel.com> Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
262d98b1 | 13-May-2022 |
Ricardo Martinez <ricardo.martinez@linux.intel.com> |
net: wwan: t7xx: Avoid calls to skb_data_area_size()
skb_data_area_size() helper was used to calculate the size of the DMA mapped buffer passed to the HW. Instead of doing this, use the size passed
net: wwan: t7xx: Avoid calls to skb_data_area_size()
skb_data_area_size() helper was used to calculate the size of the DMA mapped buffer passed to the HW. Instead of doing this, use the size passed to allocate the skbs.
Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
de49ea38 | 06-May-2022 |
Haijun Liu <haijun.liu@mediatek.com> |
net: wwan: t7xx: Device deep sleep lock/unlock
Introduce the mechanism to lock/unlock the device 'deep sleep' mode. When the PCIe link state is L1.2 or L2, the host side still can keep the device is
net: wwan: t7xx: Device deep sleep lock/unlock
Introduce the mechanism to lock/unlock the device 'deep sleep' mode. When the PCIe link state is L1.2 or L2, the host side still can keep the device is in D0 state from the host side point of view. At the same time, if the device's 'deep sleep' mode is unlocked, the device will go to 'deep sleep' while it is still in D0 state on the host side.
Signed-off-by: Haijun Liu <haijun.liu@mediatek.com> Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com> Co-developed-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
d10b3a69 | 06-May-2022 |
Haijun Liu <haijun.liu@mediatek.com> |
net: wwan: t7xx: Runtime PM
Enables runtime power management callbacks including runtime_suspend and runtime_resume. Autosuspend is used to prevent overhead by frequent wake-ups.
Signed-off-by: Hai
net: wwan: t7xx: Runtime PM
Enables runtime power management callbacks including runtime_suspend and runtime_resume. Autosuspend is used to prevent overhead by frequent wake-ups.
Signed-off-by: Haijun Liu <haijun.liu@mediatek.com> Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com> Co-developed-by: Eliot Lee <eliot.lee@intel.com> Signed-off-by: Eliot Lee <eliot.lee@intel.com> Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
46e8f49e | 06-May-2022 |
Haijun Liu <haijun.liu@mediatek.com> |
net: wwan: t7xx: Introduce power management
Implements suspend, resumes, freeze, thaw, poweroff, and restore `dev_pm_ops` callbacks.
From the host point of view, the t7xx driver is one entity. But,
net: wwan: t7xx: Introduce power management
Implements suspend, resumes, freeze, thaw, poweroff, and restore `dev_pm_ops` callbacks.
From the host point of view, the t7xx driver is one entity. But, the device has several modules that need to be addressed in different ways during power management (PM) flows. The driver uses the term 'PM entities' to refer to the 2 DPMA and 2 CLDMA HW blocks that need to be managed during PM flows. When a dev_pm_ops function is called, the PM entities list is iterated and the matching function is called for each entry in the list.
Signed-off-by: Haijun Liu <haijun.liu@mediatek.com> Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com> Co-developed-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
05d19bf5 | 06-May-2022 |
Haijun Liu <haijun.liu@mediatek.com> |
net: wwan: t7xx: Add WWAN network interface
Creates the Cross Core Modem Network Interface (CCMNI) which implements the wwan_ops for registration with the WWAN framework, CCMNI also implements the n
net: wwan: t7xx: Add WWAN network interface
Creates the Cross Core Modem Network Interface (CCMNI) which implements the wwan_ops for registration with the WWAN framework, CCMNI also implements the net_device_ops functions used by the network device. Network device operations include open, close, start transmission, TX timeout and change MTU.
Signed-off-by: Haijun Liu <haijun.liu@mediatek.com> Co-developed-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com> Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com> Co-developed-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Reviewed-by: Loic Poulain <loic.poulain@linaro.org> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|