#
88412277 |
| 16-Apr-2024 |
Alex Elder <elder@linaro.org> |
net: ipa: sort all includes
Establish the rule that header files are always included in sorted (POSIX local) order. Standard and private headers are separated by a blank line.
Similarly, sort all
net: ipa: sort all includes
Establish the rule that header files are always included in sorted (POSIX local) order. Standard and private headers are separated by a blank line.
Similarly, sort all forward-declarations for structures.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
#
f60e5fb6 |
| 16-Apr-2024 |
Alex Elder <elder@linaro.org> |
net: ipa: more include file cleanup
All of the config data files and all of the register definition files (plus a few others) use GSI_EE_AP, which is defined in "ipa_version.h". Include that header
net: ipa: more include file cleanup
All of the config data files and all of the register definition files (plus a few others) use GSI_EE_AP, which is defined in "ipa_version.h". Include that header where it's needed.
All of the IPA register definition files include "../ipa.h", though none of them need anything defined there. Similarly, all of the GSI register definition files include "../gsi.h", but don't need anything defined there. Remove these unnneded includes.
All of the configuration data files include "../gsi.h", though none of them need anything defined there, so remove these includes.
Remove other includes of local header files that are not required.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
#
8c044024 |
| 16-Apr-2024 |
Alex Elder <elder@linaro.org> |
net: ipa: remove unneeded standard includes
Some IPA header files include one or more other standard header files despite not directly needing anything defined in the included files. Remove these u
net: ipa: remove unneeded standard includes
Some IPA header files include one or more other standard header files despite not directly needing anything defined in the included files. Remove these unnecessary includes.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
#
5245f4fd |
| 01-Mar-2024 |
Alex Elder <elder@linaro.org> |
net: ipa: don't save the platform device
The IPA platform device is now only used as the structure containing the IPA device structure. Replace the platform device pointer with a pointer to the dev
net: ipa: don't save the platform device
The IPA platform device is now only used as the structure containing the IPA device structure. Replace the platform device pointer with a pointer to the device structure.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
8defab8b |
| 25-Oct-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: don't assume 8 modem routing table entries
Currently all platforms are assumed allot 8 routing table entries for use by the modem. Instead, add a new configuration data entry that defines
net: ipa: don't assume 8 modem routing table entries
Currently all platforms are assumed allot 8 routing table entries for use by the modem. Instead, add a new configuration data entry that defines the number of modem routing table entries, and record that in the IPA structure.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
#
a4388da5 |
| 30-Sep-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: update copyrights
Some source files state copyright dates that are earlier than the last modification of the file. Change the copyright year to 2022 in all such cases.
Signed-off-by: Ale
net: ipa: update copyrights
Some source files state copyright dates that are earlier than the last modification of the file. Change the copyright year to 2022 in all such cases.
Signed-off-by: Alex Elder <elder@linaro.org> Link: https://lore.kernel.org/r/20220930224549.3503434-1-elder@linaro.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
cf412ec3 |
| 13-Sep-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: properly limit modem routing table use
IPA can route packets between IPA-connected entities. The AP and modem are currently the only such entities supported, and no routing is required to
net: ipa: properly limit modem routing table use
IPA can route packets between IPA-connected entities. The AP and modem are currently the only such entities supported, and no routing is required to transfer packets between them.
The number of entries in each routing table is fixed, and defined at initialization time. Some of these entries are designated for use by the modem, and the rest are available for the AP to use. The AP sends a QMI message to the modem which describes (among other things) information about routing table memory available for the modem to use.
Currently the QMI initialization packet gives wrong information in its description of routing tables. What *should* be supplied is the maximum index that the modem can use for the routing table memory located at a given location. The current code instead supplies the total *number* of routing table entries. Furthermore, the modem is granted the entire table, not just the subset it's supposed to use.
This patch fixes this. First, the ipa_mem_bounds structure is generalized so its "end" field can be interpreted either as a final byte offset, or a final array index. Second, the IPv4 and IPv6 (non-hashed and hashed) table information fields in the QMI ipa_init_modem_driver_req structure are changed to be ipa_mem_bounds rather than ipa_mem_array structures. Third, we set the "end" value for each routing table to be the last index, rather than setting the "count" to be the number of indices. Finally, instead of allowing the modem to use all of a routing table's memory, it is limited to just the portion meant to be used by the modem. In all versions of IPA currently supported, that is IPA_ROUTE_MODEM_COUNT (8) entries.
Update a few comments for clarity.
Fixes: 530f9216a9537 ("soc: qcom: ipa: AP/modem communications") Signed-off-by: Alex Elder <elder@linaro.org> Link: https://lore.kernel.org/r/20220913204602.1803004-1-elder@linaro.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
8d017efb |
| 12-May-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: get rid of a duplicate initialization
In ipa_qmi_ready(), the "ipa" local variable is set when initialized, but then set again just before it's first used. One or the other is enough, so g
net: ipa: get rid of a duplicate initialization
In ipa_qmi_ready(), the "ipa" local variable is set when initialized, but then set again just before it's first used. One or the other is enough, so get rid of the first one.
References: https://lore.kernel.org/lkml/200de1bd-0f01-c334-ca18-43eed783dfac@intel.com/ Reported-by: kernel test robot <lkp@intel.com> Fixes: 530f9216a953 ("soc: qcom: ipa: AP/modem communications") Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
63961f54 |
| 26-Jul-2021 |
Alex Elder <elder@linaro.org> |
net: ipa: kill ipa_modem_setup()
The functions ipa_modem_setup() and ipa_modem_teardown() are trivial wrappers that call ipa_qmi_setup() and ipa_qmi_teardown(). Just call the QMI functions directly
net: ipa: kill ipa_modem_setup()
The functions ipa_modem_setup() and ipa_modem_teardown() are trivial wrappers that call ipa_qmi_setup() and ipa_qmi_teardown(). Just call the QMI functions directly, and get rid of the wrappers.
Improve the documentation of what setting up QMI does.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
5e3bc1e5 |
| 10-Jun-2021 |
Alex Elder <elder@linaro.org> |
net: ipa: introduce ipa_mem_find()
Introduce a new function that abstracts finding information about a region in IPA-local memory, given its memory region ID. For now it simply uses the region ID a
net: ipa: introduce ipa_mem_find()
Introduce a new function that abstracts finding information about a region in IPA-local memory, given its memory region ID. For now it simply uses the region ID as an index into the IPA memory array. If the region is not defined, ipa_mem_find() returns a null pointer.
Update all code that accesses the ipa->mem[] array directly to use ipa_mem_find() instead. The return value must be checked for null when optional memory regions are sought.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
4ea29143 |
| 28-Mar-2021 |
Alex Elder <elder@linaro.org> |
net: ipa: kill IPA_TABLE_ENTRY_SIZE
Entries in an IPA route or filter table are 64-bit little-endian addresses, each of which refers to a routing or filtering rule.
The format of these table slots
net: ipa: kill IPA_TABLE_ENTRY_SIZE
Entries in an IPA route or filter table are 64-bit little-endian addresses, each of which refers to a routing or filtering rule.
The format of these table slots are fixed, but IPA_TABLE_ENTRY_SIZE is used to define their size. This symbol doesn't really add value, and I think it unnecessarily 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 <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
d7f3087b |
| 24-Mar-2021 |
Alex Elder <elder@linaro.org> |
net: ipa: reduce IPA version assumptions
Modify conditional tests throughout the IPA code so they do not assume that IPA v3.5.1 is the oldest version supported. Also remove assumptions that IPA v4.
net: ipa: reduce IPA version assumptions
Modify conditional tests throughout the IPA code so they do not assume that IPA v3.5.1 is the oldest version supported. Also remove assumptions that IPA v4.5 is the newest version of IPA supported.
Augment versions in comments with "+", to be clearer that the comment applies to a version and subsequent versions. (E.g., "present for IPA v4.2+" instead of just "present for v4.2".)
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
2ef88644 |
| 19-Mar-2021 |
Alex Elder <elder@linaro.org> |
net: ipa: define some new memory regions
There are several memory regions that are defined starting with IPA v4.0, but which were not used for the SC7180 SoC (IPA v4.2). Even though they're not use
net: ipa: define some new memory regions
There are several memory regions that are defined starting with IPA v4.0, but which were not used for the SC7180 SoC (IPA v4.2). Even though they're not used (yet), define them so they are ready to be used for SoCs when they become supported.
There are two QUOTA statistics memory regions, 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 <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
3a9ef3e1 |
| 12-Mar-2021 |
Alex Elder <elder@linaro.org> |
net: ipa: terminate message handler arrays
When a QMI handle is initialized, an array of message handler structures is provided, defining how any received message should be handled based on its type
net: ipa: terminate message handler arrays
When a QMI handle is initialized, an array of message handler structures is provided, defining how any received message should be handled based on its type and message ID. The QMI core code traverses this array when a message arrives and calls the function associated with the (type, msg_id) found in the array.
The array is supposed to be terminated with an empty (all zero) entry though. Without it, an unsupported message will cause the QMI core code to go past the end of the array.
Fix this bug, by properly terminating the message handler arrays provided when QMI handles are set up by the IPA driver.
Fixes: 530f9216a9537 ("soc: qcom: ipa: AP/modem communications") Reported-by: Sujit Kautkar <sujitka@chromium.org> Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
e65f3df5 |
| 09-Dec-2020 |
Zheng Yongjun <zhengyongjun3@huawei.com> |
net: ipa: convert comma to semicolon
Replace a comma between expression statements by a semicolon.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@dave
net: ipa: convert comma to semicolon
Replace a comma between expression statements by a semicolon.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
b5094a3b |
| 22-Nov-2020 |
Rikard Falkeborn <rikard.falkeborn@gmail.com> |
soc: qcom: ipa: Constify static qmi structs
These are only used as input arguments to qmi_handle_init() which accepts const pointers to both qmi_ops and qmi_msg_handler. Make them const to allow the
soc: qcom: ipa: Constify static qmi structs
These are only used as input arguments to qmi_handle_init() which accepts const pointers to both qmi_ops and qmi_msg_handler. Make them const to allow the compiler to put them in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Acked-by: Alex Elder <elder@linaro.org> Link: https://lore.kernel.org/r/20201122234031.33432-2-rikard.falkeborn@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
530f9216 |
| 06-Mar-2020 |
Alex Elder <elder@linaro.org> |
soc: qcom: ipa: AP/modem communications
This patch implements two forms of out-of-band communication between the AP and modem.
- QMI is a mechanism that allows clients running on the AP inter
soc: qcom: ipa: AP/modem communications
This patch implements two forms of out-of-band communication between the AP and modem.
- QMI is a mechanism that allows clients running on the AP interact with services running on the modem (and vice-versa). The AP IPA driver uses QMI to communicate with the corresponding IPA driver resident on the modem, to agree on parameters used with the IPA hardware and to ensure both sides are ready before entering operational mode.
- SMP2P is a more primitive mechanism available for the modem and AP to communicate with each other. It provides a means for either the AP or modem to interrupt the other, and furthermore, to provide 32 bits worth of information. The IPA driver uses SMP2P to tell the modem what the state of the IPA clock was in the event of a crash. This allows the modem to safely access the IPA hardware (or avoid doing so) when a crash occurs, for example, to access information within the IPA hardware.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|