ssb: Fix usage of struct device used for DMAing

This fixes DMA on architectures where DMA is nontrivial, like PPC64.
We must use the host-device's (PCI) struct device for any DMA
operation instead of the SSB device. For this we add a new
struct device pointer to the SSB device structure that will always
point to the right device for DMAing.

Without this patch b43 and b44 drivers won't work on complex-DMA
architectures, that for example need dev->archdata for DMA operations.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Michael Buesch
2008-04-11 11:59:00 +02:00
committed by John W. Linville
parent 2d4543fdb4
commit 4ac58469f1
4 changed files with 52 additions and 45 deletions

View File

@ -129,6 +129,10 @@ struct ssb_device {
const struct ssb_bus_ops *ops;
struct device *dev;
/* Pointer to the device that has to be used for
* any DMA related operation. */
struct device *dma_dev;
struct ssb_bus *bus;
struct ssb_device_id id;