]> git.baikalelectronics.ru Git - kernel.git/commit
IB/ipath: Fix potentially wrong RNR retry counter returned in ipath_query_qp()
authorPatrick Marchand Latifi <patrick.latifi@qlogic.com>
Tue, 8 Jan 2008 07:43:04 +0000 (23:43 -0800)
committerRoland Dreier <rolandd@cisco.com>
Tue, 11 Mar 2008 21:01:14 +0000 (14:01 -0700)
commit13d1f3ec52faff91cfe4c4508666f95a7e378f7d
treefa8c4f5b110148b913c3f9b5663d7a95358d4fd4
parentbaef7c639267ac4cc63af2aea8a2bd7b3ea97daf
IB/ipath: Fix potentially wrong RNR retry counter returned in ipath_query_qp()

There can be a case where the requester's rnr retry counter
(s_rnr_retry) is less than the number of rnr retries allowed per QP
(s_rnr_retry_cnt).  This can happen if the s_rnr_retry counter is being
decremented and an ipath_query_qp call is issued during that time frame.
The fix is to always return the number of rnr retries allowed per QP
instead of the requester's rnr counter.

Found by code review.

Signed-off-by: Patrick Marchand Latifi <patrick.latifi@qlogic.com>
Acked-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_qp.c