From a99d1f4c2afd3e1704d0c7de4f65c1681f8b9242 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jul 2020 13:49:11 +0200 Subject: [PATCH] 4.9-stable patches added patches: virtio-virtio_console-add-missing-module_device_table-for-rproc-serial.patch --- queue-4.9/series | 1 + ...module_device_table-for-rproc-serial.patch | 51 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 queue-4.9/virtio-virtio_console-add-missing-module_device_table-for-rproc-serial.patch diff --git a/queue-4.9/series b/queue-4.9/series index 7c9a0604396..bb2f4d68c85 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -71,3 +71,4 @@ usb-serial-cypress_m8-enable-simply-automated-upb-pim.patch usb-serial-ch341-add-new-product-id-for-ch340.patch usb-serial-option-add-gosuncn-gm500-series.patch usb-serial-option-add-quectel-eg95-lte-modem.patch +virtio-virtio_console-add-missing-module_device_table-for-rproc-serial.patch diff --git a/queue-4.9/virtio-virtio_console-add-missing-module_device_table-for-rproc-serial.patch b/queue-4.9/virtio-virtio_console-add-missing-module_device_table-for-rproc-serial.patch new file mode 100644 index 00000000000..b8688a36b86 --- /dev/null +++ b/queue-4.9/virtio-virtio_console-add-missing-module_device_table-for-rproc-serial.patch @@ -0,0 +1,51 @@ +From 897c44f0bae574c5fb318c759b060bebf9dd6013 Mon Sep 17 00:00:00 2001 +From: Alexander Lobakin +Date: Tue, 23 Jun 2020 11:09:33 +0000 +Subject: virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial + +From: Alexander Lobakin + +commit 897c44f0bae574c5fb318c759b060bebf9dd6013 upstream. + +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: # v3.8+ +Signed-off-by: Alexander Lobakin +Reviewed-by: Amit Shah +Link: https://lore.kernel.org/r/x7C_CbeJtoGMy258nwAXASYz3xgFMFpyzmUvOyZzRnQrgWCREBjaqBOpAUS7ol4NnZYvSVwmTsCG0Ohyfvta-ygw6HMHcoeKK0C3QFiAO_Q=@pm.me +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/virtio_console.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/char/virtio_console.c ++++ b/drivers/char/virtio_console.c +@@ -2161,6 +2161,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, +@@ -2173,6 +2174,7 @@ static struct virtio_device_id rproc_ser + #endif + { 0 }, + }; ++MODULE_DEVICE_TABLE(virtio, rproc_serial_id_table); + + static unsigned int rproc_serial_features[] = { + }; +@@ -2325,6 +2327,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.47.3