Re: [PATCH RFC] net: qualcomm: rmnet: Move common struct definitions to include

2019-05-21 Thread Alex Elder
On 5/21/19 4:08 PM, Bjorn Andersson wrote: > On Tue 21 May 13:45 PDT 2019, Arnd Bergmann wrote: > >> On Tue, May 21, 2019 at 9:35 PM Subash Abhinov Kasiviswanathan >> wrote: >>> >>> Create if_rmnet.h and move the rmnet MAP packet structs to this >>> common include file. To account for portability

[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

[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 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 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 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

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 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 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 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 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 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 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

[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

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

2021-01-15 Thread Alex Elder
On 1/15/21 12:59 PM, Jakub Kicinski wrote: On Fri, 15 Jan 2021 04:42:14 -0600 Alex Elder wrote: 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 post

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

2021-01-17 Thread Alex Elder
On 1/16/21 9:12 PM, Jakub Kicinski wrote: On Fri, 15 Jan 2021 06:50:50 -0600 Alex Elder wrote: Currently we assume that the IPA hardware has exactly three interconnects. But that won't be guaranteed for all platforms, so allow any number of interconnects to be specified in the configur

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-next 4/5] net: ipa: repurpose gsi_irq_ieob_disable()

2021-01-20 Thread Alex Elder
consistent. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 5b98003263710..59fc22347a257 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -272,7

[PATCH net-next 1/5] net: ipa: count actual work done in gsi_channel_poll()

2021-01-20 Thread Alex Elder
actually processed. Instead, increment the count after processing, to ensure it reflects the number of processed transactions. The result is more naturally described as a for loop rather than a while loop, so change that. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 5 ++--- 1 file

[PATCH net-next 0/5] net: ipa: NAPI poll updates

2021-01-20 Thread Alex Elder
polling loop a bit. The last two update how interrupts are disabled; previously it was possible for another I/O completion condition to be recorded before NAPI got scheduled. -Alex Alex Elder (5): net: ipa: count actual work done in gsi_channel_poll

[PATCH net-next 5/5] net: ipa: disable IEOB interrupts before clearing

2021-01-20 Thread Alex Elder
27;ll schedule NAPI for each event once, before another IEOB interrupt could be signaled. 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 59fc22347a257..8498326c43f40 100644

[PATCH net-next 3/5] net: ipa: have gsi_channel_update() return a value

2021-01-20 Thread Alex Elder
Have gsi_channel_update() return the first transaction in the updated completed transaction list, or NULL if no new transactions have been added. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/ipa

[PATCH net-next 2/5] net: ipa: heed napi_complete() return value

2021-01-20 Thread Alex Elder
Pay attention to the return value of napi_complete(), completing polling only if it returns true. Just use napi rather than &channel->napi as the argument passed to napi_complete(). Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 de

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

2021-01-20 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 v3 net-next 3/4] arm64: dts: qcom: sc7180: kill IPA modem-remoteproc property

2021-01-20 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 v3 net-next 2/4] dt-bindings: net: remove modem-remoteproc property

2021-01-20 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 v3 net-next 1/4] net: ipa: remove a remoteproc dependency

2021-01-20 Thread Alex Elder
. Reported-by: Randy Dunlap 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(-) diff --git a/drivers/net/ipa/ipa.h b/drivers/net/ipa/ipa.h index 6c2371084c55a

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

2021-01-20 Thread Alex Elder
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-remoteproc property

Re: [PATCH net-next 3/5] net: ipa: have gsi_channel_update() return a value

2021-01-21 Thread Alex Elder
On 1/20/21 11:35 PM, Jakub Kicinski wrote: On Wed, 20 Jan 2021 16:03:59 -0600 Alex Elder wrote: Have gsi_channel_update() return the first transaction in the updated completed transaction list, or NULL if no new transactions have been added. Signed-off-by: Alex Elder @@ -1452,7 +1452,7

[PATCH net-next v2 2/5] net: ipa: heed napi_complete() return value

2021-01-21 Thread Alex Elder
Pay attention to the return value of napi_complete(), completing polling only if it returns true. Just use napi rather than &channel->napi as the argument passed to napi_complete(). Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 de

[PATCH net-next v2 5/5] net: ipa: disable IEOB interrupts before clearing

2021-01-21 Thread Alex Elder
27;ll schedule NAPI for each event once, before another IEOB interrupt could be signaled. 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 0391f5a207c9f..f79cf3c327c1c 100644

[PATCH net-next v2 4/5] net: ipa: repurpose gsi_irq_ieob_disable()

2021-01-21 Thread Alex Elder
consistent. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 6e5817e16c0f6..0391f5a207c9f 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -272,7

