win-pvdrivers

changeset 882:5020c1c55f95

Windows 2000 doesn't have ScsiPortQuerySystemTime function
author James Harper <james.harper@bendigoit.com.au>
date Tue Mar 15 12:24:29 2011 +1100 (2011-03-15)
parents 730447ed7524
children 263f6a03163b
files xenvbd/xenvbd_scsiport.c xenvbd/xenvbd_scsiport.h
line diff
     1.1 --- a/xenvbd/xenvbd_scsiport.c	Tue Mar 15 12:23:44 2011 +1100
     1.2 +++ b/xenvbd/xenvbd_scsiport.c	Tue Mar 15 12:24:29 2011 +1100
     1.3 @@ -375,13 +375,13 @@ XenVbd_PutQueuedSrbsOnRing(PXENVBD_DEVIC
     1.4    PUCHAR ptr;
     1.5    int notify;
     1.6    int i;
     1.7 -  #if DBG
     1.8 +  #if DBG && NTDDI_VERSION >= NTDDI_WINXP
     1.9    LARGE_INTEGER current_time;
    1.10    #endif
    1.11  
    1.12    //FUNCTION_ENTER();
    1.13  
    1.14 -  #if DBG
    1.15 +  #if DBG && NTDDI_VERSION >= NTDDI_WINXP
    1.16    ScsiPortQuerySystemTime(&current_time);
    1.17    #endif
    1.18    
    1.19 @@ -541,7 +541,7 @@ XenVbd_PutQueuedSrbsOnRing(PXENVBD_DEVIC
    1.20      //KdPrint((__DRIVER_NAME "     nr_segments = %d\n", shadow->req.nr_segments));
    1.21  
    1.22      XenVbd_PutRequest(xvdd, &shadow->req);
    1.23 -    #if DBG
    1.24 +    #if DBG && NTDDI_VERSION >= NTDDI_WINXP
    1.25      shadow->ring_submit_time = current_time;
    1.26      #endif
    1.27  
    1.28 @@ -920,11 +920,10 @@ XenVbd_HwScsiInterrupt(PVOID DeviceExten
    1.29    ULONG suspend_resume_state_pdo;
    1.30    BOOLEAN last_interrupt = FALSE;
    1.31    ULONG start_ring_detect_state = xvdd->ring_detect_state;
    1.32 -  #if DBG
    1.33 +  #if DBG && NTDDI_VERSION >= NTDDI_WINXP
    1.34    srb_list_entry_t *srb_entry;
    1.35    ULONG elapsed;
    1.36    LARGE_INTEGER current_time;
    1.37 -  
    1.38    #endif
    1.39  
    1.40    /* in dump mode I think we get called on a timer, not by an actual IRQ */
    1.41 @@ -967,7 +966,7 @@ XenVbd_HwScsiInterrupt(PVOID DeviceExten
    1.42      return last_interrupt;
    1.43    }
    1.44  
    1.45 -  #if DBG
    1.46 +  #if DBG && NTDDI_VERSION >= NTDDI_WINXP
    1.47    ScsiPortQuerySystemTime(&current_time);
    1.48    #endif
    1.49  
    1.50 @@ -1031,7 +1030,7 @@ XenVbd_HwScsiInterrupt(PVOID DeviceExten
    1.51            ASSERT(srb != NULL);
    1.52            block_count = decode_cdb_length(srb);
    1.53            block_count *= xvdd->bytes_per_sector / 512;
    1.54 -          #if DBG
    1.55 +          #if DBG && NTDDI_VERSION >= NTDDI_WINXP
    1.56            srb_entry = srb->SrbExtension;
    1.57            elapsed = (ULONG)((current_time.QuadPart - shadow->ring_submit_time.QuadPart) / 10000L);
    1.58            if (elapsed > 5000)
     2.1 --- a/xenvbd/xenvbd_scsiport.h	Tue Mar 15 12:23:44 2011 +1100
     2.2 +++ b/xenvbd/xenvbd_scsiport.h	Tue Mar 15 12:24:29 2011 +1100
     2.3 @@ -89,7 +89,7 @@ typedef struct {
     2.4    PSCSI_REQUEST_BLOCK srb;
     2.5    BOOLEAN aligned_buffer_in_use;
     2.6    BOOLEAN reset;
     2.7 -  #if DBG
     2.8 +  #if DBG && NTDDI_VERSION >= NTDDI_WINXP
     2.9    LARGE_INTEGER ring_submit_time;
    2.10    #endif
    2.11  } blkif_shadow_t;