Commit b8bc77db authored by Alina Friedrichsen's avatar Alina Friedrichsen Committed by Mauro Carvalho Chehab

[media] tuner-xc2028: More firmware loading retries

My Hauppauge WinTV HVR-1400 needs sometimes more then only one retry to load the firmware successfully.
Signed-off-by: default avatarAlina Friedrichsen <x-alina@gmx.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2b97e220
...@@ -685,7 +685,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type, ...@@ -685,7 +685,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type,
{ {
struct xc2028_data *priv = fe->tuner_priv; struct xc2028_data *priv = fe->tuner_priv;
struct firmware_properties new_fw; struct firmware_properties new_fw;
int rc = 0, is_retry = 0; int rc = 0, retry_count = 0;
u16 version, hwmodel; u16 version, hwmodel;
v4l2_std_id std0; v4l2_std_id std0;
...@@ -855,9 +855,9 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type, ...@@ -855,9 +855,9 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type,
fail: fail:
memset(&priv->cur_fw, 0, sizeof(priv->cur_fw)); memset(&priv->cur_fw, 0, sizeof(priv->cur_fw));
if (!is_retry) { if (retry_count < 8) {
msleep(50); msleep(50);
is_retry = 1; retry_count++;
tuner_dbg("Retrying firmware load\n"); tuner_dbg("Retrying firmware load\n");
goto retry; goto retry;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment