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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Roland Dreier <[email protected]> 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:

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

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

ipath:
1559         dev->dma_device = &dd->pcidev->dev;
1560         dev->class_dev.dev = dev->dma_device;

mthca:
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?

Cheers,
  Joachim

---
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: [email protected]  --  Phone: +49 7031 16 1239 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux