win-pvdrivers

diff xenpci/xenpci_pdo.c @ 976:941699790045

Handle backend-id purely in xenpci_pdo. Remove domid parameter from fdo calls.
author James Harper <james.harper@bendigoit.com.au>
date Sun Apr 15 15:34:10 2012 +1000 (2012-04-15)
parents ef1f25e2c281
children e9011a1ba5bb a5d1d333e0e2
line diff
     1.1 --- a/xenpci/xenpci_pdo.c	Sun Apr 15 15:13:54 2012 +1000
     1.2 +++ b/xenpci/xenpci_pdo.c	Sun Apr 15 15:34:10 2012 +1000
     1.3 @@ -203,7 +203,7 @@ XenPci_GetBackendAndAddWatch(WDFDEVICE d
     1.4      XenPci_FreeMem(res);
     1.5      return STATUS_UNSUCCESSFUL;
     1.6    }
     1.7 -  xppdd->backend_id = atoi(value);
     1.8 +  xppdd->backend_id = (domid_t)atoi(value);
     1.9    XenPci_FreeMem(value);
    1.10  
    1.11    /* Add watch on backend state */
    1.12 @@ -354,13 +354,13 @@ XenPci_EvtChn_Sync(PVOID context, PXEN_E
    1.13  }
    1.14  
    1.15  static grant_ref_t
    1.16 -XenPci_GntTbl_GrantAccess(PVOID context, domid_t domid, uint32_t frame, int readonly, grant_ref_t ref, ULONG tag)
    1.17 +XenPci_GntTbl_GrantAccess(PVOID context, uint32_t frame, int readonly, grant_ref_t ref, ULONG tag)
    1.18  {
    1.19    WDFDEVICE device = context;
    1.20    PXENPCI_PDO_DEVICE_DATA xppdd = GetXppdd(device);
    1.21    PXENPCI_DEVICE_DATA xpdd = GetXpdd(xppdd->wdf_device_bus_fdo);
    1.22    
    1.23 -  return GntTbl_GrantAccess(xpdd, domid, frame, readonly, ref, tag);
    1.24 +  return GntTbl_GrantAccess(xpdd, xppdd->backend_id, frame, readonly, ref, tag);
    1.25  }
    1.26  
    1.27  static BOOLEAN