diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2011-09-18 10:31:34 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-20 13:00:53 -0700 |
commit | 4e65f6e80593c316c5a65a71191fa480360f165d (patch) | |
tree | 29d3cbe68bd01e7b7cdcecccd70a797ca7eaf889 /drivers/staging/hv/channel_mgmt.c | |
parent | a29b643c5767558956450b86d79eb66334704ac2 (diff) | |
download | op-kernel-dev-4e65f6e80593c316c5a65a71191fa480360f165d.zip op-kernel-dev-4e65f6e80593c316c5a65a71191fa480360f165d.tar.gz |
Staging: hv: util: Properly handle util services in the util driver
Now, properly handle util services in the util driver and eliminate code
that will not be necessary. In the current code, util services were
all handled not as other vmbus devices (net, block) but rather through
special handling (channel setup etc.). In this patch we handle all
services using the standard Linux Driver Model.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/channel_mgmt.c')
-rw-r--r-- | drivers/staging/hv/channel_mgmt.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c index c68e5fa..99cc334 100644 --- a/drivers/staging/hv/channel_mgmt.c +++ b/drivers/staging/hv/channel_mgmt.c @@ -181,24 +181,6 @@ void chn_cb_negotiate(void *context) struct icmsg_hdr *icmsghdrp; struct icmsg_negotiate *negop = NULL; - if (channel->util_index >= 0) { - /* - * This is a properly initialized util channel. - * Route this callback appropriately and setup state - * so that we don't need to reroute again. - */ - if (hv_cb_utils[channel->util_index].callback != NULL) { - /* - * The util driver has established a handler for - * this service; do the magic. - */ - channel->onchannel_callback = - hv_cb_utils[channel->util_index].callback; - (hv_cb_utils[channel->util_index].callback)(channel); - return; - } - } - buflen = PAGE_SIZE; buf = kmalloc(buflen, GFP_ATOMIC); @@ -348,7 +330,6 @@ static void vmbus_process_offer(struct work_struct *work) struct vmbus_channel *channel; bool fnew = true; int ret; - int cnt; unsigned long flags; /* The next possible work is rescind handling */ @@ -410,23 +391,6 @@ 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++) { - if (!uuid_le_cmp(newchannel->offermsg.offer.if_type, - hv_cb_utils[cnt].data) && - vmbus_open(newchannel, 2 * PAGE_SIZE, - 2 * PAGE_SIZE, NULL, 0, - chn_cb_negotiate, - newchannel) == 0) { - hv_cb_utils[cnt].channel = newchannel; - newchannel->util_index = cnt; - - pr_info("%s\n", hv_cb_utils[cnt].log_msg); - - } - } } } |