Pārlūkot izejas kodu

Update update address to work with single buffer

Matthias Vogelgesang 8 gadi atpakaļ
vecāks
revīzija
98ffc8fb4f
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      ddrio.c

+ 4 - 0
ddrio.c

@@ -269,6 +269,8 @@ read_from_ddr (pcilib_t *pci, volatile void *bar, Options *opts)
     desc[flag_index] = 0;
 
     while (size >= mem_size) {
+        desc[flag_index] = 0;
+
         /* set write addr */
         WR64 (HF_REG_DESCRIPTOR_ADDRESS, bus_addr_data);
 
@@ -291,6 +293,8 @@ read_from_ddr (pcilib_t *pci, volatile void *bar, Options *opts)
     memset (data, 0xf0, mem_size);
 
     if (size > 0) {
+        desc[flag_index] = 0;
+
         if (opts->verbose)
             printf ("Read remaining %zu bytes\n", size);