[PATCH net-next v2 1/5] net: ipa: count actual work done in gsi_channel_poll()

2021-01-21 Thread Alex Elder
actually processed. Instead, increment the count after processing, to ensure it reflects the number of processed transactions. The result is more naturally described as a for loop rather than a while loop, so change that. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 5 ++--- 1 file

[PATCH net-next v2 0/5] net: ipa: NAPI poll updates

2021-01-21 Thread Alex Elder
ded before NAPI got scheduled. -Alex Alex Elder (5): net: ipa: count actual work done in gsi_channel_poll() net: ipa: heed napi_complete() return value net: ipa: have gsi_channel_update() return a value net: ipa: repurpose gsi_irq_ieob_disable()

[PATCH net-next v2 3/5] net: ipa: have gsi_channel_update() return a value

2021-01-21 Thread Alex Elder
Have gsi_channel_update() return the first transaction in the updated completed transaction list, or NULL if no new transactions have been added. Signed-off-by: Alex Elder --- v2: Do not drop the static keyword that limits the function scope. drivers/net/ipa/gsi.c | 13 ++--- 1 file

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: netdev@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 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 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-next 1/4] net: ipa: update IPA aggregation registers for IPA v4.5

2020-11-30 Thread Alex Elder
e computed differently. That is handled in an upcoming patch. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 102 ++--- drivers/net/ipa/ipa_reg.h | 38 ++-- 2 files changed, 101 insertions(+), 39 deletions(-) diff --git a/drivers/net/ipa/ipa_

[PATCH net-next 0/4] net: ipa: IPA v4.5 aggregation and Qtime

2020-11-30 Thread Alex Elder
along with its configuration, and the last two patches configure the timers that use it. -Alex Alex Elder (4): net: ipa: update IPA aggregation registers for IPA v4.5 net: ipa: set up IPA v4.5 Qtime configuration net: ipa: use Qtime for IPA v4.5 aggreg

[PATCH net-next 3/4] net: ipa: use Qtime for IPA v4.5 aggregation time limit

2020-11-30 Thread Alex Elder
v4.5 selects between two possible granularity values derived from the 19.2 MHz Qtime clock. These granularities are 100 microseconds or 1 millisecond per tick. We use the smaller granularity if possible, unless the desired period is too large to be specified that way. Signed-off-by: Alex Elder

[PATCH net-next 4/4] net: ipa: use Qtime for IPA v4.5 head-of-line time limit

2020-11-30 Thread Alex Elder
IPA v4.5. Both of these are private functions, so shorten their names a bit so they don't take up so much space on the line. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 48 +- 1 file changed, 42 insertions(+), 6 deletions(-) diff --

[PATCH net-next 2/4] net: ipa: set up IPA v4.5 Qtime configuration

2020-11-30 Thread Alex Elder
Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 67 +++--- drivers/net/ipa/ipa_reg.h | 30 + 2 files changed, 93 insertions(+), 4 deletions(-) diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index f25bcfe51dd4b..d07

[PATCH net-next 0/2] net: ipa: IPA v4.5 inline checksum offload

2020-11-30 Thread Alex Elder
of the new data structure. -Alex Alex Elder (2): if_rmnet.h: define struct rmnet_map_v5_csum_header net: ipa: add support for inline checksum offload drivers/net/ipa/ipa_endpoint.c | 50 ++ drivers/net/ipa/ipa_reg.h

[PATCH net-next 2/2] net: ipa: add support for inline checksum offload

2020-11-30 Thread Alex Elder
rdware confirms the checksum value in the payload is correct. To function, the rmnet driver must also add support for this new "inline" checksum offload. The changes implementing this will be submitted soon. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa

[PATCH net-next 1/2] if_rmnet.h: define struct rmnet_map_v5_csum_header

2020-11-30 Thread Alex Elder
Define a new rmnet_map_v5_csum_header structure type. It will be used for inline checksum offload, supported with version 5 of the QMAP protocol. Signed-off-by: Alex Elder --- include/linux/if_rmnet.h | 30 ++ 1 file changed, 30 insertions(+) diff --git a/include

Re: [PATCH net-next 4/6] net: ipa: add support to code for IPA v4.5

2020-12-01 Thread Alex Elder
On 12/1/20 12:11 PM, Jon Hunter wrote: On 25/11/2020 20:45, Alex Elder wrote: Update the IPA code to make use of the updated IPA v4.5 register definitions. Generally what this patch does is, if IPA v4.5 hardware is in use: - Ensure new registers or fields in IPA v4.5 are updated where

