<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/ntb, branch v4.9.259</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.259</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.259'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-10-29T08:05:41Z</updated>
<entry>
<title>NTB: hw: amd: fix an issue about leak system resources</title>
<updated>2020-10-29T08:05:41Z</updated>
<author>
<name>Kaige Li</name>
<email>likaige@loongson.cn</email>
</author>
<published>2020-08-11T01:59:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bd332ce78820fab8127f121960cd2ce46934b6ea'/>
<id>urn:sha1:bd332ce78820fab8127f121960cd2ce46934b6ea</id>
<content type='text'>
[ Upstream commit 44a0a3c17919db1498cebb02ecf3cf4abc1ade7b ]

The related system resources were not released when pci_set_dma_mask(),
pci_set_consistent_dma_mask(), or pci_iomap() return error in the
amd_ntb_init_pci() function. Add pci_release_regions() to fix it.

Fixes: a1b3695820aa ("NTB: Add support for AMD PCI-Express Non-Transparent Bridge")
Signed-off-by: Kaige Li &lt;likaige@loongson.cn&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntb: intel: fix return value for ndev_vec_mask()</title>
<updated>2019-11-28T17:28:52Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2018-08-29T00:13:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=23c7064d5c2d6b7a7c268b6f4d545ac4e8b4e08e'/>
<id>urn:sha1:23c7064d5c2d6b7a7c268b6f4d545ac4e8b4e08e</id>
<content type='text'>
[ Upstream commit 7756e2b5d68c36e170a111dceea22f7365f83256 ]

ndev_vec_mask() should be returning u64 mask value instead of int.
Otherwise the mask value returned can be incorrect for larger
vectors.

Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers")

Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Tested-by: Lucas Van &lt;lucas.van@intel.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntb_transport: Fix bug with max_mw_size parameter</title>
<updated>2018-05-30T05:50:22Z</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-12-18T18:25:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=33d353db125a9b220638066346e642b6bfbca204'/>
<id>urn:sha1:33d353db125a9b220638066346e642b6bfbca204</id>
<content type='text'>
[ Upstream commit cbd27448faff4843ac4b66cc71445a10623ff48d ]

When using the max_mw_size parameter of ntb_transport to limit the size of
the Memory windows, communication cannot be established and the queues
freeze.

This is because the mw_size that's reported to the peer is correctly
limited but the size used locally is not. So the MW is initialized
with a buffer smaller than the window but the TX side is using the
full window. This means the TX side will be writing to a region of the
window that points nowhere.

This is easily fixed by applying the same limit to tx_size in
ntb_transport_init_queue().

Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Acked-by: Allen Hubbe &lt;Allen.Hubbe@dell.com&gt;
Cc: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ntb: transport shouldn't disable link due to bogus values in SPADs</title>
<updated>2017-08-30T08:21:55Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2017-07-28T22:10:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c1628774f0c807944478684b97cf258da8f7c10a'/>
<id>urn:sha1:c1628774f0c807944478684b97cf258da8f7c10a</id>
<content type='text'>
commit f3fd2afed8eee91620d05b69ab94c14793c849d7 upstream.

It seems that under certain scenarios the SPAD can have bogus values caused
by an agent (i.e. BIOS or other software) that is not the kernel driver, and
that causes memory window setup failure. This should not cause the link to
be disabled because if we do that, the driver will never recover again. We
have verified in testing that this issue happens and prevents proper link
recovery.

Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Acked-by: Allen Hubbe &lt;Allen.Hubbe@dell.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Fixes: 84f766855f61 ("ntb: stop link work when we do not have memory")
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ntb: no sleep in ntb_async_tx_submit</title>
<updated>2017-08-30T08:21:55Z</updated>
<author>
<name>Allen Hubbe</name>
<email>Allen.Hubbe@dell.com</email>
</author>
<published>2017-06-09T22:06:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7592db555524b5d0dfe92a1d3069f450f31291fe'/>
<id>urn:sha1:7592db555524b5d0dfe92a1d3069f450f31291fe</id>
<content type='text'>
commit 88931ec3dc11e7dbceb3b0df455693873b508fbe upstream.

Do not sleep in ntb_async_tx_submit, which could deadlock.
This reverts commit "8c874cc140d667f84ae4642bb5b5e0d6396d2ca4"

Fixes: 8c874cc140d6 ("NTB: Address out of DMA descriptor issue with NTB")
Reported-by: Jia-Ju Bai &lt;baijiaju1990@163.com&gt;
Signed-off-by: Allen Hubbe &lt;Allen.Hubbe@dell.com&gt;
Acked-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ntb_transport: fix bug calculating num_qps_mw</title>
<updated>2017-08-30T08:21:54Z</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-06-05T20:00:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=471954c313c57e09839f1381bd4897283d8e6537'/>
<id>urn:sha1:471954c313c57e09839f1381bd4897283d8e6537</id>
<content type='text'>
commit 8e8496e0e9564b66165f5219a4e8ed20b0d3fc6b upstream.

A divide by zero error occurs if qp_count is less than mw_count because
num_qps_mw is calculated to be zero. The calculation appears to be
incorrect.

The requirement is for num_qps_mw to be set to qp_count / mw_count
with any remainder divided among the earlier mws.

For example, if mw_count is 5 and qp_count is 12 then mws 0 and 1
will have 3 qps per window and mws 2 through 4 will have 2 qps per window.
Thus, when mw_num &lt; qp_count % mw_count, num_qps_mw is 1 higher
than when mw_num &gt;= qp_count.

Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Acked-by: Allen Hubbe &lt;Allen.Hubbe@dell.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ntb_transport: fix qp count bug</title>
<updated>2017-08-30T08:21:54Z</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-06-05T20:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4743d1b37a38c36ce2b01741edd33bbaaea9a1b4'/>
<id>urn:sha1:4743d1b37a38c36ce2b01741edd33bbaaea9a1b4</id>
<content type='text'>
commit cb827ee6ccc3e480f0d9c0e8e53eef55be5b0414 upstream.

In cases where there are more mw's than spads/2-2, the mw count gets
reduced to match the limitation. ntb_transport also tries to ensure that
there are fewer qps than mws but uses the full mw count instead of
the reduced one. When this happens, the math in
'ntb_transport_setup_qp_mw' will get confused and result in a kernel
paging request bug.

This patch fixes the bug by reducing qp_count to the reduced mw count
instead of the full mw count.

Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Acked-by: Allen Hubbe &lt;Allen.Hubbe@dell.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ntb_transport: Pick an unused queue</title>
<updated>2017-02-23T16:44:36Z</updated>
<author>
<name>Thomas VanSelus</name>
<email>tvanselus@xes-inc.com</email>
</author>
<published>2017-02-13T22:46:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=68214ad3926c7dd829e2f810b6af6fe7c76fd3da'/>
<id>urn:sha1:68214ad3926c7dd829e2f810b6af6fe7c76fd3da</id>
<content type='text'>
commit 8fcd0950c021d7be8493280541332b924b9de962 upstream.

Fix typo causing ntb_transport_create_queue to select the first
queue every time, instead of using the next free queue.

Signed-off-by: Thomas VanSelus &lt;tvanselus@xes-inc.com&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Acked-by: Allen Hubbe &lt;Allen.Hubbe@dell.com&gt;
Fixes: fce8a7bb5 ("PCI-Express Non-Transparent Bridge Support")
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ntb: ntb_perf missing dmaengine_unmap_put</title>
<updated>2017-02-23T16:44:36Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2017-01-30T21:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f4202601509465c3d2e96b6bfd4a1237ac4268d1'/>
<id>urn:sha1:f4202601509465c3d2e96b6bfd4a1237ac4268d1</id>
<content type='text'>
commit 9644347c5240d0ee3ba7472ef332aaa4ff4db398 upstream.

In the normal I/O execution path, ntb_perf is missing a call to
dmaengine_unmap_put() after submission. That causes us to leak
unmap objects.

Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Fixes: 8a7b6a77 ("ntb: ntb perf tool")
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>NTB: ntb_transport: fix debugfs_remove_recursive</title>
<updated>2017-02-23T16:44:36Z</updated>
<author>
<name>Allen Hubbe</name>
<email>Allen.Hubbe@dell.com</email>
</author>
<published>2016-12-27T22:57:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=43325382fc7a216f2087d7dfdc662e30e952adf1'/>
<id>urn:sha1:43325382fc7a216f2087d7dfdc662e30e952adf1</id>
<content type='text'>
commit dd62245e73de9138333cb0e7a42c8bc1215c3ce6 upstream.

The call to debugfs_remove_recursive(qp-&gt;debugfs_dir) of the sub-level
directory must not be later than
debugfs_remove_recursive(nt_debugfs_dir) of the top-level directory.
Otherwise, the sub-level directory will not exist, and it would be
invalid (panic) to attempt to remove it.  This removes the top-level
directory last, after sub-level directories have been cleaned up.

Signed-off-by: Allen Hubbe &lt;Allen.Hubbe@dell.com&gt;
Fixes: e26a5843f ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
