WSL2-Linux-Kernel/drivers
Hugo Villeneuve b67b421a82 serial: max310x: improve crystal stable clock detection
commit 93cd256ab224c2519e7c4e5f58bb4f1ac2bf0965 upstream.

Some people are seeing a warning similar to this when using a crystal:

    max310x 11-006c: clock is not stable yet

The datasheet doesn't mention the maximum time to wait for the clock to be
stable when using a crystal, and it seems that the 10ms delay in the driver
is not always sufficient.

Jan Kundrát reported that it took three tries (each separated by 10ms) to
get a stable clock.

Modify behavior to check stable clock ready bit multiple times (20), and
waiting 10ms between each try.

Note: the first draft of the driver originally used a 50ms delay, without
checking the clock stable bit.
Then a loop with 1000 retries was implemented, each time reading the clock
stable bit.

Fixes: 4cf9a888fd ("serial: max310x: Check the clock readiness")
Cc: stable@vger.kernel.org
Suggested-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Link: https://www.spinics.net/lists/linux-serial/msg35773.html
Link: https://lore.kernel.org/all/20240110174015.6f20195fde08e5c9e64e5675@hugovil.com/raw
Link: e5dfe3e4a7
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20240116213001.3691629-3-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 08:55:07 +01:00
..
accessibility
acpi ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events 2024-02-23 08:54:38 +01:00
amba amba: bus: fix refcount leak 2023-09-19 12:22:47 +02:00
android binder: signal epoll threads of self-work 2024-02-23 08:55:06 +01:00
ata ata: pata_isapnp: Add missing error check for devm_ioport_map() 2023-12-03 07:31:21 +01:00
atm atm: idt77252: fix a memleak in open_card_ubr0 2024-02-23 08:54:57 +01:00
auxdisplay
base arm64: irq: set the correct node for VMAP stack 2024-02-23 08:54:36 +01:00
bcma
block block/rnbd-srv: Check for unlikely string overflow 2024-02-23 08:54:43 +01:00
bluetooth Bluetooth: qca: Set both WIDEBAND_SPEECH and LE_STATES quirks for QCA2066 2024-02-23 08:54:45 +01:00
bus bus: mhi: host: Add alignment check for event ring read pointer 2024-02-23 08:54:33 +01:00
cdrom
char hwrng: core - Fix page fault dead lock on mmap-ed hwrng 2024-02-23 08:54:24 +01:00
clk clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks 2024-02-23 08:54:49 +01:00
clocksource clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware 2023-11-28 16:56:15 +00:00
comedi
connector
counter counter: microchip-tcb-capture: Fix the use of internal GCLK logic 2023-10-19 23:05:37 +02:00
cpufreq cpufreq: intel_pstate: Refine computation of P-state for given frequency 2024-02-23 08:54:35 +01:00
cpuidle powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT 2023-09-19 12:22:42 +02:00
crypto crypto: stm32/crc32 - fix parsing list of devices 2024-02-23 08:54:39 +01:00
cxl cxl/mem: Fix shutdown order 2023-11-20 11:08:27 +01:00
dax dax/kmem: Pass valid argument to memory_group_register_static 2023-07-23 13:47:17 +02:00
dca
devfreq PM / devfreq: Synchronize devfreq_monitor_[start/stop] 2024-02-23 08:54:38 +01:00
dio
dma dmaengine: fsl-qdma: Fix a memory leak related to the queue command DMA 2024-02-23 08:54:56 +01:00
dma-buf dma-buf/sw_sync: Avoid recursive lock during fence signal 2023-08-30 16:18:21 +02:00
edac EDAC/thunderx: Fix possible out-of-bounds string access 2024-01-25 14:52:32 -08:00
eisa
extcon extcon: usbc-tusb320: Convert to i2c's .probe_new() 2023-07-23 13:47:31 +02:00
firewire firewire: core: correct documentation of fw_csr_string() kernel API 2024-02-23 08:55:05 +01:00
firmware firmware: arm_scmi: Check mailbox/SMT channel for consistency 2024-02-23 08:54:32 +01:00
fpga
fsi fsi: aspeed: Reset master errors after CFAM reset 2023-09-19 12:22:46 +02:00
gnss
gpio gpio: eic-sprd: Clear interrupt after set the interrupt type 2024-02-23 08:54:35 +01:00
gpu drm/prime: Support page array >= 4GB 2024-02-23 08:55:07 +01:00
greybus
hid HID: wacom: Do not register input devices until after hid_hw_start 2024-02-23 08:55:03 +01:00
hsi
hv
hwmon hwmon: (coretemp) Fix bogus core_id to attr name mapping 2024-02-23 08:54:57 +01:00
hwspinlock
hwtracing coresight: etm4x: Fix width of CCITMIN field 2024-01-25 14:52:32 -08:00
i2c i2c: i801: Fix block process call transactions 2024-02-23 08:55:04 +01:00
i3c i3c: master: cdns: Update maximum prescaler value for i2c clock 2024-02-23 08:54:50 +01:00
idle
iio iio: accel: bma400: Fix a compilation problem 2024-02-23 08:55:07 +01:00
infiniband IB/ipoib: Fix mcast list locking 2024-02-23 08:54:48 +01:00
input Input: atkbd - skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID 2024-02-23 08:55:00 +01:00
interconnect interconnect: Treat xlate() returning NULL node as an error 2024-01-05 15:13:32 +01:00
iommu iommu/dma: Trace bounce buffer usage when mapping buffers 2024-01-25 14:52:49 -08:00
ipack
irqchip irqchip/stm32-exti: add missing DT IRQ flag translation 2023-11-08 17:26:45 +01:00
isdn mISDN: Update parameter type of dsp_cmx_send() 2023-08-16 18:22:01 +02:00
leds leds: trigger: panic: Don't register panic notifier if creating the trigger failed 2024-02-23 08:54:49 +01:00
macintosh
mailbox mailbox: arm_mhuv2: Fix a bug for mhuv2_sender_interrupt 2024-02-23 08:54:50 +01:00
mcb mcb: fix error handling for different scenarios when parsing 2023-11-28 16:56:31 +00:00
md md: Whenassemble the array, consult the superblock of the freshest device 2024-02-23 08:54:44 +01:00
media media: rc: bpf attach/detach requires write permission 2024-02-23 08:55:07 +01:00
memory
memstick
message
mfd mfd: ti_am335x_tscadc: Fix TI SoC dependencies 2024-02-23 08:54:50 +01:00
misc misc: fastrpc: Mark all sessions as invalid in cb_remove 2024-02-23 08:55:06 +01:00
mmc mmc: mmc_spi: remove custom DMA mapped buffers 2024-02-23 08:54:26 +01:00
most
mtd mtd: Fix gluebi NULL pointer dereference caused by ftl notifier 2024-01-25 14:52:34 -08:00
mux
net hv_netvsc: Fix race condition between netvsc_probe and netvsc_remove 2024-02-23 08:55:07 +01:00
nfc
ntb ntb: Fix calculation ntb_transport_tx_free_entry() 2023-09-19 12:22:51 +02:00
nubus
nvdimm nd_btt: Make BTT lanes preemptible 2023-11-20 11:08:22 +01:00
nvme nvmet-tcp: Fix the H2C expected PDU len calculation 2024-01-25 14:52:52 -08:00
nvmem nvmem: imx: correct nregs for i.MX6UL 2023-11-08 17:26:41 +01:00
of of: unittest: Fix compile in the non-dynamic case 2024-02-23 08:55:01 +01:00
opp OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd() 2023-09-19 12:22:31 +02:00
parisc parisc: iosapic.c: Fix sparse warnings 2023-10-06 13:18:15 +02:00
parport parport: parport_serial: Add Brainboxes device IDs and geometry 2024-01-25 14:52:31 -08:00
pci PCI/AER: Decode Requester ID when no error info found 2024-02-23 08:54:51 +01:00
pcmcia pcmcia: ds: fix possible name leak in error path in pcmcia_device_add() 2023-11-20 11:08:27 +01:00
perf perf: hisi: Fix use-after-free when register pmu fails 2023-11-20 11:08:21 +01:00
phy phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP 2024-02-23 08:54:56 +01:00
pinctrl pinctrl: lochnagar: Don't build on MIPS 2024-01-25 14:52:27 -08:00
platform platform/x86: intel-vbtn: Fix missing tablet-mode-switch events 2024-01-25 14:52:29 -08:00
pnp PNP: ACPI: fix fortify warning 2024-02-23 08:54:38 +01:00
power power: supply: bq256xx: fix some problem in bq256xx_hw_init 2024-01-25 14:52:50 -08:00
powercap
pps
ps3
ptp ptp: annotate data-race around q->head and q->tail 2023-11-28 16:56:23 +00:00
pwm pwm: jz4740: Don't use dev_err_probe() in .request() 2024-01-25 14:52:48 -08:00
rapidio
ras
regulator regulator: core: Only increment use_count when enable_count changes 2024-02-23 08:54:37 +01:00
remoteproc
reset reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning 2024-01-25 14:52:30 -08:00
rpmsg rpmsg: virtio: Free driver_override when rpmsg_remove() 2024-02-23 08:54:24 +01:00
rtc rtc: Adjust failure return code for cmos_set_alarm() 2024-02-23 08:54:26 +01:00
s390 s390/scm: fix virtual vs physical address confusion 2024-01-25 14:52:30 -08:00
sbus
scsi scsi: Revert "scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock" 2024-02-23 08:55:05 +01:00
sh
siox
slimbus
soc soc: qcom: llcc: Fix dis_cap_alloc and retain_on_pc configuration 2024-01-25 14:52:39 -08:00
soundwire soundwire: stream: fix NULL pointer dereference for multi_link 2023-12-20 15:17:41 +01:00
spi spi: ppc4xx: Drop write-only variable 2024-02-23 08:55:02 +01:00
spmi
ssb
staging staging: iio: ad5933: fix type mismatch regression 2024-02-23 08:55:06 +01:00
target scsi: target: core: Fix deadlock due to recursive locking 2023-10-10 21:59:07 +02:00
tc
tee tee: optee: Fix supplicant based device enumeration 2023-12-13 18:36:38 +01:00
thermal thermal: core: prevent potential string overflow 2023-11-20 11:08:15 +01:00
thunderbolt thunderbolt: Check that lane 1 is in CL0 before enabling lane bonding 2023-10-19 23:05:36 +02:00
tty serial: max310x: improve crystal stable clock detection 2024-02-23 08:55:07 +01:00
uio uio: Fix use-after-free in uio_open 2024-01-25 14:52:31 -08:00
usb usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend 2024-02-23 08:55:04 +01:00
vdpa vdpa/mlx5: preserve CVQ vringh index 2023-12-13 18:36:31 +01:00
vfio vfio/type1: fix cap_migration information leak 2023-09-19 12:22:41 +02:00
vhost vhost: use kzalloc() instead of kmalloc() followed by memset() 2024-02-23 08:55:00 +01:00
video fbdev: flush deferred work in fb_deferred_io_fsync() 2024-01-25 14:52:48 -08:00
virt
virtio virtio-mmio: fix memory leak of vm_dev 2023-11-08 17:26:36 +01:00
visorbus
vlynq
vme
w1 w1: fix loop in w1_fini() 2023-07-23 13:47:20 +02:00
watchdog watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786 2024-02-23 08:54:49 +01:00
xen xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import 2024-02-23 08:54:50 +01:00
zorro
Kconfig
Makefile