WSL2-Linux-Kernel/drivers
Maciej W. Rozycki f7adc73878 serial: 8250: Handle custom baud rates in UPF_MAGIC_MULTIPLIER range
Handle custom baud rates requested in the UPF_MAGIC_MULTIPLIER range
with BOTHER.  Currently matching is exact, that is if a baud rate that
is not either of clk/4 or clk/8 is requested, then we fall through to
the default case, which will just divide the clock rate by 16 times the
rate requested, round it to closest integer, and possibly yield even
worse results then if clamping to the extra baud rates was chosen.

So for example if we have the usual base rate of 115200 and request a
rate of 230399, then the fall-through divisor calculation will yield 1,
and consequently the baud rate of 115200 will be programmed even though
obviously the magic rate of 230400 would be more appropriate.

Make the selection of the magic rates range-qualified then and use clk/4
for rates from clk/6 up (assuming `serial8250_get_baud_rate' has already
rejected any rates too far beyond clk/4), and otherwise use clk/8 for
rates from clk/12 up, and finally fall through to the standard divisor
calculation.  Explicitly void using the undocumented rate of 153600bps
and stick to documented divisor values only.

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Link: https://lore.kernel.org/r/alpine.DEB.2.21.2105200232090.29169@angie.orcam.me.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-16 09:20:29 +02:00
..
accessibility tty: no checking of tty_unregister_ldisc 2021-05-13 16:57:17 +02:00
acpi Merge branch 'acpi-bus' 2021-06-11 17:57:24 +02:00
amba
android binder: Return EFAULT if we fail BINDER_ENABLE_ONEWAY_SPAM_DETECTION 2021-05-13 20:35:26 +02:00
ata pci-v5.13-changes 2021-05-05 13:24:11 -07:00
atm atm: firestream: Use fallthrough pseudo-keyword 2021-05-07 16:01:08 -07:00
auxdisplay treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
base drivers/base/memory: fix trying offlining memory blocks with memory holes on aarch64 2021-06-05 08:58:11 -07:00
bcma
block block-5.13-2021-06-12 2021-06-12 11:59:58 -07:00
bluetooth Linux 5.13-rc6 2021-06-14 09:14:43 +02:00
bus Char/Misc driver fixes for 5.13-rc6 2021-06-12 12:13:55 -07:00
cdrom cdrom: gdrom: initialize global variable at init time 2021-05-13 18:58:44 +02:00
char tty: make use of tty_get_{char,frame}_size 2021-06-15 14:03:27 +02:00
clk clk: Skip clk provider registration when np is NULL 2021-05-11 08:47:25 +02:00
clocksource clocksource/drivers/hyper-v: Re-enable VDSO_CLOCKMODE_HVCLOCK on X86 2021-05-14 14:55:13 +02:00
comedi
connector
counter
cpufreq Fix an idle CPU selection bug, and an AMD Ryzen maximum frequency enumeration bug. 2021-05-15 10:24:48 -07:00
cpuidle
crypto Revert "crypto: cavium/nitrox - add an error message to explain the failure of pci_request_mem_regions" 2021-05-13 17:23:05 +02:00
cxl
dax
dca
devfreq
dio
dma dmaengine: idxd: Use cpu_feature_enabled() 2021-06-03 16:32:59 +02:00
dma-buf dma-buf: fix unintended pin/unpin warnings 2021-05-20 14:02:27 +02:00
edac x86/msr: Rename MSR_K8_SYSCFG to MSR_AMD64_SYSCFG 2021-05-10 07:51:38 +02:00
eisa
extcon - Core Frameworks 2021-04-28 15:59:13 -07:00
firewire
firmware EFI fixes for v5.13-rc 2021-05-23 11:39:02 +02:00
fpga
fsi
gnss
gpio gpio: wcd934x: Fix shift-out-of-bounds error 2021-05-27 09:51:35 +02:00
gpu Merge tag 'amd-drm-fixes-5.13-2021-06-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes 2021-06-11 11:17:10 +10:00
greybus
hid HID: asus: Cleanup Asus T101HA keyboard-dock handling 2021-05-27 15:40:35 +02:00
hsi
hv printk changes for 5.13 2021-04-27 18:09:44 -07:00
hwmon hwmon: (tps23861) correct shunt LSB values 2021-06-10 08:40:09 -07:00
hwspinlock
hwtracing ARM: 2021-05-01 10:14:08 -07:00
i2c i2c: qcom-geni: Suspend and resume the bus during SYSTEM_SLEEP_PM ops 2021-06-04 22:32:58 +02:00
i3c
ide
idle
iio iio: adc: ad7793: Add missing error code in ad7793_setup() 2021-05-22 08:32:36 +01:00
infiniband IB/mlx5: Fix initializing CQ fragments buffer 2021-06-10 08:59:34 -03:00
input tty: make tty_ldisc_ops a param in tty_unregister_ldisc 2021-05-13 16:57:16 +02:00
interconnect interconnect: qcom: Add missing MODULE_DEVICE_TABLE 2021-05-11 07:26:31 +03:00
iommu iommu/vt-d: Fix sysfs leak in alloc_iommu() 2021-05-27 16:07:08 +02:00
ipack tty: make tty_operations::chars_in_buffer return uint 2021-05-13 18:29:11 +02:00
irqchip irqchip: Remove redundant error printing 2021-05-16 13:07:18 +01:00
isdn Merge 5.13-rc4 into tty-next 2021-05-31 09:44:28 +02:00
leds leds: lp5523: check return value of lp5xx_read and jump to cleanup code 2021-05-13 17:30:15 +02:00
lightnvm
macintosh
mailbox - qcom: enable support for SM8350 and SC7280 2021-04-28 16:10:33 -07:00
mcb
md block-5.13-2021-06-12 2021-06-12 11:59:58 -07:00
media media: gspca: properly check for errors in po1030_probe() 2021-05-13 18:58:32 +02:00
memory .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
memstick
message
mfd - Core Frameworks 2021-04-28 15:59:13 -07:00
misc Linux 5.13-rc6 2021-06-14 09:14:43 +02:00
mmc Linux 5.13-rc6 2021-06-14 09:14:43 +02:00
most
mtd mtd: parsers: ofpart: fix parsing subpartitions 2021-05-10 18:34:30 +02:00
mux
net Linux 5.13-rc6 2021-06-14 09:14:43 +02:00
nfc NFC: nfcmrvl: fix kernel-doc syntax in file headers 2021-05-23 17:26:38 -07:00
ntb
nubus
nvdimm include: remove pagemap.h from blkdev.h 2021-05-06 19:24:11 -07:00
nvme nvmet: fix freeing unallocated p2pmem 2021-06-02 10:10:38 +03:00
nvmem
of of: overlay: Remove redundant assignment to ret 2021-05-03 13:57:56 -05:00
opp
parisc
parport treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
pci PCI/MSI: Fix MSIs for generic hosts that use device-tree's "msi-map" 2021-05-25 18:37:37 -05:00
pcmcia
perf ARM: 2021-05-01 10:14:08 -07:00
phy phy: Sparx5 Eth SerDes: check return value after calling platform_get_resource() 2021-06-03 11:18:19 +05:30
pinctrl pinctrl: qcom: Make it possible to select SC8180x TLMM 2021-06-09 13:15:20 +02:00
platform platform/mellanox: mlxreg-hotplug: Revert "move to use request_irq by IRQF_NO_AUTOEN flag" 2021-06-04 22:03:13 +02:00
pnp
power power supply and reset changes for the v5.13 series 2021-04-28 15:43:58 -07:00
powercap
pps tty: no checking of tty_unregister_ldisc 2021-05-13 16:57:17 +02:00
ps3
ptp ptp: ocp: Fix a resource leak in an error handling path 2021-05-12 14:06:33 -07:00
pwm pwm: Changes for v5.13-rc1 2021-05-05 12:53:16 -07:00
rapidio rapidio: handle create_workqueue() failure 2021-05-13 18:32:19 +02:00
ras
regulator regulator: Fixes for v5.14 2021-06-08 09:41:16 -07:00
remoteproc remoteproc updates for v5.13 2021-05-04 11:13:33 -07:00
reset pci-v5.13-changes 2021-05-05 13:24:11 -07:00
rpmsg
rtc RTC for 5.13 2021-05-03 12:15:21 -07:00
s390 Merge 5.13-rc4 into tty-next 2021-05-31 09:44:28 +02:00
sbus
scsi SCSI fixes on 20210613 2021-06-13 12:25:33 -07:00
sh
siox
slimbus
soc soc: amlogic: meson-clk-measure: remove redundant dev_err call in meson_msr_probe() 2021-05-31 09:26:58 +02:00
soundwire soundwire: qcom: fix handling of qcom,ports-block-pack-mode 2021-05-13 11:14:13 +05:30
spi spi: stm32-qspi: Always wait BUSY bit to be cleared in stm32_qspi_wait_cmd() 2021-06-03 13:55:36 +01:00
spmi
ssb
staging tty: make use of tty_get_{char,frame}_size 2021-06-15 14:03:27 +02:00
target scsi: target: core: Fix warning on realtime kernels 2021-05-31 22:59:13 -04:00
tc
tee OP-TEE use export_uuid() to copy UUID 2021-06-05 15:43:11 -07:00
thermal - Fix out-of-spec hardware (1st gen Hygon) which does not implement 2021-06-06 12:25:43 -07:00
thunderbolt thunderbolt: usb4: Fix NVM read buffer bounds and offset issue 2021-05-20 11:52:58 +03:00
tty serial: 8250: Handle custom baud rates in UPF_MAGIC_MULTIPLIER range 2021-06-16 09:20:29 +02:00
uio uio_hv_generic: Fix another memory leak in error handling paths 2021-05-14 13:26:04 +02:00
usb tty: make use of tty_get_{char,frame}_size 2021-06-15 14:03:27 +02:00
vdpa {net,vdpa}/mlx5: Configure interface MAC into mpfs L2 table 2021-05-18 23:01:48 -07:00
vfio vfio/platform: fix module_put call in error flow 2021-05-24 13:40:13 -06:00
vhost virtio,vhost,vdpa: features, fixes 2021-05-05 13:31:39 -07:00
video Revert "fb_defio: Remove custom address_space_operations" 2021-06-01 17:38:40 +02:00
virt nitro_enclaves: Fix stale file descriptors on failed usercopy 2021-04-29 19:06:49 +02:00
virtio virtio_pci_modern: correct sparse tags for notify 2021-05-04 04:19:59 -04:00
visorbus
vlynq
vme
w1
watchdog - Core Frameworks 2021-04-28 15:59:13 -07:00
xen xen-pciback: reconfigure also from backend watch handler 2021-05-21 09:55:16 +02:00
zorro
Kconfig
Makefile virtio,vhost,vdpa: features, fixes 2021-05-05 13:31:39 -07:00