Skip to contentSkip to conversation

ieee1394: ohci1394: add reg_flush, remove bogus barriers

PATCH In review Stefan Richter 1 participant 2 messages Mar 5, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ieee1394: ohci1394: add reg_flush, remove bogus barriers

Add a utility function to flush MMIO writes.
Remove some mb()s which didn't do anything.

There are still a few wmb()s in ohci1394 which look suspicious. Shouldn't there be dma_sync_*() calls instead?

---

 drivers/ieee1394/ohci1394.c |   47 +++++++++---------------------------
 drivers/ieee1394/ohci1394.h |   14 ++++++----
 2 files changed, 21 insertions(+), 40 deletions(-)
drivers/ieee1394/ohci1394.h +8 -6
Index: linux/drivers/ieee1394/ohci1394.h
===================================================================
@@ -248,17 +248,19 @@ static inline int cross_bound(unsigned l
 	return 0;
 }
 
-/*
- * Register read and write helper functions.
- */
+/* Register read and write helper functions */
 static inline void reg_write(const struct ti_ohci *ohci, int offset, u32 data)
 {
-        writel(data, ohci->registers + offset);
+	writel(data, ohci->registers + offset);
 }
-
 static inline u32 reg_read(const struct ti_ohci *ohci, int offset)
 {
-        return readl(ohci->registers + offset);
+	return readl(ohci->registers + offset);
+}
+/* A dummy read to force all PCI writes to be posted immediately */
+static inline void reg_flush(const struct ti_ohci *ohci)
+{
+	readl(ohci->registers);
 }
 
 
drivers/ieee1394/ohci1394.c +13 -34

120 lines not on this page · raw message

Signature · 3 lines
Stefan Richter
-=====-=-=== --== --=-=
http://arcgraph.de/sr/
#1 lore raw

drivers/ieee1394/ohci1394.c static int ohci_iso_recv_start(struct hp · line 1519

Quoted 9 lines · I wrote:
drivers/ieee1394/ohci1394.c +1 -1
@@ -1521,7 +1513,7 @@ static int ohci_iso_recv_start(struct hp
 
 	if (sync != -1) {
 		/* set sync flag on first DMA descriptor */
-		struct dma_cmd *cmd = &recv->block[recv->block_dma];
+ 		struct dma_cmd *cmd = &recv->block[recv->block_dma];
 		cmd->control |= cpu_to_le32(DMA_CTL_WAIT);
 
 		/* match sync field */

Ignore this hunk.

Signature · 3 lines
Stefan Richter
-=====-=-=== --== --=-=
http://arcgraph.de/sr/