From f26efeb64853afc23e9e79b79150a51f53c1ef3b Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Mon, 16 May 2011 06:44:35 -0700 Subject: [PATCH] --- yaml --- r: 249728 b: refs/heads/master c: 31bceb845e0f5393db1d9bf033d365cff7132c93 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/staging/hv/channel_mgmt.c | 2 ++ trunk/drivers/staging/hv/hyperv.h | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ad5a13b7768b..d36163db4b20 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7e0b3bf3abec4cd30c58e6311f913759a9e324d7 +refs/heads/master: 31bceb845e0f5393db1d9bf033d365cff7132c93 diff --git a/trunk/drivers/staging/hv/channel_mgmt.c b/trunk/drivers/staging/hv/channel_mgmt.c index e8c706c6c830..1021713ea4c0 100644 --- a/trunk/drivers/staging/hv/channel_mgmt.c +++ b/trunk/drivers/staging/hv/channel_mgmt.c @@ -419,6 +419,7 @@ static void vmbus_process_offer(struct work_struct *work) * can cleanup properly */ newchannel->state = CHANNEL_OPEN_STATE; + newchannel->util_index = -1; /* Invalid index */ /* Open IC channels */ for (cnt = 0; cnt < MAX_MSG_TYPES; cnt++) { @@ -430,6 +431,7 @@ static void vmbus_process_offer(struct work_struct *work) hv_cb_utils[cnt].callback, newchannel) == 0) { hv_cb_utils[cnt].channel = newchannel; + newchannel->util_index = cnt; pr_info("%s\n", hv_cb_utils[cnt].log_msg); diff --git a/trunk/drivers/staging/hv/hyperv.h b/trunk/drivers/staging/hv/hyperv.h index 56af1ecbf0e5..8b826a115443 100644 --- a/trunk/drivers/staging/hv/hyperv.h +++ b/trunk/drivers/staging/hv/hyperv.h @@ -532,6 +532,11 @@ struct vmbus_channel { struct work_struct work; enum vmbus_channel_state state; + /* + * For util channels, stash the + * the service index for easy access. + */ + s8 util_index; struct vmbus_channel_offer_channel offermsg; /*