<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/memory/brcmstb_dpfe.c, branch v5.15.208</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.208</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.208'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-07-23T11:47:03+00:00</updated>
<entry>
<title>memory: brcmstb_dpfe: fix testing array offset after use</title>
<updated>2023-07-23T11:47:03+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2023-05-13T11:29:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=38d04765ad93113e406c6190dc1b84cab52939ce'/>
<id>urn:sha1:38d04765ad93113e406c6190dc1b84cab52939ce</id>
<content type='text'>
[ Upstream commit 1d9e93fad549bc38f593147479ee063f2872c170 ]

Code should first check for valid value of array offset, then use it as
the index.  Fixes smatch warning:

  drivers/memory/brcmstb_dpfe.c:443 __send_command() error: testing array offset 'cmd' after use.

Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE")
Acked-by: Markus Mayer &lt;mmayer@broadcom.com&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Link: https://lore.kernel.org/r/20230513112931.176066-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>memory: brcmstb_dpfe: Simplify with dev_err_probe()</title>
<updated>2020-09-02T15:22:31+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2020-08-28T15:37:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=74ca0d837b99b0ca6e66861a64a6456beaa10298'/>
<id>urn:sha1:74ca0d837b99b0ca6e66861a64a6456beaa10298</id>
<content type='text'>
Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and the error value gets printed.

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Acked-by: Markus Mayer &lt;mmayer@broadcom.com&gt;
Link: https://lore.kernel.org/r/20200828153747.22358-1-krzk@kernel.org
</content>
</entry>
<entry>
<title>memory: brcmstb_dpfe: fix array index out of bounds</title>
<updated>2020-08-22T20:53:28+00:00</updated>
<author>
<name>Markus Mayer</name>
<email>mmayer@broadcom.com</email>
</author>
<published>2020-08-22T20:50:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f42ae4bbf94c15aa720afb9d176ecbfe140d792e'/>
<id>urn:sha1:f42ae4bbf94c15aa720afb9d176ecbfe140d792e</id>
<content type='text'>
We would overrun the error_text array if we hit a TIMEOUT condition,
because we were using the error code "ETIMEDOUT" (which is 110) as an
array index.

We fix the problem by correcting the array index and by providing a
function to retrieve error messages rather than accessing the array
directly. The function includes a bounds check that prevents the array
from being overrun.

Link: https://lore.kernel.org/linux-arm-kernel/38d00022-730c-948a-917c-d86382df8cb9@canonical.com/
Link: https://lore.kernel.org/r/20200822205000.15841-1-mmayer@broadcom.com
Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE")
Reported-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Markus Mayer &lt;mmayer@broadcom.com&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
</content>
</entry>
<entry>
<title>memory: brcmstb_dpfe: Fix memory leak</title>
<updated>2020-08-20T18:52:59+00:00</updated>
<author>
<name>Alex Dewar</name>
<email>alex.dewar90@gmail.com</email>
</author>
<published>2020-08-20T17:21:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4da1edcf8f226d53c02c6b0e3077d581115b30d0'/>
<id>urn:sha1:4da1edcf8f226d53c02c6b0e3077d581115b30d0</id>
<content type='text'>
In brcmstb_dpfe_download_firmware(), memory is allocated to variable fw by
firmware_request_nowarn(), but never released. Fix up to release fw on
all return paths.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE")
Signed-off-by: Alex Dewar &lt;alex.dewar90@gmail.com&gt;
Acked-by: Markus Mayer &lt;mmayer@broadcom.com&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Link: https://lore.kernel.org/r/20200820172118.781324-1-alex.dewar90@gmail.com
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
</content>
</entry>
<entry>
<title>memory: brcmstb_dpfe: Fix language typo</title>
<updated>2020-07-27T09:13:33+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2020-07-24T18:23:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f7fa245a1a97aa7aa16c1d57f345b49bd874efe7'/>
<id>urn:sha1:f7fa245a1a97aa7aa16c1d57f345b49bd874efe7</id>
<content type='text'>
Fix firwmare -&gt; firmware.

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
</content>
</entry>
<entry>
<title>memory: brcmstb_dpfe: Remove unneeded braces</title>
<updated>2020-07-24T14:18:32+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2020-07-24T07:40:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf77f3f4659959c60be0a12cdb1a14c4b1825124'/>
<id>urn:sha1:bf77f3f4659959c60be0a12cdb1a14c4b1825124</id>
<content type='text'>
Single statement blocks don't need braces.  Fixes checkpatch warning:

    WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Acked-by: Markus Mayer &lt;mmayer@broadcom.com&gt;
</content>
</entry>
<entry>
<title>memory: brcmstb_dpfe: Constify the contents of string</title>
<updated>2020-07-24T14:18:32+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2020-07-24T07:40:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a6ca67a838826ebabe9f1c1434140459928ee5b5'/>
<id>urn:sha1:a6ca67a838826ebabe9f1c1434140459928ee5b5</id>
<content type='text'>
The string itself can be made const for safety.

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Acked-by: Markus Mayer &lt;mmayer@broadcom.com&gt;
</content>
</entry>
<entry>
<title>memory: brcmstb: dpfe: Fixup API version/commands for 7211</title>
<updated>2019-10-18T19:11:59+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2019-10-15T22:45:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b61d3e87b6ab6f5da1ab1f825d1c75abbbebc578'/>
<id>urn:sha1:b61d3e87b6ab6f5da1ab1f825d1c75abbbebc578</id>
<content type='text'>
7211 uses a newer version of API v2 which is half way between what was
defined as API v3 and what used to be called API v2 but was used with
DPFE firmwares with major versions 1.x.x.x. Starting with **the new**
API v2, we are no longer getting loadable firmware images, so the
capability to load it is removed (like v3).

To avoid spreading more confusion, map 7268/7271/7278 to the old DPFE
API version 2, 7211 to the new API v2 and introduce the specific
commands for that, and leave newer versions to map to API v3.

Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Markus Mayer &lt;mmayer@broadcom.com&gt;
</content>
</entry>
<entry>
<title>memory: brcmstb: dpfe: Compute checksum at __send_command() time</title>
<updated>2019-10-18T19:11:50+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2019-10-15T22:45:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5d06f53d950928ecc02dd1a05e58f719eb28589b'/>
<id>urn:sha1:5d06f53d950928ecc02dd1a05e58f719eb28589b</id>
<content type='text'>
Instead of pre-computing the checksum, do it at the time we send the
command, this reduces the possibility of introducing errors as well as
limits the amount of code necessary while adding new commands and/or new
API versions. The MSG_CHKSUM enumeration value is no longer necessary
and is removed.

Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Markus Mayer &lt;mmayer@broadcom.com&gt;
</content>
</entry>
<entry>
<title>memory: brcmstb: dpfe: support for deferred firmware download</title>
<updated>2019-10-18T17:07:43+00:00</updated>
<author>
<name>Markus Mayer</name>
<email>mmayer@broadcom.com</email>
</author>
<published>2019-10-15T22:45:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=242fb2f1d995184f996466167d41a2d49353229b'/>
<id>urn:sha1:242fb2f1d995184f996466167d41a2d49353229b</id>
<content type='text'>
We add support for deferred downloading of the DPFE firmware. It may be
necessary to do this if the root file system containing the firmware
image is not yet available at the time the driver's probe function is
being called.

Signed-off-by: Markus Mayer &lt;mmayer@broadcom.com&gt;
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
</content>
</entry>
</feed>
