linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: make module xhci_hcd removable
@ 2015-05-18 17:53 Arthur Demchenkov
  2015-05-18 20:07 ` Andrew Bresticker
  2015-05-18 22:46 ` Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Arthur Demchenkov @ 2015-05-18 17:53 UTC (permalink / raw)
  To: abrestic
  Cc: mathias.nyman, gregkh, linux-usb, linux-kernel, Arthur Demchenkov

Fixed regression. After commit 29e409f the module xhci_hcd became
non-removable. That behaviour is not expected and there're no notes
about it in commit message. The module should be removable as it
blocks PM suspend/resume functions (Debian Bug#666406).

Signed-off-by: Arthur Demchenkov <spinal.by@gmail.com>
---
 drivers/usb/host/xhci.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index ec8ac16..4299cbf 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -5011,4 +5011,12 @@ static int __init xhci_hcd_init(void)
 	BUILD_BUG_ON(sizeof(struct xhci_run_regs) != (8+8*128)*32/8);
 	return 0;
 }
+
+/*
+ * If an init function is provided, an exit function must also be provided
+ * to allow module unload.
+ */
+static void __exit xhci_hcd_fini(void) { }
+
 module_init(xhci_hcd_init);
+module_exit(xhci_hcd_fini);
-- 
2.3.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: make module xhci_hcd removable
  2015-05-18 17:53 [PATCH] usb: make module xhci_hcd removable Arthur Demchenkov
@ 2015-05-18 20:07 ` Andrew Bresticker
  2015-05-18 22:46 ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Bresticker @ 2015-05-18 20:07 UTC (permalink / raw)
  To: Arthur Demchenkov
  Cc: Mathias Nyman, Greg Kroah-Hartman, linux-usb, linux-kernel

Hi Arthur,

On Mon, May 18, 2015 at 10:53 AM, Arthur Demchenkov <spinal.by@gmail.com> wrote:
> Fixed regression. After commit 29e409f the module xhci_hcd became
> non-removable. That behaviour is not expected and there're no notes
> about it in commit message. The module should be removable as it
> blocks PM suspend/resume functions (Debian Bug#666406).
>
> Signed-off-by: Arthur Demchenkov <spinal.by@gmail.com>

Oops, sorry about that!  Anyway,

Reviewed-by: Andrew Bresticker <abrestic@chromium.org>

I suppose this should be a considered a stable fix for v3.18 and later.

Thanks,
Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: make module xhci_hcd removable
  2015-05-18 17:53 [PATCH] usb: make module xhci_hcd removable Arthur Demchenkov
  2015-05-18 20:07 ` Andrew Bresticker
@ 2015-05-18 22:46 ` Greg KH
  2015-05-19  5:24   ` Bjørn Mork
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2015-05-18 22:46 UTC (permalink / raw)
  To: Arthur Demchenkov; +Cc: abrestic, mathias.nyman, linux-usb, linux-kernel

On Mon, May 18, 2015 at 08:53:10PM +0300, Arthur Demchenkov wrote:
> Fixed regression. After commit 29e409f the module xhci_hcd became
> non-removable. That behaviour is not expected and there're no notes
> about it in commit message. The module should be removable as it
> blocks PM suspend/resume functions (Debian Bug#666406).

I hate to ask why debian things that unloading all kernel modules is the
correct thing to do for suspend...

But that's separate from this patch, this looks correct, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: make module xhci_hcd removable
  2015-05-18 22:46 ` Greg KH
@ 2015-05-19  5:24   ` Bjørn Mork
  0 siblings, 0 replies; 4+ messages in thread
From: Bjørn Mork @ 2015-05-19  5:24 UTC (permalink / raw)
  To: Greg KH
  Cc: Arthur Demchenkov, abrestic, mathias.nyman, linux-usb, linux-kernel

Greg KH <gregkh@linuxfoundation.org> writes:

> On Mon, May 18, 2015 at 08:53:10PM +0300, Arthur Demchenkov wrote:
>> Fixed regression. After commit 29e409f the module xhci_hcd became
>> non-removable. That behaviour is not expected and there're no notes
>> about it in commit message. The module should be removable as it
>> blocks PM suspend/resume functions (Debian Bug#666406).
>
> I hate to ask why debian things that unloading all kernel modules is the
> correct thing to do for suspend...

They don't.  If you look closer, the bug report refers to unloading
xhci_hcd as a *workaround* for the bug which casued xhci_hcd to
immediately wake the system.

But I was under the impression that (other) bug was fixed long ago?


Bjørn

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-19  5:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-18 17:53 [PATCH] usb: make module xhci_hcd removable Arthur Demchenkov
2015-05-18 20:07 ` Andrew Bresticker
2015-05-18 22:46 ` Greg KH
2015-05-19  5:24   ` Bjørn Mork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).