<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/pci/endpoint, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-02-16T15:01:10Z</updated>
<entry>
<title>PCI: endpoint: Drop only_64bit on reserved BARs</title>
<updated>2024-02-16T15:01:10Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2024-02-16T13:45:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9266514689fe6476423209ee40168db53134101d'/>
<id>urn:sha1:9266514689fe6476423209ee40168db53134101d</id>
<content type='text'>
The definition of a reserved BAR is that EPF drivers should not touch
them.

The definition of only_64bit is that the EPF driver must configure this
BAR as 64-bit. (An EPF driver is not allowed to choose if this BAR should
be configured as 32-bit or 64-bit.)

Thus, it does not make sense to put only_64bit of a BAR that EPF drivers
are not allow to touch.

Drop the only_64bit property from hardware descriptions that are of type
reserved BAR.

Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Reviewed-by: Kishon Vijay Abraham I &lt;kishon@kernel.org&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Link: https://lore.kernel.org/r/20240216134524.1142149-3-cassel@kernel.org
Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: Clean up hardware description for BARs</title>
<updated>2024-02-16T15:00:46Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2024-02-16T13:45:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e01c9797c0ebb307c9bb196c677f6e571335773e'/>
<id>urn:sha1:e01c9797c0ebb307c9bb196c677f6e571335773e</id>
<content type='text'>
The hardware description for BARs is scattered in many different variables
in pci_epc_features. Some of these things are mutually exclusive, so it
can create confusion over which variable that has precedence over another.

Improve the situation by creating a struct pci_epc_bar_desc, and a new
enum pci_epc_bar_type, and convert the endpoint controller drivers to use
this more well defined format.

Additionally, some endpoint controller drivers mark the BAR succeeding a
"64-bit only BAR" as reserved, while some do not. By definition, a 64-bit
BAR uses the succeeding BAR for the upper 32-bits, so an EPF driver cannot
use a BAR succeeding a 64-bit BAR. Ensure that all endpoint controller
drivers are uniform, and actually describe a reserved BAR as reserved.

Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Reviewed-by: Kishon Vijay Abraham I &lt;kishon@kernel.org&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Link: https://lore.kernel.org/r/20240216134524.1142149-2-cassel@kernel.org
Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
</content>
</entry>
<entry>
<title>PCI: epf-mhi: Add support for SA8775P SoC</title>
<updated>2024-02-16T10:49:14Z</updated>
<author>
<name>Mrinmay Sarkar</name>
<email>quic_msarkar@quicinc.com</email>
</author>
<published>2023-12-01T12:06:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c670e29f5bfe6c404a5405a0fa8e235de2f4f0c9'/>
<id>urn:sha1:c670e29f5bfe6c404a5405a0fa8e235de2f4f0c9</id>
<content type='text'>
Add support for Qualcomm Snapdragon SA8775P SoC to the EPF driver.
SA8775P is currently reusing the PID 0x0306 (the default one hardcoded
in the config space header) as the unique PID is not yet allocated.

But the host side stack works fine with the default PID. It will get
updated once the PID is finalized. Also, it has no fixed PCI class as of
now, so it is being advertised as "PCI_CLASS_OTHERS".

Signed-off-by: Mrinmay Sarkar &lt;quic_msarkar@quicinc.com&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Link: https://lore.kernel.org/r/1701432377-16899-5-git-send-email-quic_msarkar@quicinc.com
Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
</content>
</entry>
<entry>
<title>PCI: epf-mhi: Add "pci_epf_mhi_" prefix to the function names</title>
<updated>2024-02-16T10:48:13Z</updated>
<author>
<name>Manivannan Sadhasivam</name>
<email>manivannan.sadhasivam@linaro.org</email>
</author>
<published>2023-12-01T12:06:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2e00fd5487c796db8b8324e80bc5fe8a02c15a15'/>
<id>urn:sha1:2e00fd5487c796db8b8324e80bc5fe8a02c15a15</id>
<content type='text'>
Without the prefix, the function name would appear as
"/sys/kernel/config/functions/{sdx55/sm8450}". This will be a problem if
multiple functions are supported for this endpoint device.

So let's add the "pci_epf_mhi_" prefix to identify _this_ function
uniquely. Even though it is an ABI breakage, this driver is not used
anywhere outside Qcom and myself to my knowledge. So it safe to change
the function name.

Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Signed-off-by: Mrinmay Sarkar &lt;quic_msarkar@quicinc.com&gt;
Link: https://lore.kernel.org/r/1701432377-16899-4-git-send-email-quic_msarkar@quicinc.com
</content>
</entry>
<entry>
<title>PCI: epf-vntb: Return actual error code during pci_vntb_probe() failure</title>
<updated>2024-02-16T10:44:01Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2023-12-01T03:30:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=976dc5ff3018552dcfe58018a0cfdf6376318117'/>
<id>urn:sha1:976dc5ff3018552dcfe58018a0cfdf6376318117</id>
<content type='text'>
If dma_set_mask_and_coherent() in pci_vntb_probe() fails, return the actual
error code instead of -EINVAL.

Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20231201033057.1399131-2-yangyingliang@huaweicloud.com
[mani: reworded commit message and subject]
Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
</content>
</entry>
<entry>
<title>NTB: fix possible name leak in ntb_register_device()</title>
<updated>2024-02-16T10:43:38Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2023-12-01T03:30:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aebfdfe39b9327a3077d0df8db3beb3160c9bdd0'/>
<id>urn:sha1:aebfdfe39b9327a3077d0df8db3beb3160c9bdd0</id>
<content type='text'>
If device_register() fails in ntb_register_device(), the device name
allocated by dev_set_name() should be freed. As per the comment in
device_register(), callers should use put_device() to give up the
reference in the error path. So fix this by calling put_device() in the
error path so that the name can be freed in kobject_cleanup().

As a result of this, put_device() in the error path of
ntb_register_device() is removed and the actual error is returned.

Fixes: a1bd3baeb2f1 ("NTB: Add NTB hardware abstraction layer")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Link: https://lore.kernel.org/r/20231201033057.1399131-1-yangyingliang@huaweicloud.com
[mani: reworded commit message]
Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: pci-epf-vntb: Remove superfluous checks for pci_epf_alloc_space() API</title>
<updated>2024-02-09T17:10:23Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2024-02-07T21:39:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c795fd3f3622d276f3cdb7b64e6e6c4042585734'/>
<id>urn:sha1:c795fd3f3622d276f3cdb7b64e6e6c4042585734</id>
<content type='text'>
Now that the checks are performed by the pci_epf_alloc_space() API, let's
remove the superfluous checks in this driver.

Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Reviewed-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Link: https://lore.kernel.org/r/20240207213922.1796533-5-cassel@kernel.org
[mani: reworded the commit message]
Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: pci-epf-test: Remove superfluous checks for pci_epf_alloc_space() API</title>
<updated>2024-02-09T17:10:22Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2024-02-07T21:39:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fda826b15c782b6b7d3bd3a9a089c928512ebd3d'/>
<id>urn:sha1:fda826b15c782b6b7d3bd3a9a089c928512ebd3d</id>
<content type='text'>
Now that the checks are performed by the pci_epf_alloc_space() API, let's
remove the superfluous checks in this driver.

Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Reviewed-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Link: https://lore.kernel.org/r/20240207213922.1796533-4-cassel@kernel.org
[mani: reworded commit message]
Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: Improve pci_epf_alloc_space() API</title>
<updated>2024-02-09T17:09:46Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2024-02-07T21:39:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=84b51a6baeaf1ba85e024a5bf145382c02179013'/>
<id>urn:sha1:84b51a6baeaf1ba85e024a5bf145382c02179013</id>
<content type='text'>
pci_epf_alloc_space() already performs checks on the requested BAR size,
and will allocate and set epf_bar-&gt;size to a size higher than the
requested BAR size if some constraint deems it necessary.

However, there are additional checks done in the function drivers like
pci-epf-test.c, other than the existing checks in this API.

And similar checks are proposed to other endpoint function drivers, see:
https://lore.kernel.org/linux-pci/20240108151015.2030469-1-Frank.Li@nxp.com

Having these checks scattered over different locations in multiple EPF
drivers is not maintainable and makes the code hard to follow.

Since pci_epf_alloc_space() already performs roundups and some checks,
let's move the additional checks from pci-epf-test.c to
pci_epf_alloc_space().

This makes the API more robust and also offloads the checks from the
function drivers.

Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Reviewed-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Link: https://lore.kernel.org/r/20240207213922.1796533-3-cassel@kernel.org
[mani: reworded commit message and fixed uninitialized 'dev' pointer issue]
Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: Refactor pci_epf_alloc_space() API</title>
<updated>2024-02-09T08:50:19Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2024-02-07T21:39:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e891becdccaa9048b1ab91c08ad5722edd571806'/>
<id>urn:sha1:e891becdccaa9048b1ab91c08ad5722edd571806</id>
<content type='text'>
Refactor pci_epf_alloc_space() API to accept "epc_features" as a parameter.
This is a preparatory work to make the API more robust.

Reviewed-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Link: https://lore.kernel.org/r/20240207213922.1796533-2-cassel@kernel.org
[mani: reworded commit message]
Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
</content>
</entry>
</feed>
