int hvcs_register_connection (uint32_t unit_address, uint32_t p_partition_ID, uint32_t p_unit_address);
If this function is called once and -EINVAL is returned it may indicate that the partner info needs to be refreshed for the target unit address at which point the caller must invoke hvcs_get_partner_info and then call this function again. If, for a second time, -EINVAL is returned then it indicates that there is probably already a partner connection registered to a different vty-server adapter. It is also possible that a second -EINVAL may indicate that one of the parms is not valid, for instance if the link was removed between the vty-server adapter and the vty adapter that you are trying to open. Don't shoot the messenger. Firmware implemented it this way.
If this function is called once and -EINVAL is returned it may indicate that the partner info needs to be refreshed for the target unit address at which point the caller must invoke hvcs_get_partner_info and then call this function again. If, for a second time, -EINVAL is returned then it indicates that there is probably already a partner connection registered to a different vty-server adapter. It is also possible that a second -EINVAL may indicate that one of the parms is not valid, for instance if the link was removed between the vty-server adapter and the vty adapter that you are trying to open. Don't shoot the messenger. Firmware implemented it this way.