All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Conor.Dooley@microchip.com
Cc: pali@kernel.org, robh@kernel.org, lorenzo.pieralisi@arm.com,
	kw@linux.com, Daire.McNamara@microchip.com,
	linux-pci@vger.kernel.org, gregkh@linuxfoundation.org,
	ian@linux.cowan.aero, kernel@pengutronix.de, bhelgaas@google.com
Subject: Re: [PATCH] PCI: microchip: Allow driver to be built as a module
Date: Thu, 21 Apr 2022 18:18:23 +0200	[thread overview]
Message-ID: <20220421161823.btbuktvz62jgn43a@pengutronix.de> (raw)
In-Reply-To: <787e21f9-9db6-8c20-4983-17ff59b4e045@microchip.com>

[-- Attachment #1: Type: text/plain, Size: 2537 bytes --]

On Thu, Apr 21, 2022 at 01:55:01PM +0000, Conor.Dooley@microchip.com wrote:
> On 21/04/2022 13:41, Pali Rohár wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> > 
> > On Thursday 21 April 2022 11:31:16 Conor.Dooley@microchip.com wrote:
> >> On 20/04/2022 16:41, Pali Rohár wrote:
> >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> >>>
> >>> On Wednesday 20 April 2022 11:34:49 Uwe Kleine-König wrote:
> >>>> There are no known reasons to not use this driver as a module,
> >>>
> >>> Hello! I think that there are reasons. pcie-microchip-host.c driver uses
> >>> builtin_platform_driver() and not module_platform_driver(); it does not
> >>> implement .remove driver callback and also has set suppress_bind_attrs
> >>> to true. I think that all these parts should be properly implemented
> >>> otherwise it does not have sane reasons to use driver as loadable and
> >>> unloadable module.
> >>>
> >>> Btw, I implemented proper module support for pci-mvebu.c driver
> >>> recently, so you can take an inspiration. See:
> >>> https://lore.kernel.org/linux-pci/20211126144307.7568-1-pali@kernel.org/t/#u
> >>
> >> Hmm, so what is the way forward here, are you happy to do it yourself
> >> or do you not have the hardware/would rather that we did it?
> > 
> > Hello! It would be needed to implement remove callback. But I do not
> > have hardware for doing and testing it, so I do not feel that I can do
> > it. I think that somebody with hardware and documentation should look at
> > it and decide what is required to do in remove/cleanup procedure.
> > 
> > Also it would be needed to investigate if something more is needed to
> > change builtin_platform_driver() to module_platform_driver(). If there
> > are not some other steps which needs to be done in correct sequence and
> > usage of builtin_platform_driver() currently ensures it.
> 
> Was more wondering if this was something Uwe had hardware for than
> yourself, since he was poking around at the driver. But (assuming he
> doesnt either) I'll add this to our todo :)

FTR: I don't have the hardware, I just touched the driver because I
found that missing ; that didn't hurt with the driver =y. Wondering why
it was bool was just the obvious next thought.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2022-04-21 16:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  9:34 [PATCH] PCI: microchip: Allow driver to be built as a module Uwe Kleine-König
2022-04-20 16:41 ` Pali Rohár
2022-04-21 11:31   ` Conor.Dooley
2022-04-21 13:41     ` Pali Rohár
2022-04-21 13:55       ` Conor.Dooley
2022-04-21 16:18         ` Uwe Kleine-König [this message]

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=20220421161823.btbuktvz62jgn43a@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=Conor.Dooley@microchip.com \
    --cc=Daire.McNamara@microchip.com \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ian@linux.cowan.aero \
    --cc=kernel@pengutronix.de \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=pali@kernel.org \
    --cc=robh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.