[PATCH net 1/4] net: ipa: add a missing __iomem attribute

2021-02-01 Thread Alex Elder
The virt local variable in gsi_channel_state() does not have an __iomem attribute but should. Fix this. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 14d9a791924bf

[PATCH net 3/4] net: ipa: use the right accessor in ipa_endpoint_status_skip()

2021-02-01 Thread Alex Elder
When extracting the destination endpoint ID from the status in ipa_endpoint_status_skip(), u32_get_bits() is used. This happens to work, but it's wrong: the structure field is only 8 bits wide instead of 32. Fix this by using u8_get_bits() to get the destination endpoint ID. Signed-off-by:

[PATCH net 4/4] net: ipa: fix two format specifier errors

2021-02-01 Thread Alex Elder
Fix two format specifiers that used %lu for a size_t in "ipa_mem.c". Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c index 0cc3a3374caa2..f25029b9ec

Re: [PATCH net 3/4] net: ipa: use the right accessor in ipa_endpoint_status_skip()

2021-02-01 Thread Alex Elder
On 2/1/21 6:02 PM, Amy Parker wrote: On Mon, Feb 1, 2021 at 3:32 PM Alex Elder wrote: When extracting the destination endpoint ID from the status in ipa_endpoint_status_skip(), u32_get_bits() is used. This happens to work, but it's wrong: the structure field is only 8 bits wide instead

[PATCH net v2] net: ipa: set error code in gsi_channel_setup()

2021-02-03 Thread Alex Elder
: ipa: the generic software interface") Reported-by: Dan Carpenter Signed-off-by: Alex Elder --- v2: Added "Fixes" tag. drivers/net/ipa/gsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 34e5f2155d620..b77f5fef7aeca 100644 -

Re: [PATCH] remoteproc: qcom: fix glink dependencies

2021-02-04 Thread Alex Elder
On 2/4/21 9:40 AM, Arnd Bergmann wrote: From: Arnd Bergmann Building the remoteproc drivers into the kernel while the qcom_glink code is in a loadable module results in a link error: ld.lld: error: undefined symbol: qcom_glink_ssr_notify referenced by vmlinux.o:(glink_subdev_unprepare) Add

Re: [PATCH] remoteproc: qcom: fix glink dependencies

2021-02-04 Thread Alex Elder
On 2/4/21 11:16 AM, Arnd Bergmann wrote: > On Thu, Feb 4, 2021 at 5:16 PM Alex Elder wrote: >> >> On 2/4/21 9:40 AM, Arnd Bergmann wrote: >>> From: Arnd Bergmann >>> >>> Building the remoteproc drivers into the kernel while the qcom_glink >>> c

Re: [PATCH net-next 2/7] net: ipa: synchronize NAPI only for suspend

