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

2021-04-16 Thread Alex Elder
pose. 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..7443490d4cc

[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

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

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

2021-04-11 Thread Alex Elder
eturns a value, all callers of that function ought to be checking it. If the return value is not necessary it should be a void function if possible. I don't expect the world to change, but I just think the default should be "must check" rather than "check optional". -Alex

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 3/4] net: ipa: add IPA v4.5 configuration data

2021-04-09 Thread Alex Elder
in SDX55 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/n

[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 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 6/7] net: ipa: get rid of empty GSI functions

2021-04-09 Thread Alex Elder
cases. 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/driver

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

[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 3/7] net: ipa: only set endpoint netdev pointer when in use

2021-04-09 Thread Alex Elder
_stop() 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/dr

[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 net-next 2/7] net: ipa: update sequence type for modem TX endpoint

2021-04-09 Thread Alex Elder
ned-off-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_dat

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

2021-04-09 Thread Alex Elder
d-off-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 @@

Re: [RESEND net-next 4/4] net: ipa: remove repeated words

2021-03-30 Thread Alex Elder
On 3/30/21 2:27 AM, Huazhong Tan wrote: From: Peng Li Remove repeated words "that" and "the". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Acked-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

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

2021-03-28 Thread Alex Elder
arily 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/i

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

2021-03-28 Thread Alex Elder
nting 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_ta

[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
EM_DL_NLO_TX, which 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/i

[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 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 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 0/7] net: ipa: a few last bits

2021-03-28 Thread Alex Elder
the size of a table entry, 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

[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 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 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 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 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 07/12] net: ipa: move ipa_resource_type definition

2021-03-26 Thread Alex Elder
n its 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

[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 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 02/12] net: ipa: fix bug in resource group limit programming

2021-03-26 Thread Alex Elder
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 03/12] net: ipa: identify resource groups

2021-03-26 Thread Alex Elder
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 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 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
ration data. That 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 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 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 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 0/6] net: ipa: update registers for other versions

2021-03-25 Thread Alex Elder
cases register fields are laid out differently, and in these cases the changes are a little more substantive. I won't claim the result is 100% correct, but it's close, and should allow all IPA versions 3.x through 4.x to be supported by the driver.

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

2021-03-24 Thread Alex Elder
of-2, and so your clever test would be a simple test. I'll take that into account when I implement the fix. Thanks for the suggestion. -Alex

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 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 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 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 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 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 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
Version 2 of this series adds kernel-doc descriptions for all members of the ipa_version enumerated type in patch 2. The original description of the series is below. -Alex This series is sort of a mix of things, generally related to updating IPA versions

[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 5/6] net: ipa: move ipa_aggr_granularity_val()

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

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

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

2021-03-23 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 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] net: ipa: avoid 64-bit modulus

2021-03-22 Thread Alex Elder
g 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

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
ference to `__umoddi3' This code assumes a 32-bit kernel implies a 32-bit dma_addr_t. But it seems that's not the case for i386... Let me try to reproduce this. The fix should be easy. Sorry about that. -Alex

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

2021-03-22 Thread Alex Elder
s the kernel moves forward. If I need to keep it in my own repository it will be fairly isolated, and easier to carry for my own use. If David/Jakub comments here, I'll know. Otherwise I'll post it as an RFC initially when I've got something. -Alex

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

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

2021-03-22 Thread Alex Elder
up this validation code was already my goal, but I'll be doing it differently now. In the end, I might like the new result better, which is always a nice outcome from discussion during review. Thank you. -Alex

[PATCH] iwlwifi: add new pci id for 6235

2021-03-22 Thread Alex Hung
lspci output: Network controller [0280]: Intel Corporation Centrino Advanced-N6235 [8086:088f] (rev 24) Subsystem: Intel Corporation Centrino Advanced-N 6235 [8086:526a] Cc: sta...@vger.kernel.org Signed-off-by: Alex Hung --- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 + 1 file changed

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

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

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

2021-03-20 Thread Alex Elder
e one 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 -- drive

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

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

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

[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
atch so 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 ++---

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

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

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

2021-03-19 Thread Alex Elder
!= IPA_VERSION_4_5); Hi Alex It is impossible to see just looking what the NULL means. And given its the first parameter, it should be quite important. I find this API pretty bad. I actually don't like the first argument. I would have supplied the main IPA pointer, but that isn

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

2021-03-19 Thread Alex Elder
them to be concise and useful: assert(count <= MAX_COUNT); versus /* Caller must ensure count is in range */ We might just disagree on this, and that's OK. I'm interested to hear whether others think. -Alex

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

2021-03-19 Thread Alex Elder
ou may not appreciate the value of that, but I do. -Alex

[PATCH net-next 2/5] net: ipa: fix canary count for SC7180 UC_INFO region

2021-03-19 Thread Alex Elder
There should be no canary values written before the beginning of the UC_INFO memory region. This was correct for SDM845, but somehow was committed with the wrong value for SC7180. This bug seems to cause no harm, so we'll just correct it without back-porting. Signed-off-by: Alex

[PATCH net-next 5/5] net: ipa: define QSB limits in configuration data

2021-03-19 Thread Alex Elder
Define the maximum number of reads and writes to configure for the QSB masters used for IPA in configuration data. We don't use these values yet; the next commit takes care of that. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sc7180.c | 10 ++ drivers/net/ipa/ipa_data-s

[PATCH net-next 4/5] net: ipa: define some new memory regions

2021-03-19 Thread Alex Elder
, one for the modem and one for the AP. Define distinct names for these regions, and get rid of the definition of IPA_MEM_STATS_QUOTA. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sc7180.c | 2 +- drivers/net/ipa/ipa_mem.h | 10 +- drivers/net/ipa/ipa_qmi.c | 2

[PATCH net-next 3/5] net: ipa: don't define empty memory regions

2021-03-19 Thread Alex Elder
cause the memory regions are defined in statically initialized memory. For the SC7180, the STATS_DROP memory region has a zero size and no canaries as well. These regions are the only place where a zero-sized region is defined despite having no canaries. Remove them. Signed-off-by: Alex

[PATCH net-next 1/5] net: ipa: make all configuration data constant

2021-03-19 Thread Alex Elder
All of the platform configuration data should be constant, but that isn't the case for the memory regions, interconnects, and clocks. Fix this. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sc7180.c | 6 +++--- drivers/net/ipa/ipa_data-sdm845.c | 6 +++--- 2 files chang

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

2021-03-19 Thread Alex Elder
parameters -Alex Alex Elder (5): net: ipa: make all configuration data constant net: ipa: fix canary count for SC7180 UC_INFO region net: ipa: don't define empty memory regions net: ipa: define some new memory regions net: ipa: define QSB limits in configuration data drivers/net/ipa/

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

2021-03-19 Thread Alex Elder
On 3/19/21 12:00 AM, Leon Romanovsky wrote: On Thu, Mar 18, 2021 at 11:29:23PM -0500, Alex Elder wrote: Convert some commented assertion statements into real calls to ipa_assert(). If the IPA device pointer is available, provide it, otherwise pass NULL for that. There are lots more places to

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

2021-03-19 Thread Alex Elder
On 3/18/21 11:55 PM, Leon Romanovsky wrote: On Thu, Mar 18, 2021 at 11:29:22PM -0500, Alex Elder wrote: Create a new macro ipa_assert() to verify that a condition is true. This produces a build-time error if the condition can be evaluated at build time; otherwise __ipa_assert_runtime() is

[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

  1   2   3   4   5   6   7   8   9   10   >