* [patch added to 3.12-stable] [media] af9035: correct eeprom offsets
@ 2016-06-15 6:30 Jiri Slaby
2016-06-15 6:30 ` [patch added to 3.12-stable] misc: ad525x_dpot: Fix the enabling of the "otpXen" attributes Jiri Slaby
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jiri Slaby @ 2016-06-15 6:30 UTC (permalink / raw)
To: stable; +Cc: Antti Palosaari, Mauro Carvalho Chehab, Oliver Neukum, Jiri Slaby
From: Antti Palosaari <crope@iki.fi>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 9c574ad4d360353ec8dd6bc85e78d8b2d0f8e775 upstream.
Used memory mapped eeprom offsets were off-by 8 bytes.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/media/usb/dvb-usb-v2/af9035.h | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.h b/drivers/media/usb/dvb-usb-v2/af9035.h
index a1c68d829b8c..39b0123fe36c 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.h
+++ b/drivers/media/usb/dvb-usb-v2/af9035.h
@@ -109,20 +109,20 @@ static const u32 clock_lut_it9135[] = {
* Values 0 and 3 are seen to this day. 0 for single TS and 3 for dual TS.
*/
-#define EEPROM_BASE_AF9035 0x42fd
-#define EEPROM_BASE_IT9135 0x499c
+#define EEPROM_BASE_AF9035 0x42f5
+#define EEPROM_BASE_IT9135 0x4994
#define EEPROM_SHIFT 0x10
-#define EEPROM_IR_MODE 0x10
-#define EEPROM_TS_MODE 0x29
-#define EEPROM_2ND_DEMOD_ADDR 0x2a
-#define EEPROM_IR_TYPE 0x2c
-#define EEPROM_1_IF_L 0x30
-#define EEPROM_1_IF_H 0x31
-#define EEPROM_1_TUNER_ID 0x34
-#define EEPROM_2_IF_L 0x40
-#define EEPROM_2_IF_H 0x41
-#define EEPROM_2_TUNER_ID 0x44
+#define EEPROM_IR_MODE 0x18
+#define EEPROM_TS_MODE 0x31
+#define EEPROM_2ND_DEMOD_ADDR 0x32
+#define EEPROM_IR_TYPE 0x34
+#define EEPROM_1_IF_L 0x38
+#define EEPROM_1_IF_H 0x39
+#define EEPROM_1_TUNER_ID 0x3c
+#define EEPROM_2_IF_L 0x48
+#define EEPROM_2_IF_H 0x49
+#define EEPROM_2_TUNER_ID 0x4c
/* USB commands */
#define CMD_MEM_RD 0x00
--
2.8.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [patch added to 3.12-stable] misc: ad525x_dpot: Fix the enabling of the "otpXen" attributes
2016-06-15 6:30 [patch added to 3.12-stable] [media] af9035: correct eeprom offsets Jiri Slaby
@ 2016-06-15 6:30 ` Jiri Slaby
2016-06-15 6:30 ` [patch added to 3.12-stable] pch_phub: return -ENODATA if ROM can't be mapped Jiri Slaby
2016-06-15 12:54 ` [patch added to 3.12-stable] [media] af9035: correct eeprom offsets Antti Palosaari
2 siblings, 0 replies; 5+ messages in thread
From: Jiri Slaby @ 2016-06-15 6:30 UTC (permalink / raw)
To: stable; +Cc: Dan Bogdan Nechita, Greg Kroah-Hartman, Oliver Neukum, Jiri Slaby
From: Dan Bogdan Nechita <dan.bogdan.nechita@gmail.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit 1bb850a1b7f68b66361e658e334f9fdf8231f17d upstream.
Currently writing the attributes with "echo" will result in comparing:
"enabled\n" with "enabled\0" and attribute is always set to false.
Use the sysfs_streq() instead because it treats both NUL and
new-line-then-NUL as equivalent string terminations.
Signed-off-by: Dan Bogdan Nechita <dan.bogdan.nechita@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/misc/ad525x_dpot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/ad525x_dpot.c b/drivers/misc/ad525x_dpot.c
index 65fb74402c37..49811a8a1b07 100644
--- a/drivers/misc/ad525x_dpot.c
+++ b/drivers/misc/ad525x_dpot.c
@@ -458,7 +458,7 @@ static ssize_t sysfs_set_reg(struct device *dev,
int err;
if (reg & DPOT_ADDR_OTP_EN) {
- if (!strncmp(buf, "enabled", sizeof("enabled")))
+ if (sysfs_streq(buf, "enabled"))
set_bit(DPOT_RDAC_MASK & reg, data->otp_en_mask);
else
clear_bit(DPOT_RDAC_MASK & reg, data->otp_en_mask);
--
2.8.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [patch added to 3.12-stable] pch_phub: return -ENODATA if ROM can't be mapped
2016-06-15 6:30 [patch added to 3.12-stable] [media] af9035: correct eeprom offsets Jiri Slaby
2016-06-15 6:30 ` [patch added to 3.12-stable] misc: ad525x_dpot: Fix the enabling of the "otpXen" attributes Jiri Slaby
@ 2016-06-15 6:30 ` Jiri Slaby
2016-06-15 12:54 ` [patch added to 3.12-stable] [media] af9035: correct eeprom offsets Antti Palosaari
2 siblings, 0 replies; 5+ messages in thread
From: Jiri Slaby @ 2016-06-15 6:30 UTC (permalink / raw)
To: stable; +Cc: Colin Ian King, Greg Kroah-Hartman, Oliver Neukum, Jiri Slaby
From: Colin Ian King <colin.king@canonical.com>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit a75fa128236bc2fdaa5e412145cbd577e42e14c2 upstream.
The error return err is not initialized for the case when pci_map_rom
fails and no ROM can me mapped. Fix this by setting ret to -ENODATA;
(this is the same error value that is returned if the ROM data is
successfully mapped but does not match the expected ROM signature.).
Issue found from static code analysis using CoverityScan.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/misc/pch_phub.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/pch_phub.c b/drivers/misc/pch_phub.c
index a5925f7f17f6..829ca77c143e 100644
--- a/drivers/misc/pch_phub.c
+++ b/drivers/misc/pch_phub.c
@@ -512,8 +512,10 @@ static ssize_t pch_phub_bin_read(struct file *filp, struct kobject *kobj,
/* Get Rom signature */
chip->pch_phub_extrom_base_address = pci_map_rom(chip->pdev, &rom_size);
- if (!chip->pch_phub_extrom_base_address)
+ if (!chip->pch_phub_extrom_base_address) {
+ err = -ENODATA;
goto exrom_map_err;
+ }
pch_phub_read_serial_rom(chip, chip->pch_opt_rom_start_address,
(unsigned char *)&rom_signature);
--
2.8.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [patch added to 3.12-stable] [media] af9035: correct eeprom offsets
2016-06-15 6:30 [patch added to 3.12-stable] [media] af9035: correct eeprom offsets Jiri Slaby
2016-06-15 6:30 ` [patch added to 3.12-stable] misc: ad525x_dpot: Fix the enabling of the "otpXen" attributes Jiri Slaby
2016-06-15 6:30 ` [patch added to 3.12-stable] pch_phub: return -ENODATA if ROM can't be mapped Jiri Slaby
@ 2016-06-15 12:54 ` Antti Palosaari
2016-06-15 13:52 ` Jiri Slaby
2 siblings, 1 reply; 5+ messages in thread
From: Antti Palosaari @ 2016-06-15 12:54 UTC (permalink / raw)
To: Jiri Slaby, stable; +Cc: Mauro Carvalho Chehab, Oliver Neukum
Hello Jiri!
That patch is not needed for stable. It does not have any functional change.
Eeprom content is mirrored to chip memory during chip boot. Both memory
location and and eeprom value offsets are corrected, which means used
calculations remains same - only numbers/definitions are fixed.
For example tuner 1 ID for af9035 chip:
old: 0x42fd + 0x34 = 0x4331
new: 0x42f5 + 0x3c = 0x4331
regards
Antti
On 06/15/2016 09:30 AM, Jiri Slaby wrote:
> From: Antti Palosaari <crope@iki.fi>
>
> This patch has been added to the 3.12 stable tree. If you have any
> objections, please let us know.
>
> ===============
>
> commit 9c574ad4d360353ec8dd6bc85e78d8b2d0f8e775 upstream.
>
> Used memory mapped eeprom offsets were off-by 8 bytes.
>
> Signed-off-by: Antti Palosaari <crope@iki.fi>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> Cc: Oliver Neukum <oliver@neukum.org>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> ---
> drivers/media/usb/dvb-usb-v2/af9035.h | 24 ++++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/media/usb/dvb-usb-v2/af9035.h b/drivers/media/usb/dvb-usb-v2/af9035.h
> index a1c68d829b8c..39b0123fe36c 100644
> --- a/drivers/media/usb/dvb-usb-v2/af9035.h
> +++ b/drivers/media/usb/dvb-usb-v2/af9035.h
> @@ -109,20 +109,20 @@ static const u32 clock_lut_it9135[] = {
> * Values 0 and 3 are seen to this day. 0 for single TS and 3 for dual TS.
> */
>
> -#define EEPROM_BASE_AF9035 0x42fd
> -#define EEPROM_BASE_IT9135 0x499c
> +#define EEPROM_BASE_AF9035 0x42f5
> +#define EEPROM_BASE_IT9135 0x4994
> #define EEPROM_SHIFT 0x10
>
> -#define EEPROM_IR_MODE 0x10
> -#define EEPROM_TS_MODE 0x29
> -#define EEPROM_2ND_DEMOD_ADDR 0x2a
> -#define EEPROM_IR_TYPE 0x2c
> -#define EEPROM_1_IF_L 0x30
> -#define EEPROM_1_IF_H 0x31
> -#define EEPROM_1_TUNER_ID 0x34
> -#define EEPROM_2_IF_L 0x40
> -#define EEPROM_2_IF_H 0x41
> -#define EEPROM_2_TUNER_ID 0x44
> +#define EEPROM_IR_MODE 0x18
> +#define EEPROM_TS_MODE 0x31
> +#define EEPROM_2ND_DEMOD_ADDR 0x32
> +#define EEPROM_IR_TYPE 0x34
> +#define EEPROM_1_IF_L 0x38
> +#define EEPROM_1_IF_H 0x39
> +#define EEPROM_1_TUNER_ID 0x3c
> +#define EEPROM_2_IF_L 0x48
> +#define EEPROM_2_IF_H 0x49
> +#define EEPROM_2_TUNER_ID 0x4c
>
> /* USB commands */
> #define CMD_MEM_RD 0x00
>
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch added to 3.12-stable] [media] af9035: correct eeprom offsets
2016-06-15 12:54 ` [patch added to 3.12-stable] [media] af9035: correct eeprom offsets Antti Palosaari
@ 2016-06-15 13:52 ` Jiri Slaby
0 siblings, 0 replies; 5+ messages in thread
From: Jiri Slaby @ 2016-06-15 13:52 UTC (permalink / raw)
To: Antti Palosaari, stable; +Cc: Mauro Carvalho Chehab, Oliver Neukum
On 06/15/2016, 02:54 PM, Antti Palosaari wrote:
> Hello Jiri!
> That patch is not needed for stable. It does not have any functional
> change.
>
> Eeprom content is mirrored to chip memory during chip boot. Both memory
> location and and eeprom value offsets are corrected, which means used
> calculations remains same - only numbers/definitions are fixed.
> For example tuner 1 ID for af9035 chip:
> old: 0x42fd + 0x34 = 0x4331
> new: 0x42f5 + 0x3c = 0x4331
Now dropped, thanks!
--
js
suse labs
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-15 13:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15 6:30 [patch added to 3.12-stable] [media] af9035: correct eeprom offsets Jiri Slaby
2016-06-15 6:30 ` [patch added to 3.12-stable] misc: ad525x_dpot: Fix the enabling of the "otpXen" attributes Jiri Slaby
2016-06-15 6:30 ` [patch added to 3.12-stable] pch_phub: return -ENODATA if ROM can't be mapped Jiri Slaby
2016-06-15 12:54 ` [patch added to 3.12-stable] [media] af9035: correct eeprom offsets Antti Palosaari
2016-06-15 13:52 ` Jiri Slaby
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.