Re: [PATCH 2/2] bnx2i : Fix cid #n not valid issue

2009-08-03 Thread Mike Christie
On 07/30/2009 01:08 AM, Ulrich Windl wrote: On 29 Jul 2009 at 21:50, Anil Veerabhadrappa wrote: +bnx2i_ep-ep_iscsi_cid = (u16) -1; As a matter of style: Wouldn't it be more logical to write (u16) ~0 instead? Casting a negative value to unsigned seems strange to me. Is there a MAX_U16

Re: [PATCH 2/2] bnx2i : Fix cid #n not valid issue

2009-07-30 Thread Ulrich Windl
On 29 Jul 2009 at 21:50, Anil Veerabhadrappa wrote: + bnx2i_ep-ep_iscsi_cid = (u16) -1; As a matter of style: Wouldn't it be more logical to write (u16) ~0 instead? Casting a negative value to unsigned seems strange to me. Regards, Ulrich

[PATCH 2/2] bnx2i : Fix cid #n not valid issue

2009-07-29 Thread Anil Veerabhadrappa
* when bnx2i_adapter_ready() fails, connection handle(cid) = 0 is wrongly freed because 'cid' is not yet allocated for the endpoint * Fix is to initialize bnx2i_ep-ep_iscsi_cid to '-1' in bnx2i_alloc_ep() and not in bnx2i_ep_connect() to avoid releasing invalid 'cid' *