[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OF8C8AA8EC.A66DAC49-ONC12572C7.00416B4B-C12572C7.00428AF7@de.ibm.com>
Date: Tue, 24 Apr 2007 14:06:59 +0200
From: Joachim Fenkes <FENKES@...ibm.com>
To: Roland Dreier <rdreier@...co.com>
Cc: "OF-General" <general@...ts.openfabrics.org>,
Hoang-Nam Nguyen <hnguyen@...ibm.com>,
LKML <linux-kernel@...r.kernel.org>,
"LinuxPPC-Dev" <linuxppc-dev@...abs.org>,
Roland Dreier <rolandd@...co.com>
Subject: Re: [PATCH] ib_core: Add missing device link to class device
Roland Dreier <rdreier@...co.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:
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: fenkes@...ibm.com -- Phone: +49 7031 16 1239
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists