<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/ntb, branch stable/6.9.y</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=stable%2F6.9.y</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=stable%2F6.9.y'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2024-02-16T10:43:38Z</updated>
<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://git.stealer.net/cgit.cgi/user/sven/linux.git/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>ntb: Check tx descriptors outstanding instead of head/tail for tx queue</title>
<updated>2023-08-22T16:38:19Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2023-08-22T16:05:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=643982232860887fed493144957ea5794b6557d1'/>
<id>urn:sha1:643982232860887fed493144957ea5794b6557d1</id>
<content type='text'>
Use existing function ntb_transport_tx_free_entry() instead of open coding
the check to see if there are outstanding tx descriptors.

Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>ntb: Fix calculation ntb_transport_tx_free_entry()</title>
<updated>2023-08-22T16:38:19Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2023-08-22T16:04:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5a7693e6bbf19b22fd6c1d2c4b7beb0a03969e2c'/>
<id>urn:sha1:5a7693e6bbf19b22fd6c1d2c4b7beb0a03969e2c</id>
<content type='text'>
ntb_transport_tx_free_entry() never returns 0 with the current
calculation. If head == tail, then it would return qp-&gt;tx_max_entry.
Change compare to tail &gt;= head and when they are equal, a 0 would be
returned.

Fixes: e74bfeedad08 ("NTB: Add flow control to the ntb_netdev")
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: renlonglong &lt;ren.longlong@h3c.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>ntb: Drop packets when qp link is down</title>
<updated>2023-08-22T16:38:19Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2023-08-22T16:04:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f195a1a6fe416882984f8bd6c61afc1383171860'/>
<id>urn:sha1:f195a1a6fe416882984f8bd6c61afc1383171860</id>
<content type='text'>
Currently when the transport receive packets after netdev has closed the
transport returns error and triggers tx errors to be incremented and
carrier to be stopped. There is no reason to return error if the device is
already closed. Drop the packet and return 0.

Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Reported-by: Yuan Y Lu &lt;yuan.y.lu@intel.com&gt;
Tested-by: Yuan Y Lu &lt;yuan.y.lu@intel.com&gt;
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>ntb: Clean up tx tail index on link down</title>
<updated>2023-08-22T16:38:19Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2023-08-22T16:04:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cc79bd2738c2d40aba58b2be6ce47dc0e471df0e'/>
<id>urn:sha1:cc79bd2738c2d40aba58b2be6ce47dc0e471df0e</id>
<content type='text'>
The tx tail index is not reset when the link goes down. This causes the
tail index to go out of sync when the link goes down and comes back up.
Refactor the ntb_qp_link_down_reset() and reset the tail index as well.

Fixes: 2849b5d70641 ("NTB: Reset transport QP link stats on down")
Reported-by: Yuan Y Lu &lt;yuan.y.lu@intel.com&gt;
Tested-by: Yuan Y Lu &lt;yuan.y.lu@intel.com&gt;
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>ntb: amd: Drop unnecessary error check for debugfs_create_dir</title>
<updated>2023-08-18T13:50:06Z</updated>
<author>
<name>Ruan Jinjie</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2023-08-17T06:32:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=28e70ed9d0fab935f78b565d9c026585559b86a4'/>
<id>urn:sha1:28e70ed9d0fab935f78b565d9c026585559b86a4</id>
<content type='text'>
This patch removes the error checking for debugfs_create_dir in
ntb_hw_amd.c. This is because the DebugFS kernel API is developed
in a way that the caller can safely ignore the errors that
occur during the creation of DebugFS nodes. The debugfs APIs have
a IS_ERR() judge in start_creating() which can handle it
gracefully. so these checks are unnecessary.

Signed-off-by: Ruan Jinjie &lt;ruanjinjie@huawei.com&gt;
Acked-by: Sanjay R Mehta &lt;sanju.mehta@amd.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: ntb_tool: Switch to memdup_user_nul() helper</title>
<updated>2023-08-18T13:50:06Z</updated>
<author>
<name>Ruan Jinjie</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2023-08-10T11:14:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=03c9e6f0e0ab3fb6129b8a9f064b7d7957aa969a'/>
<id>urn:sha1:03c9e6f0e0ab3fb6129b8a9f064b7d7957aa969a</id>
<content type='text'>
Use memdup_user_nul() helper instead of open-coding to simplify the code.

Signed-off-by: Ruan Jinjie &lt;ruanjinjie@huawei.com&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Reviewed-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Reviewed-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>dtivers: ntb: fix parameter check in perf_setup_dbgfs()</title>
<updated>2023-08-18T13:50:06Z</updated>
<author>
<name>Minjie Du</name>
<email>duminjie@vivo.com</email>
</author>
<published>2023-07-13T03:47:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=45191087c3e2866e4fbcd775e443ee0380211ed1'/>
<id>urn:sha1:45191087c3e2866e4fbcd775e443ee0380211ed1</id>
<content type='text'>
Make IS_ERR() judge the debugfs_create_dir() function return
in perf_setup_dbgfs().

Signed-off-by: Minjie Du &lt;duminjie@vivo.com&gt;
Reviewed-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>ntb: Remove error checking for debugfs_create_dir()</title>
<updated>2023-08-18T13:50:06Z</updated>
<author>
<name>Wang Ming</name>
<email>machel@vivo.com</email>
</author>
<published>2023-07-13T08:56:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f7d067041e35a8c25a8429ddac97dcca7cf28da2'/>
<id>urn:sha1:f7d067041e35a8c25a8429ddac97dcca7cf28da2</id>
<content type='text'>
It is expected that most callers should _ignore_ the errors
return by debugfs_create_dir() in tool_setup_dbgfs()

Signed-off-by: Wang Ming &lt;machel@vivo.com&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Reviewed-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Reviewed-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>ntb: hw: amd: Fix debugfs_create_dir error checking</title>
<updated>2023-07-08T17:55:44Z</updated>
<author>
<name>Anup Sharma</name>
<email>anupnewsmail@gmail.com</email>
</author>
<published>2023-05-12T20:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bff6efc54bd0e27a332eb733525d7f698fd4a5b7'/>
<id>urn:sha1:bff6efc54bd0e27a332eb733525d7f698fd4a5b7</id>
<content type='text'>
The debugfs_create_dir function returns ERR_PTR in case of error, and the
only correct way to check if an error occurred is 'IS_ERR' inline function.
This patch will replace the null-comparison with IS_ERR.

Signed-off-by: Anup Sharma &lt;anupnewsmail@gmail.com&gt;
Suggested-by: Ivan Orlov &lt;ivan.orlov0322@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
</feed>
