diff options
Diffstat (limited to 'drivers/staging/hv/netvsc_drv.c')
-rw-r--r-- | drivers/staging/hv/netvsc_drv.c | 51 |
1 files changed, 2 insertions, 49 deletions
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 55b9932..56e1157 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -76,8 +76,6 @@ static int netvsc_open(struct net_device *net) struct hv_device *device_obj = &net_device_ctx->device_ctx->device_obj; int ret = 0; - DPRINT_ENTER(NETVSC_DRV); - if (netif_carrier_ok(net)) { /* Open up the device */ ret = RndisFilterOnOpen(device_obj); @@ -92,7 +90,6 @@ static int netvsc_open(struct net_device *net) DPRINT_ERR(NETVSC_DRV, "unable to open device...link is down."); } - DPRINT_EXIT(NETVSC_DRV); return ret; } @@ -102,16 +99,12 @@ static int netvsc_close(struct net_device *net) struct hv_device *device_obj = &net_device_ctx->device_ctx->device_obj; int ret; - DPRINT_ENTER(NETVSC_DRV); - netif_stop_queue(net); ret = RndisFilterOnClose(device_obj); if (ret != 0) DPRINT_ERR(NETVSC_DRV, "unable to close device (ret %d).", ret); - DPRINT_EXIT(NETVSC_DRV); - return ret; } @@ -121,8 +114,6 @@ static void netvsc_xmit_completion(void *context) struct sk_buff *skb = (struct sk_buff *) (unsigned long)packet->Completion.Send.SendCompletionTid; - DPRINT_ENTER(NETVSC_DRV); - kfree(packet); if (skb) { @@ -135,8 +126,6 @@ static void netvsc_xmit_completion(void *context) 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) @@ -151,8 +140,6 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) int ret; unsigned int i, num_pages; - DPRINT_ENTER(NETVSC_DRV); - DPRINT_DBG(NETVSC_DRV, "xmit packet - len %d data_len %d", skb->len, skb->data_len); @@ -225,7 +212,6 @@ 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; } @@ -238,8 +224,6 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj, struct vm_device *device_ctx = to_vm_device(device_obj); struct net_device *net = dev_get_drvdata(&device_ctx->device); - DPRINT_ENTER(NETVSC_DRV); - if (!net) { DPRINT_ERR(NETVSC_DRV, "got link status but net device " "not initialized yet"); @@ -253,7 +237,6 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj, netif_carrier_off(net); netif_stop_queue(net); } - DPRINT_EXIT(NETVSC_DRV); } /* @@ -270,8 +253,6 @@ static int netvsc_recv_callback(struct hv_device *device_obj, int i; unsigned long flags; - DPRINT_ENTER(NETVSC_DRV); - if (!net) { DPRINT_ERR(NETVSC_DRV, "got receive callback but net device " "not initialized yet"); @@ -323,8 +304,6 @@ static int netvsc_recv_callback(struct hv_device *device_obj, DPRINT_DBG(NETVSC_DRV, "# of recvs %lu total size %lu", net->stats.rx_packets, net->stats.rx_bytes); - DPRINT_EXIT(NETVSC_DRV); - return 0; } @@ -364,8 +343,6 @@ static int netvsc_probe(struct device *device) struct netvsc_device_info device_info; int ret; - DPRINT_ENTER(NETVSC_DRV); - if (!net_drv_obj->Base.OnDeviceAdd) return -1; @@ -422,7 +399,6 @@ static int netvsc_probe(struct device *device) free_netdev(net); } - DPRINT_EXIT(NETVSC_DRV); return ret; } @@ -438,18 +414,13 @@ static int netvsc_remove(struct device *device) struct hv_device *device_obj = &device_ctx->device_obj; int ret; - DPRINT_ENTER(NETVSC_DRV); - 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); @@ -468,7 +439,6 @@ static int netvsc_remove(struct device *device) } free_netdev(net); - DPRINT_EXIT(NETVSC_DRV); return ret; } @@ -488,8 +458,6 @@ static void netvsc_drv_exit(void) struct device *current_dev; int ret; - DPRINT_ENTER(NETVSC_DRV); - while (1) { current_dev = NULL; @@ -515,8 +483,6 @@ static void netvsc_drv_exit(void) vmbus_child_driver_unregister(drv_ctx); - DPRINT_EXIT(NETVSC_DRV); - return; } @@ -526,8 +492,6 @@ static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) struct driver_context *drv_ctx = &g_netvsc_drv.drv_ctx; int ret; - DPRINT_ENTER(NETVSC_DRV); - vmbus_get_interface(&net_drv_obj->Base.VmbusChannelInterface); net_drv_obj->RingBufferSize = ring_size * PAGE_SIZE; @@ -547,8 +511,6 @@ static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) /* The driver belongs to vmbus */ ret = vmbus_child_driver_register(drv_ctx); - DPRINT_EXIT(NETVSC_DRV); - return ret; } @@ -568,26 +530,17 @@ MODULE_DEVICE_TABLE(dmi, hv_netvsc_dmi_table); static int __init netvsc_init(void) { - int ret; - - DPRINT_ENTER(NETVSC_DRV); 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) { - DPRINT_ENTER(NETVSC_DRV); netvsc_drv_exit(); - DPRINT_EXIT(NETVSC_DRV); } static const struct pci_device_id __initconst |