Skip to content

Commit 372ee6a

Browse files
jwrdegoedegregkh
authored andcommitted
usb: misc: ljca: Fix enumeration error on Dell Latitude 9420
Not all LJCA chips implement SPI and on chips without SPI reading the SPI descriptors will timeout. On laptop models like the Dell Latitude 9420, this is expected behavior and not an error. Modify the driver to continue without instantiating a SPI auxbus child, instead of failing to probe() the whole LJCA chip. Fixes: acd6199 ("usb: Add support for Intel LJCA device") Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Wentong Wu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 16b7e0c commit 372ee6a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/usb/misc/usb-ljca.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,10 +646,11 @@ static int ljca_enumerate_spi(struct ljca_adapter *adap)
646646
unsigned int i;
647647
int ret;
648648

649+
/* Not all LJCA chips implement SPI, a timeout reading the descriptors is normal */
649650
ret = ljca_send(adap, LJCA_CLIENT_MNG, LJCA_MNG_ENUM_SPI, NULL, 0, buf,
650651
sizeof(buf), true, LJCA_ENUM_CLIENT_TIMEOUT_MS);
651652
if (ret < 0)
652-
return ret;
653+
return (ret == -ETIMEDOUT) ? 0 : ret;
653654

654655
/* check firmware response */
655656
desc = (struct ljca_spi_descriptor *)buf;

0 commit comments

Comments
 (0)