--- /dev/null
+From 5c31ef91c06db7800ad573174bd92be4df34ecb2 Mon Sep 17 00:00:00 2001
+From: Angelo Butti <buttiangelo@gmail.com>
+Date: Mon, 7 Nov 2016 16:39:03 +0100
+Subject: 8250: FIX Fourth port offset of Pericom PI7C9X7954 boards
+
+From: Angelo Butti <buttiangelo@gmail.com>
+
+commit 5c31ef91c06db7800ad573174bd92be4df34ecb2 upstream.
+
+Hi,
+below patch to fix Fourth port offset of Percom PI7C9X7954 boards.
+
+I had a problem using Fourth port on a pci express serial board based on Pericom
+PI7C9X7954. Reading datasheet I notice a "special" offset assign to this port
+when used in I/O mode.
+
+Offset 0x0 -> UART 0
+Offset 0x8 -> UART 1
+Offset 0x10 -> UART 2
+Offset 0x38 -> UART 3 <<---- This don't follow a logical sequence
+
+This patch add a different init to last port, to have right offset.
+
+I check also Pericom 7952 and 7958 but that devices follow logical sequence,
+so they are ok.
+
+Regards,
+Angelo
+
+Signed-off-by: Angelo Butti <buttiangelo@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/serial/8250/8250_pci.c | 34 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -1330,6 +1330,30 @@ static int pci_default_setup(struct seri
+ return setup_port(priv, port, bar, offset, board->reg_shift);
+ }
+
++static int pci_pericom_setup(struct serial_private *priv,
++ const struct pciserial_board *board,
++ struct uart_8250_port *port, int idx)
++{
++ unsigned int bar, offset = board->first_offset, maxnr;
++
++ bar = FL_GET_BASE(board->flags);
++ if (board->flags & FL_BASE_BARS)
++ bar += idx;
++ else
++ offset += idx * board->uart_offset;
++
++ if (idx==3)
++ offset = 0x38;
++
++ maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
++ (board->reg_shift + 3);
++
++ if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
++ return 1;
++
++ return setup_port(priv, port, bar, offset, board->reg_shift);
++}
++
+ static int
+ ce4100_serial_setup(struct serial_private *priv,
+ const struct pciserial_board *board,
+@@ -2097,6 +2121,16 @@ static struct pci_serial_quirk pci_seria
+ .exit = pci_plx9050_exit,
+ },
+ /*
++ * Pericom (Only 7954 - It have a offset jump for port 4)
++ */
++ {
++ .vendor = PCI_VENDOR_ID_PERICOM,
++ .device = PCI_DEVICE_ID_PERICOM_PI7C9X7954,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .setup = pci_pericom_setup,
++ },
++ /*
+ * PLX
+ */
+ {
--- /dev/null
+From 0bdb50c531f7377a9da80d3ce2d61f389c84cb30 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neil@brown.name>
+Date: Sun, 6 Jan 2019 21:06:25 +1100
+Subject: dm: fix to_sector() for 32bit
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: NeilBrown <neil@brown.name>
+
+commit 0bdb50c531f7377a9da80d3ce2d61f389c84cb30 upstream.
+
+A dm-raid array with devices larger than 4GB won't assemble on
+a 32 bit host since _check_data_dev_sectors() was added in 4.16.
+This is because to_sector() treats its argument as an "unsigned long"
+which is 32bits (4GB) on a 32bit host. Using "unsigned long long"
+is more correct.
+
+Kernels as early as 4.2 can have other problems due to to_sector()
+being used on the size of a device.
+
+Fixes: 0cf4503174c1 ("dm raid: add support for the MD RAID0 personality")
+cc: stable@vger.kernel.org (v4.2+)
+Reported-and-tested-by: Guillaume Perréal <gperreal@free.fr>
+Signed-off-by: NeilBrown <neil@brown.name>
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/device-mapper.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/linux/device-mapper.h
++++ b/include/linux/device-mapper.h
+@@ -627,7 +627,7 @@ extern struct ratelimit_state dm_ratelim
+ */
+ #define dm_target_offset(ti, sector) ((sector) - (ti)->begin)
+
+-static inline sector_t to_sector(unsigned long n)
++static inline sector_t to_sector(unsigned long long n)
+ {
+ return (n >> SECTOR_SHIFT);
+ }
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
-@@ -4976,10 +4976,10 @@ static struct pci_device_id serial_pci_t
+@@ -5010,10 +5010,10 @@ static struct pci_device_id serial_pci_t
*/
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_2SDB,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SDB,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_pericom_PI7C9X7954 },
-@@ -4988,10 +4988,10 @@ static struct pci_device_id serial_pci_t
+@@ -5022,10 +5022,10 @@ static struct pci_device_id serial_pci_t
pbn_pericom_PI7C9X7954 },
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM232_2DB,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4DB,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_pericom_PI7C9X7954 },
-@@ -5000,10 +5000,10 @@ static struct pci_device_id serial_pci_t
+@@ -5034,10 +5034,10 @@ static struct pci_device_id serial_pci_t
pbn_pericom_PI7C9X7954 },
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_2SMDB,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SMDB,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_pericom_PI7C9X7954 },
-@@ -5012,13 +5012,13 @@ static struct pci_device_id serial_pci_t
+@@ -5046,13 +5046,13 @@ static struct pci_device_id serial_pci_t
pbn_pericom_PI7C9X7954 },
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_1,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM422_4,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_pericom_PI7C9X7954 },
-@@ -5027,16 +5027,16 @@ static struct pci_device_id serial_pci_t
+@@ -5061,16 +5061,16 @@ static struct pci_device_id serial_pci_t
pbn_pericom_PI7C9X7954 },
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM_2S,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM232_4,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_pericom_PI7C9X7954 },
-@@ -5045,13 +5045,13 @@ static struct pci_device_id serial_pci_t
+@@ -5079,13 +5079,13 @@ static struct pci_device_id serial_pci_t
pbn_pericom_PI7C9X7954 },
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM_2SM,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM422_8,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_pericom_PI7C9X7958 },
-@@ -5060,19 +5060,19 @@ static struct pci_device_id serial_pci_t
+@@ -5094,19 +5094,19 @@ static struct pci_device_id serial_pci_t
pbn_pericom_PI7C9X7958 },
{ PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
-@@ -2126,6 +2126,111 @@ static struct pci_serial_quirk pci_seria
+@@ -2160,6 +2160,111 @@ static struct pci_serial_quirk pci_seria
.setup = pci_default_setup,
.exit = pci_plx9050_exit,
},
drm-i915-relax-mmap-vma-check.patch
serial-uartps-fix-stuck-isr-if-rx-disabled-with-non-empty-fifo.patch
serial-8250_of-assume-reg-shift-of-2-for-mrvl-mmp-uart.patch
+8250-fix-fourth-port-offset-of-pericom-pi7c9x7954-boards.patch
serial-8250_pci-fix-number-of-ports-for-acces-serial-cards.patch
serial-8250_pci-have-acces-cards-that-use-the-four-port-pericom-pi7c9x7954-chip-use-the-pci_pericom_setup.patch
jbd2-clear-dirty-flag-when-revoking-a-buffer-from-an-older-transaction.patch
powerpc-fix-32-bit-kvm-pr-lockup-and-host-crash-with-macos-guest.patch
powerpc-ptrace-simplify-vr_get-set-to-avoid-gcc-warning.patch
arm-s3c24xx-fix-boolean-expressions-in-osiris_dvs_notify.patch
+dm-fix-to_sector-for-32bit.patch