]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sc16is7xx: Defer probe if device read fails
authorAnnaliese McDermond <nh6z@nh6z.net>
Mon, 29 Mar 2021 20:10:49 +0000 (20:10 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:25 +0000 (10:49 +0200)
commitbc9ecd8659b00198d3af25b0e47ff89e10d4ebec
tree3822ddbf85e9a97b94398b9553c890efb7e88226
parentc4eb0709a792f081e6a3960bb15b900e77334615
sc16is7xx: Defer probe if device read fails

commit 158e800e0fde91014812f5cdfb92ce812e3a33b4 upstream.

A test was added to the probe function to ensure the device was
actually connected and working before successfully completing a
probe.  If the device was actually there, but the I2C bus was not
ready yet for whatever reason, the probe fails permanently.

Change the probe so that we defer the probe on a regmap read
failure so that we try the probe again when the dependent drivers
are potentially loaded.  This should not affect the case where the
device truly isn't present because the probe will never successfully
complete.

Fixes: 2aa916e67db3 ("sc16is7xx: Read the LSR register for basic device presence check")
Cc: stable@vger.kernel.org
Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
Link: https://lore.kernel.org/r/010101787f9c3fd8-c1815c00-2d6b-4c85-a96a-a13e68597fda-000000@us-west-2.amazonses.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c