Re: [PATCH] IB/usnic: Handle 0 counts in resource allocation

2015-12-10 Thread Nelson Escobar
On 12/9/2015 10:47 PM, Leon Romanovsky wrote: > On Wed, Dec 09, 2015 at 10:42:19AM -0800, Nelson Escobar wrote: >> -if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 1 || !owner) >> +if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 0 || !owner) > B

Re: [PATCH] IB/usnic: Handle 0 counts in resource allocation

2015-12-10 Thread Nelson Escobar
On 12/10/2015 11:47 AM, l...@leon.nu wrote: > On Thu, Dec 10, 2015 at 11:22:24AM -0800, Nelson Escobar wrote: >> On 12/9/2015 10:47 PM, Leon Romanovsky wrote: >>> On Wed, Dec 09, 2015 at 10:42:19AM -0800, Nelson Escobar wrote: >>>> - if (usnic_vnic_res_free_cn

[PATCH] IB/usnic: Fix message typo

2015-12-09 Thread Nelson Escobar
Signed-off-by: Dave Goodell <dgood...@cisco.com> Reviewed-by: Reese Faucette <rfauc...@cisco.com> Reviewed-by: Xuyang Wang <xuyw...@cisco.com> Signed-off-by: Nelson Escobar <neesc...@cisco.com> --- drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c | 2 +- 1 file changed, 1

[PATCH] IB/usnic: Handle 0 counts in resource allocation

2015-12-09 Thread Nelson Escobar
Signed-off-by: Dave Goodell <dgood...@cisco.com> Reviewed-by: Reese Faucette <rfauc...@cisco.com> Reviewed-by: Xuyang Wang <xuyw...@cisco.com> Signed-off-by: Nelson Escobar <neesc...@cisco.com> --- drivers/infiniband/hw/usnic/usnic_vnic.c | 54 +---

[PATCH] IB/usnic: Support more QP state transitions

2015-12-09 Thread Nelson Escobar
ucette <rfauc...@cisco.com> Reviewed-by: Xuyang Wang <xuyw...@cisco.com> Signed-off-by: Nelson Escobar <neesc...@cisco.com> --- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/infiniband/hw/u

[PATCH] IB/usnic: Fix incorrect cast in usnic_ib_fw_string_to_u64

2015-12-09 Thread Nelson Escobar
Signed-off-by: Christian Benvenuti <be...@cisco.com> Signed-off-by: Nelson Escobar <neesc...@cisco.com> Reviewed-by: Dave Goodell <dgood...@cisco.com> --- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i

[PATCH] IB/usnic: Fix resource leak in error case

2015-12-09 Thread Nelson Escobar
Signed-off-by: Dave Goodell <dgood...@cisco.com> Reviewed-by: Reese Faucette <rfauc...@cisco.com> Reviewed-by: Xuyang Wang <xuyw...@cisco.com> Signed-off-by: Nelson Escobar <neesc...@cisco.com> --- drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c | 2 +- 1 file changed, 1

[PATCH] IB/usnic: Improve a failure message

2015-12-09 Thread Nelson Escobar
Signed-off-by: Nelson Escobar <neesc...@cisco.com> Reviewed-by: Dave Goodell <dgood...@cisco.com> --- drivers/infiniband/hw/usnic/usnic_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/usnic/usnic_debugfs.c b/drivers/infinib

[PATCH] IB/usnic: Remove unused prototype

2015-12-09 Thread Nelson Escobar
query_protocol() was added in commit 6b90a6d66b17 ("IB/Verbs: Implement new callback query_protocol()") and then removed in commit f9b22e355d38 ("IB/core: Convert core to use bitfield for caps"). This left behind an unused prototype. Signed-off-by: Nelson Escobar <neesc