<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/misc/ocxl/config.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-12-31T12:26:26Z</updated>
<entry>
<title>ocxl: fix pci device refcount leak when calling get_function_0()</title>
<updated>2022-12-31T12:26:26Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-11-21T15:43:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9a1b3148975b71fdc194e62612478346bbe618cd'/>
<id>urn:sha1:9a1b3148975b71fdc194e62612478346bbe618cd</id>
<content type='text'>
[ Upstream commit 27158c72678b39ee01cc01de1aba6b51c71abe2f ]

get_function_0() calls pci_get_domain_bus_and_slot(), as comment
says, it returns a pci device with refcount increment, so after
using it, pci_dev_put() needs be called.

Get the device reference when get_function_0() is not called, so
pci_dev_put() can be called in the error path and callers
unconditionally. And add comment above get_dvsec_vendor0() to tell
callers to call pci_dev_put().

Fixes: 87db7579ebd5 ("ocxl: control via sysfs whether the FPGA is reloaded on a link reset")
Suggested-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Acked-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20221121154339.4088935-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ocxl: Use pci core's DVSEC functionality</title>
<updated>2021-10-29T18:53:52Z</updated>
<author>
<name>Ben Widawsky</name>
<email>ben.widawsky@intel.com</email>
</author>
<published>2021-10-09T16:44:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c6d7e1341cc99ba49df1384c8c5b3f534a5463b1'/>
<id>urn:sha1:c6d7e1341cc99ba49df1384c8c5b3f534a5463b1</id>
<content type='text'>
Reduce maintenance burden of DVSEC query implementation by using the
centralized PCI core implementation.

There are two obvious places to simply drop in the new core
implementation. There remains find_dvsec_from_pos() which would benefit
from using a core implementation. As that change is less trivial it is
reserved for later.

Cc: linuxppc-dev@lists.ozlabs.org
Cc: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Acked-by: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt; (v1)
Signed-off-by: Ben Widawsky &lt;ben.widawsky@intel.com&gt;
Reviewed-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/163379789065.692348.7117946955275586530.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>misc: ocxl: config: Rename function attribute description</title>
<updated>2020-11-03T09:12:10Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2020-11-02T14:20:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a7c392c76a434c71df30ca748aae00d69684ff48'/>
<id>urn:sha1:a7c392c76a434c71df30ca748aae00d69684ff48</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/misc/ocxl/config.c:81: warning: Function parameter or member 'dev' not described in 'get_function_0'
 drivers/misc/ocxl/config.c:81: warning: Excess function parameter 'device' description in 'get_function_0'

Cc: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt;
Cc: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: linuxppc-dev@lists.ozlabs.org
Acked-by: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt;
Acked-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Link: https://lore.kernel.org/r/20201102142001.560490-2-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ocxl: Address kernel doc errors &amp; warnings</title>
<updated>2020-07-29T13:47:52Z</updated>
<author>
<name>Alastair D'Silva</name>
<email>alastair@d-silva.org</email>
</author>
<published>2020-04-15T01:23:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3591538a31af37cf6a2d83f1da99e651a822af8b'/>
<id>urn:sha1:3591538a31af37cf6a2d83f1da99e651a822af8b</id>
<content type='text'>
This patch addresses warnings and errors from the kernel doc scripts for
the OpenCAPI driver.

It also makes minor tweaks to make the docs more consistent.

Signed-off-by: Alastair D'Silva &lt;alastair@d-silva.org&gt;
Acked-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200415012343.919255-3-alastair@d-silva.org
</content>
</entry>
<entry>
<title>ocxl: control via sysfs whether the FPGA is reloaded on a link reset</title>
<updated>2020-07-15T01:07:19Z</updated>
<author>
<name>Philippe Bergheaud</name>
<email>felix@linux.ibm.com</email>
</author>
<published>2020-06-19T14:04:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=87db7579ebd5ded337056eb765542eb2608f16e3'/>
<id>urn:sha1:87db7579ebd5ded337056eb765542eb2608f16e3</id>
<content type='text'>
Some opencapi FPGA images allow to control if the FPGA should be reloaded
on the next adapter reset. If it is supported, the image specifies it
through a Vendor Specific DVSEC in the config space of function 0.

Signed-off-by: Philippe Bergheaud &lt;felix@linux.ibm.com&gt;
Signed-off-by: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt;
Reviewed-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200619140439.153962-1-fbarrat@linux.ibm.com
</content>
</entry>
<entry>
<title>ocxl: Update for AFU descriptor template version 1.1</title>
<updated>2019-07-10T03:20:44Z</updated>
<author>
<name>Alastair D'Silva</name>
<email>alastair@d-silva.org</email>
</author>
<published>2019-06-05T11:15:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=73a2b047c81046a7f734a5759ab5fdedbb6968fd'/>
<id>urn:sha1:73a2b047c81046a7f734a5759ab5fdedbb6968fd</id>
<content type='text'>
The OpenCAPI discovery and configuration specification has been
updated and introduces version 1.1 of the AFU descriptor template,
with new fields to better define the memory layout of an OpenCAPI
adapter.

