]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/hv/netvsc.c
Merge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[karo-tx-linux.git] / drivers / staging / hv / netvsc.c
index ba15059c45b2c46313e1b22a517834f7c460ff44..1d2ebbe17e2cb8d1e917f8fe28a6b51de0d7236e 100644 (file)
@@ -174,8 +174,6 @@ int NetVscInitialize(struct hv_driver *drv)
 {
        struct netvsc_driver *driver = (struct netvsc_driver *)drv;
 
-       DPRINT_ENTER(NETVSC);
-
        DPRINT_DBG(NETVSC, "sizeof(struct hv_netvsc_packet)=%zd, "
                   "sizeof(struct nvsp_message)=%zd, "
                   "sizeof(struct vmtransfer_page_packet_header)=%zd",
@@ -202,9 +200,6 @@ int NetVscInitialize(struct hv_driver *drv)
        driver->OnSend                  = NetVscOnSend;
 
        RndisFilterInit(driver);
-
-       DPRINT_EXIT(NETVSC);
-
        return 0;
 }
 
@@ -214,13 +209,10 @@ static int NetVscInitializeReceiveBufferWithNetVsp(struct hv_device *Device)
        struct netvsc_device *netDevice;
        struct nvsp_message *initPacket;
 
-       DPRINT_ENTER(NETVSC);
-
        netDevice = GetOutboundNetDevice(Device);
        if (!netDevice) {
                DPRINT_ERR(NETVSC, "unable to get net device..."
                           "device being destroyed?");
-               DPRINT_EXIT(NETVSC);
                return -1;
        }
        /* ASSERT(netDevice->ReceiveBufferSize > 0); */
@@ -335,7 +327,6 @@ Cleanup:
 
 Exit:
        PutNetDevice(Device);
-       DPRINT_EXIT(NETVSC);
        return ret;
 }
 
@@ -345,13 +336,10 @@ static int NetVscInitializeSendBufferWithNetVsp(struct hv_device *Device)
        struct netvsc_device *netDevice;
        struct nvsp_message *initPacket;
 
-       DPRINT_ENTER(NETVSC);
-
        netDevice = GetOutboundNetDevice(Device);
        if (!netDevice) {
                DPRINT_ERR(NETVSC, "unable to get net device..."
                           "device being destroyed?");
-               DPRINT_EXIT(NETVSC);
                return -1;
        }
        if (netDevice->SendBufferSize <= 0) {
@@ -434,7 +422,6 @@ Cleanup:
 
 Exit:
        PutNetDevice(Device);
-       DPRINT_EXIT(NETVSC);
        return ret;
 }
 
@@ -443,8 +430,6 @@ static int NetVscDestroyReceiveBuffer(struct netvsc_device *NetDevice)
        struct nvsp_message *revokePacket;
        int ret = 0;
 
