Commit 63a796b4 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Jakub Kicinski
Browse files

net: airoha: honor reset return value in airoha_hw_init()



Take into account return value from reset_control_bulk_assert and
reset_control_bulk_deassert routines in airoha_hw_init().

Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/f49dc04a87653e0155f4fab3e3eb584785c8ad6a.1722699555.git.lorenzo@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c4e2ced1
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -2071,13 +2071,21 @@ static int airoha_hw_init(struct platform_device *pdev,
	int err, i;

	/* disable xsi */
	reset_control_bulk_assert(ARRAY_SIZE(eth->xsi_rsts), eth->xsi_rsts);
	err = reset_control_bulk_assert(ARRAY_SIZE(eth->xsi_rsts),
					eth->xsi_rsts);
	if (err)
		return err;

	err = reset_control_bulk_assert(ARRAY_SIZE(eth->rsts), eth->rsts);
	if (err)
		return err;

	reset_control_bulk_assert(ARRAY_SIZE(eth->rsts), eth->rsts);
	msleep(20);
	reset_control_bulk_deassert(ARRAY_SIZE(eth->rsts), eth->rsts);
	msleep(20);
	err = reset_control_bulk_deassert(ARRAY_SIZE(eth->rsts), eth->rsts);
	if (err)
		return err;

	msleep(20);
	err = airoha_fe_init(eth);
	if (err)
		return err;