mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 21:00:53 +07:00
drxk: allow loading firmware synchrousnously
Due to udev-182, the firmware load was changed to be async, as otherwise udev would give up of loading a firmware. Add an option to return to the previous behaviour, async firmware loads cause failures with the tda18271 driver. Antti tested it with the following hardware: Hauppauge WinTV HVR 930C MaxMedia UB425-TC PCTV QuatroStick nano (520e) Tested-by: Antti Palosaari <crope@iki.fi> Cc: stable@kernel.org # for Kernel 3.6 - please note that driver location has changed Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
6ae5e06084
commit
8e30783b0b
@ -28,6 +28,7 @@
|
|||||||
* A value of 0 (default) or lower indicates that
|
* A value of 0 (default) or lower indicates that
|
||||||
* the correct number of parameters will be
|
* the correct number of parameters will be
|
||||||
* automatically detected.
|
* automatically detected.
|
||||||
|
* @load_firmware_sync: Force the firmware load to be synchronous.
|
||||||
*
|
*
|
||||||
* On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is
|
* On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is
|
||||||
* UIO-3.
|
* UIO-3.
|
||||||
@ -39,6 +40,7 @@ struct drxk_config {
|
|||||||
bool parallel_ts;
|
bool parallel_ts;
|
||||||
bool dynamic_clk;
|
bool dynamic_clk;
|
||||||
bool enable_merr_cfg;
|
bool enable_merr_cfg;
|
||||||
|
bool load_firmware_sync;
|
||||||
|
|
||||||
bool antenna_dvbt;
|
bool antenna_dvbt;
|
||||||
u16 antenna_gpio;
|
u16 antenna_gpio;
|
||||||
|
@ -6609,6 +6609,15 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
|
|||||||
|
|
||||||
/* Load firmware and initialize DRX-K */
|
/* Load firmware and initialize DRX-K */
|
||||||
if (state->microcode_name) {
|
if (state->microcode_name) {
|
||||||
|
if (config->load_firmware_sync) {
|
||||||
|
const struct firmware *fw = NULL;
|
||||||
|
|
||||||
|
status = request_firmware(&fw, state->microcode_name,
|
||||||
|
state->i2c->dev.parent);
|
||||||
|
if (status < 0)
|
||||||
|
fw = NULL;
|
||||||
|
load_firmware_cb(fw, state);
|
||||||
|
} else {
|
||||||
status = request_firmware_nowait(THIS_MODULE, 1,
|
status = request_firmware_nowait(THIS_MODULE, 1,
|
||||||
state->microcode_name,
|
state->microcode_name,
|
||||||
state->i2c->dev.parent,
|
state->i2c->dev.parent,
|
||||||
@ -6619,6 +6628,7 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
|
|||||||
"drxk: failed to request a firmware\n");
|
"drxk: failed to request a firmware\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (init_drxk(state) < 0)
|
} else if (init_drxk(state) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user