Re: [PATCH] Drivers: hv: vmbus: fix error return code in vmbus_connect()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/12/2013 04:03 AM, KY Srinivasan wrote:
>
>> -----Original Message-----
>> From: Wei Yongjun [mailto:weiyj.lk@xxxxxxxxx]
>> Sent: Wednesday, September 11, 2013 4:20 AM
>> To: KY Srinivasan; Haiyang Zhang
>> Cc: yongjun_wei@xxxxxxxxxxxxxxxxx; devel@xxxxxxxxxxxxxxxxxxxxxx; linux-
>> kernel@xxxxxxxxxxxxxxx
>> Subject: [PATCH] Drivers: hv: vmbus: fix error return code in vmbus_connect()
>>
>> From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
>>
>> Fix to return -EINVAL in the version check error handling
>> case instead of 0, as done elsewhere in this function.
> The return will not be zero in this case. If you look at the function 
> vmbus_negotiate_version(), in case the host refuses the version, the
> return value will be set to -ECONNREFUSED

look at the code:

 196         do {
 197                 ret = vmbus_negotiate_version(msginfo, version);
 198                 if (ret)
 199                         goto cleanup;
 200 
 201                 if (vmbus_connection.conn_state == CONNECTED)
 202                         break;
 203 
 204                 version = vmbus_get_next_version(version);
 205         } while (version != VERSION_INVAL);
 206 
 207         if (version == VERSION_INVAL)
 208                 goto cleanup;

if function vmbus_negotiate_version() return error, the code
will goto cleanup. 

If 'version == VERSION_INVAL' is true, I think we tried all
of the VERSION_WS2008/VERSION_WIN7/VERSION_WIN8, but still
can not get the connection.

 



_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux