Commit 30bd3b56 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Mauro Carvalho Chehab

[media] DM04/QQBOX Fix issue with firmware release and cold reset

Fix issue where firmware does not release on cold reset.
Also, default firmware never cold resets in multi tuner
environment.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 61c4f2c8
...@@ -747,7 +747,7 @@ static int lme_firmware_switch(struct usb_device *udev, int cold) ...@@ -747,7 +747,7 @@ static int lme_firmware_switch(struct usb_device *udev, int cold)
fw_lme = fw_s0194; fw_lme = fw_s0194;
ret = request_firmware(&fw, fw_lme, &udev->dev); ret = request_firmware(&fw, fw_lme, &udev->dev);
if (ret == 0) { if (ret == 0) {
cold = 0;/*lme2510-s0194 cannot cold reset*/ cold = 0;
break; break;
} }
dvb_usb_lme2510_firmware = TUNER_LG; dvb_usb_lme2510_firmware = TUNER_LG;
...@@ -769,8 +769,10 @@ static int lme_firmware_switch(struct usb_device *udev, int cold) ...@@ -769,8 +769,10 @@ static int lme_firmware_switch(struct usb_device *udev, int cold)
case TUNER_S7395: case TUNER_S7395:
fw_lme = fw_c_s7395; fw_lme = fw_c_s7395;
ret = request_firmware(&fw, fw_lme, &udev->dev); ret = request_firmware(&fw, fw_lme, &udev->dev);
if (ret == 0) if (ret == 0) {
cold = 0;
break; break;
}
dvb_usb_lme2510_firmware = TUNER_LG; dvb_usb_lme2510_firmware = TUNER_LG;
case TUNER_LG: case TUNER_LG:
fw_lme = fw_c_lg; fw_lme = fw_c_lg;
...@@ -796,14 +798,14 @@ static int lme_firmware_switch(struct usb_device *udev, int cold) ...@@ -796,14 +798,14 @@ static int lme_firmware_switch(struct usb_device *udev, int cold)
ret = lme2510_download_firmware(udev, fw); ret = lme2510_download_firmware(udev, fw);
} }
release_firmware(fw);
if (cold) { if (cold) {
info("FRM Changing to %s firmware", fw_lme); info("FRM Changing to %s firmware", fw_lme);
lme_coldreset(udev); lme_coldreset(udev);
return -ENODEV; return -ENODEV;
} }
release_firmware(fw);
return ret; return ret;
} }
...@@ -1220,5 +1222,5 @@ module_exit(lme2510_module_exit); ...@@ -1220,5 +1222,5 @@ module_exit(lme2510_module_exit);
MODULE_AUTHOR("Malcolm Priestley <tvboxspy@gmail.com>"); MODULE_AUTHOR("Malcolm Priestley <tvboxspy@gmail.com>");
MODULE_DESCRIPTION("LME2510(C) DVB-S USB2.0"); MODULE_DESCRIPTION("LME2510(C) DVB-S USB2.0");
MODULE_VERSION("1.80"); MODULE_VERSION("1.81");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
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