LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial
@ 2020-03-10 11:05 Alexander Lobakin
  2020-03-11 14:53 ` Amit Shah
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Lobakin @ 2020-03-10 11:05 UTC (permalink / raw)
  To: Amit Shah
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Sjur Brandeland,
	Rusty Russell, Alexander Lobakin, virtualization, stable,
	linux-kernel

rproc_serial_id_table lacks an exposure to module devicetable, so
when remoteproc firmware requests VIRTIO_ID_RPROC_SERIAL, no uevent
is generated and no module autoloading occurs.
Add missing MODULE_DEVICE_TABLE() annotation and move the existing
one for VIRTIO_ID_CONSOLE right to the table itself.

Fixes: 1b6370463e88 ("virtio_console: Add support for remoteproc serial")
Cc: <stable@vger.kernel.org> # v3.8+
Signed-off-by: Alexander Lobakin <alobakin@dlink.ru>
---
 drivers/char/virtio_console.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 4df9b40d6342..7e1bc0f580a2 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -2116,6 +2116,7 @@ static struct virtio_device_id id_table[] = {
 	{ VIRTIO_ID_CONSOLE, VIRTIO_DEV_ANY_ID },
 	{ 0 },
 };
+MODULE_DEVICE_TABLE(virtio, id_table);
 
 static unsigned int features[] = {
 	VIRTIO_CONSOLE_F_SIZE,
@@ -2128,6 +2129,7 @@ static struct virtio_device_id rproc_serial_id_table[] = {
 #endif
 	{ 0 },
 };
+MODULE_DEVICE_TABLE(virtio, rproc_serial_id_table);
 
 static unsigned int rproc_serial_features[] = {
 };
@@ -2280,6 +2282,5 @@ static void __exit fini(void)
 module_init(init);
 module_exit(fini);
 
-MODULE_DEVICE_TABLE(virtio, id_table);
 MODULE_DESCRIPTION("Virtio console driver");
 MODULE_LICENSE("GPL");
-- 
2.25.1


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

* Re: [PATCH] virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial
  2020-03-10 11:05 [PATCH] virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial Alexander Lobakin
@ 2020-03-11 14:53 ` Amit Shah
  2020-04-08 13:17   ` Alexander Lobakin
  0 siblings, 1 reply; 3+ messages in thread
From: Amit Shah @ 2020-03-11 14:53 UTC (permalink / raw)
  To: Alexander Lobakin
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Sjur Brandeland,
	Rusty Russell, virtualization, stable, linux-kernel

On Tue, 2020-03-10 at 14:05 +0300, Alexander Lobakin wrote:
> rproc_serial_id_table lacks an exposure to module devicetable, so
> when remoteproc firmware requests VIRTIO_ID_RPROC_SERIAL, no uevent
> is generated and no module autoloading occurs.
> Add missing MODULE_DEVICE_TABLE() annotation and move the existing
> one for VIRTIO_ID_CONSOLE right to the table itself.
> 
> Fixes: 1b6370463e88 ("virtio_console: Add support for remoteproc
> serial")
> Cc: <stable@vger.kernel.org> # v3.8+
> Signed-off-by: Alexander Lobakin <alobakin@dlink.ru>

Reviewed-by: Amit Shah <amit@kernel.org>

Thanks,

> ---
>  drivers/char/virtio_console.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/char/virtio_console.c
> b/drivers/char/virtio_console.c
> index 4df9b40d6342..7e1bc0f580a2 100644
> --- a/drivers/char/virtio_console.c
> +++ b/drivers/char/virtio_console.c
> @@ -2116,6 +2116,7 @@ static struct virtio_device_id id_table[] = {
>  	{ VIRTIO_ID_CONSOLE, VIRTIO_DEV_ANY_ID },
>  	{ 0 },
>  };
> +MODULE_DEVICE_TABLE(virtio, id_table);
>  
>  static unsigned int features[] = {
>  	VIRTIO_CONSOLE_F_SIZE,
> @@ -2128,6 +2129,7 @@ static struct virtio_device_id
> rproc_serial_id_table[] = {
>  #endif
>  	{ 0 },
>  };
> +MODULE_DEVICE_TABLE(virtio, rproc_serial_id_table);
>  
>  static unsigned int rproc_serial_features[] = {
>  };
> @@ -2280,6 +2282,5 @@ static void __exit fini(void)
>  module_init(init);
>  module_exit(fini);
>  
> -MODULE_DEVICE_TABLE(virtio, id_table);
>  MODULE_DESCRIPTION("Virtio console driver");
>  MODULE_LICENSE("GPL");


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

* Re: [PATCH] virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial
  2020-03-11 14:53 ` Amit Shah
@ 2020-04-08 13:17   ` Alexander Lobakin
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Lobakin @ 2020-04-08 13:17 UTC (permalink / raw)
  To: Amit Shah
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Sjur Brandeland,
	Rusty Russell, virtualization, stable, linux-kernel

On Wed, 2020-03-11 at 15:53 +0100, Amit Shah wrote:
> On Tue, 2020-03-10 at 14:05 +0300, Alexander Lobakin wrote:
> > rproc_serial_id_table lacks an exposure to module devicetable, so
> > when remoteproc firmware requests VIRTIO_ID_RPROC_SERIAL, no uevent
> > is generated and no module autoloading occurs.
> > Add missing MODULE_DEVICE_TABLE() annotation and move the existing
> > one for VIRTIO_ID_CONSOLE right to the table itself.
> > 
> > Fixes: 1b6370463e88 ("virtio_console: Add support for remoteproc
> > serial")
> > Cc: <stable@vger.kernel.org> # v3.8+
> > Signed-off-by: Alexander Lobakin <alobakin@dlink.ru>
> 
> Reviewed-by: Amit Shah <amit@kernel.org>

Thank you! Well, who will take this into his tree?

> Thanks,
> 
> > ---
> >  drivers/char/virtio_console.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/char/virtio_console.c
> > b/drivers/char/virtio_console.c
> > index 4df9b40d6342..7e1bc0f580a2 100644
> > --- a/drivers/char/virtio_console.c
> > +++ b/drivers/char/virtio_console.c
> > @@ -2116,6 +2116,7 @@ static struct virtio_device_id id_table[] = {
> >  	{ VIRTIO_ID_CONSOLE, VIRTIO_DEV_ANY_ID },
> >  	{ 0 },
> >  };
> > +MODULE_DEVICE_TABLE(virtio, id_table);
> >  
> >  static unsigned int features[] = {
> >  	VIRTIO_CONSOLE_F_SIZE,
> > @@ -2128,6 +2129,7 @@ static struct virtio_device_id
> > rproc_serial_id_table[] = {
> >  #endif
> >  	{ 0 },
> >  };
> > +MODULE_DEVICE_TABLE(virtio, rproc_serial_id_table);
> >  
> >  static unsigned int rproc_serial_features[] = {
> >  };
> > @@ -2280,6 +2282,5 @@ static void __exit fini(void)
> >  module_init(init);
> >  module_exit(fini);
> >  
> > -MODULE_DEVICE_TABLE(virtio, id_table);
> >  MODULE_DESCRIPTION("Virtio console driver");
> >  MODULE_LICENSE("GPL");


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

end of thread, other threads:[~2020-04-08 13:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 11:05 [PATCH] virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial Alexander Lobakin
2020-03-11 14:53 ` Amit Shah
2020-04-08 13:17   ` Alexander Lobakin

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).