Drivers: hv: vmbus: Use all supported IC versions to negotiate
[linux-2.6-microblaze.git] / drivers / hv / hv_fcopy.c
index e47d8c9..0a315e6 100644 (file)
 #define WIN8_SRV_MINOR         1
 #define WIN8_SRV_VERSION       (WIN8_SRV_MAJOR << 16 | WIN8_SRV_MINOR)
 
+#define FCOPY_VER_COUNT 1
+static const int fcopy_versions[] = {
+       WIN8_SRV_VERSION
+};
+
+#define FW_VER_COUNT 1
+static const int fw_versions[] = {
+       UTIL_FW_VERSION
+};
+
 /*
  * Global state maintained for transaction that is being processed.
  * For a class of integration services, including the "file copy service",
@@ -228,8 +238,6 @@ void hv_fcopy_onchannelcallback(void *context)
        u64 requestid;
        struct hv_fcopy_hdr *fcopy_msg;
        struct icmsg_hdr *icmsghdr;
-       struct icmsg_negotiate *negop = NULL;
-       int util_fw_version;
        int fcopy_srv_version;
 
        if (fcopy_transaction.state > HVUTIL_READY)
@@ -243,10 +251,10 @@ void hv_fcopy_onchannelcallback(void *context)
        icmsghdr = (struct icmsg_hdr *)&recv_buffer[
                        sizeof(struct vmbuspipe_hdr)];
        if (icmsghdr->icmsgtype == ICMSGTYPE_NEGOTIATE) {
-               util_fw_version = UTIL_FW_VERSION;
-               fcopy_srv_version = WIN8_SRV_VERSION;
-               vmbus_prep_negotiate_resp(icmsghdr, negop, recv_buffer,
-                               util_fw_version, fcopy_srv_version);
+               vmbus_prep_negotiate_resp(icmsghdr, recv_buffer,
+                               fw_versions, FW_VER_COUNT,
+                               fcopy_versions, FCOPY_VER_COUNT,
+                               NULL, &fcopy_srv_version);
        } else {
                fcopy_msg = (struct hv_fcopy_hdr *)&recv_buffer[
                                sizeof(struct vmbuspipe_hdr) +