summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-bcm2835.c
diff options
context:
space:
mode:
authorValmer Huhn <valmer.huhn@concurrent-rt.com>2020-08-13 19:52:55 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-03 12:24:27 +0300
commitce755e4eae3e7f782d6a690ac6bd85ac9671b5e0 (patch)
tree5b79413292aaa868a76e198fb6e7f95b3ff84bb2 /drivers/irqchip/irq-bcm2835.c
parente12f36220f6f89ecf78edc98a153d548352d6951 (diff)
downloadlinux-ce755e4eae3e7f782d6a690ac6bd85ac9671b5e0.tar.xz
serial: 8250_exar: Fix number of ports for Commtech PCIe cards
commit c6b9e95dde7b54e6a53c47241201ab5a4035c320 upstream. The following in 8250_exar.c line 589 is used to determine the number of ports for each Exar board: nr_ports = board->num_ports ? board->num_ports : pcidev->device & 0x0f; If the number of ports a card has is not explicitly specified, it defaults to the rightmost 4 bits of the PCI device ID. This is prone to error since not all PCI device IDs contain a number which corresponds to the number of ports that card provides. This particular case involves COMMTECH_4222PCIE, COMMTECH_4224PCIE and COMMTECH_4228PCIE cards with device IDs 0x0022, 0x0020 and 0x0021. Currently the multiport cards receive 2, 0 and 1 port instead of 2, 4 and 8 ports respectively. To fix this, each Commtech Fastcom PCIe card is given a struct where the number of ports is explicitly specified. This ensures 'board->num_ports' is used instead of the default 'pcidev->device & 0x0f'. Fixes: d0aeaa83f0b0 ("serial: exar: split out the exar code from 8250_pci") Signed-off-by: Valmer Huhn <valmer.huhn@concurrent-rt.com> Tested-by: Valmer Huhn <valmer.huhn@concurrent-rt.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200813165255.GC345440@icarus.concurrent-rt.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/irqchip/irq-bcm2835.c')
0 files changed, 0 insertions, 0 deletions