The ocxl driver doesn't do much yet to support LPC memory but as we
start seeing (non-LPC) AFU images using the new template, this patch
updates the config space parsing code to avoid spitting a warning.

Signed-off-by: Alastair D'Silva &lt;alastair@d-silva.org&gt;
Signed-off-by: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt;
Reviewed-by: Christophe Lombard &lt;clombard@linux.vnet.ibm.com&gt;
Acked-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20190605111545.19762-1-fbarrat@linux.ibm.com
</content>
</entry>
<entry>
<title>ocxl: Remove some unused exported symbols</title>
<updated>2019-05-02T16:55:01Z</updated>
<author>
<name>Alastair D'Silva</name>
<email>alastair@d-silva.org</email>
</author>
<published>2019-03-25T05:34:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b696d28283e2e030cdc9ece7a4eb0a93b4c474fd'/>
<id>urn:sha1:b696d28283e2e030cdc9ece7a4eb0a93b4c474fd</id>
<content type='text'>
Remove some unused exported symbols.

Signed-off-by: Alastair D'Silva &lt;alastair@d-silva.org&gt;
Reviewed-by: Greg Kurz &lt;groug@kaod.org&gt;
Acked-by: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt;
Acked-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>ocxl: read_pasid never returns an error, so make it void</title>
<updated>2019-05-02T16:55:00Z</updated>
<author>
<name>Alastair D'Silva</name>
<email>alastair@d-silva.org</email>
</author>
<published>2019-03-25T05:34:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=32941494ff9a9f78fc967adf0e03044b62e09114'/>
<id>urn:sha1:32941494ff9a9f78fc967adf0e03044b62e09114</id>
<content type='text'>
No need for a return value in read_pasid as it only returns 0.

Signed-off-by: Alastair D'Silva &lt;alastair@d-silva.org&gt;
Reviewed-by: Greg Kurz &lt;groug@kaod.org&gt;
Acked-by: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt;
Acked-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>ocxl: Fix endiannes bug in read_afu_name()</title>
<updated>2018-12-21T03:46:50Z</updated>
<author>
<name>Greg Kurz</name>
<email>groug@kaod.org</email>
</author>
<published>2018-12-11T17:58:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2f07229f02d4c55affccd11a61af4fd4b94dc436'/>
<id>urn:sha1:2f07229f02d4c55affccd11a61af4fd4b94dc436</id>
<content type='text'>
The AFU Descriptor Template in the PCI config space has a Name Space
field which is a 24 Byte ASCII character string of descriptive name
space for the AFU. The OCXL driver read the string four characters at
a time with pci_read_config_dword().

This optimization is valid on a little-endian system since this is PCI,
but a big-endian system ends up with each subset of four characters in
reverse order.

This could be fixed by switching to read characters one by one. Another
option is to swap the bytes if we're big-endian.

Go for the latter with le32_to_cpu().

Cc: stable@vger.kernel.org      # v4.16
Signed-off-by: Greg Kurz &lt;groug@kaod.org&gt;
Acked-by: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt;
Acked-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>ocxl: Fix access to the AFU Descriptor Data</title>
<updated>2018-09-19T11:58:09Z</updated>
<author>
<name>Christophe Lombard</name>
<email>clombard@linux.vnet.ibm.com</email>
</author>
<published>2018-08-14T12:45:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6f8e45f7eb1bee5efdbe4a9cfe4a45627403c5fb'/>
<id>urn:sha1:6f8e45f7eb1bee5efdbe4a9cfe4a45627403c5fb</id>
<content type='text'>
The AFU Information DVSEC capability is a means to extract common,
general information about all of the AFUs associated with a Function
independent of the specific functionality that each AFU provides.
Write in the AFU Index field allows to access to the descriptor data
for each AFU.

With the current code, we are not able to access to these specific data
when the index &gt;= 1 because we are writing to the wrong location.
All requests to the data of each AFU are pointing to those of the AFU 0,
which could have impacts when using a card with more than one AFU per
function.

This patch fixes the access to the AFU Descriptor Data indexed by the
AFU Info Index field.

Fixes: 5ef3166e8a32 ("ocxl: Driver code for 'generic' opencapi devices")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 4.16
Signed-off-by: Christophe Lombard &lt;clombard@linux.vnet.ibm.com&gt;

Acked-by: Frederic Barrat &lt;fbarrat@linux.vnet.ibm.com&gt;
Acked-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
</feed>
