Re: [PATCH 2/2] [media] ds3000: properly report firmware loading issues

2012-09-03 Thread Rémi Cardona
On 08/30/2012 06:00 PM, Antti Palosaari wrote: hmm, looks like ds3000_readreg() logic is still a little bit broken. It checks count of sent messages and compares it to 2. But if I2C-adapter sends only 1 message or 3 (which should not be possible) function return that count instead of

[PATCH 2/2] [media] ds3000: properly report firmware loading issues

2012-08-30 Thread Rémi Cardona
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. Signed-off-by: Rémi Cardona remi.card...@smartjog.com ---

Re: [PATCH 2/2] [media] ds3000: properly report firmware loading issues

2012-08-30 Thread Antti Palosaari
On 08/30/2012 12:36 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. Signed-off-by: Rémi

Re: [PATCH 2/2] [media] ds3000: properly report firmware loading issues

2012-08-30 Thread Rémi Cardona
Hi Antti, On 08/30/2012 03:39 PM, Antti Palosaari wrote: As I understand firmware downloading failure is coming from the fact that register read fails = fails to detect if firmware is already running or not. Well we actually see 2 cases: - the register read failure (when ds3000_readreg()

Re: [PATCH 2/2] [media] ds3000: properly report firmware loading issues

2012-08-30 Thread Antti Palosaari
On 08/30/2012 06:21 PM, Rémi Cardona wrote: Hi Antti, On 08/30/2012 03:39 PM, Antti Palosaari wrote: As I understand firmware downloading failure is coming from the fact that register read fails = fails to detect if firmware is already running or not. Well we actually see 2 cases: - the