[PATCH net-next] net: ipa: fix build-time bug in ipa_hardware_config_qsb()

2020-12-01 Thread Alex Elder
; this might change again in the future if I learn there is a better value to use. Reported-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa

Re: [PATCH net-next 2/2] net: ipa: add support for inline checksum offload

2020-12-02 Thread Alex Elder
On 12/1/20 8:13 PM, Jakub Kicinski wrote: >> To function, the rmnet driver must also add support for this new >> "inline" checksum offload. The changes implementing this will be >> submitted soon. > We don't usually merge half of a feature. Why not wait until all > support is in place? > > Do I u

[PATCH v2 net-next] net: ipa: fix build-time bug in ipa_hardware_config_qsb()

2020-12-02 Thread Alex Elder
that the hardware use the maximum it is capable of. Reported-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Alex Elder --- v2: Got confirmation that 0 is the desired value to use (with comment). drivers/net/ipa/ipa_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH net 1/1] net: ipa: pass the correct size when freeing DMA memory

2020-12-03 Thread Alex Elder
it Kautkar Signed-off-by: Alex Elder --- drivers/net/ipa/gsi_trans.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ipa/gsi_trans.c b/drivers/net/ipa/gsi_trans.c index e8599bb948c08..6c3ed5b17b80c 100644 --- a/drivers/net/ipa/gsi_trans.c +++ b/drivers/net/ipa/g

[PATCH net-next 1/3] net: ipa: define clock and interconnect data

2020-11-19 Thread Alex Elder
ad of ENOTSUPP (to avoid using the nonstandard errno). Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 7 ++- drivers/net/ipa/ipa_clock.h | 5 - drivers/net/ipa/ipa_data.h | 31 ++- drivers/net/ipa/ipa_main.c | 21 ++--- 4 files change

[PATCH net-next 3/3] net: ipa: use config data for clocking

2020-11-19 Thread Alex Elder
Stop assuming a fixed IPA core clock rate and interconnect bandwidths. Use the configuration data defined for these things instead. Get rid of the previously-used constants. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 40 ++--- 1 file changed

[PATCH net-next 2/3] net: ipa: populate clock and interconnect data

2020-11-19 Thread Alex Elder
width values. They will be activated in the next commit, which uses the configured values rather than the fixed constants. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sc7180.c | 21 + drivers/net/ipa/ipa_data-sdm845.c | 21 + 2 files change

[PATCH net-next 0/3] net: ipa: platform-specific clock and interconnect rates

2020-11-19 Thread Alex Elder
bandwidth value. This means the SDM845 bandwidth settings are also changed by this series. -Alex Alex Elder (3): net: ipa: define clock and interconnect data net: ipa: populate clock and interconnect data net: ipa: use config data for clocking drivers/net

[PATCH net-next 0/6] net: ipa: add a driver shutdown callback

2020-11-19 Thread Alex Elder
-Alex Alex Elder (6): net: ipa: print channel/event ring number on error net: ipa: don't reset an ALLOCATED channel net: ipa: ignore CHANNEL_NOT_RUNNING errors net: ipa: support retries on generic GSI commands net: ipa: retry modem stop if busy net: ipa: add driver shutdown cal

[PATCH net-next 6/6] net: ipa: add driver shutdown callback

2020-11-19 Thread Alex Elder
trous for any "in flight" IPA activity. Avoid this by defining a new driver shutdown callback that stops all IPA activity and cleanly shuts down the driver. It merely calls the driver's existing remove callback, reporting the error if it returns one. Signed-off-by: Alex Elder

[PATCH net-next 3/6] net: ipa: ignore CHANNEL_NOT_RUNNING errors

2020-11-19 Thread Alex Elder
ndition to *not* report an error message. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 58bec70db5ab4..7c2e820625590 100644 --- a/drivers/net/ipa/g

[PATCH net-next 5/6] net: ipa: retry modem stop if busy

2020-11-19 Thread Alex Elder
try a little harder before giving up. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index 3fb9c5d90b70e..9f4bd822ac625 100644 --- a/drivers/net/ipa/ipa_main.c +++ b/drivers/ne

[PATCH net-next 4/6] net: ipa: support retries on generic GSI commands

2020-11-19 Thread Alex Elder
e the HALT command if the result code indicates -EAGAIN. Limit this to 10 retries (after the initial attempt). Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 21 +++-- drivers/net/ipa/gsi.h | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/ne

[PATCH net-next 1/6] net: ipa: print channel/event ring number on error

2020-11-19 Thread Alex Elder
these error messages. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 54 +-- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 55151960a6985..2bc513c663396 100644 --- a/drivers/net/ipa

