From 7ac2c7b30a36807b590aa23f2c5ee70158dbf980 Mon Sep 17 00:00:00 2001
From: "Wesley W. Terpstra" <w.terpstra@gsi.de>
Date: Mon, 4 Jun 2012 13:02:13 +0200
Subject: [PATCH] Fixed a bug which caused the cycle line not to drop.

---
 driver/pcie_wb.c  | 3 +++
 driver/wishbone.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/driver/pcie_wb.c b/driver/pcie_wb.c
index 206299d..ea15cf4 100644
--- a/driver/pcie_wb.c
+++ b/driver/pcie_wb.c
@@ -39,6 +39,9 @@ static void wb_cycle(struct wishbone* wb, int on)
 	
 	if (on) mutex_lock(&dev->mutex);
 	
+	if (unlikely(debug))
+		printk(KERN_ALERT PCIE_WB ": cycle(%d)\n", on);
+	
 	iowrite32(on?0x80000000UL:0, control + CONTROL_REGISTER_HIGH);
 	
 	if (!on) mutex_unlock(&dev->mutex);
diff --git a/driver/wishbone.c b/driver/wishbone.c
index 44b9a13..60aeddf 100644
--- a/driver/wishbone.c
+++ b/driver/wishbone.c
@@ -152,7 +152,7 @@ static void etherbone_process(struct etherbone_context* context)
 			}
 		}
 		
-		if ((flags & ETHERBONE_CYC) == 0) {
+		if ((flags & ETHERBONE_CYC) != 0) {
 			wops->cycle(wb, 0);
 			context->state = idle;
 		}
-- 
GitLab