Lines Matching refs:newchannel
493 struct vmbus_channel *newchannel = in vmbus_add_channel_work() local
495 struct vmbus_channel *primary_channel = newchannel->primary_channel; in vmbus_add_channel_work()
503 newchannel->state = CHANNEL_OPEN_STATE; in vmbus_add_channel_work()
509 if (vmbus_add_channel_kobj(dev, newchannel)) in vmbus_add_channel_work()
513 primary_channel->sc_creation_callback(newchannel); in vmbus_add_channel_work()
515 newchannel->probe_done = true; in vmbus_add_channel_work()
522 newchannel->device_obj = vmbus_device_create( in vmbus_add_channel_work()
523 &newchannel->offermsg.offer.if_type, in vmbus_add_channel_work()
524 &newchannel->offermsg.offer.if_instance, in vmbus_add_channel_work()
525 newchannel); in vmbus_add_channel_work()
526 if (!newchannel->device_obj) in vmbus_add_channel_work()
529 newchannel->device_obj->device_id = newchannel->device_id; in vmbus_add_channel_work()
535 ret = vmbus_device_register(newchannel->device_obj); in vmbus_add_channel_work()
539 newchannel->offermsg.child_relid); in vmbus_add_channel_work()
540 kfree(newchannel->device_obj); in vmbus_add_channel_work()
544 newchannel->probe_done = true; in vmbus_add_channel_work()
554 newchannel->probe_done = true; in vmbus_add_channel_work()
557 list_del(&newchannel->listentry); in vmbus_add_channel_work()
559 list_del(&newchannel->sc_list); in vmbus_add_channel_work()
562 vmbus_channel_unmap_relid(newchannel); in vmbus_add_channel_work()
566 vmbus_release_relid(newchannel->offermsg.child_relid); in vmbus_add_channel_work()
568 free_channel(newchannel); in vmbus_add_channel_work()
575 static void vmbus_process_offer(struct vmbus_channel *newchannel) in vmbus_process_offer() argument
610 &newchannel->offermsg.offer.if_type) && in vmbus_process_offer()
612 &newchannel->offermsg.offer.if_instance)) { in vmbus_process_offer()
614 newchannel->primary_channel = channel; in vmbus_process_offer()
619 init_vp_index(newchannel); in vmbus_process_offer()
622 if (is_hvsock_channel(newchannel) || is_sub_channel(newchannel)) in vmbus_process_offer()
632 list_add_tail(&newchannel->listentry, in vmbus_process_offer()
638 if (newchannel->offermsg.offer.sub_channel_index == 0) { in vmbus_process_offer()
644 kfree(newchannel); in vmbus_process_offer()
651 list_add_tail(&newchannel->sc_list, &channel->sc_list); in vmbus_process_offer()
654 vmbus_channel_map_relid(newchannel); in vmbus_process_offer()
680 INIT_WORK(&newchannel->add_channel_work, vmbus_add_channel_work); in vmbus_process_offer()
683 queue_work(wq, &newchannel->add_channel_work); in vmbus_process_offer()
1000 struct vmbus_channel *oldchannel, *newchannel; in vmbus_onoffer() local
1087 newchannel = alloc_channel(); in vmbus_onoffer()
1088 if (!newchannel) { in vmbus_onoffer()
1095 vmbus_setup_channel_state(newchannel, offer); in vmbus_onoffer()
1097 vmbus_process_offer(newchannel); in vmbus_onoffer()