* [PATCH 1/6] [media] ds3000: Declare MODULE_FIRMWARE usage
2012-09-14 9:27 [PATCH v2 0/6] ds3000 improvements Rémi Cardona
@ 2012-09-14 9:27 ` Rémi Cardona
2012-09-16 1:27 ` Antti Palosaari
2012-09-14 9:27 ` [PATCH 2/6] [media] ds3000: remove useless 'locking' Rémi Cardona
` (5 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Rémi Cardona @ 2012-09-14 9:27 UTC (permalink / raw)
To: linux-media; +Cc: liplianin
Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
---
drivers/media/dvb/frontends/ds3000.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 4c8ac26..46874c7 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -1310,3 +1310,4 @@ MODULE_DESCRIPTION("DVB Frontend module for Montage Technology "
"DS3000/TS2020 hardware");
MODULE_AUTHOR("Konstantin Dimitrov");
MODULE_LICENSE("GPL");
+MODULE_FIRMWARE(DS3000_DEFAULT_FIRMWARE);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 2/6] [media] ds3000: remove useless 'locking'
2012-09-14 9:27 [PATCH v2 0/6] ds3000 improvements Rémi Cardona
2012-09-14 9:27 ` [PATCH 1/6] [media] ds3000: Declare MODULE_FIRMWARE usage Rémi Cardona
@ 2012-09-14 9:27 ` Rémi Cardona
2012-09-16 1:28 ` Antti Palosaari
2012-09-14 9:27 ` [PATCH 3/6] [media] ds3000: properly report register read errors Rémi Cardona
` (4 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Rémi Cardona @ 2012-09-14 9:27 UTC (permalink / raw)
To: linux-media; +Cc: liplianin
Since b9bf2eafaad9c1ef02fb3db38c74568be601a43a, the function
ds3000_firmware_ondemand() is called only once during init. This
locking scheme may have been useful when the firmware was loaded at
each tune.
Furthermore, it looks like this 'lock' was put in to prevent concurrent
access (and not recursion as the comments suggest). However, this open-
coded mechanism is anything but race-free and should have used a proper
mutex.
Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
---
drivers/media/dvb/frontends/ds3000.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 46874c7..474f26e 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -233,7 +233,6 @@ struct ds3000_state {
struct i2c_adapter *i2c;
const struct ds3000_config *config;
struct dvb_frontend frontend;
- u8 skip_fw_load;
/* previous uncorrected block counter for DVB-S2 */
u16 prevUCBS2;
};
@@ -395,8 +394,6 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe)
if (ds3000_readreg(state, 0xb2) <= 0)
return ret;
- if (state->skip_fw_load)
- return 0;
/* Load firmware */
/* request the firmware, this will block until someone uploads it */
printk(KERN_INFO "%s: Waiting for firmware upload (%s)...\n", __func__,
@@ -410,9 +407,6 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe)
return ret;
}
- /* Make sure we don't recurse back through here during loading */
- state->skip_fw_load = 1;
-
ret = ds3000_load_firmware(fe, fw);
if (ret)
printk("%s: Writing firmware to device failed\n", __func__);
@@ -422,9 +416,6 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe)
dprintk("%s: Firmware upload %s\n", __func__,
ret == 0 ? "complete" : "failed");
- /* Ensure firmware is always loaded if required */
- state->skip_fw_load = 0;
-
return ret;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH 2/6] [media] ds3000: remove useless 'locking'
2012-09-14 9:27 ` [PATCH 2/6] [media] ds3000: remove useless 'locking' Rémi Cardona
@ 2012-09-16 1:28 ` Antti Palosaari
0 siblings, 0 replies; 15+ messages in thread
From: Antti Palosaari @ 2012-09-16 1:28 UTC (permalink / raw)
To: Rémi Cardona; +Cc: linux-media, liplianin
On 09/14/2012 12:27 PM, Rémi Cardona wrote:
> Since b9bf2eafaad9c1ef02fb3db38c74568be601a43a, the function
> ds3000_firmware_ondemand() is called only once during init. This
> locking scheme may have been useful when the firmware was loaded at
> each tune.
>
> Furthermore, it looks like this 'lock' was put in to prevent concurrent
> access (and not recursion as the comments suggest). However, this open-
> coded mechanism is anything but race-free and should have used a proper
> mutex.
>
> Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 3/6] [media] ds3000: properly report register read errors
2012-09-14 9:27 [PATCH v2 0/6] ds3000 improvements Rémi Cardona
2012-09-14 9:27 ` [PATCH 1/6] [media] ds3000: Declare MODULE_FIRMWARE usage Rémi Cardona
2012-09-14 9:27 ` [PATCH 2/6] [media] ds3000: remove useless 'locking' Rémi Cardona
@ 2012-09-14 9:27 ` Rémi Cardona
2012-09-16 1:30 ` Antti Palosaari
2012-09-14 9:27 ` [PATCH 4/6] [media] ds3000: bail out early on i2c failures during firmware load Rémi Cardona
` (3 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Rémi Cardona @ 2012-09-14 9:27 UTC (permalink / raw)
To: linux-media; +Cc: liplianin
This brings both ds3000_readreg() and ds3000_tuner_readreg() in line
with ds3000_writereg() and ds3000_tuner_writereg() respectively.
Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
---
drivers/media/dvb/frontends/ds3000.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 474f26e..6752222 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -340,7 +340,7 @@ static int ds3000_readreg(struct ds3000_state *state, u8 reg)
if (ret != 2) {
printk(KERN_ERR "%s: reg=0x%x(error=%d)\n", __func__, reg, ret);
- return ret;
+ return -EREMOTEIO;
}
dprintk("%s: read reg 0x%02x, value 0x%02x\n", __func__, reg, b1[0]);
@@ -367,12 +367,15 @@ static int ds3000_tuner_readreg(struct ds3000_state *state, u8 reg)
}
};
- ds3000_writereg(state, 0x03, 0x12);
- ret = i2c_transfer(state->i2c, msg, 2);
+ ret = ds3000_writereg(state, 0x03, 0x12);
+ if (ret < 0) {
+ return -EREMOTEIO;
+ }
+ ret = i2c_transfer(state->i2c, msg, 2);
if (ret != 2) {
printk(KERN_ERR "%s: reg=0x%x(error=%d)\n", __func__, reg, ret);
- return ret;
+ return -EREMOTEIO;
}
dprintk("%s: read reg 0x%02x, value 0x%02x\n", __func__, reg, b1[0]);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 4/6] [media] ds3000: bail out early on i2c failures during firmware load
2012-09-14 9:27 [PATCH v2 0/6] ds3000 improvements Rémi Cardona
` (2 preceding siblings ...)
2012-09-14 9:27 ` [PATCH 3/6] [media] ds3000: properly report register read errors Rémi Cardona
@ 2012-09-14 9:27 ` Rémi Cardona
2012-09-16 1:41 ` Antti Palosaari
2012-09-14 9:27 ` [PATCH 5/6] [media] ds3000: properly report firmware probing issues Rémi Cardona
` (2 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Rémi Cardona @ 2012-09-14 9:27 UTC (permalink / raw)
To: linux-media; +Cc: liplianin
- if kmalloc() returns NULL, we can return immediately without trying
to kfree() a NULL pointer.
- if i2c_transfer() fails, error out immediately instead of trying to
upload the remaining bytes of the firmware.
- the error code is then properly propagated down to ds3000_initfe().
Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
---
drivers/media/dvb/frontends/ds3000.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 6752222..162faaf 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -280,15 +280,14 @@ static int ds3000_tuner_writereg(struct ds3000_state *state, int reg, int data)
static int ds3000_writeFW(struct ds3000_state *state, int reg,
const u8 *data, u16 len)
{
- int i, ret = -EREMOTEIO;
+ int i, ret = 0;
struct i2c_msg msg;
u8 *buf;
buf = kmalloc(33, GFP_KERNEL);
if (buf == NULL) {
printk(KERN_ERR "Unable to kmalloc\n");
- ret = -ENOMEM;
- goto error;
+ return -ENOMEM;
}
*(buf) = reg;
@@ -308,8 +307,10 @@ static int ds3000_writeFW(struct ds3000_state *state, int reg,
printk(KERN_ERR "%s: write error(err == %i, "
"reg == 0x%02x\n", __func__, ret, reg);
ret = -EREMOTEIO;
+ goto error;
}
}
+ ret = 0;
error:
kfree(buf);
@@ -426,6 +427,7 @@ static int ds3000_load_firmware(struct dvb_frontend *fe,
const struct firmware *fw)
{
struct ds3000_state *state = fe->demodulator_priv;
+ int ret = 0;
dprintk("%s\n", __func__);
dprintk("Firmware is %zu bytes (%02x %02x .. %02x %02x)\n",
@@ -438,10 +440,10 @@ static int ds3000_load_firmware(struct dvb_frontend *fe,
/* Begin the firmware load process */
ds3000_writereg(state, 0xb2, 0x01);
/* write the entire firmware */
- ds3000_writeFW(state, 0xb0, fw->data, fw->size);
+ ret = ds3000_writeFW(state, 0xb0, fw->data, fw->size);
ds3000_writereg(state, 0xb2, 0x00);
- return 0;
+ return ret;
}
static int ds3000_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH 4/6] [media] ds3000: bail out early on i2c failures during firmware load
2012-09-14 9:27 ` [PATCH 4/6] [media] ds3000: bail out early on i2c failures during firmware load Rémi Cardona
@ 2012-09-16 1:41 ` Antti Palosaari
0 siblings, 0 replies; 15+ messages in thread
From: Antti Palosaari @ 2012-09-16 1:41 UTC (permalink / raw)
To: Rémi Cardona; +Cc: linux-media, liplianin
On 09/14/2012 12:27 PM, Rémi Cardona wrote:
> - if kmalloc() returns NULL, we can return immediately without trying
> to kfree() a NULL pointer.
> - if i2c_transfer() fails, error out immediately instead of trying to
> upload the remaining bytes of the firmware.
> - the error code is then properly propagated down to ds3000_initfe().
>
> Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Few comments still, you may change or leave unchanged. Those are still
old code and we are not expecting someone should fix as review findings.
Looks like ds3000_writeFW() is something like write multiple registers
with splitting I2C messages. IMHO it should be general routine to write
multiple registers (using register address auto-increment). Now it
multiplies I2C access routines for register write.
See for example tda10071 routines which could be just copy&pasted.
Also it uses hard-coded limit for slitting I2C message for 33 byte
chunks. Generally that limit is coming from the I2C-adapter hardware.
Also, allocing 33 byte of memory sounds overkill. Does anyone know good
rule of thumb what is size of buffer needed when make decision to alloc
instead of stack (non recursive Kernel function)?
> ---
> drivers/media/dvb/frontends/ds3000.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
> index 6752222..162faaf 100644
> --- a/drivers/media/dvb/frontends/ds3000.c
> +++ b/drivers/media/dvb/frontends/ds3000.c
> @@ -280,15 +280,14 @@ static int ds3000_tuner_writereg(struct ds3000_state *state, int reg, int data)
> static int ds3000_writeFW(struct ds3000_state *state, int reg,
> const u8 *data, u16 len)
> {
> - int i, ret = -EREMOTEIO;
> + int i, ret = 0;
> struct i2c_msg msg;
> u8 *buf;
>
> buf = kmalloc(33, GFP_KERNEL);
> if (buf == NULL) {
> printk(KERN_ERR "Unable to kmalloc\n");
> - ret = -ENOMEM;
> - goto error;
> + return -ENOMEM;
> }
>
> *(buf) = reg;
> @@ -308,8 +307,10 @@ static int ds3000_writeFW(struct ds3000_state *state, int reg,
> printk(KERN_ERR "%s: write error(err == %i, "
> "reg == 0x%02x\n", __func__, ret, reg);
> ret = -EREMOTEIO;
> + goto error;
> }
> }
> + ret = 0;
>
> error:
> kfree(buf);
> @@ -426,6 +427,7 @@ static int ds3000_load_firmware(struct dvb_frontend *fe,
> const struct firmware *fw)
> {
> struct ds3000_state *state = fe->demodulator_priv;
> + int ret = 0;
>
> dprintk("%s\n", __func__);
> dprintk("Firmware is %zu bytes (%02x %02x .. %02x %02x)\n",
> @@ -438,10 +440,10 @@ static int ds3000_load_firmware(struct dvb_frontend *fe,
> /* Begin the firmware load process */
> ds3000_writereg(state, 0xb2, 0x01);
> /* write the entire firmware */
> - ds3000_writeFW(state, 0xb0, fw->data, fw->size);
> + ret = ds3000_writeFW(state, 0xb0, fw->data, fw->size);
> ds3000_writereg(state, 0xb2, 0x00);
>
> - return 0;
> + return ret;
> }
>
> static int ds3000_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
>
Antti
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 5/6] [media] ds3000: properly report firmware probing issues
2012-09-14 9:27 [PATCH v2 0/6] ds3000 improvements Rémi Cardona
` (3 preceding siblings ...)
2012-09-14 9:27 ` [PATCH 4/6] [media] ds3000: bail out early on i2c failures during firmware load Rémi Cardona
@ 2012-09-14 9:27 ` Rémi Cardona
2012-09-16 1:44 ` Antti Palosaari
2012-09-14 9:27 ` [PATCH 6/6] [media] ds3000: add module parameter to force firmware upload Rémi Cardona
2012-09-16 1:26 ` [PATCH v2 0/6] ds3000 improvements Antti Palosaari
6 siblings, 1 reply; 15+ messages in thread
From: Rémi Cardona @ 2012-09-14 9:27 UTC (permalink / raw)
To: linux-media; +Cc: liplianin
ds3000_readreg() returns negative values in case of i2c failures. The
old code would simply return 0 when failing to read the 0xb2 register,
misleading ds3000_initfe() into believing that the firmware had been
correctly loaded.
Also print out a message if the chip says a firmware is already loaded.
This should make it more obvious if the chip is in a weird state.
Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
---
drivers/media/dvb/frontends/ds3000.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 162faaf..970963c 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -395,8 +395,14 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe)
dprintk("%s()\n", __func__);
- if (ds3000_readreg(state, 0xb2) <= 0)
+ ret = ds3000_readreg(state, 0xb2);
+ if (ret == 0) {
+ printk(KERN_INFO "%s: Firmware already uploaded, skipping\n",
+ __func__);
return ret;
+ } else if (ret < 0) {
+ return ret;
+ }
/* Load firmware */
/* request the firmware, this will block until someone uploads it */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH 5/6] [media] ds3000: properly report firmware probing issues
2012-09-14 9:27 ` [PATCH 5/6] [media] ds3000: properly report firmware probing issues Rémi Cardona
@ 2012-09-16 1:44 ` Antti Palosaari
0 siblings, 0 replies; 15+ messages in thread
From: Antti Palosaari @ 2012-09-16 1:44 UTC (permalink / raw)
To: Rémi Cardona; +Cc: linux-media, liplianin
On 09/14/2012 12:27 PM, Rémi Cardona wrote:
> ds3000_readreg() returns negative values in case of i2c failures. The
> old code would simply return 0 when failing to read the 0xb2 register,
> misleading ds3000_initfe() into believing that the firmware had been
> correctly loaded.
>
> Also print out a message if the chip says a firmware is already loaded.
> This should make it more obvious if the chip is in a weird state.
>
> Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
I still suggest to use pr_info() / dev_info() instead of
printk(KERN_INFO...).
Also printing "Firmware already uploaded, skipping" *every time* when
device is opened is not wise.
> ---
> drivers/media/dvb/frontends/ds3000.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
> index 162faaf..970963c 100644
> --- a/drivers/media/dvb/frontends/ds3000.c
> +++ b/drivers/media/dvb/frontends/ds3000.c
> @@ -395,8 +395,14 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe)
>
> dprintk("%s()\n", __func__);
>
> - if (ds3000_readreg(state, 0xb2) <= 0)
> + ret = ds3000_readreg(state, 0xb2);
> + if (ret == 0) {
> + printk(KERN_INFO "%s: Firmware already uploaded, skipping\n",
> + __func__);
> return ret;
> + } else if (ret < 0) {
> + return ret;
> + }
>
> /* Load firmware */
> /* request the firmware, this will block until someone uploads it */
>
regards
Antti
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 6/6] [media] ds3000: add module parameter to force firmware upload
2012-09-14 9:27 [PATCH v2 0/6] ds3000 improvements Rémi Cardona
` (4 preceding siblings ...)
2012-09-14 9:27 ` [PATCH 5/6] [media] ds3000: properly report firmware probing issues Rémi Cardona
@ 2012-09-14 9:27 ` Rémi Cardona
2012-09-16 1:45 ` Antti Palosaari
2012-09-16 1:26 ` [PATCH v2 0/6] ds3000 improvements Antti Palosaari
6 siblings, 1 reply; 15+ messages in thread
From: Rémi Cardona @ 2012-09-14 9:27 UTC (permalink / raw)
To: linux-media; +Cc: liplianin
Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
---
drivers/media/dvb/frontends/ds3000.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 970963c..3e0e9de 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -30,6 +30,7 @@
#include "ds3000.h"
static int debug;
+static int force_fw_upload;
#define dprintk(args...) \
do { \
@@ -396,10 +397,13 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe)
dprintk("%s()\n", __func__);
ret = ds3000_readreg(state, 0xb2);
- if (ret == 0) {
+ if (ret == 0 && force_fw_upload == 0) {
printk(KERN_INFO "%s: Firmware already uploaded, skipping\n",
__func__);
return ret;
+ } else if (ret == 0 && force_fw_upload) {
+ printk(KERN_INFO "%s: Firmware already uploaded, "
+ "forcing upload\n", __func__);
} else if (ret < 0) {
return ret;
}
@@ -1308,6 +1312,9 @@ static struct dvb_frontend_ops ds3000_ops = {
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Activates frontend debugging (default:0)");
+module_param(force_fw_upload, int, 0644);
+MODULE_PARM_DESC(force_fw_upload, "Force firmware upload (default:0)");
+
MODULE_DESCRIPTION("DVB Frontend module for Montage Technology "
"DS3000/TS2020 hardware");
MODULE_AUTHOR("Konstantin Dimitrov");
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH 6/6] [media] ds3000: add module parameter to force firmware upload
2012-09-14 9:27 ` [PATCH 6/6] [media] ds3000: add module parameter to force firmware upload Rémi Cardona
@ 2012-09-16 1:45 ` Antti Palosaari
0 siblings, 0 replies; 15+ messages in thread
From: Antti Palosaari @ 2012-09-16 1:45 UTC (permalink / raw)
To: Rémi Cardona; +Cc: linux-media, liplianin
On 09/14/2012 12:27 PM, Rémi Cardona wrote:
> Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
With same comments as earlier patch.
> ---
> drivers/media/dvb/frontends/ds3000.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
> index 970963c..3e0e9de 100644
> --- a/drivers/media/dvb/frontends/ds3000.c
> +++ b/drivers/media/dvb/frontends/ds3000.c
> @@ -30,6 +30,7 @@
> #include "ds3000.h"
>
> static int debug;
> +static int force_fw_upload;
>
> #define dprintk(args...) \
> do { \
> @@ -396,10 +397,13 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe)
> dprintk("%s()\n", __func__);
>
> ret = ds3000_readreg(state, 0xb2);
> - if (ret == 0) {
> + if (ret == 0 && force_fw_upload == 0) {
> printk(KERN_INFO "%s: Firmware already uploaded, skipping\n",
> __func__);
> return ret;
> + } else if (ret == 0 && force_fw_upload) {
> + printk(KERN_INFO "%s: Firmware already uploaded, "
> + "forcing upload\n", __func__);
> } else if (ret < 0) {
> return ret;
> }
> @@ -1308,6 +1312,9 @@ static struct dvb_frontend_ops ds3000_ops = {
> module_param(debug, int, 0644);
> MODULE_PARM_DESC(debug, "Activates frontend debugging (default:0)");
>
> +module_param(force_fw_upload, int, 0644);
> +MODULE_PARM_DESC(force_fw_upload, "Force firmware upload (default:0)");
> +
> MODULE_DESCRIPTION("DVB Frontend module for Montage Technology "
> "DS3000/TS2020 hardware");
> MODULE_AUTHOR("Konstantin Dimitrov");
>
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 0/6] ds3000 improvements
2012-09-14 9:27 [PATCH v2 0/6] ds3000 improvements Rémi Cardona
` (5 preceding siblings ...)
2012-09-14 9:27 ` [PATCH 6/6] [media] ds3000: add module parameter to force firmware upload Rémi Cardona
@ 2012-09-16 1:26 ` Antti Palosaari
2012-09-17 12:54 ` Rémi Cardona
6 siblings, 1 reply; 15+ messages in thread
From: Antti Palosaari @ 2012-09-16 1:26 UTC (permalink / raw)
To: Rémi Cardona; +Cc: linux-media, liplianin
On 09/14/2012 12:27 PM, Rémi Cardona wrote:
> Hi all,
>
> Here is an updated and more complete patch series for ds3000. I've
> done my testing on top of kernel 3.5.2 and things look ok so far.
>
> Reviews and comments are again more than welcome.
I reviewed it and I was near to test it also, but patches didn't apply.
driver/media directory structure is changed recently.
Is it possible you to rebase it top of latest tree and resend?
http://git.linuxtv.org/media_tree.git/shortlog/refs/heads/staging/for_v3.7
I have few comments too, IMHO nothing you must fix but feel free to do
if you wish. Comments will follow per patch.
regards
Antti
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v2 0/6] ds3000 improvements
2012-09-16 1:26 ` [PATCH v2 0/6] ds3000 improvements Antti Palosaari
@ 2012-09-17 12:54 ` Rémi Cardona
0 siblings, 0 replies; 15+ messages in thread
From: Rémi Cardona @ 2012-09-17 12:54 UTC (permalink / raw)
To: Antti Palosaari; +Cc: linux-media
On 09/16/2012 03:26 AM, Antti Palosaari wrote:
> On 09/14/2012 12:27 PM, Rémi Cardona wrote:
>> Hi all,
>>
>> Here is an updated and more complete patch series for ds3000. I've
>> done my testing on top of kernel 3.5.2 and things look ok so far.
>>
>> Reviews and comments are again more than welcome.
>
> I reviewed it and I was near to test it also, but patches didn't apply.
> driver/media directory structure is changed recently.
>
> Is it possible you to rebase it top of latest tree and resend?
Thanks for the review, I'll rebase and fix the patches accordingly.
Cheers,
Rémi
^ permalink raw reply [flat|nested] 15+ messages in thread