linux/drivers/ntb
Dave Jiang 5a7693e6bb ntb: Fix calculation ntb_transport_tx_free_entry()
ntb_transport_tx_free_entry() never returns 0 with the current
calculation. If head == tail, then it would return qp->tx_max_entry.
Change compare to tail >= head and when they are equal, a 0 would be
returned.

Fixes: e74bfeedad ("NTB: Add flow control to the ntb_netdev")
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: renlonglong <ren.longlong@h3c.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
2023-08-22 12:38:19 -04:00
..
hw ntb: amd: Drop unnecessary error check for debugfs_create_dir 2023-08-18 09:50:06 -04:00
test NTB: ntb_tool: Switch to memdup_user_nul() helper 2023-08-18 09:50:06 -04:00
core.c
Kconfig
Makefile
msi.c NTB/msi: Use struct_size() helper in devm_kzalloc() 2022-01-23 16:15:15 -05:00
ntb_transport.c ntb: Fix calculation ntb_transport_tx_free_entry() 2023-08-22 12:38:19 -04:00