Home
last modified time | relevance | path

Searched hist:"5 a7693e6bbf19b22fd6c1d2c4b7beb0a03969e2c" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/ntb/
H A Dntb_transport.cdiff 5a7693e6bbf19b22fd6c1d2c4b7beb0a03969e2c Tue Aug 22 11:04:57 CDT 2023 Dave Jiang <dave.jiang@intel.com> 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: e74bfeedad08 ("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>