<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/ipa/gsi.h, branch linux-5.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-06-21T19:30:59Z</updated>
<entry>
<title>net: ipa: introduce gsi_ring_setup()</title>
<updated>2021-06-21T19:30:59Z</updated>
<author>
<name>Alex Elder</name>
</author>
<published>2021-06-21T17:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bae70a803a771d0f1e55cfe1db195d8af2765dd8'/>
<id>urn:sha1:bae70a803a771d0f1e55cfe1db195d8af2765dd8</id>
<content type='text'>
Prior to IPA v3.5.1, there is no HW_PARAM_2 GSI register, which we
use to determine the number of channels and endpoints per execution
environment.  In that case, we will just assume the number supported
is the maximum supported by the driver.

Introduce gsi_ring_setup() to encapsulate the code that determines
the number of channels and endpoints.

Update GSI_EVT_RING_COUNT_MAX so it is big enough to handle any
available channel for all supported hardware (IPA v4.9 can have 23
channels and 24 event rings).

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Acked-by: AngeloGioacchino Del Regno
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ipa: increase channels and events</title>
<updated>2021-03-24T23:52:47Z</updated>
<author>
<name>Alex Elder</name>
</author>
<published>2021-03-24T13:15:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=810a2e1f1073983eebcdf3d4e98d6183db863c6f'/>
<id>urn:sha1:810a2e1f1073983eebcdf3d4e98d6183db863c6f</id>
<content type='text'>
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 &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ipa: use a separate pointer for adjusted GSI memory</title>
<updated>2021-02-13T00:54:16Z</updated>
<author>
<name>Alex Elder</name>
</author>
<published>2021-02-12T14:33:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=571b1e7e58ad30b3a842254aea50d2e83b2396e1'/>
<id>urn:sha1:571b1e7e58ad30b3a842254aea50d2e83b2396e1</id>
<content type='text'>
This patch actually fixes a bug, though it doesn't affect the two
platforms supported currently.  The fix implements GSI memory
pointers a bit differently.

For IPA version 4.5 and above, the address space for almost all GSI
registers is adjusted downward by a fixed amount.  This is currently
handled by adjusting the I/O virtual address pointer after it has
been mapped.  The bug is that the pointer is not "de-adjusted" as it
should be when it's unmapped.

This patch fixes that error, but it does so by maintaining one "raw"
pointer for the mapped memory range.  This is assigned when the
memory is mapped and used to unmap the memory.  This pointer is also
used to access the two registers that do *not* sit in the "adjusted"
memory space.

Rather than adjusting *that* pointer, we maintain a separate pointer
that's an adjusted copy of the "raw" pointer, and that is used for
most GSI register accesses.

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ipa: do not cache event ring state</title>
<updated>2021-02-06T22:57:17Z</updated>
<author>
<name>Alex Elder</name>
</author>
<published>2021-02-05T22:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3f77c926f649eed686f36a1e6888abb698146a2a'/>
<id>urn:sha1:3f77c926f649eed686f36a1e6888abb698146a2a</id>
<content type='text'>
An event ring's state only needs to be known when it is allocated,
reset, or deallocated.  We check an event ring's state both before
and after performing an event ring control command that changes
its state.  These are only issued at startup and shutdown, so there
is very little value in caching the state.

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

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ipa: support retries on generic GSI commands</title>
<updated>2020-11-21T02:45:52Z</updated>
<author>
<name>Alex Elder</name>
</author>
<published>2020-11-19T22:49:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1136145660f3116cb92794c1a7571bf49e4a1938'/>
<id>urn:sha1:1136145660f3116cb92794c1a7571bf49e4a1938</id>
<content type='text'>
When stopping an AP RX channel, there can be a transient period
while the channel enters STOP_IN_PROC state before reaching the
final STOPPED state.  In that case we make another attempt to stop
the channel.

Similarly, when stopping a modem channel (using a GSI generic
command issued from the AP), it's possible that multiple attempts
will be required before the channel reaches STOPPED state.

Add a field to the GSI structure to record an errno representing the
result code provided when a generic command completes.  If the
result learned in gsi_isr_gp_int1() is RETRY, record -EAGAIN in the
result code, otherwise record 0 for success, or -EIO for any other
result.

