From: Greg KH <gregkh@linuxfoundation.org>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
Gerard Snitselaar <dev@snitselaar.org>,
Ian Abbott <ian.abbott@mev.co.uk>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"fmhess@users.sourceforge.net" <fmhess@users.sourceforge.net>
Subject: Re: [PATCH v2] staging: comedi: resolve section mismatch in s626
Date: Wed, 18 Apr 2012 16:28:24 -0700 [thread overview]
Message-ID: <20120418232824.GA9419@kroah.com> (raw)
In-Reply-To: <4F86D294.3050108@mev.co.uk>
On Thu, Apr 12, 2012 at 02:03:16PM +0100, Ian Abbott wrote:
> On 2012/04/10 07:24 PM, Greg KH wrote:
> >On Mon, Apr 02, 2012 at 11:48:54AM +0100, Ian Abbott wrote:
> >>On 2012-03-19 23:26, Greg KH wrote:
> >>>On Mon, Mar 19, 2012 at 03:46:49PM -0700, Gerard Snitselaar wrote:
> >>>>I looked at this a bit more. It looks like they lose visibility to the
> >>>>pci_dev structure.
> >>>>
> >>>>*_probe()
> >>>> comedi_pci_auto_config() pci_dev
> >>>> comedi_auto_config() pci_dev->dev
> >>>> comedi_device_attach() ??
> >>>> driv->attach() ??<= iterate through pci devices.
> >>>>
> >>>>Most of the examples I have looked at so far use for_each_pci_dev() to
> >>>>find the device, and s626 shortcuts it a bit by directly making calls
> >>>>to pci_get_subsys() with specific ids. They all verify they have the
> >>>>right device by checking the bus and slot that are grabbed from the
> >>>>pci_dev in comedi_pci_auto_config() and passed down.
> >>>
> >>>Ugh, surely there's a way to keep the pci dev through the
> >>>comedi_device_attach() call, right?
> >>
> >>comedi_device_attach() is also called for the COMEDI_DEVCONFIG ioctl
> >>for "manually" configuring a comedi device, and that has no idea
> >>about struct pci_dev, etc.
> >>
> >>I recently posted a series of patches that allows lower-level comedi
> >>drivers to supply separate hooks for auto-configuring PCI devices or
> >>USB devices without abusing the old "manual configuration" code
> >>paths, see <http://driverdev.linuxdriverproject.org/pipermail/devel/2012-March/025331.html>.
> >>
> >>The old loop that searches the PCI bus is still needed for the
> >>"manual configuration" code path.
> >
> >So, now that I've applied your patches, this patch isn't needed anymore,
> >right? Or should it be reworked to use the new interfaces?
>
> I think it's still needed as that the comedi_driver->attach() hook
> is still needed to support manual configuration by the
> COMEDI_DEVCONFIG ioctl, and the existing code really shouldn't be
> looking in s626_pci_table[] as it's tagged __devinitconst.
>
> I never saw any mismatched section warnings when I compiled a
> linux-next kernel on my system with a full set of comedi drivers,
> even with CONFIG_DEBUG_SECTION_MISMATCH configured. I'm not sure
> why not, unless it has something to do with me building the kernel
> with a separate build directory.
Yes, I don't see the mismatch either, so I'm not going to apply this
patch, sorry, as I don't see what it is trying to fix at all.
greg k-h
next prev parent reply other threads:[~2012-04-18 23:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 2:25 [PATCH] staging: comedi: resolve section mismatch in s626 Gerard Snitselaar
2012-03-19 3:09 ` [PATCH v2] " Gerard Snitselaar
2012-03-19 16:31 ` Greg KH
2012-03-19 16:43 ` Gerard Snitselaar
2012-03-19 22:46 ` Gerard Snitselaar
2012-03-19 23:26 ` Greg KH
2012-04-02 10:48 ` Ian Abbott
2012-04-10 18:24 ` Greg KH
2012-04-10 19:24 ` Gerard Snitselaar
2012-04-12 13:03 ` Ian Abbott
2012-04-18 23:28 ` Greg KH [this message]
2012-04-20 1:34 ` Gerard Snitselaar
2012-04-20 15:33 ` Greg KH
2012-04-24 1:30 ` [PATCH v2 resend] " Gerard Snitselaar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120418232824.GA9419@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=abbotti@mev.co.uk \
--cc=dev@snitselaar.org \
--cc=devel@driverdev.osuosl.org \
--cc=fmhess@users.sourceforge.net \
--cc=ian.abbott@mev.co.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox