[PATCH net-next 2/2] net: ipa: optionally define firmware name via DT

2021-04-16 Thread Alex Elder
purpose. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index aad915e2ce523..9915603ed10ba 100644 --- a/drivers/net/ipa/ipa_main.c +++ b/driver

[PATCH net-next 1/2] dt-bindings: net: qcom,ipa: add firmware-name property

2021-04-16 Thread Alex Elder
;) is used. Signed-off-by: Alex Elder --- .../devicetree/bindings/net/qcom,ipa.yaml | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml index da5212e693e91..7443490d4c

[PATCH net-next 0/2] net: ipa: allow different firmware names

2021-04-16 Thread Alex Elder
Add the ability to define a "firmware-name" property in the IPA DT node, specifying an alternate name to use for the firmware file. Used only if the AP (Trust Zone) does early IPA initialization. -Alex Alex Elder (2): dt-bindings: net: qco

Re: [PATCH] drivers: ipa: Fix missing IRQF_ONESHOT as only threaded handler

2021-04-16 Thread Alex Elder
On 4/15/21 10:40 PM, zhuguangqin...@gmail.com wrote: From: Guangqing Zhu This is not required here. -Alex https://lore.kernel.org/netdev/d57e0a43-4d87-93cf-471c-c8185ea85...@ieee.org/ Coccinelle noticed: drivers/net/ipa/ipa_smp2p.c:186:7-27: ERROR: Threaded IRQ with no primary handler

Re: [PATCH] staging: greybus: Match parentheses alignment

2021-04-14 Thread Alex Elder
On 4/14/21 9:29 AM, Joe Perches wrote: On Wed, 2021-04-14 at 08:17 -0500, Alex Elder wrote: Perhaps (like the -W options for GCC) there could be a way to specify in a Makefile which checkpatch messages are reported/not reported? I don't claim that's a good suggestion, but if I could optionally

Re: [PATCH] staging: greybus: Match parentheses alignment

2021-04-14 Thread Alex Elder
On 4/6/21 12:21 PM, Joe Perches wrote: On Tue, 2021-04-06 at 15:27 +0200, Greg KH wrote: On Tue, Apr 06, 2021 at 06:42:59PM +0600, Zhansaya Bagdauletkyzy wrote: Match next line with open parentheses by adding tabs/spaces to conform with Linux kernel coding style. Reported by checkpatch. []

[PATCH net-next 2/2] arm64: dts: qcom: sm8350-mtp: enable IPA

2021-04-13 Thread Alex Elder
Enable IPA for the SM8350 MTP. Signed-off-by: Alex Elder --- arch/arm64/boot/dts/qcom/sm8350-mtp.dts | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8350-mtp.dts b/arch/arm64/boot/dts/qcom/sm8350-mtp.dts index 6ca638b4e3213..93740444dd1ea 100644 --- a/arch

[PATCH net-next 1/2] arm64: dts: qcom: sm8350: add IPA information

2021-04-13 Thread Alex Elder
Add IPA-related nodes and definitions to "sm8350.dtsi", which uses IPA v4.9. Signed-off-by: Alex Elder --- arch/arm64/boot/dts/qcom/sm8350.dtsi | 51 1 file changed, 51 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boo

[PATCH net-next 0/2] arm64: dts: qcom: enable SM8350

2021-04-13 Thread Alex Elder
Add IPA-related information to "sm8350.dtsi", and enable IPA for the SM8350 MTP platform. -Alex Alex Elder (2): arm64: dts: qcom: sm8350: add IPA information arm64: dts: qcom: sm8350-mtp: enable IPA arch/arm64/boot/dts/qcom/sm8350-mt

[PATCH net-next 2/2] net: ipa: add IPA v4.9 configuration data

2021-04-13 Thread Alex Elder
Add support for the SM8350 SoC, which includes IPA version 4.9. Signed-off-by: Alex Elder --- drivers/net/ipa/Makefile| 3 +- drivers/net/ipa/ipa_data-v4.9.c | 430 drivers/net/ipa/ipa_data.h | 1 + drivers/net/ipa/ipa_main.c | 4 + 4

[PATCH net-next 1/2] dt-bindings: net: qcom,ipa: add support for SM8350

2021-04-13 Thread Alex Elder
Add support for "qcom,sm8350-ipa", which uses IPA v4.9. Use "enum" rather than "oneOf/const ..." to specify compatible strings, as suggested by Rob Herring. Signed-off-by: Alex Elder --- Documentation/devicetree/bindings/net/qcom,ipa.yaml | 11 ++- 1 fi

[PATCH net-next 0/2] net: ipa: add support for the SM8350 SoC

2021-04-13 Thread Alex Elder
files to support this SoC will be sent separately and will go through the Qualcomm tree.) -Alex Alex Elder (2): dt-bindings: net: qcom,ipa: add support for SM8350 net: ipa: add IPA v4.9 configuration data .../devicetree/bindings/net/qcom,ipa.yaml | 11

Re: [PATCH net-next 4/7] net: ipa: ipa_stop() does not return an error

2021-04-12 Thread Alex Elder
On 4/12/21 2:26 AM, Leon Romanovsky wrote: On Sun, Apr 11, 2021 at 08:42:15AM -0500, Alex Elder wrote: On 4/11/21 8:28 AM, Leon Romanovsky wrote: I think *not* checking an available return value is questionable practice. I'd really rather have a build option for a "__need_not_check

Re: [PATCH net-next 4/7] net: ipa: ipa_stop() does not return an error

2021-04-11 Thread Alex Elder
On 4/11/21 8:28 AM, Leon Romanovsky wrote: >> I think *not* checking an available return value is questionable >> practice. I'd really rather have a build option for a >> "__need_not_check" tag and have "must_check" be the default. > __need_not_check == void ??? I'm not sure I understand your

Re: [PATCH net-next 4/7] net: ipa: ipa_stop() does not return an error

2021-04-11 Thread Alex Elder
On 4/11/21 1:34 AM, Leon Romanovsky wrote: > On Fri, Apr 09, 2021 at 01:07:19PM -0500, Alex Elder wrote: >> In ipa_modem_stop(), if the modem netdev pointer is non-null we call >> ipa_stop(). We check for an error and if one is returned we handle >> it. But ipa_stop() never

[PATCH net-next 4/4] net: ipa: add IPA v4.11 configuration data

2021-04-09 Thread Alex Elder
Add support for the SC7280 SoC, which includes IPA version 4.11. Signed-off-by: Alex Elder --- drivers/net/ipa/Makefile | 2 +- drivers/net/ipa/ipa_data-v4.11.c | 382 +++ drivers/net/ipa/ipa_data.h | 1 + drivers/net/ipa/ipa_main.c | 4 + 4

[PATCH net-next 2/4] net: ipa: disable checksum offload for IPA v4.5+

2021-04-09 Thread Alex Elder
m metadata supplied with messages. Currently, the RMNet driver does not support inline checksum offload. This support is imminent, but until it is available, do not allow newer versions of IPA to specify checksum offload for endpoints. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpo

[PATCH net-next 3/4] net: ipa: add IPA v4.5 configuration data

2021-04-09 Thread Alex Elder
X55 versus the other two existing platforms (SDM845 and SC7180): - SDX55 uses a 32-bit Linux kernel - SDX55 has four interconnects rather than three - SDX55 uses IPA v4.5, which uses inline checksum offload Signed-off-by: Alex Elder --- drivers/net/ipa/Makefile| 3 +- drivers/net/ip

[PATCH net-next 1/4] dt-bindings: net: qcom,ipa: add some compatible strings

2021-04-09 Thread Alex Elder
Add existing supported platform "qcom,sc7180-ipa" to the set of IPA compatible strings. Also add newly-supported "qcom,sdx55-ipa", "qcom,sc7280-ipa". Signed-off-by: Alex Elder --- Documentation/devicetree/bindings/net/qcom,ipa.yaml | 6 +- 1 file change

[PATCH net-next 0/4] net: ipa: support two more platforms

2021-04-09 Thread Alex Elder
um offload used for IPA v4.5+, and once those are present this capability will be enabled for IPA. The third and fourth patches add configuration data for IPA versions 4.5 (used for the SDX55 SoC) and 4.11 (used for the SD7280 SoC). -Alex Alex Elder (4): d

[PATCH net-next 5/7] net: ipa: get rid of empty IPA functions