[PATCH net-next 2/6] net: ipa: don't reset an ALLOCATED channel

2020-11-19 Thread Alex Elder
it's been stopped. But if it was never started, its state will still be ALLOCATED, the RESET command is not required. Quietly skip doing the reset without printing an error message if a channel is already in ALLOCATED state when we request it be reset. Signed-off-by: Alex Elder --- driver

Re: [PATCH net-next 4/6] net: ipa: support retries on generic GSI commands

2020-11-20 Thread Alex Elder
On 11/20/20 8:49 PM, Jakub Kicinski wrote: > On Thu, 19 Nov 2020 16:49:27 -0600 Alex Elder wrote: >> +do >> +ret = gsi_generic_command(gsi, channel_id, >> + GSI_GENERIC_HALT_CHANNEL); >> +while (ret == -EAGAIN &

[PATCH net-next 2/6] net: ipa: update IPA registers for IPA v4.5

2020-11-25 Thread Alex Elder
r IPA v4.5-specific code changes will come later. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c| 15 +-- drivers/net/ipa/ipa_reg.h | 36 +-- drivers/net/ipa/ipa_version.h | 1 + 3 files changed, 44 insertions(+), 8 deletions(-) di

[PATCH net-next 5/6] net: ipa: update gsi registers for IPA v4.5

2020-11-25 Thread Alex Elder
gsi_channel_program() to accommodate the new (expanded) PREFETCH_MODE field in the CH_C_QOS register. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 10 -- drivers/net/ipa/gsi_reg.h | 13 + 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/gsi.c b

[PATCH net-next 6/6] net: ipa: adjust GSI register addresses

2020-11-25 Thread Alex Elder
back to the virtual address to access these registers. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 21 +++-- drivers/net/ipa/gsi_reg.h | 11 +++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c

[PATCH net-next 1/6] net: ipa: reverse logic on escape buffer use

2020-11-25 Thread Alex Elder
Starting with IPA v4.2 there is a GSI channel option to use an "escape buffer" instead of prefetch buffers. This should be used for all channels *except* the AP command TX channel. The logic that implements this has it backwards; fix this bug. Signed-off-by: Alex Elder --- drive

[PATCH net-next 4/6] net: ipa: add support to code for IPA v4.5

2020-11-25 Thread Alex Elder
well. Note that IPA_RESOURCE_GROUP_SRC_MAX and IPA_RESOURCE_GROUP_DST_MAX already reflect that 5 is an acceptable number of resources (which IPA v4.5 implements). Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 10 +++--- drivers/net/ipa/ipa_main.c | 63

[PATCH net-next 0/6] net: ipa: start adding IPA v4.5 support

2020-11-25 Thread Alex Elder
r IPA v4.5. -Alex Alex Elder (6): net: ipa: reverse logic on escape buffer use net: ipa: update IPA registers for IPA v4.5 net: ipa: add new most-significant bits to registers net: ipa: add support to code for IPA v4.5 net: ipa: update gsi registers for IPA v4.5

[PATCH net-next 3/6] net: ipa: add new most-significant bits to registers

2020-11-25 Thread Alex Elder
handles encoding the metadata offset field for use in the ENDP_INIT_HDR register in a way appropriate for the hardware version. This and ipa_metadata_offset_encoded() ensure the mask argument passed to u32_encode_bits() is constant. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 39

Re: [PATCH net-next 1/2] soc: qcom: ipa: Constify static qmi structs

2020-11-25 Thread Alex Elder
a lot. Acked-by: Alex Elder --- drivers/net/ipa/ipa_qmi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ipa/ipa_qmi.c b/drivers/net/ipa/ipa_qmi.c index 5090f0f923ad..d2c3f273c233 100644 --- a/drivers/net/ipa/ipa_qmi.c +++ b/drivers/net/ipa/ipa_qmi.c

[PATCH net-next 2/4] net: ipa: get rid of a useless line of code

2020-11-09 Thread Alex Elder
Delete a spurious line of code in ipa_hardware_config(). It reads a register value then ignores the value, so is completely unnecessary. Add a missing word in a comment. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH net-next 0/4] net: ipa: little fixes

2020-11-09 Thread Alex Elder
arning message to be a debug, as requested by Stephen Boyd. And the last one just gets rid of an error message that would be output after a different message had already reported a problem. -Alex Alex Elder (4): net: ipa: don't break build on large tr

[PATCH net-next 1/4] net: ipa: don't break build on large transaction size

2020-11-09 Thread Alex Elder
the memory requirement for the transaction arrays would be about double. With various debugging build flags enabled, the size grows to 160 bytes. But there's no reason to treat that as a build-time bug. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 3 --- 1 file changed, 3 d

