]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Nov 2020 19:54:48 +0000 (20:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Nov 2020 19:54:48 +0000 (20:54 +0100)
added patches:
arm-dts-mt7623-add-missing-pause-for-switchport.patch
arm-s3c24xx-fix-missing-system-reset.patch
arm-samsung-fix-pm-debug-build-with-debug_ll-but-mmu.patch
arm64-berlin-select-dw_apb_timer_of.patch
cachefiles-handle-readpage-error-correctly.patch
device-property-don-t-clear-secondary-pointer-for-shared-primary-firmware-node.patch
device-property-keep-secondary-firmware-node-secondary-by-type.patch
hil-parisc-disable-hil-driver-when-it-gets-stuck.patch
kvm-arm64-fix-aarch32-handling-of-dbgd-ccint-scrext-and-dbgvcr.patch
rtc-rx8010-don-t-modify-the-global-rtc-ops.patch
staging-comedi-cb_pcidas-allow-2-channel-commands-for-ao-subdevice.patch
staging-octeon-drop-on-uncorrectable-alignment-or-fcs-error.patch
staging-octeon-repair-fixed-link-support.patch
tty-make-fontx-ioctl-use-the-tty-pointer-they-were-actually-passed.patch

15 files changed:
queue-4.19/arm-dts-mt7623-add-missing-pause-for-switchport.patch [new file with mode: 0644]
queue-4.19/arm-s3c24xx-fix-missing-system-reset.patch [new file with mode: 0644]
queue-4.19/arm-samsung-fix-pm-debug-build-with-debug_ll-but-mmu.patch [new file with mode: 0644]
queue-4.19/arm64-berlin-select-dw_apb_timer_of.patch [new file with mode: 0644]
queue-4.19/cachefiles-handle-readpage-error-correctly.patch [new file with mode: 0644]
queue-4.19/device-property-don-t-clear-secondary-pointer-for-shared-primary-firmware-node.patch [new file with mode: 0644]
queue-4.19/device-property-keep-secondary-firmware-node-secondary-by-type.patch [new file with mode: 0644]
queue-4.19/hil-parisc-disable-hil-driver-when-it-gets-stuck.patch [new file with mode: 0644]
queue-4.19/kvm-arm64-fix-aarch32-handling-of-dbgd-ccint-scrext-and-dbgvcr.patch [new file with mode: 0644]
queue-4.19/rtc-rx8010-don-t-modify-the-global-rtc-ops.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/staging-comedi-cb_pcidas-allow-2-channel-commands-for-ao-subdevice.patch [new file with mode: 0644]
queue-4.19/staging-octeon-drop-on-uncorrectable-alignment-or-fcs-error.patch [new file with mode: 0644]
queue-4.19/staging-octeon-repair-fixed-link-support.patch [new file with mode: 0644]
queue-4.19/tty-make-fontx-ioctl-use-the-tty-pointer-they-were-actually-passed.patch [new file with mode: 0644]

diff --git a/queue-4.19/arm-dts-mt7623-add-missing-pause-for-switchport.patch b/queue-4.19/arm-dts-mt7623-add-missing-pause-for-switchport.patch
new file mode 100644 (file)
index 0000000..2be7018
--- /dev/null
@@ -0,0 +1,33 @@
+From 36f0a5fc5284838c544218666c63ee8cfa46a9c3 Mon Sep 17 00:00:00 2001
+From: Frank Wunderlich <frank-w@public-files.de>
+Date: Mon, 7 Sep 2020 09:05:17 +0200
+Subject: arm: dts: mt7623: add missing pause for switchport
+
+From: Frank Wunderlich <frank-w@public-files.de>
+
+commit 36f0a5fc5284838c544218666c63ee8cfa46a9c3 upstream.
+
+port6 of mt7530 switch (= cpu port 0) on bananapi-r2 misses pause option
+which causes rx drops on running iperf.
+
+Fixes: f4ff257cd160 ("arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board")
+Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20200907070517.51715-1-linux@fw-web.de
+Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
++++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+@@ -192,6 +192,7 @@
+                                       fixed-link {
+                                               speed = <1000>;
+                                               full-duplex;
++                                              pause;
+                                       };
+                               };
+                       };
diff --git a/queue-4.19/arm-s3c24xx-fix-missing-system-reset.patch b/queue-4.19/arm-s3c24xx-fix-missing-system-reset.patch
new file mode 100644 (file)
index 0000000..9661c54
--- /dev/null
@@ -0,0 +1,36 @@
+From f6d7cde84f6c5551586c8b9b68d70f8e6dc9a000 Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzk@kernel.org>
+Date: Tue, 4 Aug 2020 21:26:49 +0200
+Subject: ARM: s3c24xx: fix missing system reset
+
+From: Krzysztof Kozlowski <krzk@kernel.org>
+
+commit f6d7cde84f6c5551586c8b9b68d70f8e6dc9a000 upstream.
+
+Commit f6361c6b3880 ("ARM: S3C24XX: remove separate restart code")
+removed usage of the watchdog reset platform code in favor of the
+Samsung SoC watchdog driver.  However the latter was not selected thus
+S3C24xx platforms lost reset abilities.
+
+Cc: <stable@vger.kernel.org>
+Fixes: f6361c6b3880 ("ARM: S3C24XX: remove separate restart code")
+Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/Kconfig |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -592,8 +592,10 @@ config ARCH_S3C24XX
+       select HAVE_S3C2410_WATCHDOG if WATCHDOG
+       select HAVE_S3C_RTC if RTC_CLASS
+       select NEED_MACH_IO_H
++      select S3C2410_WATCHDOG
+       select SAMSUNG_ATAGS
+       select USE_OF
++      select WATCHDOG
+       help
+         Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
+         and S3C2450 SoCs based systems, such as the Simtec Electronics BAST
diff --git a/queue-4.19/arm-samsung-fix-pm-debug-build-with-debug_ll-but-mmu.patch b/queue-4.19/arm-samsung-fix-pm-debug-build-with-debug_ll-but-mmu.patch
new file mode 100644 (file)
index 0000000..85426ac
--- /dev/null
@@ -0,0 +1,40 @@
+From 7be0d19c751b02db778ca95e3274d5ea7f31891c Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzk@kernel.org>
+Date: Thu, 10 Sep 2020 17:41:49 +0200
+Subject: ARM: samsung: fix PM debug build with DEBUG_LL but !MMU
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Krzysztof Kozlowski <krzk@kernel.org>
+
+commit 7be0d19c751b02db778ca95e3274d5ea7f31891c upstream.
+
+Selecting CONFIG_SAMSUNG_PM_DEBUG (depending on CONFIG_DEBUG_LL) but
+without CONFIG_MMU leads to build errors:
+
+  arch/arm/plat-samsung/pm-debug.c: In function ‘s3c_pm_uart_base’:
+  arch/arm/plat-samsung/pm-debug.c:57:2: error:
+    implicit declaration of function ‘debug_ll_addr’ [-Werror=implicit-function-declaration]
+
+Fixes: 99b2fc2b8b40 ("ARM: SAMSUNG: Use debug_ll_addr() to get UART base address")
+Reported-by: kernel test robot <lkp@intel.com>
+Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20200910154150.3318-1-krzk@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/plat-samsung/Kconfig |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/plat-samsung/Kconfig
++++ b/arch/arm/plat-samsung/Kconfig
+@@ -240,6 +240,7 @@ config SAMSUNG_PM_DEBUG
+       bool "Samsung PM Suspend debug"
+       depends on PM && DEBUG_KERNEL
+       depends on DEBUG_EXYNOS_UART || DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
++      depends on DEBUG_LL && MMU
+       help
+         Say Y here if you want verbose debugging from the PM Suspend and
+         Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
diff --git a/queue-4.19/arm64-berlin-select-dw_apb_timer_of.patch b/queue-4.19/arm64-berlin-select-dw_apb_timer_of.patch
new file mode 100644 (file)
index 0000000..dd7aab8
--- /dev/null
@@ -0,0 +1,32 @@
+From b0fc70ce1f028e14a37c186d9f7a55e51439b83a Mon Sep 17 00:00:00 2001
+From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
+Date: Fri, 9 Oct 2020 15:08:31 +0800
+Subject: arm64: berlin: Select DW_APB_TIMER_OF
+
+From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
+
+commit b0fc70ce1f028e14a37c186d9f7a55e51439b83a upstream.
+
+Berlin SoCs always contain some DW APB timers which can be used as an
+always-on broadcast timer.
+
+Link: https://lore.kernel.org/r/20201009150536.214181fb@xhacker.debian
+Cc: <stable@vger.kernel.org> # v3.14+
+Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm64/Kconfig.platforms |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm64/Kconfig.platforms
++++ b/arch/arm64/Kconfig.platforms
+@@ -46,6 +46,7 @@ config ARCH_BCM_IPROC
+ config ARCH_BERLIN
+       bool "Marvell Berlin SoC Family"
+       select DW_APB_ICTL
++      select DW_APB_TIMER_OF
+       select GPIOLIB
+       select PINCTRL
+       help
diff --git a/queue-4.19/cachefiles-handle-readpage-error-correctly.patch b/queue-4.19/cachefiles-handle-readpage-error-correctly.patch
new file mode 100644 (file)
index 0000000..be1a193
--- /dev/null
@@ -0,0 +1,41 @@
+From 9480b4e75b7108ee68ecf5bc6b4bd68e8031c521 Mon Sep 17 00:00:00 2001
+From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
+Date: Mon, 26 Oct 2020 09:12:10 +0000
+Subject: cachefiles: Handle readpage error correctly
+
+From: Matthew Wilcox (Oracle) <willy@infradead.org>
+
+commit 9480b4e75b7108ee68ecf5bc6b4bd68e8031c521 upstream.
+
+If ->readpage returns an error, it has already unlocked the page.
+
+Fixes: 5e929b33c393 ("CacheFiles: Handle truncate unlocking the page we're reading")
+Cc: stable@vger.kernel.org
+Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
+Signed-off-by: David Howells <dhowells@redhat.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/cachefiles/rdwr.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/fs/cachefiles/rdwr.c
++++ b/fs/cachefiles/rdwr.c
+@@ -125,7 +125,7 @@ static int cachefiles_read_reissue(struc
+               _debug("reissue read");
+               ret = bmapping->a_ops->readpage(NULL, backpage);
+               if (ret < 0)
+-                      goto unlock_discard;
++                      goto discard;
+       }
+       /* but the page may have been read before the monitor was installed, so
+@@ -142,6 +142,7 @@ static int cachefiles_read_reissue(struc
+ unlock_discard:
+       unlock_page(backpage);
++discard:
+       spin_lock_irq(&object->work_lock);
+       list_del(&monitor->op_link);
+       spin_unlock_irq(&object->work_lock);
diff --git a/queue-4.19/device-property-don-t-clear-secondary-pointer-for-shared-primary-firmware-node.patch b/queue-4.19/device-property-don-t-clear-secondary-pointer-for-shared-primary-firmware-node.patch
new file mode 100644 (file)
index 0000000..7e8f3a3
--- /dev/null
@@ -0,0 +1,50 @@
+From 99aed9227073fb34ce2880cbc7063e04185a65e1 Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Date: Thu, 22 Oct 2020 21:41:00 +0300
+Subject: device property: Don't clear secondary pointer for shared primary firmware node
+
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+
+commit 99aed9227073fb34ce2880cbc7063e04185a65e1 upstream.
+
+It appears that firmware nodes can be shared between devices. In such case
+when a (child) device is about to be deleted, its firmware node may be shared
+and ACPI_COMPANION_SET(..., NULL) call for it breaks the secondary link
+of the shared primary firmware node.
+
+In order to prevent that, check, if the device has a parent and parent's
+firmware node is shared with its child, and avoid crashing the link.
+
+Fixes: c15e1bdda436 ("device property: Fix the secondary firmware node handling in set_primary_fwnode()")
+Reported-by: Ferry Toth <fntoth@gmail.com>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Tested-by: Ferry Toth <fntoth@gmail.com>
+Cc: 5.9+ <stable@vger.kernel.org> # 5.9+
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/base/core.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/base/core.c
++++ b/drivers/base/core.c
+@@ -3333,6 +3333,7 @@ static inline bool fwnode_is_primary(str
+  */
+ void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
+ {
++      struct device *parent = dev->parent;
+       struct fwnode_handle *fn = dev->fwnode;
+       if (fwnode) {
+@@ -3347,7 +3348,8 @@ void set_primary_fwnode(struct device *d
+       } else {
+               if (fwnode_is_primary(fn)) {
+                       dev->fwnode = fn->secondary;
+-                      fn->secondary = ERR_PTR(-ENODEV);
++                      if (!(parent && fn == parent->fwnode))
++                              fn->secondary = ERR_PTR(-ENODEV);
+               } else {
+                       dev->fwnode = NULL;
+               }
diff --git a/queue-4.19/device-property-keep-secondary-firmware-node-secondary-by-type.patch b/queue-4.19/device-property-keep-secondary-firmware-node-secondary-by-type.patch
new file mode 100644 (file)
index 0000000..824228c
--- /dev/null
@@ -0,0 +1,55 @@
+From d5dcce0c414fcbfe4c2037b66ac69ea5f9b3f75c Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Date: Thu, 22 Oct 2020 21:40:59 +0300
+Subject: device property: Keep secondary firmware node secondary by type
+
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+
+commit d5dcce0c414fcbfe4c2037b66ac69ea5f9b3f75c upstream.
+
+Behind primary and secondary we understand the type of the nodes
+which might define their ordering. However, if primary node gone,
+we can't maintain the ordering by definition of the linked list.
+Thus, by ordering secondary node becomes first in the list.
+But in this case the meaning of it is still secondary (or auxiliary).
+The type of the node is maintained by the secondary pointer in it:
+
+       secondary pointer               Meaning
+       NULL or valid                   primary node
+       ERR_PTR(-ENODEV)                secondary node
+
+So, if by some reason we do the following sequence of calls
+
+       set_primary_fwnode(dev, NULL);
+       set_primary_fwnode(dev, primary);
+
+we should preserve secondary node.
+
+This concept is supported by the description of set_primary_fwnode()
+along with implementation of set_secondary_fwnode(). Hence, fix
+the commit c15e1bdda436 to follow this as well.
+
+Fixes: c15e1bdda436 ("device property: Fix the secondary firmware node handling in set_primary_fwnode()")
+Cc: Ferry Toth <fntoth@gmail.com>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Tested-by: Ferry Toth <fntoth@gmail.com>
+Cc: 5.9+ <stable@vger.kernel.org> # 5.9+
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/base/core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/base/core.c
++++ b/drivers/base/core.c
+@@ -3347,7 +3347,7 @@ void set_primary_fwnode(struct device *d
+       } else {
+               if (fwnode_is_primary(fn)) {
+                       dev->fwnode = fn->secondary;
+-                      fn->secondary = NULL;
++                      fn->secondary = ERR_PTR(-ENODEV);
+               } else {
+                       dev->fwnode = NULL;
+               }
diff --git a/queue-4.19/hil-parisc-disable-hil-driver-when-it-gets-stuck.patch b/queue-4.19/hil-parisc-disable-hil-driver-when-it-gets-stuck.patch
new file mode 100644 (file)
index 0000000..73f0672
--- /dev/null
@@ -0,0 +1,136 @@
+From 879bc2d27904354b98ca295b6168718e045c4aa2 Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Mon, 19 Oct 2020 16:57:50 +0200
+Subject: hil/parisc: Disable HIL driver when it gets stuck
+
+From: Helge Deller <deller@gmx.de>
+
+commit 879bc2d27904354b98ca295b6168718e045c4aa2 upstream.
+
+When starting a HP machine with HIL driver but without an HIL keyboard
+or HIL mouse attached, it may happen that data written to the HIL loop
+gets stuck (e.g. because the transaction queue is full).  Usually one
+will then have to reboot the machine because all you see is and endless
+output of:
+ Transaction add failed: transaction already queued?
+
+In the higher layers hp_sdc_enqueue_transaction() is called to queued up
+a HIL packet. This function returns an error code, and this patch adds
+the necessary checks for this return code and disables the HIL driver if
+further packets can't be sent.
+
+Tested on a HP 730 and a HP 715/64 machine.
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/serio/hil_mlc.c    |   21 ++++++++++++++++++---
+ drivers/input/serio/hp_sdc_mlc.c |    8 ++++----
+ include/linux/hil_mlc.h          |    2 +-
+ 3 files changed, 23 insertions(+), 8 deletions(-)
+
+--- a/drivers/input/serio/hil_mlc.c
++++ b/drivers/input/serio/hil_mlc.c
+@@ -74,7 +74,7 @@ EXPORT_SYMBOL(hil_mlc_unregister);
+ static LIST_HEAD(hil_mlcs);
+ static DEFINE_RWLOCK(hil_mlcs_lock);
+ static struct timer_list      hil_mlcs_kicker;
+-static int                    hil_mlcs_probe;
++static int                    hil_mlcs_probe, hil_mlc_stop;
+ static void hil_mlcs_process(unsigned long unused);
+ static DECLARE_TASKLET_DISABLED(hil_mlcs_tasklet, hil_mlcs_process, 0);
+@@ -702,9 +702,13 @@ static int hilse_donode(hil_mlc *mlc)
+               if (!mlc->ostarted) {
+                       mlc->ostarted = 1;
+                       mlc->opacket = pack;
+-                      mlc->out(mlc);
++                      rc = mlc->out(mlc);
+                       nextidx = HILSEN_DOZE;
+                       write_unlock_irqrestore(&mlc->lock, flags);
++                      if (rc) {
++                              hil_mlc_stop = 1;
++                              return 1;
++                      }
+                       break;
+               }
+               mlc->ostarted = 0;
+@@ -715,8 +719,13 @@ static int hilse_donode(hil_mlc *mlc)
+       case HILSE_CTS:
+               write_lock_irqsave(&mlc->lock, flags);
+-              nextidx = mlc->cts(mlc) ? node->bad : node->good;
++              rc = mlc->cts(mlc);
++              nextidx = rc ? node->bad : node->good;
+               write_unlock_irqrestore(&mlc->lock, flags);
++              if (rc) {
++                      hil_mlc_stop = 1;
++                      return 1;
++              }
+               break;
+       default:
+@@ -780,6 +789,12 @@ static void hil_mlcs_process(unsigned lo
+ static void hil_mlcs_timer(struct timer_list *unused)
+ {
++      if (hil_mlc_stop) {
++              /* could not send packet - stop immediately. */
++              pr_warn(PREFIX "HIL seems stuck - Disabling HIL MLC.\n");
++              return;
++      }
++
+       hil_mlcs_probe = 1;
+       tasklet_schedule(&hil_mlcs_tasklet);
+       /* Re-insert the periodic task. */
+--- a/drivers/input/serio/hp_sdc_mlc.c
++++ b/drivers/input/serio/hp_sdc_mlc.c
+@@ -210,7 +210,7 @@ static int hp_sdc_mlc_cts(hil_mlc *mlc)
+       priv->tseq[2] = 1;
+       priv->tseq[3] = 0;
+       priv->tseq[4] = 0;
+-      __hp_sdc_enqueue_transaction(&priv->trans);
++      return __hp_sdc_enqueue_transaction(&priv->trans);
+  busy:
+       return 1;
+  done:
+@@ -219,7 +219,7 @@ static int hp_sdc_mlc_cts(hil_mlc *mlc)
+       return 0;
+ }
+-static void hp_sdc_mlc_out(hil_mlc *mlc)
++static int hp_sdc_mlc_out(hil_mlc *mlc)
+ {
+       struct hp_sdc_mlc_priv_s *priv;
+@@ -234,7 +234,7 @@ static void hp_sdc_mlc_out(hil_mlc *mlc)
+  do_data:
+       if (priv->emtestmode) {
+               up(&mlc->osem);
+-              return;
++              return 0;
+       }
+       /* Shouldn't be sending commands when loop may be busy */
+       BUG_ON(down_trylock(&mlc->csem));
+@@ -296,7 +296,7 @@ static void hp_sdc_mlc_out(hil_mlc *mlc)
+               BUG_ON(down_trylock(&mlc->csem));
+       }
+  enqueue:
+-      hp_sdc_enqueue_transaction(&priv->trans);
++      return hp_sdc_enqueue_transaction(&priv->trans);
+ }
+ static int __init hp_sdc_mlc_init(void)
+--- a/include/linux/hil_mlc.h
++++ b/include/linux/hil_mlc.h
+@@ -103,7 +103,7 @@ struct hilse_node {
+ /* Methods for back-end drivers, e.g. hp_sdc_mlc */
+ typedef int   (hil_mlc_cts) (hil_mlc *mlc);
+-typedef void  (hil_mlc_out) (hil_mlc *mlc);
++typedef int   (hil_mlc_out) (hil_mlc *mlc);
+ typedef int   (hil_mlc_in)  (hil_mlc *mlc, suseconds_t timeout);
+ struct hil_mlc_devinfo {
diff --git a/queue-4.19/kvm-arm64-fix-aarch32-handling-of-dbgd-ccint-scrext-and-dbgvcr.patch b/queue-4.19/kvm-arm64-fix-aarch32-handling-of-dbgd-ccint-scrext-and-dbgvcr.patch
new file mode 100644 (file)
index 0000000..e1182c1
--- /dev/null
@@ -0,0 +1,59 @@
+From 4a1c2c7f63c52ccb11770b5ae25920a6b79d3548 Mon Sep 17 00:00:00 2001
+From: Marc Zyngier <maz@kernel.org>
+Date: Thu, 29 Oct 2020 17:24:09 +0000
+Subject: KVM: arm64: Fix AArch32 handling of DBGD{CCINT,SCRext} and DBGVCR
+
+From: Marc Zyngier <maz@kernel.org>
+
+commit 4a1c2c7f63c52ccb11770b5ae25920a6b79d3548 upstream.
+
+The DBGD{CCINT,SCRext} and DBGVCR register entries in the cp14 array
+are missing their target register, resulting in all accesses being
+targetted at the guard sysreg (indexed by __INVALID_SYSREG__).
+
+Point the emulation code at the actual register entries.
+
+Fixes: bdfb4b389c8d ("arm64: KVM: add trap handlers for AArch32 debug registers")
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20201029172409.2768336-1-maz@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm64/include/asm/kvm_host.h |    1 +
+ arch/arm64/kvm/sys_regs.c         |    6 +++---
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+--- a/arch/arm64/include/asm/kvm_host.h
++++ b/arch/arm64/include/asm/kvm_host.h
+@@ -192,6 +192,7 @@ enum vcpu_sysreg {
+ #define cp14_DBGWCR0  (DBGWCR0_EL1 * 2)
+ #define cp14_DBGWVR0  (DBGWVR0_EL1 * 2)
+ #define cp14_DBGDCCINT        (MDCCINT_EL1 * 2)
++#define cp14_DBGVCR   (DBGVCR32_EL2 * 2)
+ #define NR_COPRO_REGS (NR_SYS_REGS * 2)
+--- a/arch/arm64/kvm/sys_regs.c
++++ b/arch/arm64/kvm/sys_regs.c
+@@ -1555,9 +1555,9 @@ static const struct sys_reg_desc cp14_re
+       { Op1( 0), CRn( 0), CRm( 1), Op2( 0), trap_raz_wi },
+       DBG_BCR_BVR_WCR_WVR(1),
+       /* DBGDCCINT */
+-      { Op1( 0), CRn( 0), CRm( 2), Op2( 0), trap_debug32 },
++      { Op1( 0), CRn( 0), CRm( 2), Op2( 0), trap_debug32, NULL, cp14_DBGDCCINT },
+       /* DBGDSCRext */
+-      { Op1( 0), CRn( 0), CRm( 2), Op2( 2), trap_debug32 },
++      { Op1( 0), CRn( 0), CRm( 2), Op2( 2), trap_debug32, NULL, cp14_DBGDSCRext },
+       DBG_BCR_BVR_WCR_WVR(2),
+       /* DBGDTR[RT]Xint */
+       { Op1( 0), CRn( 0), CRm( 3), Op2( 0), trap_raz_wi },
+@@ -1572,7 +1572,7 @@ static const struct sys_reg_desc cp14_re
+       { Op1( 0), CRn( 0), CRm( 6), Op2( 2), trap_raz_wi },
+       DBG_BCR_BVR_WCR_WVR(6),
+       /* DBGVCR */
+-      { Op1( 0), CRn( 0), CRm( 7), Op2( 0), trap_debug32 },
++      { Op1( 0), CRn( 0), CRm( 7), Op2( 0), trap_debug32, NULL, cp14_DBGVCR },
+       DBG_BCR_BVR_WCR_WVR(7),
+       DBG_BCR_BVR_WCR_WVR(8),
+       DBG_BCR_BVR_WCR_WVR(9),
diff --git a/queue-4.19/rtc-rx8010-don-t-modify-the-global-rtc-ops.patch b/queue-4.19/rtc-rx8010-don-t-modify-the-global-rtc-ops.patch
new file mode 100644 (file)
index 0000000..01f1ddc
--- /dev/null
@@ -0,0 +1,84 @@
+From d3b14296da69adb7825022f3224ac6137eb30abf Mon Sep 17 00:00:00 2001
+From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Date: Mon, 14 Sep 2020 17:45:48 +0200
+Subject: rtc: rx8010: don't modify the global rtc ops
+
+From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+
+commit d3b14296da69adb7825022f3224ac6137eb30abf upstream.
+
+The way the driver is implemented is buggy for the (admittedly unlikely)
+use case where there are two RTCs with one having an interrupt configured
+and the second not. This is caused by the fact that we use a global
+rtc_class_ops struct which we modify depending on whether the irq number
+is present or not.
+
+Fix it by using two const ops structs with and without alarm operations.
+While at it: not being able to request a configured interrupt is an error
+so don't ignore it and bail out of probe().
+
+Fixes: ed13d89b08e3 ("rtc: Add Epson RX8010SJ RTC driver")
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20200914154601.32245-2-brgl@bgdev.pl
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ drivers/rtc/rtc-rx8010.c |   24 +++++++++++++++++-------
+ 1 file changed, 17 insertions(+), 7 deletions(-)
+
+--- a/drivers/rtc/rtc-rx8010.c
++++ b/drivers/rtc/rtc-rx8010.c
+@@ -428,16 +428,26 @@ static int rx8010_ioctl(struct device *d
+       }
+ }
+-static struct rtc_class_ops rx8010_rtc_ops = {
++static const struct rtc_class_ops rx8010_rtc_ops_default = {
+       .read_time = rx8010_get_time,
+       .set_time = rx8010_set_time,
+       .ioctl = rx8010_ioctl,
+ };
++static const struct rtc_class_ops rx8010_rtc_ops_alarm = {
++      .read_time = rx8010_get_time,
++      .set_time = rx8010_set_time,
++      .ioctl = rx8010_ioctl,
++      .read_alarm = rx8010_read_alarm,
++      .set_alarm = rx8010_set_alarm,
++      .alarm_irq_enable = rx8010_alarm_irq_enable,
++};
++
+ static int rx8010_probe(struct i2c_client *client,
+                       const struct i2c_device_id *id)
+ {
+       struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
++      const struct rtc_class_ops *rtc_ops;
+       struct rx8010_data *rx8010;
+       int err = 0;
+@@ -468,16 +478,16 @@ static int rx8010_probe(struct i2c_clien
+               if (err) {
+                       dev_err(&client->dev, "unable to request IRQ\n");
+-                      client->irq = 0;
+-              } else {
+-                      rx8010_rtc_ops.read_alarm = rx8010_read_alarm;
+-                      rx8010_rtc_ops.set_alarm = rx8010_set_alarm;
+-                      rx8010_rtc_ops.alarm_irq_enable = rx8010_alarm_irq_enable;
++                      return err;
+               }
++
++              rtc_ops = &rx8010_rtc_ops_alarm;
++      } else {
++              rtc_ops = &rx8010_rtc_ops_default;
+       }
+       rx8010->rtc = devm_rtc_device_register(&client->dev, client->name,
+-              &rx8010_rtc_ops, THIS_MODULE);
++                                             rtc_ops, THIS_MODULE);
+       if (IS_ERR(rx8010->rtc)) {
+               dev_err(&client->dev, "unable to register the class device\n");
index 8a09d8aa9cc2ce5e880a7af38261c532971acdfe..bc8887dd139941bc8c4f9d8c3f6eb8adc2523f37 100644 (file)
@@ -175,3 +175,17 @@ ext4-fix-error-handling-code-in-add_new_gdb.patch
 ext4-fix-invalid-inode-checksum.patch
 ext4-fix-superblock-checksum-calculation-race.patch
 drm-ttm-fix-eviction-valuable-range-check.patch
+rtc-rx8010-don-t-modify-the-global-rtc-ops.patch
+tty-make-fontx-ioctl-use-the-tty-pointer-they-were-actually-passed.patch
+arm64-berlin-select-dw_apb_timer_of.patch
+cachefiles-handle-readpage-error-correctly.patch
+hil-parisc-disable-hil-driver-when-it-gets-stuck.patch
+arm-dts-mt7623-add-missing-pause-for-switchport.patch
+arm-samsung-fix-pm-debug-build-with-debug_ll-but-mmu.patch
+arm-s3c24xx-fix-missing-system-reset.patch
+device-property-keep-secondary-firmware-node-secondary-by-type.patch
+device-property-don-t-clear-secondary-pointer-for-shared-primary-firmware-node.patch
+kvm-arm64-fix-aarch32-handling-of-dbgd-ccint-scrext-and-dbgvcr.patch
+staging-comedi-cb_pcidas-allow-2-channel-commands-for-ao-subdevice.patch
+staging-octeon-repair-fixed-link-support.patch
+staging-octeon-drop-on-uncorrectable-alignment-or-fcs-error.patch
diff --git a/queue-4.19/staging-comedi-cb_pcidas-allow-2-channel-commands-for-ao-subdevice.patch b/queue-4.19/staging-comedi-cb_pcidas-allow-2-channel-commands-for-ao-subdevice.patch
new file mode 100644 (file)
index 0000000..9446ff6
--- /dev/null
@@ -0,0 +1,41 @@
+From 647a6002cb41d358d9ac5de101a8a6dc74748a59 Mon Sep 17 00:00:00 2001
+From: Ian Abbott <abbotti@mev.co.uk>
+Date: Wed, 21 Oct 2020 13:21:42 +0100
+Subject: staging: comedi: cb_pcidas: Allow 2-channel commands for AO subdevice
+
+From: Ian Abbott <abbotti@mev.co.uk>
+
+commit 647a6002cb41d358d9ac5de101a8a6dc74748a59 upstream.
+
+The "cb_pcidas" driver supports asynchronous commands on the analog
+output (AO) subdevice for those boards that have an AO FIFO.  The code
+(in `cb_pcidas_ao_check_chanlist()` and `cb_pcidas_ao_cmd()`) to
+validate and set up the command supports output to a single channel or
+to two channels simultaneously (the boards have two AO channels).
+However, the code in `cb_pcidas_auto_attach()` that initializes the
+subdevices neglects to initialize the AO subdevice's `len_chanlist`
+member, leaving it set to 0, but the Comedi core will "correct" it to 1
+if the driver neglected to set it.  This limits commands to use a single
+channel (either channel 0 or 1), but the limit should be two channels.
+Set the AO subdevice's `len_chanlist` member to be the same value as the
+`n_chan` member, which will be 2.
+
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
+Link: https://lore.kernel.org/r/20201021122142.81628-1-abbotti@mev.co.uk
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/comedi/drivers/cb_pcidas.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/staging/comedi/drivers/cb_pcidas.c
++++ b/drivers/staging/comedi/drivers/cb_pcidas.c
+@@ -1342,6 +1342,7 @@ static int cb_pcidas_auto_attach(struct
+               if (dev->irq && board->has_ao_fifo) {
+                       dev->write_subdev = s;
+                       s->subdev_flags |= SDF_CMD_WRITE;
++                      s->len_chanlist = s->n_chan;
+                       s->do_cmdtest   = cb_pcidas_ao_cmdtest;
+                       s->do_cmd       = cb_pcidas_ao_cmd;
+                       s->cancel       = cb_pcidas_ao_cancel;
diff --git a/queue-4.19/staging-octeon-drop-on-uncorrectable-alignment-or-fcs-error.patch b/queue-4.19/staging-octeon-drop-on-uncorrectable-alignment-or-fcs-error.patch
new file mode 100644 (file)
index 0000000..987736d
--- /dev/null
@@ -0,0 +1,90 @@
+From 49d28ebdf1e30d806410eefc7de0a7a1ca5d747c Mon Sep 17 00:00:00 2001
+From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
+Date: Fri, 16 Oct 2020 16:56:30 +0200
+Subject: staging: octeon: Drop on uncorrectable alignment or FCS error
+
+From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
+
+commit 49d28ebdf1e30d806410eefc7de0a7a1ca5d747c upstream.
+
+Currently in case of alignment or FCS error if the packet cannot be
+corrected it's still not dropped. Report the error properly and drop the
+packet while making the code around a little bit more readable.
+
+Fixes: 80ff0fd3ab64 ("Staging: Add octeon-ethernet driver files.")
+Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20201016145630.41852-1-alexander.sverdlin@nokia.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/octeon/ethernet-rx.c |   34 +++++++++++++++++++---------------
+ 1 file changed, 19 insertions(+), 15 deletions(-)
+
+--- a/drivers/staging/octeon/ethernet-rx.c
++++ b/drivers/staging/octeon/ethernet-rx.c
+@@ -80,15 +80,17 @@ static inline int cvm_oct_check_rcv_erro
+       else
+               port = work->word1.cn38xx.ipprt;
+-      if ((work->word2.snoip.err_code == 10) && (work->word1.len <= 64)) {
++      if ((work->word2.snoip.err_code == 10) && (work->word1.len <= 64))
+               /*
+                * Ignore length errors on min size packets. Some
+                * equipment incorrectly pads packets to 64+4FCS
+                * instead of 60+4FCS.  Note these packets still get
+                * counted as frame errors.
+                */
+-      } else if (work->word2.snoip.err_code == 5 ||
+-                 work->word2.snoip.err_code == 7) {
++              return 0;
++
++      if (work->word2.snoip.err_code == 5 ||
++          work->word2.snoip.err_code == 7) {
+               /*
+                * We received a packet with either an alignment error
+                * or a FCS error. This may be signalling that we are
+@@ -119,7 +121,10 @@ static inline int cvm_oct_check_rcv_erro
+                               /* Port received 0xd5 preamble */
+                               work->packet_ptr.s.addr += i + 1;
+                               work->word1.len -= i + 5;
+-                      } else if ((*ptr & 0xf) == 0xd) {
++                              return 0;
++                      }
++
++                      if ((*ptr & 0xf) == 0xd) {
+                               /* Port received 0xd preamble */
+                               work->packet_ptr.s.addr += i;
+                               work->word1.len -= i + 4;
+@@ -129,21 +134,20 @@ static inline int cvm_oct_check_rcv_erro
+                                           ((*(ptr + 1) & 0xf) << 4);
+                                       ptr++;
+                               }
+-                      } else {
+-                              printk_ratelimited("Port %d unknown preamble, packet dropped\n",
+-                                                 port);
+-                              cvm_oct_free_work(work);
+-                              return 1;
++                              return 0;
+                       }
++
++                      printk_ratelimited("Port %d unknown preamble, packet dropped\n",
++                                         port);
++                      cvm_oct_free_work(work);
++                      return 1;
+               }
+-      } else {
+-              printk_ratelimited("Port %d receive error code %d, packet dropped\n",
+-                                 port, work->word2.snoip.err_code);
+-              cvm_oct_free_work(work);
+-              return 1;
+       }
+-      return 0;
++      printk_ratelimited("Port %d receive error code %d, packet dropped\n",
++                         port, work->word2.snoip.err_code);
++      cvm_oct_free_work(work);
++      return 1;
+ }
+ static void copy_segments_to_skb(cvmx_wqe_t *work, struct sk_buff *skb)
diff --git a/queue-4.19/staging-octeon-repair-fixed-link-support.patch b/queue-4.19/staging-octeon-repair-fixed-link-support.patch
new file mode 100644 (file)
index 0000000..98f2d24
--- /dev/null
@@ -0,0 +1,63 @@
+From 179f5dc36b0a1aa31538d7d8823deb65c39847b3 Mon Sep 17 00:00:00 2001
+From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
+Date: Fri, 16 Oct 2020 12:18:57 +0200
+Subject: staging: octeon: repair "fixed-link" support
+
+From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
+
+commit 179f5dc36b0a1aa31538d7d8823deb65c39847b3 upstream.
+
+The PHYs must be registered once in device probe function, not in device
+open callback because it's only possible to register them once.
+
+Fixes: a25e278020bf ("staging: octeon: support fixed-link phys")
+Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20201016101858.11374-1-alexander.sverdlin@nokia.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/octeon/ethernet-mdio.c |    6 ------
+ drivers/staging/octeon/ethernet.c      |    9 +++++++++
+ 2 files changed, 9 insertions(+), 6 deletions(-)
+
+--- a/drivers/staging/octeon/ethernet-mdio.c
++++ b/drivers/staging/octeon/ethernet-mdio.c
+@@ -152,12 +152,6 @@ int cvm_oct_phy_setup_device(struct net_
+       phy_node = of_parse_phandle(priv->of_node, "phy-handle", 0);
+       if (!phy_node && of_phy_is_fixed_link(priv->of_node)) {
+-              int rc;
+-
+-              rc = of_phy_register_fixed_link(priv->of_node);
+-              if (rc)
+-                      return rc;
+-
+               phy_node = of_node_get(priv->of_node);
+       }
+       if (!phy_node)
+--- a/drivers/staging/octeon/ethernet.c
++++ b/drivers/staging/octeon/ethernet.c
+@@ -13,6 +13,7 @@
+ #include <linux/phy.h>
+ #include <linux/slab.h>
+ #include <linux/interrupt.h>
++#include <linux/of_mdio.h>
+ #include <linux/of_net.h>
+ #include <linux/if_ether.h>
+ #include <linux/if_vlan.h>
+@@ -875,6 +876,14 @@ static int cvm_oct_probe(struct platform
+                               break;
+                       }
++                      if (priv->of_node && of_phy_is_fixed_link(priv->of_node)) {
++                              if (of_phy_register_fixed_link(priv->of_node)) {
++                                      netdev_err(dev, "Failed to register fixed link for interface %d, port %d\n",
++                                                 interface, priv->port);
++                                      dev->netdev_ops = NULL;
++                              }
++                      }
++
+                       if (!dev->netdev_ops) {
+                               free_netdev(dev);
+                       } else if (register_netdev(dev) < 0) {
diff --git a/queue-4.19/tty-make-fontx-ioctl-use-the-tty-pointer-they-were-actually-passed.patch b/queue-4.19/tty-make-fontx-ioctl-use-the-tty-pointer-they-were-actually-passed.patch
new file mode 100644 (file)
index 0000000..cbd813b
--- /dev/null
@@ -0,0 +1,153 @@
+From 90bfdeef83f1d6c696039b6a917190dcbbad3220 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Mon, 26 Oct 2020 13:15:23 -0700
+Subject: tty: make FONTX ioctl use the tty pointer they were actually passed
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 90bfdeef83f1d6c696039b6a917190dcbbad3220 upstream.
+
+Some of the font tty ioctl's always used the current foreground VC for
+their operations.  Don't do that then.
+
+This fixes a data race on fg_console.
+
+Side note: both Michael Ellerman and Jiri Slaby point out that all these
+ioctls are deprecated, and should probably have been removed long ago,
+and everything seems to be using the KDFONTOP ioctl instead.
+
+In fact, Michael points out that it looks like busybox's loadfont
+program seems to have switched over to using KDFONTOP exactly _because_
+of this bug (ahem.. 12 years ago ;-).
+
+Reported-by: Minh Yuan <yuanmingbuaa@gmail.com>
+Acked-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Jiri Slaby <jirislaby@kernel.org>
+Cc: Greg KH <greg@kroah.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/vt/vt_ioctl.c |   32 +++++++++++++++++---------------
+ 1 file changed, 17 insertions(+), 15 deletions(-)
+
+--- a/drivers/tty/vt/vt_ioctl.c
++++ b/drivers/tty/vt/vt_ioctl.c
+@@ -244,7 +244,7 @@ int vt_waitactive(int n)
+ static inline int 
+-do_fontx_ioctl(int cmd, struct consolefontdesc __user *user_cfd, int perm, struct console_font_op *op)
++do_fontx_ioctl(struct vc_data *vc, int cmd, struct consolefontdesc __user *user_cfd, int perm, struct console_font_op *op)
+ {
+       struct consolefontdesc cfdarg;
+       int i;
+@@ -262,15 +262,16 @@ do_fontx_ioctl(int cmd, struct consolefo
+               op->height = cfdarg.charheight;
+               op->charcount = cfdarg.charcount;
+               op->data = cfdarg.chardata;
+-              return con_font_op(vc_cons[fg_console].d, op);
+-      case GIO_FONTX: {
++              return con_font_op(vc, op);
++
++      case GIO_FONTX:
+               op->op = KD_FONT_OP_GET;
+               op->flags = KD_FONT_FLAG_OLD;
+               op->width = 8;
+               op->height = cfdarg.charheight;
+               op->charcount = cfdarg.charcount;
+               op->data = cfdarg.chardata;
+-              i = con_font_op(vc_cons[fg_console].d, op);
++              i = con_font_op(vc, op);
+               if (i)
+                       return i;
+               cfdarg.charheight = op->height;
+@@ -278,7 +279,6 @@ do_fontx_ioctl(int cmd, struct consolefo
+               if (copy_to_user(user_cfd, &cfdarg, sizeof(struct consolefontdesc)))
+                       return -EFAULT;
+               return 0;
+-              }
+       }
+       return -EINVAL;
+ }
+@@ -924,7 +924,7 @@ int vt_ioctl(struct tty_struct *tty,
+               op.height = 0;
+               op.charcount = 256;
+               op.data = up;
+-              ret = con_font_op(vc_cons[fg_console].d, &op);
++              ret = con_font_op(vc, &op);
+               break;
+       }
+@@ -935,7 +935,7 @@ int vt_ioctl(struct tty_struct *tty,
+               op.height = 32;
+               op.charcount = 256;
+               op.data = up;
+-              ret = con_font_op(vc_cons[fg_console].d, &op);
++              ret = con_font_op(vc, &op);
+               break;
+       }
+@@ -952,7 +952,7 @@ int vt_ioctl(struct tty_struct *tty,
+       case PIO_FONTX:
+       case GIO_FONTX:
+-              ret = do_fontx_ioctl(cmd, up, perm, &op);
++              ret = do_fontx_ioctl(vc, cmd, up, perm, &op);
+               break;
+       case PIO_FONTRESET:
+@@ -969,11 +969,11 @@ int vt_ioctl(struct tty_struct *tty,
+               {
+               op.op = KD_FONT_OP_SET_DEFAULT;
+               op.data = NULL;
+-              ret = con_font_op(vc_cons[fg_console].d, &op);
++              ret = con_font_op(vc, &op);
+               if (ret)
+                       break;
+               console_lock();
+-              con_set_default_unimap(vc_cons[fg_console].d);
++              con_set_default_unimap(vc);
+               console_unlock();
+               break;
+               }
+@@ -1100,8 +1100,9 @@ struct compat_consolefontdesc {
+ };
+ static inline int
+-compat_fontx_ioctl(int cmd, struct compat_consolefontdesc __user *user_cfd,
+-                       int perm, struct console_font_op *op)
++compat_fontx_ioctl(struct vc_data *vc, int cmd,
++                 struct compat_consolefontdesc __user *user_cfd,
++                 int perm, struct console_font_op *op)
+ {
+       struct compat_consolefontdesc cfdarg;
+       int i;
+@@ -1119,7 +1120,8 @@ compat_fontx_ioctl(int cmd, struct compa
+               op->height = cfdarg.charheight;
+               op->charcount = cfdarg.charcount;
+               op->data = compat_ptr(cfdarg.chardata);
+-              return con_font_op(vc_cons[fg_console].d, op);
++              return con_font_op(vc, op);
++
+       case GIO_FONTX:
+               op->op = KD_FONT_OP_GET;
+               op->flags = KD_FONT_FLAG_OLD;
+@@ -1127,7 +1129,7 @@ compat_fontx_ioctl(int cmd, struct compa
+               op->height = cfdarg.charheight;
+               op->charcount = cfdarg.charcount;
+               op->data = compat_ptr(cfdarg.chardata);
+-              i = con_font_op(vc_cons[fg_console].d, op);
++              i = con_font_op(vc, op);
+               if (i)
+                       return i;
+               cfdarg.charheight = op->height;
+@@ -1218,7 +1220,7 @@ long vt_compat_ioctl(struct tty_struct *
+        */
+       case PIO_FONTX:
+       case GIO_FONTX:
+-              ret = compat_fontx_ioctl(cmd, up, perm, &op);
++              ret = compat_fontx_ioctl(vc, cmd, up, perm, &op);
+               break;
+       case KDFONTOP: