Inplace I/O: prevent pairing with already paired fmmus
authorMartin Troxler <ch1010277@ch10pc446>
Mon, 18 Oct 2010 10:30:57 +0200
changeset 1994 b369f3f92eb8
parent 1993 78229bd38928
child 1995 7d748d9cf9e8
Inplace I/O: prevent pairing with already paired fmmus
master/slave_config.c
--- a/master/slave_config.c	Fri Jul 23 17:06:12 2010 +0200
+++ b/master/slave_config.c	Mon Oct 18 10:30:57 2010 +0200
@@ -188,7 +188,9 @@
     tx_size = fmmu->data_size;
     if (sc->allow_overlapping_pdos && sc->used_fmmus > 0) {
         prev_fmmu = &sc->fmmu_configs[sc->used_fmmus-1];
-        if (fmmu->dir != prev_fmmu->dir) {
+        if (fmmu->dir != prev_fmmu->dir && prev_fmmu->tx_size != 0) {
+            // prev fmmu has opposite direction
+            // and is not already paired with prev-prev fmmu
             prev_fmmu->tx_size = max(fmmu->data_size,prev_fmmu->data_size);
             tx_size = 0;
             fmmu_logical_start_address = prev_fmmu->logical_start_address;