[PATCH net-next 3/4] net: ipa: change a warning to debug

2020-11-09 Thread Alex Elder
rning too. But in this case the difference is harmless; so rather than issuing a warning, just provide a debug message instead. Reorder these checks so the one that matters more is done first. Reported-by: Stephen Boyd Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_mem.c | 8 1

[PATCH net-next 4/4] net: ipa: drop an error message

2020-11-09 Thread Alex Elder
There is no need for gsi_modem_channel_halt() to report an error, because gsi_generic_command() will already have done that if the command times out. So get rid of the extra message. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions

[PATCH net-next 1/6] net: ipa: define GSI interrupt types with enums

2020-11-10 Thread Alex Elder
Define the GSI global interrupt types with an enumerated type whose values are the bit positions representing the global interrupt types. Similarly, define the GSI general interrupt types with an enumerated type whose values are the bit positions of general interrupt types. Signed-off-by: Alex

[PATCH net-next 6/6] net: ipa: use enumerated types for GSI field values

2020-11-10 Thread Alex Elder
Replace constants defined with an "_FVAL" suffix with values defined in enumerated types, to be consistent with other usage in the driver. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 2 +- drivers/net/ipa/gsi_reg.h | 26 +- 2 files changed, 18

[PATCH net-next 4/6] net: ipa: move GSI error values into "gsi_reg.h"

2020-11-10 Thread Alex Elder
ot; suffix in the names of the gsi_err_code members. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 22 ++ drivers/net/ipa/gsi_reg.h | 17 + 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net

[PATCH net-next 0/6] net: ipa: GSI register consolidation

2020-11-10 Thread Alex Elder
certain definitions. -Alex Alex Elder (6): net: ipa: define GSI interrupt types with enums net: ipa: use common value for channel type and protocol net: ipa: move channel type values into "gsi_reg.h" net: ipa: move GSI error values into "gsi_

[PATCH net-next 3/6] net: ipa: move channel type values into "gsi_reg.h"

2020-11-10 Thread Alex Elder
he definition of the EV_CH_E_CNTXT_0 register indicating this type is used for its EV_CHTYPE field. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 8 drivers/net/ipa/gsi_reg.h | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers

[PATCH net-next 2/6] net: ipa: use common value for channel type and protocol

2020-11-10 Thread Alex Elder
n place of "EVT_CHTYPE" and "CHANNEL_PROTOCOL". Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 273529b69d39c..8b476e51ab78e 1006

[PATCH net-next 5/6] net: ipa: move GSI command opcode values into "gsi_reg.h"

2020-11-10 Thread Alex Elder
The gsi_ch_cmd_opcode, gsi_evt_cmd_opcode, and gsi_generic_cmd_opcode enumerated types are values that fields in the GSI command registers can take on. Move their definitions out of "gsi.c" and into "gsi_reg.h", alongside the definition of registers they are associated with.

[PATCH net-next 1/2] net: ipa: fix source packet contexts limit

2020-11-12 Thread Alex Elder
I have discovered that the maximum number of source packet contexts configured for SDM845 is incorrect. Fix this error. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sdm845.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/ipa_data-sdm845.c b

[PATCH net-next 0/2] net: ipa: two fixes

2020-11-12 Thread Alex Elder
explicitly ignores it rather than issuing a warning when it occurs. -Alex Alex Elder (2): net: ipa: fix source packet contexts limit net: ipa: ignore the microcontroller log event drivers/net/ipa/ipa_data-sdm845.c | 4 ++-- drivers/net/ip

[PATCH net-next 2/2] net: ipa: ignore the microcontroller log event

2020-11-12 Thread Alex Elder
that rather than treating the log info event we receive as "unsupported." Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_uc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ipa/ipa_uc.c b/drivers/net/ipa/ipa_uc.c index b382d47bc70d9..15bb357f3cfb1 10064

[PATCH net] net: ipa: lock when freeing transaction

2020-11-14 Thread Alex Elder
on in gsi_trans_free() while holding the spinlock. Fixes: 9dd441e4ed575 ("soc: qcom: ipa: GSI transactions") Reported-by: Stephen Boyd Signed-off-by: Alex Elder --- drivers/net/ipa/gsi_trans.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH net-next 09/11] net: ipa: rearrange a few IPA register definitions

2020-11-16 Thread Alex Elder
mmediately above the definition of ipa_aggr_granularity_val() where it's used. - Move each register field value enumerated type definition to immediately follow the definitions of the register and field it is associated with. No code functionality is modified by this patch. Sign

  1   2   3   4   5   6   7   >