2021-04-09 Thread Alex Elder
removed, resulting in some code simplification. Add comments in these spots making it explicit that there is no inverse. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 29 + drivers/net/ipa/ipa_mem.c | 9 +++-- drivers/net/ipa/ipa_mem.h | 5

[PATCH net-next 7/7] net: ipa: three small fixes

2021-04-09 Thread Alex Elder
it's only referenced inside "ipa_endpoint.c". Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 6 +++--- drivers/net/ipa/ipa_endpoint.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c

[PATCH net-next 6/7] net: ipa: get rid of empty GSI functions

2021-04-09 Thread Alex Elder
. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 54 +-- 1 file changed, 6 insertions(+), 48 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 1c835b3e1a437..9f06663cef263 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net

[PATCH net-next 4/7] net: ipa: ipa_stop() does not return an error

2021-04-09 Thread Alex Elder
handling is needed at this spot. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_modem.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/net/ipa/ipa_modem.c b/drivers/net/ipa/ipa_modem.c index 8a6ccebde2889..af9aedbde717a 100644 --- a/drivers/net/ipa

[PATCH net-next 2/7] net: ipa: update sequence type for modem TX endpoint

2021-04-09 Thread Alex Elder
-by: Alex Elder --- drivers/net/ipa/ipa_data-v3.5.1.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ipa/ipa_data-v3.5.1.c b/drivers/net/ipa/ipa_data-v3.5.1.c index 57703e95a3f9c..ead1a82f32f5c 100644 --- a/drivers/net/ipa/ipa_data-v3.5.1.c +++ b/drivers/net/ipa/ipa_data-v3.5.1.c

[PATCH net-next 3/7] net: ipa: only set endpoint netdev pointer when in use

2021-04-09 Thread Alex Elder
() before unregistering the network device. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_modem.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/ipa/ipa_modem.c b/drivers/net/ipa/ipa_modem.c index 9b08eb8239846..8a6ccebde2889 100644 --- a/drivers

[PATCH net-next 1/7] net: ipa: relax pool entry size requirement

2021-04-09 Thread Alex Elder
-by: Alex Elder --- drivers/net/ipa/gsi_trans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/gsi_trans.c b/drivers/net/ipa/gsi_trans.c index 70c2b585f98d6..8c795a6a85986 100644 --- a/drivers/net/ipa/gsi_trans.c +++ b/drivers/net/ipa/gsi_trans.c @@ -91,7

[PATCH net-next 0/7] net: ipa: a few small fixes

2021-04-09 Thread Alex Elder
er warning. -Alex Alex Elder (7): net: ipa: relax pool entry size requirement net: ipa: update sequence type for modem TX endpoint net: ipa: only set endpoint netdev pointer when in use net: ipa: ipa_stop() does not return an error net: ipa: get rid of empty IPA functions

[PATCH] ARM: dts: qcom: sdx55: add IPA information

2021-04-09 Thread Alex Elder
Add IPA-related nodes and definitions to "sdx55.dtsi". The SMP2P nodes (ipa_smp2p_out and ipa_smp2p_in) are already present. Signed-off-by: Alex Elder --- Note: This depends on this series posted by Mani Sadhasivam: https://lore.kernel.org/linux-arm-msm/202104081704

[PATCH] ARM: configs: qcom_defconfig: enable IPA and RMNET

2021-04-09 Thread Alex Elder
The SDX55 is a 32-bit ARM device that includes IPA v4.5. Add CONFIG_QCOM_IPA=m and CONFIG_RMNET=m to "qcom_defconfig". Signed-off-by: Alex Elder --- arch/arm/configs/qcom_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/qcom_defconfig b/arch/a

[PATCH] clk: qcom: rpmh: add support for SDX55 rpmh IPA clock

2021-04-09 Thread Alex Elder
The IPA core clock is required for SDX55. Define it. Signed-off-by: Alex Elder --- drivers/clk/qcom/clk-rpmh.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index c623ce9004063..552d1cbfea4c0 100644 --- a/drivers/clk/qcom/clk

Re: [PATCH] interconnect: qcom: sm8350: Use the correct ids

2021-04-01 Thread Alex Elder
the endpoints. Let's fix this and use the correct ids. Reported-by: Alex Elder Signed-off-by: Georgi Djakov Looks good to me. Acked-by: Alex Elder --- drivers/interconnect/qcom/sm8350.c | 80 +++--- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git

