Thread (14 messages) flat view 14 messages, 4 authors, 2007-08-31

Re: [PATCH] pcmcia: CompactFlash driver for PA Semi Electra boards

From: Olof Johansson <hidden>
Date: 2007-06-25 15:40:59
Also in: lkml

On Mon, Jun 25, 2007 at 06:56:36AM +0100, Christoph Hellwig wrote:
quoted
+static int bus_notify(struct notifier_block *nb, unsigned long action,
+		      void *data)
+{
+	struct device *dev = data;
+
+	printk("bus notify called\n");
+
+	/* We are only intereted in device addition */
+	if (action != BUS_NOTIFY_ADD_DEVICE)
+		return 0;
+
+	/* We use the direct ops for localbus */
+	dev->archdata.dma_ops = &dma_direct_ops;
+
+	return 0;
+}
Sorry for not coming back to you after the last posting of the patch,
but I still really this bit of the code.  We don't set dma ops from
a driver anywhere else in the tree, so I'd really prefer if you could
handle this in architecture code somewhere.  Especially as dma_direct_ops
and the pcmcia_bug_type shouldn't really be something exported to users.

Also this code is unlogic if not buggy.  Just because you have one
electra bridge it doesn't mean all pcmcia is driven by it.  In fact I'm
pretty sure there are cardbus/pcmcia bridges that can be plugged into
plain pci slots.
Yeah, all good points. Also, I obviously missed to take out the debug
printk. I'll post an updated patch separately.


Thanks!

-Olof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help