win-pvdrivers

changeset 773:aa428237f288

Fix bug in network tx when the sg element spans pages
author James Harper <james.harper@bendigoit.com.au>
date Mon Feb 01 19:31:47 2010 +1100 (2010-02-01)
parents 47876d124c24
children a3f0201d7fa0
files xennet/xennet_tx.c
line diff
     1.1 --- a/xennet/xennet_tx.c	Mon Feb 01 12:17:02 2010 +1100
     1.2 +++ b/xennet/xennet_tx.c	Mon Feb 01 19:31:47 2010 +1100
     1.3 @@ -322,7 +322,7 @@ XenNet_HWSendPacket(struct xennet_info *
     1.4        xi->tx_ring_free--;
     1.5        txN->id = get_id_from_freelist(xi);
     1.6        txN->gref = xi->vectors.GntTbl_GrantAccess(xi->vectors.context, 0,
     1.7 -        (ULONG)(sg->Elements[sg_element].Address.QuadPart >> PAGE_SHIFT), FALSE, INVALID_GRANT_REF);
     1.8 +        (ULONG)((sg->Elements[sg_element].Address.QuadPart + sg_offset) >> PAGE_SHIFT), FALSE, INVALID_GRANT_REF);
     1.9        ASSERT(txN->gref != INVALID_GRANT_REF);
    1.10        ASSERT(xi->tx_shadows[txN->id].gref == INVALID_GRANT_REF);
    1.11        xi->tx_shadows[txN->id].gref = txN->gref;