Re: [PATCH] interconnect: qcom: sm8350: Add missing link between nodes

2021-04-01 Thread Alex Elder
On 4/1/21 4:44 AM, Georgi Djakov wrote: There is a link between the GEM NoC and C NoC nodes, which is currently missing from the topology. Let's add it to allow consumers request paths that use this link. Reported-by: Alex Elder Signed-off-by: Georgi Djakov Thanks Georgi. Tested-by: Alex

[PATCH net-next 7/7] net: ipa: kill IPA_TABLE_ENTRY_SIZE

2021-03-28 Thread Alex Elder
obscures what a table entry *is*. So get rid of IPA_TABLE_ENTRY_SIZE, and just use sizeof(__le64) in its place throughout the code. Update the comments in "ipa_table.c" to provide a little better explanation of these table slots. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_cm

[PATCH net-next 5/7] net: ipa: use version based configuration for SC7180

2021-03-28 Thread Alex Elder
Rename the SC7180 configuration data file so that its name is derived from its IPA version. Update a few other references to the code that talk about the SC7180 rather than just IPA v4.2. Signed-off-by: Alex Elder --- drivers/net/ipa/Makefile | 2 +- .../{ipa_data-sc7180

[PATCH net-next 3/7] net: ipa: don't define endpoints unnecessarily

2021-03-28 Thread Alex Elder
ch can be used for IPA v4.5+. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sdm845.c | 12 drivers/net/ipa/ipa_endpoint.h| 11 ++- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/net/ipa/ipa_data-sdm845.c b/drivers/net/ipa/ipa_data-sdm845.c

[PATCH net-next 6/7] net: ipa: DMA addresses are nicely aligned

2021-03-28 Thread Alex Elder
an error if a DMA allocation fails. Suggested-by: David Laight Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 13 - drivers/net/ipa/gsi_private.h | 2 +- drivers/net/ipa/gsi_trans.c | 9 - drivers/net/ipa/ipa_data.h| 4 ++-- drivers/net/ipa/ipa_table.c

[PATCH net-next 4/7] net: ipa: switch to version based configuration

2021-03-28 Thread Alex Elder
about the SDM845 rather than just IPA v3.5.1. Signed-off-by: Alex Elder --- drivers/net/ipa/Kconfig | 3 +-- drivers/net/ipa/Makefile | 2 +- .../{ipa_data-sdm845.c => ipa_data-v3.5.1.c} | 22 ++- drivers/net/ipa/ipa_dat

[PATCH net-next 2/7] net: ipa: store BCR register values in config data

2021-03-28 Thread Alex Elder
The backward compatibility register value is a platform-specific property that is not stored in the platform data. Create a data field where this can be represented, and get rid ipa_reg_bcr_val(). This register is not present starting with IPA v4.5. Signed-off-by: Alex Elder --- drivers/net

[PATCH net-next 1/7] net: ipa: fix all kernel-doc warnings

2021-03-28 Thread Alex Elder
Fix all warnings produced when running: scripts/kernel-doc -none drivers/net/ipa/*.[ch] Signed-off-by: Alex Elder --- drivers/net/ipa/gsi_private.h | 2 +- drivers/net/ipa/gsi_trans.h | 5 +++-- drivers/net/ipa/ipa.h | 7 --- drivers/net/ipa/ipa_cmd.h | 19

[PATCH net-next 0/7] net: ipa: a few last bits

2021-03-28 Thread Alex Elder
, using sizeof(__le64) in its place. -Alex Alex Elder (7): net: ipa: fix all kernel-doc warnings net: ipa: store BCR register values in config data net: ipa: don't define endpoints unnecessarily net: ipa: switch to version based configuration net: ipa

Re: [greybus-dev] [PATCH] greybus: remove stray nul byte in apb_log_enable_read output

2021-03-28 Thread Alex Elder
On 3/26/21 12:05 PM, Rasmus Villemoes wrote: > On 26/03/2021 17.31, Alex Elder wrote: >> On 3/26/21 10:22 AM, Rasmus Villemoes wrote: >>> Including a nul byte in the otherwise human-readable ascii output >>> from this debugfs file is probably not intended. >> >

Re: [greybus-dev] [PATCH] greybus: remove stray nul byte in apb_log_enable_read output

2021-03-26 Thread Alex Elder
On 3/26/21 10:22 AM, Rasmus Villemoes wrote: Including a nul byte in the otherwise human-readable ascii output from this debugfs file is probably not intended. Looking only at the comments above simple_read_from_buffer(), the last argument is the size of the buffer (tmp_buf in this case). So

[PATCH net-next 11/12] net: ipa: record number of groups in data

2021-03-26 Thread Alex Elder
defines its supported number of resource groups. So get rid of those two functions. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sc7180.c | 4 +++ drivers/net/ipa/ipa_data-sdm845.c | 4 +++ drivers/net/ipa/ipa_data.h| 4 +++ drivers/net/ipa/ipa_resource.c| 50

[PATCH net-next 09/12] net: ipa: combine source and destation resource types

2021-03-26 Thread Alex Elder
The ipa_resource_src and ipa_resource_dst structures are identical in form, so just replace them with a single structure. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sc7180.c | 4 ++-- drivers/net/ipa/ipa_data-sdm845.c | 4 ++-- drivers/net/ipa/ipa_data.h| 18

[PATCH net-next 06/12] net: ipa: index resource limits with type

2021-03-26 Thread Alex Elder
-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sc7180.c | 21 +++-- drivers/net/ipa/ipa_data-sdm845.c | 21 +++-- drivers/net/ipa/ipa_data.h| 4 drivers/net/ipa/ipa_resource.c| 20 ++-- 4 files changed, 24 insertions(+), 42 deletions

[PATCH net-next 07/12] net: ipa: move ipa_resource_type definition

2021-03-26 Thread Alex Elder
configuration data file. This permits each to have a distinct set of resources. Shorten the data files slightly, by putting the min and max limit values on the same line. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sc7180.c | 35 -- drivers/net/ipa/ipa_data-sdm845.c | 80

[PATCH net-next 10/12] net: ipa: pass data for source and dest resource config

2021-03-26 Thread Alex Elder
Pass the resource data pointer to ipa_resource_config_src() and ipa_resource_config_dst() to be used for configuring resource limits. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_resource.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/ipa

[PATCH net-next 12/12] net: ipa: support more than 6 resource groups

2021-03-26 Thread Alex Elder
IPA versions 3.0 and 3.1 support up to 8 resource groups. There is some interest in supporting these older versions of the hardware, so update the resource configuration code to program resource limits for these groups if specified. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data.h

[PATCH net-next 08/12] net: ipa: combine source and destination group limits

2021-03-26 Thread Alex Elder
Replace IPA_RESOURCE_GROUP_SRC_MAX and IPA_RESOURCE_GROUP_DST_MAX with a single symbol, IPA_RESOURCE_GROUP_MAX. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data.h | 11 +-- drivers/net/ipa/ipa_resource.c | 10 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff

[PATCH net-next 03/12] net: ipa: identify resource groups

2021-03-26 Thread Alex Elder
in its configuration data file. Use these new symbolic values when specifying the resource group an endpoint is associated with. And use them to index the limits arrays for source and destination resources, making it clearer how these values are used. Signed-off-by: Alex Elder --- drivers/net/ipa

[PATCH net-next 05/12] net: ipa: combine resource type definitions

2021-03-26 Thread Alex Elder
, stating explicitly that code assumes the first source and first destination member must have numeric value 0. Fix the kerneldoc comments for the ipa_gsi_endpoint_data structure. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data.h | 31 +++ 1 file changed, 15

[PATCH net-next 04/12] net: ipa: add some missing resource limits

2021-03-26 Thread Alex Elder
estination resource group (number 2) should have non-zero limits programmed in some cases, to ensure correct operation. Add these missing resource group limit definitions to the SDM845 configuration data. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sdm

[PATCH net-next 02/12] net: ipa: fix bug in resource group limit programming

2021-03-26 Thread Alex Elder
in the four places it occurs. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_resource.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ipa/ipa_resource.c b/drivers/net/ipa/ipa_resource.c index 2f0f2dca36785..edd9d1e5cbb62 100644 --- a/drivers/net/ipa

[PATCH net-next 01/12] net: ipa: introduce ipa_resource.c

2021-03-26 Thread Alex Elder
Separate the IPA resource-related code into a new source file, "ipa_resource.c", and matching header file "ipa_resource.h". Signed-off-by: Alex Elder --- drivers/net/ipa/Makefile | 2 +- drivers/net/ipa/ipa_main.c | 148 +--- drivers/net/ipa/

[PATCH net-next 00/12] net: ipa: rework resource programming

2021-03-26 Thread Alex Elder
at way the number is based on the actual number of groups defined. This removes the need for a sort of clunky pair of functions that defined that information previously. Finally, the last patch just increases the number of resource groups that can be defined to 8.

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

2021-03-25 Thread Alex Elder
id - 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

[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 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 2/6] net: ipa: update component config register

2021-03-25 Thread Alex Elder
the 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 0/6] net: ipa: update registers for other versions

2021-03-25 Thread Alex Elder
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/ipa/gsi.c

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

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

[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_reg.h

[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

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

[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 1/6] net: ipa: reduce IPA version assumptions

2021-03-24 Thread Alex Elder
a version 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

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

2021-03-24 Thread Alex Elder
ot;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 deletions(-)

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

2021-03-23 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 deletion

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

2021-03-23 Thread Alex Elder
ot;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 deletions(-)

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

2021-03-23 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_reg.h

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

2021-03-23 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

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

2021-03-23 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 --- drivers/net/ipa/ipa_version.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/ipa_version.h b/drivers/net/ipa

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

2021-03-23 Thread Alex Elder
and events supported by the driver, sufficient for IPA v4.5. -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

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

2021-03-23 Thread Alex Elder
a version 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] net: ipa: avoid 64-bit modulus

2021-03-22 Thread Alex Elder
are for power-of-2 values, and this means the lower 32 bits of the DMA address can be used. This ensures both operands to the modulo operator are 32 bits wide. Reported-by: Randy Dunlap Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 11 +++ drivers/net/ipa/ipa_table.c | 9

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

2021-03-22 Thread Alex Elder
On 3/22/21 5:56 PM, Andrew Lunn wrote: The solution is to create a user space tool inside the drivers/net/ipa directory that will link with the kernel source files and will perform all the basic one-time checks I want to make. Hi Alex Have you found any other driver doing this? Where do they

Re: linux-next: Tree for Mar 22 (net/ipa)

2021-03-22 Thread Alex Elder
On 3/22/21 12:16 PM, Randy Dunlap wrote: On 3/22/21 12:52 AM, Stephen Rothwell wrote: Hi all, Warning: Some of the branches in linux-next may still based on v5.12-rc1, so please be careful if you are trying to bisect a bug. News: if your -next included tree is based on Linus' tree tag

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

2021-03-22 Thread Alex Elder
On 3/22/21 9:17 AM, Leon Romanovsky wrote: We are not talking about putting this tool in upstream repo, right? If yes, please get buy-in from David/Jakub first. I'll make the user space sanity check tool either way. It would be nice to have it upstream, the checks continue to be made as the

Re: [PATCH net-next v2 0/2] net: ipa: fix validation

2021-03-22 Thread Alex Elder
On 3/20/21 9:17 AM, Alex Elder wrote: There is sanity checking code in the IPA driver that's meant to be enabled only during development. This allows the driver to make certain assumptions, but not have to verify those assumptions are true at (operational) runtime. This code is built

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

2021-03-22 Thread Alex Elder
On 3/22/21 1:40 AM, Leon Romanovsky wrote: I'd like to suggest a plan so I can begin to make progress, but do so in a way you/others think is satisfactory. - I would first like to fix the existing bugs, namely that if IPA_VALIDATION is defined there are build errors, and that

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

2021-03-21 Thread Alex Elder
On 3/21/21 8:49 AM, Leon Romanovsky wrote: > On Sun, Mar 21, 2021 at 08:21:24AM -0500, Alex Elder wrote: >> On 3/21/21 3:21 AM, Leon Romanovsky wrote: >>> On Sat, Mar 20, 2021 at 09:17:29AM -0500, Alex Elder wrote: >>>> There are blocks of IPA code that sanity-check v

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

2021-03-21 Thread Alex Elder
On 3/21/21 3:21 AM, Leon Romanovsky wrote: On Sat, Mar 20, 2021 at 09:17:29AM -0500, Alex Elder wrote: There are blocks of IPA code that sanity-check various values, at compile time where possible. Most of these checks can be done once during development but skipped for normal operation

[PATCH net-next 5/5] net: ipa: update some comments in "ipa_data.h"

2021-03-20 Thread Alex Elder
Fix/expand some comments in "ipa_data.h". Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data.h | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/net/ipa/ipa_data.h b/drivers/net/ipa/ipa_data.h index caf9b3f9577eb..7816583fc1

[PATCH net-next 3/5] net: ipa: split sequencer type in two

2021-03-20 Thread Alex Elder
of passes that a packet takes through the IPA processing pipeline, and how many of those passes end by supplying the processed packet to the microprocessor. The result expands the supported types beyond what is required for now, but simplifies the way these are defined. Signed-off-by: Alex Elder --- drive

[PATCH net-next 4/5] net: ipa: sequencer type is for TX endpoints only

2021-03-20 Thread Alex Elder
spot it's needed. We previously specified the sequencer type for RX endpoints with INVALID values. These are no longer needed, so get rid of them. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sc7180.c | 12 +--- drivers/net/ipa/ipa_data-sdm845.c | 10 -- drivers/net/ipa

[PATCH net-next 2/5] net: ipa: implement MAX_READS_BEATS QSB data

2021-03-20 Thread Alex Elder
to be specified in the platform configuration data. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sc7180.c | 1 + drivers/net/ipa/ipa_data.h| 2 ++ drivers/net/ipa/ipa_main.c| 10 -- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa

[PATCH net-next 0/5] net: ipa: more configuration data updates

2021-03-20 Thread Alex Elder
type definition so it only applies to TX endpoints (they aren't valid for RX endpoints). And the last makes some minor documentation updates. -Alex Alex Elder (5): net: ipa: use configuration data for QSB settings net: ipa: implement MAX_READS_BEATS QSB

[PATCH net-next 1/5] net: ipa: use configuration data for QSB settings

2021-03-20 Thread Alex Elder
Use the QSB configuration data in ipa_hardware_config_qsb(), rather than determining in code what values to use based on IPA version. Pass configuration data to ipa_hardware_config() so it can be passed to ipa_hardware_config_qsb(). Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 73

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

2021-03-20 Thread Alex Elder
On 3/20/21 8:24 AM, Alex Elder wrote: On 3/18/21 11:29 PM, Alex Elder wrote: There is sanity checking code in the IPA driver that's meant to be enabled only during development.  This allows the driver to make certain assumptions, but not have to verify those assumptions are true at (operational

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

2021-03-20 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

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

2021-03-20 Thread Alex Elder
that it mentions the changes made to ipa_cmd_table_valid(). -Alex Alex Elder (2): net: ipa: fix init header command validation net: ipa: fix IPA validation drivers/net/ipa/Makefile | 2 +- drivers/net/ipa/gsi_trans.c| 8 ++--- drivers/net/ipa

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

2021-03-20 Thread Alex Elder
, update ipa_cmd_table_valid() so the format of messages printed for errors matches what's done in ipa_cmd_header_valid(). Signed-off-by: Alex Elder --- v2: - Updated description to mention ipa_cmd_table_valid() changes. drivers/net/ipa/ipa_cmd.c | 50 ++- 1

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

2021-03-20 Thread Alex Elder
On 3/18/21 11:29 PM, Alex Elder wrote: There is sanity checking code in the IPA driver that's meant to be enabled only during development. This allows the driver to make certain assumptions, but not have to verify those assumptions are true at (operational) runtime. This code is built

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

2021-03-19 Thread Alex Elder
On 3/19/21 1:32 PM, Andrew Lunn wrote: @@ -212,7 +213,7 @@ static inline u32 ipa_reg_bcr_val(enum ipa_version version) BCR_HOLB_DROP_L2_IRQ_FMASK | BCR_DUAL_TX_FMASK; - /* assert(version != IPA_VERSION_4_5); */ + ipa_assert(NULL, version

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

2021-03-19 Thread Alex Elder
On 3/19/21 10:32 AM, Leon Romanovsky wrote: +/* Verify the expression yields true, and fail at build time if possible */ +#define ipa_assert(dev, expr) \ + do { \ + if (__builtin_constant_p(expr)) \ + compiletime_assert(expr, __ipa_failure_msg(expr)); \

  1   2   3   4   5   6   7   8   9   10   >