deviceInfo = (struct storvsc_device_info *)AdditionalInfo;
ret = StorVscOnDeviceAdd(Device, AdditionalInfo);
- if (ret != 0) {
- DPRINT_EXIT(BLKVSC);
+ if (ret != 0)
return ret;
- }
/*
* We need to use the device instance guid to set the path and target
deviceInfo->TargetId = Device->deviceInstance.data[5] << 8 |
Device->deviceInstance.data[4];
- DPRINT_EXIT(BLKVSC);
-
return ret;
}
storDriver->Base.OnCleanup = StorVscOnCleanup;
storDriver->OnIORequest = StorVscOnIORequest;
- DPRINT_EXIT(BLKVSC);
-
return ret;
}
/* The driver belongs to vmbus */
ret = vmbus_child_driver_register(drv_ctx);
- DPRINT_EXIT(BLKVSC_DRV);
-
return ret;
}
vmbus_child_driver_unregister(drv_ctx);
- DPRINT_EXIT(BLKVSC_DRV);
-
return;
}
blkdev = NULL;
}
- DPRINT_EXIT(BLKVSC_DRV);
-
return ret;
}
DPRINT_DBG(BLKVSC_DRV, "blkvsc_remove()\n");
- if (!storvsc_drv_obj->Base.OnDeviceRemove) {
- DPRINT_EXIT(BLKVSC_DRV);
+ if (!storvsc_drv_obj->Base.OnDeviceRemove)
return -1;
- }
/*
* Call to the vsc driver to let it know that the device is being
kfree(blkdev);
- DPRINT_EXIT(BLKVSC_DRV);
-
return ret;
}
ret = blkvsc_drv_init(BlkVscInitialize);
- DPRINT_EXIT(BLKVSC_DRV);
-
return ret;
}
} else {
VmbusSetEvent(Channel->OfferMsg.ChildRelId);
}
-
- DPRINT_EXIT(VMBUS);
}
#if 0
(unsigned long *)&monitorPage->TriggerGroup
[Channel->MonitorGroup].Pending);
}
-
- DPRINT_EXIT(VMBUS);
}
#endif
kfree(openInfo->WaitEvent);
kfree(openInfo);
-
- DPRINT_EXIT(VMBUS);
-
return 0;
errorout:
kfree(msgInfo->WaitEvent);
kfree(msgInfo);
-
- DPRINT_EXIT(VMBUS);
-
return ret;
}
kfree(info->WaitEvent);
kfree(info);
-
- DPRINT_EXIT(VMBUS);
-
return ret;
}
FreeVmbusChannel(Channel);
}
-
- DPRINT_EXIT(VMBUS);
}
/**
if (ret == 0 && !GetRingBufferInterruptMask(&Channel->Outbound))
VmbusChannelSetEvent(Channel);
- DPRINT_EXIT(VMBUS);
-
return ret;
}
EXPORT_SYMBOL(VmbusChannelSendPacket);
if (ret == 0 && !GetRingBufferInterruptMask(&Channel->Outbound))
VmbusChannelSetEvent(Channel);
- DPRINT_EXIT(VMBUS);
-
return ret;
}
if (ret == 0 && !GetRingBufferInterruptMask(&Channel->Outbound))
VmbusChannelSetEvent(Channel);
- DPRINT_EXIT(VMBUS);
-
return ret;
}
spin_unlock_irqrestore(&Channel->inbound_lock, flags);
/* DPRINT_DBG(VMBUS, "nothing to read!!"); */
- DPRINT_EXIT(VMBUS);
return 0;
}
DPRINT_ERR(VMBUS, "buffer too small - got %d needs %d",
BufferLen, userLen);
- DPRINT_EXIT(VMBUS);
-
return -1;
}
spin_unlock_irqrestore(&Channel->inbound_lock, flags);
- DPRINT_EXIT(VMBUS);
-
return 0;
}
EXPORT_SYMBOL(VmbusChannelRecvPacket);
spin_unlock_irqrestore(&Channel->inbound_lock, flags);
/* DPRINT_DBG(VMBUS, "nothing to read!!"); */
- DPRINT_EXIT(VMBUS);
return 0;
}
DPRINT_ERR(VMBUS, "buffer too small - needed %d bytes but "
"got space for only %d bytes", packetLen, BufferLen);
- DPRINT_EXIT(VMBUS);
return -2;
}
ret = RingBufferRead(&Channel->Inbound, Buffer, packetLen, 0);
spin_unlock_irqrestore(&Channel->inbound_lock, flags);
-
- DPRINT_EXIT(VMBUS);
-
return 0;
}
DPRINT_DBG(VMBUS, "channel released (%p)", channel);
kfree(channel);
-
- DPRINT_EXIT(VMBUS);
}
/*
DPRINT_DBG(VMBUS, "Ignoring duplicate offer for relid (%d)",
newChannel->OfferMsg.ChildRelId);
FreeVmbusChannel(newChannel);
- DPRINT_EXIT(VMBUS);
return;
}
cnt++;
}
}
- DPRINT_EXIT(VMBUS);
}
/*
struct vmbus_channel *channel = context;
VmbusChildDeviceRemove(channel->DeviceObject);
- DPRINT_EXIT(VMBUS);
}
/*
if (!fSupported) {
DPRINT_DBG(VMBUS, "Ignoring channel offer notification for "
"child relid %d", offer->ChildRelId);
- DPRINT_EXIT(VMBUS);
return;
}
/* TODO: Make sure the offer comes from our parent partition */
osd_schedule_callback(newChannel->ControlWQ, VmbusChannelProcessOffer,
newChannel);
-
- DPRINT_EXIT(VMBUS);
}
/*
osd_schedule_callback(channel->ControlWQ,
VmbusChannelProcessRescindOffer,
channel);
-
- DPRINT_EXIT(VMBUS);
}
/*
static void VmbusChannelOnOffersDelivered(
struct vmbus_channel_message_header *hdr)
{
- DPRINT_EXIT(VMBUS);
}
/*
}
}
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
-
- DPRINT_EXIT(VMBUS);
}
/*
}
}
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
-
- DPRINT_EXIT(VMBUS);
}
/*
}
}
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
-
- DPRINT_EXIT(VMBUS);
}
/*
}
}
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
-
- DPRINT_EXIT(VMBUS);
}
/* Channel message dispatch table */
/* Free the msg that was allocated in VmbusOnMsgDPC() */
kfree(msg);
- DPRINT_EXIT(VMBUS);
}
/*
kfree(msgInfo);
}
- DPRINT_EXIT(VMBUS);
return ret;
}
kfree(msgInfo->WaitEvent);
kfree(msgInfo);
- DPRINT_EXIT(VMBUS);
-
return 0;
Cleanup:
kfree(msgInfo);
}
- DPRINT_EXIT(VMBUS);
-
return ret;
}
Cleanup:
kfree(msg);
- DPRINT_EXIT(VMBUS);
return ret;
}
}
}
}
- DPRINT_EXIT(VMBUS);
-
return;
}
*/
int VmbusSetEvent(u32 childRelId)
{
- int ret = 0;
-
/* Each u32 represents 32 channels */
set_bit(childRelId & 31,
(unsigned long *)gVmbusConnection.SendInterruptPage +
(childRelId >> 5));
- ret = HvSignalEvent();
-
- DPRINT_EXIT(VMBUS);
-
- return ret;
+ return HvSignalEvent();
}
gHvContext.SignalEventParam->FlagNumber = 0;
gHvContext.SignalEventParam->RsvdZ = 0;
- DPRINT_EXIT(VMBUS);
-
return ret;
Cleanup:
vfree(virtAddr);
}
ret = -1;
- DPRINT_EXIT(VMBUS);
-
return ret;
}
vfree(gHvContext.HypercallPage);
gHvContext.HypercallPage = NULL;
}
-
- DPRINT_EXIT(VMBUS);
}
/*
u32 irqVector = *((u32 *)(irqarg));
int cpu = smp_processor_id();
- if (!gHvContext.HypercallPage) {
- DPRINT_EXIT(VMBUS);
+ if (!gHvContext.HypercallPage)
return;
- }
/* Check the version */
rdmsrl(HV_X64_MSR_SVERSION, version);
wrmsrl(HV_X64_MSR_SCONTROL, sctrl.AsUINT64);
gHvContext.SynICInitialized = true;
-
- DPRINT_EXIT(VMBUS);
-
return;
Cleanup:
if (gHvContext.synICMessagePage[cpu])
osd_PageFree(gHvContext.synICMessagePage[cpu], 1);
-
- DPRINT_EXIT(VMBUS);
return;
}
union hv_synic_siefp siefp;
int cpu = smp_processor_id();
- if (!gHvContext.SynICInitialized) {
- DPRINT_EXIT(VMBUS);
+ if (!gHvContext.SynICInitialized)
return;
- }
rdmsrl(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT, sharedSint.AsUINT64);
osd_PageFree(gHvContext.synICMessagePage[cpu], 1);
osd_PageFree(gHvContext.synICEventPage[cpu], 1);
-
- DPRINT_EXIT(VMBUS);
}
kfree(buf);
- DPRINT_EXIT(VMBUS);
-
if (execute_shutdown == true)
orderly_poweroff(false);
}
}
kfree(buf);
-
- DPRINT_EXIT(VMBUS);
}
/*
}
kfree(buf);
-
- DPRINT_EXIT(VMBUS);
}
static int __init init_hyperv_utils(void)
__func__, ## args);\
} while (0)
-#ifdef DEBUG
-#define DPRINT_EXIT(mod) do {\
- if ((mod & (HIWORD(vmbus_loglevel))) && \
- (DEBUG_LVL_ENTEREXIT <= LOWORD(vmbus_loglevel))) \
- printk(KERN_DEBUG "["#mod"]: %s() exit\n", __func__);\
- } while (0)
-#else
-#define DPRINT_EXIT(mod)
-#endif
-
#endif /* _LOGGING_H_ */
driver->OnSend = NetVscOnSend;
RndisFilterInit(driver);
-
- DPRINT_EXIT(NETVSC);
-
return 0;
}
if (!netDevice) {
DPRINT_ERR(NETVSC, "unable to get net device..."
"device being destroyed?");
- DPRINT_EXIT(NETVSC);
return -1;
}
/* ASSERT(netDevice->ReceiveBufferSize > 0); */
Exit:
PutNetDevice(Device);
- DPRINT_EXIT(NETVSC);
return ret;
}
if (!netDevice) {
DPRINT_ERR(NETVSC, "unable to get net device..."
"device being destroyed?");
- DPRINT_EXIT(NETVSC);
return -1;
}
if (netDevice->SendBufferSize <= 0) {
Exit:
PutNetDevice(Device);
- DPRINT_EXIT(NETVSC);
return ret;
}
if (ret != 0) {
DPRINT_ERR(NETVSC, "unable to send revoke receive "
"buffer to netvsp");
- DPRINT_EXIT(NETVSC);
return -1;
}
}
if (ret != 0) {
DPRINT_ERR(NETVSC,
"unable to teardown receive buffer's gpadl");
- DPRINT_EXIT(NETVSC);
return -1;
}
NetDevice->ReceiveBufferGpadlHandle = 0;
NetDevice->ReceiveSections = NULL;
}
- DPRINT_EXIT(NETVSC);
-
return ret;
}
if (ret != 0) {
DPRINT_ERR(NETVSC, "unable to send revoke send buffer "
"to netvsp");
- DPRINT_EXIT(NETVSC);
return -1;
}
}
if (ret != 0) {
DPRINT_ERR(NETVSC, "unable to teardown send buffer's "
"gpadl");
- DPRINT_EXIT(NETVSC);
return -1;
}
NetDevice->SendBufferGpadlHandle = 0;
NetDevice->SendBuffer = NULL;
}
- DPRINT_EXIT(NETVSC);
-
return ret;
}
if (!netDevice) {
DPRINT_ERR(NETVSC, "unable to get net device..."
"device being destroyed?");
- DPRINT_EXIT(NETVSC);
return -1;
}
Cleanup:
PutNetDevice(Device);
- DPRINT_EXIT(NETVSC);
return ret;
}
{
NetVscDestroyReceiveBuffer(NetDevice);
NetVscDestroySendBuffer(NetDevice);
-
- DPRINT_EXIT(NETVSC);
}
/*
DPRINT_INFO(NETVSC, "*** NetVSC channel handshake result - %d ***",
ret);
- DPRINT_EXIT(NETVSC);
return ret;
Close:
FreeNetDevice(netDevice);
}
- DPRINT_EXIT(NETVSC);
return ret;
}
kfree(netDevice->ChannelInitEvent);
FreeNetDevice(netDevice);
-
- DPRINT_EXIT(NETVSC);
return 0;
}
*/
static void NetVscOnCleanup(struct hv_driver *drv)
{
- DPRINT_EXIT(NETVSC);
}
static void NetVscOnSendCompletion(struct hv_device *Device,
if (!netDevice) {
DPRINT_ERR(NETVSC, "unable to get net device..."
"device being destroyed?");
- DPRINT_EXIT(NETVSC);
return;
}
}
PutNetDevice(Device);
- DPRINT_EXIT(NETVSC);
}
static int NetVscOnSend(struct hv_device *Device,
if (!netDevice) {
DPRINT_ERR(NETVSC, "net device (%p) shutting down..."
"ignoring outbound packets", netDevice);
- DPRINT_EXIT(NETVSC);
return -2;
}
atomic_inc(&netDevice->NumOutstandingSends);
PutNetDevice(Device);
-
- DPRINT_EXIT(NETVSC);
return ret;
}
if (!netDevice) {
DPRINT_ERR(NETVSC, "unable to get net device..."
"device being destroyed?");
- DPRINT_EXIT(NETVSC);
return;
}
/* ASSERT(list_empty(&listHead)); */
PutNetDevice(Device);
- DPRINT_EXIT(NETVSC);
}
static void NetVscSendReceiveCompletion(struct hv_device *Device,
if (!netDevice) {
DPRINT_ERR(NETVSC, "unable to get net device..."
"device being destroyed?");
- DPRINT_EXIT(NETVSC);
return;
}
NetVscSendReceiveCompletion(device, transactionId);
PutNetDevice(device);
- DPRINT_EXIT(NETVSC);
}
static void NetVscOnChannelCallback(void *Context)
if (!netDevice) {
DPRINT_ERR(NETVSC, "net device (%p) shutting down..."
"ignoring inbound packets", netDevice);
- DPRINT_EXIT(NETVSC);
goto out;
}
} while (1);
PutNetDevice(device);
- DPRINT_EXIT(NETVSC);
out:
kfree(buffer);
return;
DPRINT_ERR(NETVSC_DRV, "unable to open device...link is down.");
}
- DPRINT_EXIT(NETVSC_DRV);
return ret;
}
if (ret != 0)
DPRINT_ERR(NETVSC_DRV, "unable to close device (ret %d).", ret);
- DPRINT_EXIT(NETVSC_DRV);
-
return ret;
}
if ((net_device_ctx->avail += num_pages) >= PACKET_PAGES_HIWATER)
netif_wake_queue(net);
}
-
- DPRINT_EXIT(NETVSC_DRV);
}
static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
netvsc_xmit_completion(packet);
}
- DPRINT_EXIT(NETVSC_DRV);
return NETDEV_TX_OK;
}
netif_carrier_off(net);
netif_stop_queue(net);
}
- DPRINT_EXIT(NETVSC_DRV);
}
/*
DPRINT_DBG(NETVSC_DRV, "# of recvs %lu total size %lu",
net->stats.rx_packets, net->stats.rx_bytes);
- DPRINT_EXIT(NETVSC_DRV);
-
return 0;
}
free_netdev(net);
}
- DPRINT_EXIT(NETVSC_DRV);
return ret;
}
if (net == NULL) {
DPRINT_INFO(NETVSC, "no net device to remove");
- DPRINT_EXIT(NETVSC_DRV);
return 0;
}
- if (!net_drv_obj->Base.OnDeviceRemove) {
- DPRINT_EXIT(NETVSC_DRV);
+ if (!net_drv_obj->Base.OnDeviceRemove)
return -1;
- }
/* Stop outbound asap */
netif_stop_queue(net);
}
free_netdev(net);
- DPRINT_EXIT(NETVSC_DRV);
return ret;
}
vmbus_child_driver_unregister(drv_ctx);
- DPRINT_EXIT(NETVSC_DRV);
-
return;
}
/* The driver belongs to vmbus */
ret = vmbus_child_driver_register(drv_ctx);
- DPRINT_EXIT(NETVSC_DRV);
-
return ret;
}
static int __init netvsc_init(void)
{
- int ret;
-
DPRINT_INFO(NETVSC_DRV, "Netvsc initializing....");
if (!dmi_check_system(hv_netvsc_dmi_table))
return -ENODEV;
- ret = netvsc_drv_init(NetVscInitialize);
-
- DPRINT_EXIT(NETVSC_DRV);
-
- return ret;
+ return netvsc_drv_init(NetVscInitialize);
}
static void __exit netvsc_exit(void)
{
netvsc_drv_exit();
- DPRINT_EXIT(NETVSC_DRV);
}
static const struct pci_device_id __initconst
byteAvailToWrite);
spin_unlock_irqrestore(&OutRingInfo->ring_lock, flags);
-
- DPRINT_EXIT(VMBUS);
-
return -1;
}
/* DumpRingInfo(OutRingInfo, "AFTER "); */
spin_unlock_irqrestore(&OutRingInfo->ring_lock, flags);
-
- DPRINT_EXIT(VMBUS);
-
return 0;
}
packet->Completion.Send.SendCompletionTid = (unsigned long)Device;
ret = gRndisFilter.InnerDriver.OnSend(Device->NetDevice->Device, packet);
- DPRINT_EXIT(NETVSC);
return ret;
}
Response->Message.InitializeComplete.RequestId,
Response->NdisMessageType);
}
-
- DPRINT_EXIT(NETVSC);
}
static void RndisFilterReceiveIndicateStatus(struct rndis_device *Device,
gRndisFilter.InnerDriver.OnReceiveCallback(Device->NetDevice->Device,
Packet);
-
- DPRINT_EXIT(NETVSC);
}
static int RndisFilterOnReceive(struct hv_device *Device,
if (!netDevice->Extension) {
DPRINT_ERR(NETVSC, "got rndis message but no rndis device..."
"dropping this message!");
- DPRINT_EXIT(NETVSC);
return -1;
}
if (rndisDevice->State == RNDIS_DEV_UNINITIALIZED) {
DPRINT_ERR(NETVSC, "got rndis message but rndis device "
"uninitialized...dropping this message!");
- DPRINT_EXIT(NETVSC);
return -1;
}
"bytes got %u)...dropping this message!",
rndisHeader->MessageLength,
Packet->TotalDataBufferLength);
- DPRINT_EXIT(NETVSC);
return -1;
}
#endif
break;
}
- DPRINT_EXIT(NETVSC);
return 0;
}
Cleanup:
if (request)
PutRndisRequest(Device, request);
- DPRINT_EXIT(NETVSC);
return ret;
}
if (request)
PutRndisRequest(Device, request);
Exit:
- DPRINT_EXIT(NETVSC);
-
return ret;
}
/* Driver->QueryLinkStatus = RndisFilterQueryDeviceLinkStatus; */
Driver->OnReceiveCallback = RndisFilterOnReceive;
- DPRINT_EXIT(NETVSC);
-
return 0;
}
Cleanup:
if (request)
PutRndisRequest(Device, request);
- DPRINT_EXIT(NETVSC);
return ret;
}
Cleanup:
if (request)
PutRndisRequest(Device, request);
- DPRINT_EXIT(NETVSC);
return;
}
if (ret == 0)
Device->State = RNDIS_DEV_DATAINITIALIZED;
- DPRINT_EXIT(NETVSC);
return ret;
}
if (ret == 0)
Device->State = RNDIS_DEV_INITIALIZED;
- DPRINT_EXIT(NETVSC);
-
return ret;
}
struct netvsc_device_info *deviceInfo = AdditionalInfo;
rndisDevice = GetRndisDevice();
- if (!rndisDevice) {
- DPRINT_EXIT(NETVSC);
+ if (!rndisDevice)
return -1;
- }
DPRINT_DBG(NETVSC, "rndis device object allocated - %p", rndisDevice);
ret = gRndisFilter.InnerDriver.Base.OnDeviceAdd(Device, AdditionalInfo);
if (ret != 0) {
kfree(rndisDevice);
- DPRINT_EXIT(NETVSC);
return ret;
}
DPRINT_INFO(NETVSC, "Device 0x%p link state %s", rndisDevice,
((deviceInfo->LinkState) ? ("down") : ("up")));
- DPRINT_EXIT(NETVSC);
-
return ret;
}
/* Pass control to inner driver to remove the device */
gRndisFilter.InnerDriver.Base.OnDeviceRemove(Device);
- DPRINT_EXIT(NETVSC);
-
return 0;
}
static void RndisFilterOnCleanup(struct hv_driver *Driver)
{
- DPRINT_EXIT(NETVSC);
}
int RndisFilterOnOpen(struct hv_device *Device)
{
- int ret;
struct netvsc_device *netDevice = Device->Extension;
if (!netDevice)
return -EINVAL;
- ret = RndisFilterOpenDevice(netDevice->Extension);
-
- DPRINT_EXIT(NETVSC);
-
- return ret;
+ return RndisFilterOpenDevice(netDevice->Extension);
}
int RndisFilterOnClose(struct hv_device *Device)
{
- int ret;
struct netvsc_device *netDevice = Device->Extension;
if (!netDevice)
return -EINVAL;
- ret = RndisFilterCloseDevice(netDevice->Extension);
-
- DPRINT_EXIT(NETVSC);
-
- return ret;
+ return RndisFilterCloseDevice(netDevice->Extension);
}
static int RndisFilterOnSend(struct hv_device *Device,
filterPacket->CompletionContext;
}
- DPRINT_EXIT(NETVSC);
-
return ret;
}
/* Pass it back to the original handler */
filterPacket->OnCompletion(filterPacket->CompletionContext);
-
- DPRINT_EXIT(NETVSC);
}
static void RndisFilterOnSendRequestCompletion(void *Context)
{
/* Noop */
- DPRINT_EXIT(NETVSC);
}
if (!storDevice) {
DPRINT_ERR(STORVSC, "unable to get stor device..."
"device being destroyed?");
- DPRINT_EXIT(STORVSC);
return -1;
}
request->WaitEvent = NULL;
nomem:
PutStorDevice(Device);
-
- DPRINT_EXIT(STORVSC);
return ret;
}
if (!storDevice) {
DPRINT_ERR(STORVSC, "unable to get stor device..."
"device being destroyed?");
- DPRINT_EXIT(STORVSC);
return;
}
atomic_dec(&storDevice->NumOutstandingRequests);
PutStorDevice(Device);
-
- DPRINT_EXIT(STORVSC);
}
static void StorVscOnReceive(struct hv_device *Device,
if (!storDevice) {
DPRINT_ERR(STORVSC, "unable to get stor device..."
"device being destroyed?");
- DPRINT_EXIT(STORVSC);
return;
}
} while (1);
PutStorDevice(device);
-
- DPRINT_EXIT(STORVSC);
return;
}
storDevice->TargetId);
Cleanup:
- DPRINT_EXIT(STORVSC);
-
return ret;
}
Device->Driver->VmbusChannelInterface.Close(Device);
FreeStorDevice(storDevice);
-
- DPRINT_EXIT(STORVSC);
return 0;
}
if (!storDevice) {
DPRINT_ERR(STORVSC, "unable to get stor device..."
"device being destroyed?");
- DPRINT_EXIT(STORVSC);
return -1;
}
Cleanup:
PutStorDevice(Device);
- DPRINT_EXIT(STORVSC);
return ret;
}
if (!storDevice) {
DPRINT_ERR(STORVSC, "unable to get stor device..."
"device being destroyed?");
- DPRINT_EXIT(STORVSC);
return -2;
}
atomic_inc(&storDevice->NumOutstandingRequests);
PutStorDevice(Device);
-
- DPRINT_EXIT(STORVSC);
return ret;
}
*/
static void StorVscOnCleanup(struct hv_driver *Driver)
{
- DPRINT_EXIT(STORVSC);
}
/*
storDriver->OnIORequest = StorVscOnIORequest;
- DPRINT_EXIT(STORVSC);
-
return 0;
}
/* The driver belongs to vmbus */
ret = vmbus_child_driver_register(drv_ctx);
- DPRINT_EXIT(STORVSC_DRV);
-
return ret;
}
storvsc_drv_obj->Base.OnCleanup(&storvsc_drv_obj->Base);
vmbus_child_driver_unregister(drv_ctx);
-
- DPRINT_EXIT(STORVSC_DRV);
-
return;
}
if (!host_device_ctx->request_pool) {
scsi_host_put(host);
- DPRINT_EXIT(STORVSC_DRV);
-
return -ENOMEM;
}
DPRINT_ERR(STORVSC_DRV, "unable to add scsi vsc device");
kmem_cache_destroy(host_device_ctx->request_pool);
scsi_host_put(host);
- DPRINT_EXIT(STORVSC_DRV);
-
return -1;
}
kmem_cache_destroy(host_device_ctx->request_pool);
scsi_host_put(host);
- DPRINT_EXIT(STORVSC_DRV);
-
return -1;
}
scsi_scan_host(host);
-
- DPRINT_EXIT(STORVSC_DRV);
-
return ret;
}
(struct host_device_context *)host->hostdata;
- if (!storvsc_drv_obj->Base.OnDeviceRemove) {
- DPRINT_EXIT(STORVSC_DRV);
+ if (!storvsc_drv_obj->Base.OnDeviceRemove)
return -1;
- }
/*
* Call to the vsc driver to let it know that the device is being
DPRINT_INFO(STORVSC, "releasing host adapter (%p)...", host);
scsi_host_put(host);
-
- DPRINT_EXIT(STORVSC_DRV);
-
return ret;
}
scsi_done_fn(scmnd);
kmem_cache_free(host_device_ctx->request_pool, cmd_request);
-
- DPRINT_EXIT(STORVSC_DRV);
}
static int do_bounce_buffer(struct scatterlist *sgl, unsigned int sg_count)
ret = SCSI_MLQUEUE_DEVICE_BUSY;
}
- DPRINT_EXIT(STORVSC_DRV);
-
return ret;
}
/* Invokes the vsc to reset the host/bus */
ret = StorVscOnHostReset(&device_ctx->device_obj);
- if (ret != 0) {
- DPRINT_EXIT(STORVSC_DRV);
+ if (ret != 0)
return ret;
- }
DPRINT_INFO(STORVSC_DRV, "sdev (%p) dev obj (%p) - host reseted",
scmnd->device, &device_ctx->device_obj);
- DPRINT_EXIT(STORVSC_DRV);
-
return ret;
}
DPRINT_INFO(STORVSC_DRV, "Storvsc initializing....");
ret = storvsc_drv_init(StorVscInitialize);
- DPRINT_EXIT(STORVSC_DRV);
return ret;
}
static void VmbusGetChannelOffers(void)
{
VmbusChannelRequestOffers();
- DPRINT_EXIT(VMBUS);
}
/*
ret = VmbusConnect();
/* VmbusSendEvent(device->localPortId+1); */
- DPRINT_EXIT(VMBUS);
-
return ret;
}
VmbusChannelReleaseUnattachedChannels();
VmbusDisconnect();
on_each_cpu(HvSynicCleanup, NULL, 1);
- DPRINT_EXIT(VMBUS);
-
return ret;
}
/* struct vmbus_driver *driver = (struct vmbus_driver *)drv; */
HvCleanup();
- DPRINT_EXIT(VMBUS);
}
/*
ret |= 0x2;
}
- DPRINT_EXIT(VMBUS);
return ret;
}
ret);
gDriver = drv;
- DPRINT_EXIT(VMBUS);
-
return ret;
}
vmbus_drv_obj->GetChannelOffers();
cleanup:
- DPRINT_EXIT(VMBUS_DRV);
-
return ret;
}
tasklet_kill(&vmbus_drv_ctx->msg_dpc);
tasklet_kill(&vmbus_drv_ctx->event_dpc);
-
- DPRINT_EXIT(VMBUS_DRV);
-
- return;
}
vmbus_drv_obj->GetChannelOffers();
- DPRINT_EXIT(VMBUS_DRV);
-
return ret;
}
EXPORT_SYMBOL(vmbus_child_driver_register);
driver_unregister(&driver_ctx->driver);
driver_ctx->driver.bus = NULL;
-
- DPRINT_EXIT(VMBUS_DRV);
}
EXPORT_SYMBOL(vmbus_child_driver_unregister);
if (!child_device_ctx) {
DPRINT_ERR(VMBUS_DRV,
"unable to allocate device_context for child device");
- DPRINT_EXIT(VMBUS_DRV);
-
return NULL;
}
memcpy(&child_device_ctx->class_id, type, sizeof(struct hv_guid));
memcpy(&child_device_ctx->device_id, instance, sizeof(struct hv_guid));
- DPRINT_EXIT(VMBUS_DRV);
-
return child_device_obj;
}
DPRINT_INFO(VMBUS_DRV, "child device (%p) registered",
&child_device_ctx->device);
- DPRINT_EXIT(VMBUS_DRV);
-
return ret;
}
DPRINT_INFO(VMBUS_DRV, "child device (%p) unregistered",
&device_ctx->device);
-
- DPRINT_EXIT(VMBUS_DRV);
}
/*
*/
static void vmbus_child_device_destroy(struct hv_device *device_obj)
{
- DPRINT_EXIT(VMBUS_DRV);
}
/*
if (ret)
return ret;
- DPRINT_EXIT(VMBUS_DRV);
-
return 0;
}
match = 1;
}
-
- DPRINT_EXIT(VMBUS_DRV);
-
return match;
}
device_unregister(&device_ctx->device);
/* put_device(&device_ctx->device); */
- DPRINT_EXIT(VMBUS_DRV);
}
/*
child_device->driver->name);
ret = -1;
}
-
- DPRINT_EXIT(VMBUS_DRV);
return ret;
}
* No-op since it is statically defined and handle in
* vmbus_bus_exit()
*/
- DPRINT_EXIT(VMBUS_DRV);
return 0;
}
}
}
- DPRINT_EXIT(VMBUS_DRV);
-
return 0;
}
* No-op since it is statically defined and handle in
* vmbus_bus_exit()
*/
- DPRINT_EXIT(VMBUS_DRV);
return;
}
/* The device may not be attached yet */
- if (!child_device->driver) {
- DPRINT_EXIT(VMBUS_DRV);
+ if (!child_device->driver)
return;
- }
driver_ctx = driver_to_driver_context(child_device->driver);
if (driver_ctx->shutdown)
driver_ctx->shutdown(child_device);
- DPRINT_EXIT(VMBUS_DRV);
-
return;
}
* of a problem design, this MUST BE FIXED! */
dev_err(device, "%s needs to be fixed!\n", __func__);
WARN_ON(1);
- DPRINT_EXIT(VMBUS_DRV);
}
/*
kfree(device_ctx);
/* !!DO NOT REFERENCE device_ctx anymore at this point!! */
- DPRINT_EXIT(VMBUS_DRV);
-
- return;
}
/*
/* Call to bus driver to handle interrupt */
vmbus_drv_obj->OnMsgDpc(&vmbus_drv_obj->Base);
-
- DPRINT_EXIT(VMBUS_DRV);
}
/*
/* Call to bus driver to handle interrupt */
vmbus_drv_obj->OnEventDpc(&vmbus_drv_obj->Base);
-
- DPRINT_EXIT(VMBUS_DRV);
}
static irqreturn_t vmbus_isr(int irq, void *dev_id)
if (test_bit(1, (unsigned long *)&ret))
tasklet_schedule(&g_vmbus_drv.event_dpc);
- DPRINT_EXIT(VMBUS_DRV);
return IRQ_HANDLED;
} else {
- DPRINT_EXIT(VMBUS_DRV);
return IRQ_NONE;
}
}
static int __init vmbus_init(void)
{
- int ret = 0;
-
DPRINT_INFO(VMBUS_DRV,
"Vmbus initializing.... current log level 0x%x (%x,%x)",
vmbus_loglevel, HIWORD(vmbus_loglevel), LOWORD(vmbus_loglevel));
if (!dmi_check_system(microsoft_hv_dmi_table))
return -ENODEV;
- ret = vmbus_bus_init(VmbusInitialize);
-
- DPRINT_EXIT(VMBUS_DRV);
- return ret;
+ return vmbus_bus_init(VmbusInitialize);
}
static void __exit vmbus_exit(void)
{
vmbus_bus_exit();
/* Todo: it is used for loglevel, to be ported to new kernel. */
- DPRINT_EXIT(VMBUS_DRV);
- return;
}
/*