Re: [PATCH] ib_core: Add missing device link to class device

From: Joachim Fenkes
Date: Tue Apr 24 2007 - 08:08:01 EST

Roland Dreier <rdreier@xxxxxxxxx> wrote on 23.04.2007 21:17:48:

> Hmm, I have links like this on my system already:
> the patch actually looks sane but I don't understand why it's needed.
> Could you explain?

I had a look at the kernel code -- currently, all device drivers except
ehca do this by themselves:

1110 dev->ibdev.dma_device = &(dev->rdev.rnic_info.pdev->dev);
1111 dev-> = &(dev->rdev.rnic_info.pdev->dev);

798 dev->ibdev.dma_device = &dev->pcidev->dev;
799 dev-> = &dev->pcidev->dev;

1559 dev->dma_device = &dd->pcidev->dev;
1560 dev-> = dev->dma_device;

1295 dev->ib_dev.dma_device = &dev->pdev->dev;
1296 dev-> = &dev->pdev->dev;

So I think it makes a lot of sense to put the assignment
into generic ib_core code instead of repeating it in all the drivers.
The respective lines could move out of the drivers in the future but
won't hurt anyone until then.

What's your take on this?


Joachim Fenkes -- eHCA Linux Driver Developer and Hardware Tamer
IBM Deutschland Entwicklung GmbH -- Dept. 3627 (I/O Firmware Dev. 2)
Schoenaicher Strasse 220 -- 71032 Boeblingen -- Germany
eMail: fenkes@xxxxxxxxxx -- Phone: +49 7031 16 1239
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at