From: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx> commit 5dbbd0609b83f6eb72c005e2e5979d0cd25243c8 upstream. The driver uses a static CSI-2 virtual channel mapping where all virtual channels from an RX port are mapped to a virtual channel number matching the RX port number. The UB960 and UB9702 have different registers for the purpose, and the UB9702 version is not correct. Each of the VC_ID_MAP registers do not contain a single mapping, as the driver currently thinks, but two. This can cause received VCs other than 0 to be mapped in a wrong way. Fix this by writing both mappings to each register. Cc: stable@xxxxxxxxxxxxxxx Fixes: afe267f2d368 ("media: i2c: add DS90UB960 driver") Reviewed-by: Jai Luthra <jai.luthra@xxxxxxxxxxxxxxxx> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/media/i2c/ds90ub960.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/i2c/ds90ub960.c +++ b/drivers/media/i2c/ds90ub960.c @@ -2534,7 +2534,7 @@ static int ub960_configure_ports_for_str for (i = 0; i < 8; i++) ub960_rxport_write(priv, nport, UB960_RR_VC_ID_MAP(i), - nport); + (nport << 4) | nport); } break; Patches currently in stable-queue which might be from tomi.valkeinen@xxxxxxxxxxxxxxxx are queue-6.6/media-i2c-ds90ub9x3-fix-extra-fwnode_handle_put.patch queue-6.6/media-i2c-ds90ub960-fix-ub9702-vc-map.patch queue-6.6/media-i2c-ds90ub960-fix-use-of-non-existing-registers-on-ub9702.patch queue-6.6/media-i2c-ds90ub960-fix-ub9702-refclk-register-access.patch queue-6.6/media-i2c-ds90ub960-fix-logging-sp-eq-status-only-for-ub9702.patch