-       DPRINT_ENTER(NETVSC);
-
        /*
         * If we got a section count, it means we received a
         * SendReceiveBufferComplete msg (ie sent
@@ -475,7 +460,6 @@ static int NetVscDestroyReceiveBuffer(struct netvsc_device *NetDevice)
                if (ret != 0) {
                        DPRINT_ERR(NETVSC, "unable to send revoke receive "
                                   "buffer to netvsp");
-                       DPRINT_EXIT(NETVSC);
                        return -1;
                }
        }
@@ -492,7 +476,6 @@ static int NetVscDestroyReceiveBuffer(struct netvsc_device *NetDevice)
                if (ret != 0) {
                        DPRINT_ERR(NETVSC,
                                   "unable to teardown receive buffer's gpadl");
-                       DPRINT_EXIT(NETVSC);
                        return -1;
                }
                NetDevice->ReceiveBufferGpadlHandle = 0;
@@ -513,8 +496,6 @@ static int NetVscDestroyReceiveBuffer(struct netvsc_device *NetDevice)
                NetDevice->ReceiveSections = NULL;
        }
 
-       DPRINT_EXIT(NETVSC);
-
        return ret;
 }
 
@@ -523,8 +504,6 @@ static int NetVscDestroySendBuffer(struct netvsc_device *NetDevice)
        struct nvsp_message *revokePacket;
        int ret = 0;
 
-       DPRINT_ENTER(NETVSC);
-
        /*
         * If we got a section count, it means we received a
         *  SendReceiveBufferComplete msg (ie sent
@@ -554,7 +533,6 @@ static int NetVscDestroySendBuffer(struct netvsc_device *NetDevice)
                if (ret != 0) {
                        DPRINT_ERR(NETVSC, "unable to send revoke send buffer "
                                   "to netvsp");
-                       DPRINT_EXIT(NETVSC);
                        return -1;
                }
        }
@@ -572,7 +550,6 @@ static int NetVscDestroySendBuffer(struct netvsc_device *NetDevice)
                if (ret != 0) {
                        DPRINT_ERR(NETVSC, "unable to teardown send buffer's "
                                   "gpadl");
-                       DPRINT_EXIT(NETVSC);
                        return -1;
                }
                NetDevice->SendBufferGpadlHandle = 0;
@@ -587,8 +564,6 @@ static int NetVscDestroySendBuffer(struct netvsc_device *NetDevice)
                NetDevice->SendBuffer = NULL;
        }
 
-       DPRINT_EXIT(NETVSC);
-
        return ret;
 }
 
@@ -600,13 +575,10 @@ static int NetVscConnectToVsp(struct hv_device *Device)
        struct nvsp_message *initPacket;
        int ndisVersion;
 
-       DPRINT_ENTER(NETVSC);
-
        netDevice = GetOutboundNetDevice(Device);
        if (!netDevice) {
                DPRINT_ERR(NETVSC, "unable to get net device..."
                           "device being destroyed?");
-               DPRINT_EXIT(NETVSC);
                return -1;
        }
 
@@ -696,18 +668,13 @@ static int NetVscConnectToVsp(struct hv_device *Device)
 
 Cleanup:
        PutNetDevice(Device);
-       DPRINT_EXIT(NETVSC);
        return ret;
 }
 
 static void NetVscDisconnectFromVsp(struct netvsc_device *NetDevice)
 {
-       DPRINT_ENTER(NETVSC);
-
        NetVscDestroyReceiveBuffer(NetDevice);
        NetVscDestroySendBuffer(NetDevice);
-
-       DPRINT_EXIT(NETVSC);
 }
 
 /*
@@ -722,8 +689,6 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
        struct netvsc_driver *netDriver =
                                (struct netvsc_driver *)Device->Driver;
 
-       DPRINT_ENTER(NETVSC);
-
        netDevice = AllocNetDevice(Device);
        if (!netDevice) {
                ret = -1;
@@ -787,7 +752,6 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
        DPRINT_INFO(NETVSC, "*** NetVSC channel handshake result - %d ***",
                    ret);
 
-       DPRINT_EXIT(NETVSC);
        return ret;
 
 Close:
@@ -812,7 +776,6 @@ Cleanup:
                FreeNetDevice(netDevice);
        }
 
-       DPRINT_EXIT(NETVSC);
        return ret;
 }
 
@@ -824,8 +787,6 @@ static int NetVscOnDeviceRemove(struct hv_device *Device)
        struct netvsc_device *netDevice;
        struct hv_netvsc_packet *netvscPacket, *pos;
 
-       DPRINT_ENTER(NETVSC);
-
        DPRINT_INFO(NETVSC, "Disabling outbound traffic on net device (%p)...",
                    Device->Extension);
 
@@ -868,8 +829,6 @@ static int NetVscOnDeviceRemove(struct hv_device *Device)
 
        kfree(netDevice->ChannelInitEvent);
        FreeNetDevice(netDevice);
-
-       DPRINT_EXIT(NETVSC);
        return 0;
 }
 
@@ -878,8 +837,6 @@ static int NetVscOnDeviceRemove(struct hv_device *Device)
  */
 static void NetVscOnCleanup(struct hv_driver *drv)
 {
-       DPRINT_ENTER(NETVSC);
-       DPRINT_EXIT(NETVSC);
 }
 
 static void NetVscOnSendCompletion(struct hv_device *Device,
@@ -889,13 +846,10 @@ static void NetVscOnSendCompletion(struct hv_device *Device,
        struct nvsp_message *nvspPacket;
        struct hv_netvsc_packet *nvscPacket;
 
-       DPRINT_ENTER(NETVSC);
-
        netDevice = GetInboundNetDevice(Device);
        if (!netDevice) {
                DPRINT_ERR(NETVSC, "unable to get net device..."
                           "device being destroyed?");
-               DPRINT_EXIT(NETVSC);
                return;
        }
 
@@ -929,7 +883,6 @@ static void NetVscOnSendCompletion(struct hv_device *Device,
        }
 
        PutNetDevice(Device);
-       DPRINT_EXIT(NETVSC);
 }
 
 static int NetVscOnSend(struct hv_device *Device,
@@ -940,13 +893,10 @@ static int NetVscOnSend(struct hv_device *Device,
 
        struct nvsp_message sendMessage;
 
-       DPRINT_ENTER(NETVSC);
-
        netDevice = GetOutboundNetDevice(Device);
        if (!netDevice) {
                DPRINT_ERR(NETVSC, "net device (%p) shutting down..."
                           "ignoring outbound packets", netDevice);
-               DPRINT_EXIT(NETVSC);
                return -2;
        }
 
@@ -986,8 +936,6 @@ static int NetVscOnSend(struct hv_device *Device,
 
        atomic_inc(&netDevice->NumOutstandingSends);
        PutNetDevice(Device);
-
-       DPRINT_EXIT(NETVSC);
        return ret;
 }
 
@@ -1007,13 +955,10 @@ static void NetVscOnReceive(struct hv_device *Device,
        unsigned long flags;
        LIST_HEAD(listHead);
 
-       DPRINT_ENTER(NETVSC);
-
        netDevice = GetInboundNetDevice(Device);
        if (!netDevice) {
                DPRINT_ERR(NETVSC, "unable to get net device..."
                           "device being destroyed?");
-               DPRINT_EXIT(NETVSC);
                return;
        }
 
@@ -1189,7 +1134,6 @@ static void NetVscOnReceive(struct hv_device *Device,
        /* ASSERT(list_empty(&listHead)); */
 
        PutNetDevice(Device);
-       DPRINT_EXIT(NETVSC);
 }
 
 static void NetVscSendReceiveCompletion(struct hv_device *Device,
@@ -1248,8 +1192,6 @@ static void NetVscOnReceiveCompletion(void *Context)
        bool fSendReceiveComp = false;
        unsigned long flags;
 
-       DPRINT_ENTER(NETVSC);
-
        /* ASSERT(packet->XferPagePacket); */
 
        /*
@@ -1261,7 +1203,6 @@ static void NetVscOnReceiveCompletion(void *Context)
        if (!netDevice) {
                DPRINT_ERR(NETVSC, "unable to get net device..."
                           "device being destroyed?");
-               DPRINT_EXIT(NETVSC);
                return;
        }
 
@@ -1292,7 +1233,6 @@ static void NetVscOnReceiveCompletion(void *Context)
                NetVscSendReceiveCompletion(device, transactionId);
 
        PutNetDevice(device);
-       DPRINT_EXIT(NETVSC);
 }
 
 static void NetVscOnChannelCallback(void *Context)
@@ -1307,9 +1247,6 @@ static void NetVscOnChannelCallback(void *Context)
        unsigned char *buffer;
        int bufferlen = NETVSC_PACKET_SIZE;
 
-
-       DPRINT_ENTER(NETVSC);
-
        /* ASSERT(device); */
 
        packet = kzalloc(NETVSC_PACKET_SIZE * sizeof(unsigned char),
@@ -1322,7 +1259,6 @@ static void NetVscOnChannelCallback(void *Context)
        if (!netDevice) {
                DPRINT_ERR(NETVSC, "net device (%p) shutting down..."
                           "ignoring inbound packets", netDevice);
-               DPRINT_EXIT(NETVSC);
                goto out;
        }
 
@@ -1386,7 +1322,6 @@ static void NetVscOnChannelCallback(void *Context)
        } while (1);
 
        PutNetDevice(device);
-       DPRINT_EXIT(NETVSC);
 out:
        kfree(buffer);
        return;