If we time out nf gsi_generic_command() waiting for the command to
complete, return -ETIMEDOUT (as before).  Otherwise return the
result stashed by gsi_isr_gp_int1().

Add a loop in gsi_modem_channel_halt() to reissue the HALT command
if the result code indicates -EAGAIN.  Limit this to 10 retries
(after the initial attempt).

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ipa: define enumerated types consistently</title>
<updated>2020-11-18T23:53:48Z</updated>
<author>
<name>Alex Elder</name>
</author>
<published>2020-11-16T23:38:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8701cb00d78a41a222fd770691e297c47ecbb218'/>
<id>urn:sha1:8701cb00d78a41a222fd770691e297c47ecbb218</id>
<content type='text'>
Consistently define numeric values for enumerated type members using
hexidecimal (rather than decimal) format values.  Align the values
assigned in the same column in each file.

Only assign values where they really matter, for example don't
assign IPA_ENDPOINT_AP_MODEM_TX the value 0.

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ipa: cache last-saved GSI IRQ enabled type</title>
<updated>2020-11-07T23:39:16Z</updated>
<author>
<name>Alex Elder</name>
</author>
<published>2020-11-05T18:14:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ca97ffd984c477e6bba26a71ebba188b99f1a4c'/>
<id>urn:sha1:3ca97ffd984c477e6bba26a71ebba188b99f1a4c</id>
<content type='text'>
Keep track of the set of GSI interrupt types that are currently
enabled by recording the mask value to write (or last written) to
the TYPE_IRQ_MSK register.

Create a new helper function gsi_irq_type_update() to handle
actually writing the register.

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ipa: rename gsi-&gt;event_enable_bitmap</title>
<updated>2020-11-07T23:39:16Z</updated>
<author>
<name>Alex Elder</name>
</author>
<published>2020-11-05T18:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a054539db1966908d3730f29ef3726534cd1f2d5'/>
<id>urn:sha1:a054539db1966908d3730f29ef3726534cd1f2d5</id>
<content type='text'>
Rename the "event_enable_bitmap" field of the GSI structure to be
"ieob_enabled_bitmap".  An upcoming patch will cache the last value
stored for another interrupt mask and this is a more direct naming
convention to follow.

Add a few comments to explain the bitmap fields in the GSI structure.

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ipa: eliminate legacy arguments</title>
<updated>2020-11-05T00:28:04Z</updated>
<author>
<name>Alex Elder</name>
</author>
<published>2020-11-02T17:54:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d387c761fa8c9026cd87b8a56a3150535205be73'/>
<id>urn:sha1:d387c761fa8c9026cd87b8a56a3150535205be73</id>
<content type='text'>
We enable a channel doorbell engine only for IPA v3.5.1, and that is
now handled directly by gsi_channel_program().

When initially setting up a channel, we want that doorbell engine
enabled, and we can request that independent of the IPA version.

Doing that makes the "legacy" argument to gsi_channel_setup_one()
unnecessary.  And with that gone we can get rid of the "legacy"
argument to gsi_channel_setup(), and gsi_setup() as well.

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ipa: use version in gsi_channel_program()</title>
<updated>2020-11-05T00:28:04Z</updated>
<author>
<name>Alex Elder</name>
</author>
<published>2020-11-02T17:53:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce54993d01b996cdf09e15882e77bea8c10903ca'/>
<id>urn:sha1:ce54993d01b996cdf09e15882e77bea8c10903ca</id>
<content type='text'>
Use the IPA version in gsi_channel_program() to determine whether
we should enable the GSI doorbell engine when requested.  This way,
callers only say whether or not it should be enabled if needed,
regardless of hardware version.

Rename the "legacy" argument to gsi_channel_reset(), and have
it indicate whether the doorbell engine should be enabled when
reprogramming following the reset.

Change all callers of gsi_channel_reset() to indicate whether to
enable the doorbell engine after reset, independent of hardware
version.

Rework a little logic in ipa_endpoint_reset() to get rid of the
"legacy" variable previously passed to gsi_channel_reset().

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
