[PATCH] ib_core: Add missing device link to class device
FENKES at de.ibm.com
Tue Apr 24 22:06:59 EST 2007
Roland Dreier <rdreier at cisco.com> 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->ibdev.class_dev.dev = &(dev->rdev.rnic_info.pdev->dev);
798 dev->ibdev.dma_device = &dev->pcidev->dev;
799 dev->ibdev.class_dev.dev = &dev->pcidev->dev;
1559 dev->dma_device = &dd->pcidev->dev;
1560 dev->class_dev.dev = dev->dma_device;
1295 dev->ib_dev.dma_device = &dev->pdev->dev;
1296 dev->ib_dev.class_dev.dev = &dev->pdev->dev;
So I think it makes a lot of sense to put the class_dev.dev 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 at de.ibm.com -- Phone: +49 7031 16 1239
More information about the Linuxppc-dev