win-pvdrivers

changeset 587:cfe35004c0f7

Zero the ring before doing bit-width detection.
author James Harper <james.harper@bendigoit.com.au>
date Tue Jun 09 12:01:23 2009 +1000 (2009-06-09)
parents bdb2d6b163f3
children 1d2e51af8e46
files xenvbd/xenvbd.c
line diff
     1.1 --- a/xenvbd/xenvbd.c	Sun Jun 07 20:31:20 2009 +1000
     1.2 +++ b/xenvbd/xenvbd.c	Tue Jun 09 12:01:23 2009 +1000
     1.3 @@ -516,7 +516,7 @@ XenVbd_HwScsiFindAdapter(PVOID DeviceExt
     1.4    }
     1.5    else
     1.6    {
     1.7 -    ConfigInfo->Master = TRUE; //FALSE;
     1.8 +    ConfigInfo->Master = TRUE;
     1.9      ConfigInfo->Dma32BitAddresses = TRUE;
    1.10      KdPrint((__DRIVER_NAME "     Dma64BitAddresses not supported\n"));
    1.11    }
    1.12 @@ -530,31 +530,15 @@ static VOID
    1.13  XenVbd_StartRingDetection(PXENVBD_DEVICE_DATA xvdd)
    1.14  {
    1.15    blkif_request_t *req;
    1.16 -  int i;
    1.17    int notify;
    1.18  
    1.19    xvdd->ring_detect_state = RING_DETECT_STATE_DETECT1;
    1.20 -  
    1.21 +  RtlZeroMemory(xvdd->sring->ring, PAGE_SIZE);
    1.22    req = RING_GET_REQUEST(&xvdd->ring, xvdd->ring.req_prod_pvt);
    1.23    req->operation = 0xff;
    1.24 -  req->nr_segments = 0;
    1.25 -  for (i = 0; i < BLKIF_MAX_SEGMENTS_PER_REQUEST; i++)
    1.26 -  {
    1.27 -    req->seg[i].gref = 0; //0xffffffff;
    1.28 -    req->seg[i].first_sect = 0; //0xff;
    1.29 -    req->seg[i].last_sect = 0; //0xff;
    1.30 -  }
    1.31    xvdd->ring.req_prod_pvt++;
    1.32 -
    1.33    req = RING_GET_REQUEST(&xvdd->ring, xvdd->ring.req_prod_pvt);
    1.34    req->operation = 0xff;
    1.35 -  req->nr_segments = 0;
    1.36 -  for (i = 0; i < BLKIF_MAX_SEGMENTS_PER_REQUEST; i++)
    1.37 -  {
    1.38 -    req->seg[i].gref = 0; //0xffffffff;
    1.39 -    req->seg[i].first_sect = 0; //0xff;
    1.40 -    req->seg[i].last_sect = 0; //0xff;
    1.41 -  }
    1.42    xvdd->ring.req_prod_pvt++;
    1.43  
    1.44    RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&xvdd->ring, notify);