Skip to content

sc16is7xx: Defer probe if device read fails - #4272

Merged
pelwell merged 1 commit into
raspberrypi:rpi-5.10.yfrom
mcdermj:am-tty-fixes
Apr 12, 2021
Merged

pelwell merged 1 commit into
raspberrypi:rpi-5.10.yfrom
mcdermj:am-tty-fixes

Conversation

@mcdermj

@mcdermj mcdermj commented Apr 12, 2021

Copy link
Copy Markdown
Contributor

Commit 158e800 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: 2aa916e ("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

Commit 158e800 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: 2aa916e ("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>
@mcdermj

mcdermj commented Apr 12, 2021

Copy link
Copy Markdown
Contributor Author

@pelwell Here is another fix that we found we needed for our board having to do with the sc16is7xx serial port driver. I think other folks are using this device as well. This was accepted upstream into tty-next and should be filtering its way down to the stable kernels too.

@pelwell
pelwell merged commit 911edcc into raspberrypi:rpi-5.10.y Apr 12, 2021
@pelwell

pelwell commented Apr 12, 2021

Copy link
Copy Markdown
Contributor

Thanks!

popcornmix added a commit to raspberrypi/firmware that referenced this pull request Apr 19, 2021
kernel: Update Allo Piano Plus DAC driver
See: raspberrypi/linux#4258

kernel: sc16is7xx: Defer probe if device read fails
See: raspberrypi/linux#4272

kernel: Codec Fixes for the tlv320aic32x4 codec on 5.10
See: raspberrypi/linux#4273

kernel: HDR improvements
See: raspberrypi/linux#4268

kernel: staging: vcsm-cma: Fix memory leak from not detaching dmabuf
See: raspberrypi/linux#4277

kernel: vc4/kms: vc4_plane: Support 2020 colourspace for yuv planes
See: raspberrypi/linux#4276

kernel: Prevent A4tech FHD 1080p webcams from being suspended automatically
See: raspberrypi/linux#4283

kernel: overlays: ghost-amp: Add DAC mute control
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Apr 19, 2021
kernel: Update Allo Piano Plus DAC driver
See: raspberrypi/linux#4258

kernel: sc16is7xx: Defer probe if device read fails
See: raspberrypi/linux#4272

kernel: Codec Fixes for the tlv320aic32x4 codec on 5.10
See: raspberrypi/linux#4273

kernel: HDR improvements
See: raspberrypi/linux#4268

kernel: staging: vcsm-cma: Fix memory leak from not detaching dmabuf
See: raspberrypi/linux#4277

kernel: vc4/kms: vc4_plane: Support 2020 colourspace for yuv planes
See: raspberrypi/linux#4276

kernel: Prevent A4tech FHD 1080p webcams from being suspended automatically
See: raspberrypi/linux#4283

kernel: overlays: ghost-amp: Add DAC mute control
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants