win-pvdrivers

changeset 1065:00d29add6a2a

Tidy up xennet. Remove KdPrint calls.
author James Harper <james.harper@bendigoit.com.au>
date Thu Oct 03 18:12:10 2013 +1000 (2013-10-03)
parents 1d6eae98e552
children 24fae56a87bf
files xennet/xennet_common.c xennet/xennet_tx.c
line diff
     1.1 --- a/xennet/xennet_common.c	Thu Oct 03 18:11:30 2013 +1000
     1.2 +++ b/xennet/xennet_common.c	Thu Oct 03 18:12:10 2013 +1000
     1.3 @@ -156,7 +156,7 @@ XenNet_ParsePacketHeader(packet_info_t *
     1.4      //KdPrint((__DRIVER_NAME "     IP\n"));
     1.5      if (pi->header_length < (ULONG)(XN_HDR_SIZE + 20)) {
     1.6        if (!XenNet_BuildHeader(pi, NULL, (ULONG)(XN_HDR_SIZE + 20))) {
     1.7 -        KdPrint((__DRIVER_NAME "     packet too small (IP Header)\n"));
     1.8 +        FUNCTION_MSG("packet too small (IP Header)\n");
     1.9          pi->parse_result = PARSE_TOO_SMALL;
    1.10          return;
    1.11        }
     2.1 --- a/xennet/xennet_tx.c	Thu Oct 03 18:11:30 2013 +1000
     2.2 +++ b/xennet/xennet_tx.c	Thu Oct 03 18:12:10 2013 +1000
     2.3 @@ -191,7 +191,7 @@ XenNet_HWSendPacket(struct xennet_info *
     2.4        flags |= NETTXF_csum_blank | NETTXF_data_validated;
     2.5      }
     2.6    } else if (csum_info.Transmit.IsIPv6) {
     2.7 -    KdPrint((__DRIVER_NAME "     Transmit.IsIPv6 not supported\n"));
     2.8 +    FUNCTION_MSG("Transmit.IsIPv6 not supported\n");
     2.9    }
    2.10    #endif
    2.11    
    2.12 @@ -273,13 +273,13 @@ XenNet_HWSendPacket(struct xennet_info *
    2.13        if (!coalesce_buf) {
    2.14          gref = XnAllocateGrant(xi->handle, (ULONG)'XNTX');
    2.15          if (gref == INVALID_GRANT_REF) {
    2.16 -          KdPrint((__DRIVER_NAME "     out of grefs - partial send\n"));
    2.17 +          FUNCTION_MSG("out of grefs - partial send\n");
    2.18            break;
    2.19          }
    2.20          coalesce_buf = NdisAllocateFromNPagedLookasideList(&xi->tx_lookaside_list);
    2.21          if (!coalesce_buf) {
    2.22            XnFreeGrant(xi->handle, gref, (ULONG)'XNTX');
    2.23 -          KdPrint((__DRIVER_NAME "     out of memory - partial send\n"));
    2.24 +          FUNCTION_MSG("out of memory - partial send\n");
    2.25            break;
    2.26          }
    2.27          coalesce_remaining = min(PAGE_SIZE, remaining);
    2.28 @@ -287,7 +287,7 @@ XenNet_HWSendPacket(struct xennet_info *
    2.29        length = XenNet_QueryData(&pi, coalesce_remaining);
    2.30        va = NdisBufferVirtualAddressSafe(pi.curr_mdl, LowPagePriority);
    2.31        if (!va) {
    2.32 -        KdPrint((__DRIVER_NAME "     failed to map buffer va - partial send\n"));
    2.33 +        FUNCTION_MSG("failed to map buffer va - partial send\n");
    2.34          coalesce_remaining = 0;
    2.35          remaining -= min(PAGE_SIZE, remaining);
    2.36          NdisFreeToNPagedLookasideList(&xi->tx_lookaside_list, coalesce_buf);
    2.37 @@ -316,7 +316,7 @@ XenNet_HWSendPacket(struct xennet_info *
    2.38        
    2.39        gref = XnAllocateGrant(xi->handle, (ULONG)'XNTX');
    2.40        if (gref == INVALID_GRANT_REF) {
    2.41 -        KdPrint((__DRIVER_NAME "     out of grefs - partial send\n"));
    2.42 +        FUNCTION_MSG("out of grefs - partial send\n");
    2.43          break;
    2.44        }
    2.45        txN = RING_GET_REQUEST(&xi->tx_ring, xi->tx_ring.req_prod_pvt);
    2.46 @@ -684,7 +684,7 @@ XenNet_TxShutdown(xennet_info_t *xi) {
    2.47  
    2.48    while (xi->tx_outstanding) {
    2.49      KeReleaseSpinLock(&xi->tx_lock, old_irql);
    2.50 -    KdPrint((__DRIVER_NAME "     Waiting for %d remaining packets to be sent\n", xi->tx_outstanding));
    2.51 +    FUNCTION_MSG("Waiting for %d remaining packets to be sent\n", xi->tx_outstanding);
    2.52      timeout.QuadPart = -1 * 1 * 1000 * 1000 * 10; /* 1 second */
    2.53      KeWaitForSingleObject(&xi->tx_idle_event, Executive, KernelMode, FALSE, &timeout);
    2.54      KeAcquireSpinLock(&xi->tx_lock, &old_irql);