Re: [PATCH RFC v2] net: add PCINet driver

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Arnd Bergmann
Date: Tuesday, November 4, 2008 - 1:23 pm

On Tuesday 04 November 2008, Ira Snyder wrote:

Yes, that makes sense. However, you should still be able to have the
PCI code built into the kernel, as long as you prevent it from scanning
the bus on the machine that is in agent/endpoint mode.

This should be made clear in the device tree. On the QS22 machine, we
remove the "pci" device from the device tree, and add a "pcie-ep"
device.


Yes, PCI guarantees reliable transfers.
 

Ok, I see. However, adding the packed attribute makes it more expensive
to use.


Ok, then you should not have a typedef.


Then I think I misunderstood something about this driver. Are these
descriptors accessed by the DMA engine, or by software? If it's the
DMA engine accessing them, can you put the descriptors on both sides
of the bus rather than just on one side?

Which side allocates them anyway? Since you use ioread32/iowrite32
on the ppc side, it looks like they are on the PCI host, which does
not seem to make much sense, because the ppc memory is much closer
to the DMA engine?

Obviously, you want the DMA engine to do the data transfers, but here, you
use ioread32 for mmio transfers to the descriptors, which is slow.


Ah, I see. We had the same problem on Axon, and I'm still looking for a
good solution. The best option is probably to abstract the immr access
in some way and provide a driver that implements them on top of PCI.

I'd suggest splitting the uart code into a separate driver then.


Ok. You can just store the dev pointer then, and leave out the op pointer.
You can always do a container_of() to get back to it.
 

Ok, I see. I fear any nice solution would make the u-boot drivers much
more complex.
 

ok.


ok.


right, I remember now. Unfortunately, alloc_etherdev is a little bit
different from many other kernel interfaces.


sure.


Most drivers now do that from the *rx* poll function, and call
netif_rx_schedule when they get a tx interrupt.


I like the documenting character of the spinlock functions. E.g. if you
use spin_lock_irq() in a function, it is obvious that interrupts are enabled,
and if you use spin_lock() on a lock that requires disabling interrupts,
you know that interrupts are already off.
 

Great, I can certainly help with that. Please CC me on anything related
to this driver.

	Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RFC v2] net: add PCINet driver, Ira Snyder, (Wed Oct 29, 1:20 pm)
Re: [PATCH RFC v2] net: add PCINet driver, Stephen Hemminger, (Wed Oct 29, 1:25 pm)
Re: [PATCH RFC v2] net: add PCINet driver, Ira Snyder, (Wed Oct 29, 1:50 pm)
Re: [PATCH RFC v2] net: add PCINet driver, Scott Wood, (Wed Oct 29, 1:54 pm)
Re: [PATCH RFC v2] net: add PCINet driver, Ira Snyder, (Wed Oct 29, 2:13 pm)
Re: [PATCH RFC v2] net: add PCINet driver, Matt Sealey, (Wed Oct 29, 2:43 pm)
Re: [PATCH RFC v2] net: add PCINet driver, Ira Snyder, (Wed Oct 29, 3:22 pm)
Re: [PATCH RFC v2] net: add PCINet driver, Arnd Bergmann, (Tue Nov 4, 5:09 am)
Re: [PATCH RFC v2] net: add PCINet driver, Ira Snyder, (Tue Nov 4, 10:34 am)
Re: [PATCH RFC v2] net: add PCINet driver, Arnd Bergmann, (Tue Nov 4, 1:23 pm)
Re: [PATCH RFC v2] net: add PCINet driver, Ira Snyder, (Tue Nov 4, 2:25 pm)
Re: [PATCH RFC v2] net: add PCINet driver, Ira Snyder, (Tue Nov 4, 3:29 pm)
Re: [PATCH RFC v2] net: add PCINet driver, Arnd Bergmann, (Wed Nov 5, 6:19 am)
Re: [PATCH RFC v2] net: add PCINet driver, Arnd Bergmann, (Wed Nov 5, 6:50 am)
Re: [PATCH RFC v2] net: add PCINet driver, Ira Snyder, (Wed Nov 5, 12:18 pm)
Re: [PATCH RFC v2] net: add PCINet driver, Ira Snyder, (Wed Nov 5, 12:32 pm)