<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/ipa/gsi.h, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-08-04T09:12:05Z</updated>
<entry>
<title>net: ipa: disable GSI interrupts while suspended</title>
<updated>2021-08-04T09:12:05Z</updated>
<author>
<name>Alex Elder</name>
</author>
<published>2021-08-03T14:01:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45a42a3c50b583e78d96038e834909de627f87f1'/>
<id>urn:sha1:45a42a3c50b583e78d96038e834909de627f87f1</id>
<content type='text'>
Introduce new functions gsi_suspend() and gsi_resume(), which will
disable the GSI interrupt handler after all endpoints are suspended
and re-enable it before endpoints are resumed.  This will ensure no
GSI interrupt handler will fire when the hardware is suspended.

Here's a little further explanation.  There are seven GSI interrupt
types, and most are disabled except when needed.
  - These two are not used (never enabled):
      GSI_INTER_EE_CH_CTRL
      GSI_INTER_EE_EV_CTRL
  - These two are only used to implement channel and event ring
    commands, and are only enabled while a command is underway:
      GSI_CH_CTRL
      GSI_EV_CTRL
  - The IEOB interrupt signals I/O completion.  It will not fire
    when a channel is stopped (or "suspended").
      GSI_IEOB
  - This interrupt is used to allocate or halt modem channels,
    and is only enabled while such a command is underway.
      GSI_GLOB_EE
    However it also is used to signal certain errors, and this could
    occur at any time.
  - The general interrupt signals general errors, and could occur at
    any time.
      GSI_GENERAL

The purpose for this change is to ensure no global or general
interrupts fire due to errors while the hardware is suspended.
We enable the clock on resume, and at that time we can "handle"
(at least report) these error conditions.

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 gsi-&gt;version for channel suspend/resume</title>
<updated>2021-08-04T09:12:05Z</updated>
<author>
<name>Alex Elder</name>
</author>
<published>2021-08-03T14:00:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=decfef0fa6b21508657a6e54a01508196988bc95'/>
<id>urn:sha1:decfef0fa6b21508657a6e54a01508196988bc95</id>
<content type='text'>
The GSI layer has the IPA version now, so there's no need for
version-specific flags to be passed from IPA.  One instance of
this is in gsi_channel_suspend() and gsi_channel_resume(), which
indicate whether or not the endpoint suspend is implemented by
GSI stopping the channel.  We can make that determination based
on gsi-&gt;version, eliminating the need for a Boolean flag in those
functions.

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: 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>
</feed>