2021-02-05 Thread Alex Elder
On 2/4/21 10:53 PM, Jakub Kicinski wrote: > On Wed, 3 Feb 2021 09:28:50 -0600 Alex Elder wrote: >> int gsi_channel_suspend(struct gsi *gsi, u32 channel_id, bool stop) >> { >> struct gsi_channel *channel = &gsi->channel[channel_id]; >> +int ret; >

[PATCH net-next v2 7/7] net: ipa: avoid field overflow

2021-02-05 Thread Alex Elder
value encoded as the lower portion of the header length. The same sort of problem exists in ipa_metadata_offset_encoded(), so implement the same fix there. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_reg.h | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --

[PATCH net-next v2 2/7] net: ipa: synchronize NAPI only for suspend

2021-02-05 Thread Alex Elder
where needed. Signed-off-by: Alex Elder --- v2: - Return early to avoid blocks of indented code drivers/net/ipa/gsi.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index f0432c965168c..60eb765c53647 100644

[PATCH net-next v2 3/7] net: ipa: do not cache event ring state

2021-02-05 Thread Alex Elder
in caching the state. Stop recording a copy of the channel's last known state, and instead fetch the true state from hardware whenever it's needed. In such cases, *do* record the state in a local variable, in case an error message reports it (so the value reported is the value seen).

Re: [PATCH net-next v3 2/3] net: ethernet: rmnet: Support for downlink MAPv5 checksum offload

2021-02-25 Thread Alex Elder
On 2/24/21 12:23 PM, Jakub Kicinski wrote: On Wed, 24 Feb 2021 01:32:50 +0530 Sharath Chandra Vurukala wrote: +/* MAP CSUM headers */ +struct rmnet_map_v5_csum_header { +#if defined(__LITTLE_ENDIAN_BITFIELD) + u8 next_hdr:1; + u8 header_type:7; + u8 hw_reserved:7; + u8

[PATCH] arm64: dts: qcom: sdm845-mtp: enable IPA

2020-05-18 Thread Alex Elder
Enable IPA on the SDM845 MTP. Signed-off-by: Alex Elder --- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts index 1372fe8601f5..2f942daeb9d1 100644 --- a/arch

[PATCH] arm64: dts: qcom: sc7180: add IPA information

2020-05-18 Thread Alex Elder
Add IPA-related nodes and definitions to "sc7180.dtsi". Signed-off-by: Alex Elder --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 51 1 file changed, 51 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.

[PATCH] arm64: defconfig: enable Qualcomm IPA and RMNet modules

2020-05-18 Thread Alex Elder
Enable building the Qualcomm IPA driver as a kernel module. To be useful, the IPA driver also requires RMNet, so enable building that as a module as well. Signed-off-by: Alex Elder --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/configs

Re: [PATCH] arm64: dts: qcom: sdm845-mtp: enable IPA

2020-05-19 Thread Alex Elder
On 5/18/20 6:24 PM, Bjorn Andersson wrote: modem-init tells the IPA driver that the modem will load the ipa_fws firmware, but the MTP is assumed to run "LA" firmware where it's the Linux-side's job to do this. I didn't see this message until just now, but I remembered that last night. I just b

[PATCH v2] arm64: dts: qcom: sdm845-mtp: enable IPA

2020-05-19 Thread Alex Elder
Enable IPA on the SDM845 MTP. Signed-off-by: Alex Elder --- v2: This device uses the AP--not the modem--for early initialization. arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts

Re: [PATCH v2 10/15] soc: qcom: ipa: use new module_firmware_crashed()

2020-05-19 Thread Alex Elder
riate in some places, I believe it should not be used here. -Alex Cc: Alex Elder Signed-off-by: Luis Chamberlain --- drivers/net/ipa/ipa_modem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ipa/ipa_modem.c b/drivers/net/i

Re: [greybus-dev] [PATCH][next] greybus: Use fallthrough pseudo-keyword

2020-07-29 Thread Alex Elder
On 7/29/20 5:51 AM, Viresh Kumar wrote: > On 28-07-20, 17:37, Alex Elder wrote: >> On 7/27/20 1:32 PM, Gustavo A. R. Silva wrote: >>> Replace the existing /* fall through */ comments and its variants with >>> the new pseudo-keyword macro fallthrough[1]. >>> >

Re: issue with uninitialized value used in a comparison in gbcodec_mixer_dapm_ctl_put

2020-08-05 Thread Alex Elder
On 7/30/20 11:02 AM, Colin Ian King wrote: > Hi, > > Static analysis with Coverity has detected an uninitialized value being > used in a comparison. The error was detected on a recent change to > drivers/staging/greybus/audio_topology.c however the issue actually > dates back to the original comm

Re: [greybus-dev] [PATCH v4 1/7] staging: greybus: audio: Update snd_jack FW usage as per new APIs

2020-08-05 Thread Alex Elder
On 7/9/20 5:27 AM, Vaibhav Agarwal wrote: > snd_soc_jack APIs are modified in recent kernel versions. This patch > updates the codec driver to resolve the compilation errors related to > jack framework. Greg has already accepted this series so I won't review this now. But I still wanted to provid

Re: [PATCH] soc: qmi: allow user to set handle wq to hiprio

2020-08-05 Thread Alex Elder
On 8/2/20 8:14 AM, 王文虎 wrote: > >>> Currently the qmi_handle is initialized single threaded and strictly >>> ordered with the active set to 1. This is pretty simple and safe but >>> sometimes ineffency. So it is better to allow user to decide whether >>> a high priority workqueue should be used. >

Re: [PATCH][next] greybus: Use fallthrough pseudo-keyword

2020-08-05 Thread Alex Elder
On 7/28/20 5:37 PM, Alex Elder wrote: > On 7/27/20 1:32 PM, Gustavo A. R. Silva wrote: >> Replace the existing /* fall through */ comments and its variants with >> the new pseudo-keyword macro fallthrough[1]. >> >> [1] >> https://www.kernel.org/doc/html/v5.7/

Re: [PATCH] dt-bindings: net: qcom,ipa: Drop unnecessary type ref on 'memory-region'

2020-12-22 Thread Alex Elder
On 12/21/20 10:01 PM, Rob Herring wrote: 'memory-region' is a common property, so it doesn't need a type ref here. Acked-by: Alex Elder Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Alex Elder Cc: net...@vger.kernel.org Signed-off-by: Rob Herring --- I

[PATCH net] net: ipa: fix interconnect enable bug

2020-12-22 Thread Alex Elder
t;net: ipa: use config data for clocking") Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/ipa_clock.c b/drivers/net/ipa/ipa_clock.c index 9dcf16f399b7a..135c393437f12 100644 --- a/drive

[PATCH net 0/3] net: ipa: GSI interrupt handling fixes

2020-12-22 Thread Alex Elder
succeed even if the completion interrupt did not arrive while it was enabled. -Alex Alex Elder (3): net: ipa: clear pending interrupts before enabling net: ipa: use state to determine channel command success net: ipa: use state to determine event ring

[PATCH net 1/3] net: ipa: clear pending interrupts before enabling

2020-12-22 Thread Alex Elder
command. Fixes: b4175f8731f78 ("net: ipa: only enable GSI event control IRQs when needed") Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index c4795249719d4..4aee60d62a

[PATCH net 3/3] net: ipa: use state to determine event ring command success

2020-12-22 Thread Alex Elder
command ends via completion interrupt or timeout, we can consider the command successful if the event ring has entered the desired state (and a failure if it has not, regardless of the cause). Fixes: b4175f8731f78 ("net: ipa: only enable GSI event control IRQs when needed") Signed-of

[PATCH net 2/3] net: ipa: use state to determine channel command success

2020-12-22 Thread Alex Elder
interrupt or timeout, we can consider the command successful if the channel has entered the desired state (and a failure if it has not, regardless of the cause). Fixes: d6c9e3f506ae8 ("net: ipa: only enable generic command completion IRQ when needed"); Signed-off-by: Alex Elder --- drive

[PATCH net-next] net: ipa: add config dependency on QCOM_SMEM

2021-01-12 Thread Alex Elder
certain configurations. Reported-by: Randy Dunlap Fixes: 38a4066f593c5 ("net: ipa: support COMPILE_TEST") Signed-off-by: Alex Elder --- drivers/net/ipa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ipa/Kconfig b/drivers/net/ipa/Kconfig index 10a

[PATCH net-next 0/4] net: ipa: remove a build dependency

2021-01-12 Thread Alex Elder
ified them. David/Jakub, please take these all through net-next if they are acceptable to you, once Rob has acked the binding and DT patches. Thanks. -Alex Alex Elder (4): net: ipa: remove a remoteproc dependency dt-bindings: net: remove modem-remotepro

[PATCH net-next 2/4] dt-bindings: net: remove modem-remoteproc property

2021-01-12 Thread Alex Elder
The IPA driver uses the remoteproc SSR notifier now, rather than the temporary IPA notification system used initially. As a result it no longer needs a property identifying the modem subsystem DT node. Use GIC_SPI rather than 0 in the example interrupt definition. Signed-off-by: Alex Elder

[PATCH net-next 1/4] net: ipa: remove a remoteproc dependency

2021-01-12 Thread Alex Elder
. Reported-by: Randy Dunlap Fixes: 30eb3fbee3da7 ("net: ipa: new notification infrastructure") Signed-off-by: Alex Elder --- drivers/net/ipa/ipa.h | 2 -- drivers/net/ipa/ipa_main.c | 38 ++ 2 files changed, 2 insertions(+), 38 deletions(-) di

[PATCH net-next 4/4] arm64: dts: qcom: sdm845: kill IPA modem-remoteproc property

2021-01-12 Thread Alex Elder
The "modem-remoteproc" property is no longer required for the IPA driver, so get rid of it. Signed-off-by: Alex Elder --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.

[PATCH net-next 3/4] arm64: dts: qcom: sc7180: kill IPA modem-remoteproc property

2021-01-12 Thread Alex Elder
The "modem-remoteproc" property is no longer required for the IPA driver, so get rid of it. Signed-off-by: Alex Elder --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.

[PATCH net-next 1/6] net: ipa: a few simple renames

2021-01-13 Thread Alex Elder
quot;gsi_" prefix to evt_ring_command() so its name is consistent with the convention used for GSI channel and generic commands. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/ipa/gsi.

[PATCH net-next 4/6] net: ipa: change GSI command timeout

2021-01-13 Thread Alex Elder
The GSI command timeout is currently 5 seconds, which is much higher than it should be. Express the timeout in milliseconds rather than seconds, and reduce it to 50 milliseconds. Fixes: 650d1603825d8 ("soc: qcom: ipa: the generic software interface") Signed-off-by: Alex Elder --- d

[PATCH net-next 6/6] net: ipa: retry TX channel stop commands

2021-01-13 Thread Alex Elder
cific. Fixes: 650d1603825d8 ("soc: qcom: ipa: the generic software interface") Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 5c163f9c0ea7b..5b29f7d9d6a

[PATCH net-next 5/6] net: ipa: change stop channel retry delay

2021-01-13 Thread Alex Elder
If a GSI stop channel command leaves the channel in STOP_IN_PROC state, we retry the stop command after a 1-2 millisecond delay. I have been told that a 3-5 millisecond delay is a better choice. Fixes: 650d1603825d8 ("soc: qcom: ipa: the generic software interface") Signed-off-by:

[PATCH net-next 3/6] net: ipa: use usleep_range()

2021-01-13 Thread Alex Elder
period in the range requested. Fixes: 650d1603825d8 ("soc: qcom: ipa: the generic software interface") Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 5 +++-- drivers/net/ipa/ipa_endpoint.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net

[PATCH net-next 0/6] net: ipa: GSI interrupt updates

2021-01-13 Thread Alex Elder
channels (in addition to RX channels). -Alex Alex Elder (6): net: ipa: a few simple renames net: ipa: introduce some interrupt helpers net: ipa: use usleep_range() net: ipa: change GSI command timeout net: ipa: change stop channel retry delay net

[PATCH net-next 2/6] net: ipa: introduce some interrupt helpers

2021-01-13 Thread Alex Elder
function gsi_irq_ev_ctrl_disable() as well. Because only one event ring at a time is enabled for this interrupt, we can simply disable the interrupt for *all* channels. Create a pair of helpers that serve the same purpose for channel commands. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 94

Re: [PATCH net-next 7/7] net: ipa: allow arbitrary number of interconnects

2021-01-18 Thread Alex Elder
On 1/18/21 1:58 PM, Jakub Kicinski wrote: > But it does sound a little too much like aligning with the vendor > driver for the sake of aligning with the vendor driver. This makes > the review for someone not familiar with the vendor driver hard, > and raises questions like "is this really needed

[PATCH net 1/2] net: ipa: introduce atomic channel STOPPING flag

2021-01-07 Thread Alex Elder
: ipa: the generic software interface") Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 11 ++- drivers/net/ipa/gsi.h | 6 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 14d9a791924bf..7e7629902911e 100644 --

[PATCH net 0/2] net: ipa: fix a suspend hang

2021-01-07 Thread Alex Elder
bling the interrupt when stopping. Without this fix in place we would occasionally see a hang while stopping channels during suspend. -Alex Alex Elder (2): net: ipa: introduce atomic channel STOPPING flag net: ipa: re-enable NAPI before enabling inte

[PATCH net 2/2] net: ipa: re-enable NAPI before enabling interrupt

2021-01-07 Thread Alex Elder
. Fixes: 650d1603825d8 ("soc: qcom: ipa: the generic software interface") Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 7e7629902911e..9bde6d02b1cd6 100644

[PATCH net-next 1/4] remoteproc: qcom: expose types for COMPILE_TEST

2021-01-07 Thread Alex Elder
"qcom_rproc.h", but those are only exposed if QCOM_RPROC_COMMON is enabled. Rearrange the conditional definition so the qcom_ssr_notify_data structure and qcom_ssr_notify_type enumerated type are defined whether or not QCOM_RPROC_COMMON is enabled. Reviewed-by: Bjorn Andersson Signed-of

[PATCH net-next 3/4] net: ipa: declare the page pointer type in "gsi_trans.h"

2021-01-07 Thread Alex Elder
". Reported-by: kernel test robot Signed-off-by: Alex Elder --- drivers/net/ipa/gsi_trans.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ipa/gsi_trans.h b/drivers/net/ipa/gsi_trans.h index 4d4606b5fa951..3a4ab8a94d827 100644 --- a/drivers/net/ipa/gsi_trans.h +++ b/drivers

[PATCH net-next 2/4] soc: qcom: mdt_loader: define stubs for COMPILE_TEST

2021-01-07 Thread Alex Elder
Define stub functions for the exposed MDT functions in case QCOM_MDT_LOADER is not configured. This allows users of these functions to link correctly for COMPILE_TEST builds without QCOM_SCM enabled. Reviewed-by: Bjorn Andersson Signed-off-by: Alex Elder --- include/linux/soc/qcom

[PATCH net-next 0/4] net: ipa: support COMPILE_TEST

2021-01-07 Thread Alex Elder
The Intel kernel test robot reported that this was a problem for the alpha build. David/Jakub, please take all four of these patches through the net-next tree if you find them acceptable. Thanks. -Alex Alex Elder (4): remoteproc: qcom: expose types for CO

[PATCH net-next 4/4] net: ipa: support COMPILE_TEST

2021-01-07 Thread Alex Elder
Arrange for the IPA driver to be built when COMPILE_TEST is enabled. Update the help text to reflect that we support two Qualcomm SoCs. Suggested-by: Jakub Kicinski Signed-off-by: Alex Elder --- drivers/net/ipa/Kconfig | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff

Re: [PATCH net 2/2] net: ipa: re-enable NAPI before enabling interrupt

2021-01-08 Thread Alex Elder
On 1/7/21 8:38 PM, Jakub Kicinski wrote: On Thu, 7 Jan 2021 15:43:25 -0600 Alex Elder wrote: @@ -743,21 +743,21 @@ static void gsi_channel_freeze(struct gsi_channel *channel) set_bit(GSI_CHANNEL_FLAG_STOPPING, channel->flags); smp_mb__after_atomic(); /* Ensure gsi_channel_p

Re: [PATCH net-next 0/6] net: ipa: GSI interrupt updates

2021-01-15 Thread Alex Elder
On 1/14/21 5:22 PM, Saeed Mahameed wrote: On Wed, 2021-01-13 at 11:15 -0600, Alex Elder wrote: This series implements some updates for the GSI interrupt code, buliding on some bug fixes implemented last month. The first two are simple changes made to improve readability and consistency. The

Re: [PATCH net-next 0/6] net: ipa: GSI interrupt updates

2021-01-15 Thread Alex Elder
On 1/14/21 8:08 PM, Jakub Kicinski wrote: Dropped the fixes tags (since its not a series of fixes) and applied. Thanks for applying these. Do you only want "Fixes" tags on patches posted for the net branch (and not net-next)? I think I might have debated sending these as bug fixes but decided

[PATCH v2 net-next 1/4] net: ipa: remove a remoteproc dependency

2021-01-15 Thread Alex Elder
. Reported-by: Randy Dunlap Fixes: 30eb3fbee3da7 ("net: ipa: new notification infrastructure") Signed-off-by: Alex Elder --- drivers/net/ipa/ipa.h | 2 -- drivers/net/ipa/ipa_main.c | 38 ++ 2 files changed, 2 insertions(+), 38 deletions(-) di

[PATCH v2 net-next 3/4] arm64: dts: qcom: sc7180: kill IPA modem-remoteproc property

2021-01-15 Thread Alex Elder
The "modem-remoteproc" property is no longer required for the IPA driver, so get rid of it. Signed-off-by: Alex Elder --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.

[PATCH v2 net-next 0/4] net: ipa: remove a build dependency

2021-01-15 Thread Alex Elder
d the binding and DT patches. Thanks. -Alex Alex Elder (4): net: ipa: remove a remoteproc dependency dt-bindings: net: remove modem-remoteproc property arm64: dts: qcom: sc7180: kill IPA modem-remoteproc property arm64: dts: qcom: sdm845: kill IPA modem-remoteproc property .../

[PATCH v2 net-next 4/4] arm64: dts: qcom: sdm845: kill IPA modem-remoteproc property

2021-01-15 Thread Alex Elder
The "modem-remoteproc" property is no longer required for the IPA driver, so get rid of it. Signed-off-by: Alex Elder --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.

[PATCH v2 net-next 2/4] dt-bindings: net: remove modem-remoteproc property

2021-01-15 Thread Alex Elder
The IPA driver uses the remoteproc SSR notifier now, rather than the temporary IPA notification system used initially. As a result it no longer needs a property identifying the modem subsystem DT node. Use GIC_SPI rather than 0 in the example interrupt definition. Signed-off-by: Alex Elder

[PATCH net-next 0/7] net: ipa: interconnect improvements

2021-01-15 Thread Alex Elder
interconnect-related cleanups are implemented as well. -Alex Alex Elder (7): net: ipa: rename interconnect settings net: ipa: don't return an error from ipa_interconnect_disable() net: ipa: introduce an IPA interconnect structure net: ipa: store averag

[PATCH net-next 7/7] net: ipa: allow arbitrary number of interconnects

2021-01-15 Thread Alex Elder
of it. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 113 +- drivers/net/ipa/ipa_data-sc7180.c | 41 ++- drivers/net/ipa/ipa_data-sdm845.c | 41 ++- drivers/net/ipa/ipa_data.h| 14 ++-- 4 files changed, 97 insertions(+), 112 dele

[PATCH net-next 2/7] net: ipa: don't return an error from ipa_interconnect_disable()

2021-01-15 Thread Alex Elder
y the first error seen. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/drivers/net/ipa/ipa_clock.c b/drivers/net/ipa/ipa_clock.c index 459c357e09678..baedb481fe824 100644 --- a/drivers/ne

[PATCH net-next 6/7] net: ipa: clean up interconnect initialization

2021-01-15 Thread Alex Elder
of an IPA interconnect structure. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 83 + 1 file changed, 47 insertions(+), 36 deletions(-) diff --git a/drivers/net/ipa/ipa_clock.c b/drivers/net/ipa/ipa_clock.c index 07069dbc6d033..fbe42106fc2a8 1

[PATCH net-next 4/7] net: ipa: store average and peak interconnect bandwidth

2021-01-15 Thread Alex Elder
ed to keep a copy of the interconnect data after initialization. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 88 ++--- 1 file changed, 52 insertions(+), 36 deletions(-) diff --git a/drivers/net/ipa/ipa_clock.c b/drivers/net/ipa/ipa_clock.c

[PATCH net-next 1/7] net: ipa: rename interconnect settings

2021-01-15 Thread Alex Elder
Use "bandwidth" rather than "rate" in describing the average and peak values to use for IPA interconnects. They should have been named that way to begin with. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 20 ++-- drivers/net/ipa/ip

[PATCH net-next 5/7] net: ipa: add interconnect name to configuration data

2021-01-15 Thread Alex Elder
Add the name to the configuration data for each interconnect. Use this information rather than a constant string during initialization. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 6 +++--- drivers/net/ipa/ipa_data-sc7180.c | 3 +++ drivers/net/ipa/ipa_data-sdm845.c | 3

[PATCH net-next 3/7] net: ipa: introduce an IPA interconnect structure

2021-01-15 Thread Alex Elder
Rather than having separate pointers for the memory, imem, and config interconnect paths, maintain an array of ipa_interconnect structures each of which contains a pointer to a path. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 59 + 1 file

Re: [PATCH net 0/2] net: ipa: fix some new build warnings

2020-12-28 Thread Alex Elder
On 12/28/20 4:14 PM, Jakub Kicinski wrote: If only it could have been caught with COMPILE_TEST.. ;) I know, I know!!! I've had a branch that's half done for a long time. It has other dependencies that are not set up for COMPILE_TEST so it's harder than I'd like. Let me see if I can make some

Re: [PATCH -next] staging: greybus: light: Use kzalloc for allocating only one thing

2020-12-29 Thread Alex Elder
On 12/29/20 7:50 AM, Zheng Yongjun wrote: Use kzalloc rather than kcalloc(1,...) The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ @@ - kcalloc(1, + kzalloc( ...) // Signed-off-by: Zheng Yongjun --- drivers/staging/greybus/light.c | 2

Re: [PATCH v2 -next] staging: greybus: light: Use kzalloc for allocating only one thing

2020-12-29 Thread Alex Elder
On 12/29/20 7:37 PM, Zheng Yongjun wrote: Use kzalloc rather than kcalloc(1,...) The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ @@ - kcalloc(1, + kzalloc( ...) // Signed-off-by: Zheng Yongjun Looks good. Reviewed-by: Alex Elder

[PATCH net 1/2] net: ipa: don't return a value from gsi_channel_command()

2020-12-26 Thread Alex Elder
d success") Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 579cc3e516775..e51a770578990 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/

[PATCH net 2/2] net: ipa: don't return a value from evt_ring_command()

2020-12-26 Thread Alex Elder
s") Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index e51a770578990..14d9a791924bf 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @

[PATCH net 0/2] net: ipa: fix some new build warnings

2020-12-26 Thread Alex Elder
. -Alex Alex Elder (2): net: ipa: don't return a value from gsi_channel_command() net: ipa: don't return a value from evt_ring_command() drivers/net/ipa/gsi.c | 38 +- 1 file changed, 13 insertions(+), 25 deletions(-) -- 2.27.0

[PATCH net-next v2 5/6] net: ipa: move ipa_aggr_granularity_val()

2021-03-24 Thread Alex Elder
o "ipa_main.c" where it's used. TIMER_FREQUENCY is used only by that function, so move that definition as well. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 15 +++ drivers/net/ipa/ipa_reg.h | 12 2 files changed, 15 insertions(+), 12 de

[PATCH net-next v2 1/6] net: ipa: reduce IPA version assumptions

2021-03-24 Thread Alex Elder
ersion and subsequent versions. (E.g., "present for IPA v4.2+" instead of just "present for v4.2".) Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 8 drivers/net/ipa/ipa_cmd.c | 26 +++--- drivers/net/ipa/ipa_endpoint.c | 25

[PATCH net-next v2 0/6] net: ipa: versions and registers

2021-03-24 Thread Alex Elder
. -Alex Alex Elder (6): net: ipa: reduce IPA version assumptions net: ipa: update version definitions net: ipa: define the ENDP_INIT_NAT register net: ipa: limit local processing context address net: ipa: move ipa_aggr_granularity_val() net: ipa: increase channels and

[PATCH net-next v2 2/6] net: ipa: update version definitions

2021-03-24 Thread Alex Elder
Add IPA version definitions for all IPA v3.x and v4.x. Fix the GSI version associated with IPA version 4.1. Signed-off-by: Alex Elder --- v2: - Add kernel-doc descriptions for ipa_version members. drivers/net/ipa/ipa_version.h | 29 ++--- 1 file changed, 22 insertions

[PATCH net-next v2 4/6] net: ipa: limit local processing context address

2021-03-24 Thread Alex Elder
the valid bits. Shorten the name of the register (omit "_BASE") to avoid the need to wrap the line in the one place it's used. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_mem.c | 6 -- drivers/net/ipa/ipa_reg.h | 14 -- 2 files changed, 16 insertions(+), 4 del

[PATCH net-next v2 3/6] net: ipa: define the ENDP_INIT_NAT register

2021-03-24 Thread Alex Elder
Define the ENDP_INIT_NAT register for setting up the NAT configuration for an endpoint. We aren't using NAT at this time, so explicitly set the type to BYPASS for all endpoints. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 17 - drivers/net/ipa/ipa_

[PATCH net-next v2 6/6] net: ipa: increase channels and events

2021-03-24 Thread Alex Elder
Increase the maximum number of channels and event rings supported by the driver, to allow the maximum available on the SDX55. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/gsi.h b/drivers/net/ipa/gsi.h

Re: [PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-24 Thread Alex Elder
On 3/24/21 11:27 AM, David Laight wrote: From: Alex Elder Sent: 23 March 2021 01:05 It is possible for a 32 bit x86 build to use a 64 bit DMA address. There are two remaining spots where the IPA driver does a modulo operation to check alignment of a DMA address, and under certain conditions

Re: [PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-24 Thread Alex Elder
On 3/24/21 12:12 PM, David Laight wrote: I think 'count' is also required to be a power of 2. so you could have checked 'addr & (size - 1)'. It is required to be, and that is checked elsewhere (in gsi_channel_data_valid()). And yes, size would therefore be a power-of-2, and so your clever test

[PATCH net-next 0/6] net: ipa: update registers for other versions

2021-03-25 Thread Alex Elder
-Alex Alex Elder (6): net: ipa: update IPA register comments net: ipa: update component config register net: ipa: support IPA interrupt addresses for IPA v4.7 net: ipa: GSI register cleanup net: ipa: update GSI ring size registers net: ipa: expand GSI channel types drivers/net

[PATCH net-next 2/6] net: ipa: update component config register

2021-03-25 Thread Alex Elder
purpose for the register. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 2 +- drivers/net/ipa/ipa_reg.h | 32 +--- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index

[PATCH net-next 3/6] net: ipa: support IPA interrupt addresses for IPA v4.7

2021-03-25 Thread Alex Elder
Starting with IPA v4.7, registers related to IPA interrupts are located at a fixed offset 0x1000 above than the addresses used for earlier versions. Define and use functions to provide the offset to use for these registers based on IPA version. Signed-off-by: Alex Elder --- drivers/net/ipa

[PATCH net-next 1/6] net: ipa: update IPA register comments

2021-03-25 Thread Alex Elder
require changes elsewhere in the code. Update rsrc_grp_encoded() to support these other IPA versions. Add kerneldoc comments for the IPA IRQ numbers and sequencer type. Fix a few spots where the version check should be less restrictive (missed by an earlier patch). Signed-off-by: Alex Elder

[PATCH net-next 4/6] net: ipa: GSI register cleanup

2021-03-25 Thread Alex Elder
- Add the definition of GSI_CH_DB_STOP channel command - Add a couple of blank lines - Move one comment and indent another - Delete two unused register definitions at the end. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi_reg.h | 14 +- 1 file changed, 9 insertions(+), 5 deletion

[PATCH net-next 5/6] net: ipa: update GSI ring size registers

2021-03-25 Thread Alex Elder
can be larger starting with IPA v4.9, so create a function to encode that as well. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 7 +-- drivers/net/ipa/gsi_reg.h | 17 +++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/net/ipa/gsi.c b

[PATCH net-next 6/6] net: ipa: expand GSI channel types

2021-03-25 Thread Alex Elder
protocols. At this point we still use only GPI protocol. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 2 +- drivers/net/ipa/gsi_reg.h | 38 +++--- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net

Re: [PATCH net-next v2 2/4] net: ipa: use upper_32_bits()

2021-03-18 Thread Alex Elder
On 3/18/21 11:03 AM, Florian Fainelli wrote: On 3/18/2021 6:51 AM, Alex Elder wrote: Use upper_32_bits() to extract the high-order 32 bits of a DMA address. This avoids doing a 32-position shift on a DMA address if it happens not to be 64 bits wide. Suggested-by: Florian Fainelli Signed

[PATCH net-next v3 1/4] net: ipa: fix assumptions about DMA address size

2021-03-18 Thread Alex Elder
entries, and a fixed constant IPA_TABLE_ENTRY_SIZE to describe the size of those entries. Loosen up two checks so they still verify some requirements, but such that they do not assume the size of a DMA address is 64 bits. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_table.c | 14

[PATCH net-next v3 3/4] net: ipa: fix table alignment requirement

2021-03-18 Thread Alex Elder
f the minimum is smaller than that. Remove the BUILD_BUG_ON() call checking against minimim DMA alignment and instead verify at rutime that the allocated memory is properly aligned. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_table.c | 20 1 file changed, 12 insertions(

[PATCH net-next v3 4/4] net: ipa: relax 64-bit build requirement

2021-03-18 Thread Alex Elder
d, size_t will be 32 bits wide, so there remains no reason to use do_div() for divide and modulo. A few recent commits also fix some code that assumes that DMA addresses are 64 bits wide. With that, we can get rid of the 64-bit build requirement. Signed-off-by: Alex Elder --- drivers/net

[PATCH net-next v3 2/4] net: ipa: use upper_32_bits()

2021-03-18 Thread Alex Elder
ned-off-by: Alex Elder --- v3: - Use upper_32_bits() where appropriate, and lower_32_bits() too. v2: - Switched to use the upper_32_bits(), as suggested by Florian. drivers/net/ipa/gsi.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/d

[PATCH net-next v3 0/4] net: ipa: support 32-bit targets

2021-03-18 Thread Alex Elder
series uses upper_32_bits() rather than creating a new function to extract bits out of a DMA address. Version 3 of uses lower_32_bits() as well. -Alex Alex Elder (4): net: ipa: fix assumptions about DMA address size net: ipa: use upper_32_bits() net

[PATCH net-next 3/4] net: ipa: introduce ipa_assert()

2021-03-18 Thread Alex Elder
ignored. IPA assertion errors will be reported using the IPA device if possible. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_assert.h | 50 1 file changed, 50 insertions(+) create mode 100644 drivers/net/ipa/ipa_assert.h diff --git a/drivers/net/ipa

[PATCH net-next 1/4] net: ipa: fix init header command validation

2021-03-18 Thread Alex Elder
-off-by: Alex Elder --- drivers/net/ipa/ipa_cmd.c | 49 +-- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/drivers/net/ipa/ipa_cmd.c b/drivers/net/ipa/ipa_cmd.c index 35e35852c25c5..b40f031a905a7 100644 --- a/drivers/net/ipa/ipa_cmd.c +++ b

[PATCH net-next 4/4] net: ipa: activate some commented assertions

2021-03-18 Thread Alex Elder
both runtime and build-time assertions, both with and without the device pointer. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_reg.h | 7 --- drivers/net/ipa/ipa_table.c | 5 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ipa/ipa_reg.h b/drivers/net/ipa

[PATCH net-next 0/4] net: ipa: fix validation

2021-03-18 Thread Alex Elder
or or compiler. A final patch converts a handful of commented assertions into "real" ones. Some existing validation code can done more simply with assertions, so over time such cases will be converted. For now though, this series adds this assertion capability.

[PATCH net-next 2/4] net: ipa: fix IPA validation

2021-03-18 Thread Alex Elder
checking. The checks are defined conditionally, but not consistently. In some cases IPA_VALIDATION enables the optional checks, while in others IPA_VALIDATE is used. Fix this by using IPA_VALIDATION consistently. Signed-off-by: Alex Elder --- drivers/net/ipa/Makefile | 2 +- drivers/net/ipa

<    1   2   3   4   5   6   7   8   9   10   >