]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Jul 2017 14:46:42 +0000 (16:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Jul 2017 14:46:42 +0000 (16:46 +0200)
added patches:
saa7134-fix-warm-medion-7134-eeprom-read.patch
staging-comedi-fix-clean-up-of-comedi_class-in-comedi_init.patch
staging-vt6556-vnt_start-fix-missing-call-to-vnt_key_init_table.patch

queue-3.18/saa7134-fix-warm-medion-7134-eeprom-read.patch [new file with mode: 0644]
queue-3.18/series
queue-3.18/staging-comedi-fix-clean-up-of-comedi_class-in-comedi_init.patch [new file with mode: 0644]
queue-3.18/staging-vt6556-vnt_start-fix-missing-call-to-vnt_key_init_table.patch [new file with mode: 0644]

diff --git a/queue-3.18/saa7134-fix-warm-medion-7134-eeprom-read.patch b/queue-3.18/saa7134-fix-warm-medion-7134-eeprom-read.patch
new file mode 100644 (file)
index 0000000..37fa7e6
--- /dev/null
@@ -0,0 +1,73 @@
+From 5a91206ff0d0548939f3e85a65fb76b400fb0e89 Mon Sep 17 00:00:00 2001
+From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
+Date: Sat, 2 Jul 2016 20:27:46 -0300
+Subject: [media] saa7134: fix warm Medion 7134 EEPROM read
+
+From: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
+
+commit 5a91206ff0d0548939f3e85a65fb76b400fb0e89 upstream.
+
+When saa7134 module driving a Medion 7134 card is reloaded reads of this
+card EEPROM (required for automatic detection of tuner model) will be
+corrupted due to I2C gate in DVB-T demod being left closed.
+This sometimes also happens on first saa7134 module load after a warm
+reboot.
+
+Fix this by opening this I2C gate before doing EEPROM read during i2c
+initialization.
+
+Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
+Cc: Oliver Hartkopp <socketcan@hartkopp.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/pci/saa7134/saa7134-i2c.c |   31 +++++++++++++++++++++++++++++++
+ 1 file changed, 31 insertions(+)
+
+--- a/drivers/media/pci/saa7134/saa7134-i2c.c
++++ b/drivers/media/pci/saa7134/saa7134-i2c.c
+@@ -350,12 +350,43 @@ static struct i2c_client saa7134_client_
+ /* ----------------------------------------------------------- */
++/* On Medion 7134 reading EEPROM needs DVB-T demod i2c gate open */
++static void saa7134_i2c_eeprom_md7134_gate(struct saa7134_dev *dev)
++{
++      u8 subaddr = 0x7, dmdregval;
++      u8 data[2];
++      int ret;
++      struct i2c_msg i2cgatemsg_r[] = { {.addr = 0x08, .flags = 0,
++                                         .buf = &subaddr, .len = 1},
++                                        {.addr = 0x08,
++                                         .flags = I2C_M_RD,
++                                         .buf = &dmdregval, .len = 1}
++                                      };
++      struct i2c_msg i2cgatemsg_w[] = { {.addr = 0x08, .flags = 0,
++                                         .buf = data, .len = 2} };
++
++      ret = i2c_transfer(&dev->i2c_adap, i2cgatemsg_r, 2);
++      if ((ret == 2) && (dmdregval & 0x2)) {
++              pr_debug("%s: DVB-T demod i2c gate was left closed\n",
++                       dev->name);
++
++              data[0] = subaddr;
++              data[1] = (dmdregval & ~0x2);
++              if (i2c_transfer(&dev->i2c_adap, i2cgatemsg_w, 1) != 1)
++                      pr_err("%s: EEPROM i2c gate open failure\n",
++                        dev->name);
++      }
++}
++
+ static int
+ saa7134_i2c_eeprom(struct saa7134_dev *dev, unsigned char *eedata, int len)
+ {
+       unsigned char buf;
+       int i,err;
++      if (dev->board == SAA7134_BOARD_MD7134)
++              saa7134_i2c_eeprom_md7134_gate(dev);
++
+       dev->i2c_client.addr = 0xa0 >> 1;
+       buf = 0;
+       if (1 != (err = i2c_master_send(&dev->i2c_client,&buf,1))) {
index 8f820219c4624d0e266e0feb4917f68fc8471f0f..97701dc78d48ad1ee6053dfd186a506582d0c81a 100644 (file)
@@ -17,3 +17,6 @@ usb-serial-qcserial-new-sierra-wireless-em7305-device-id.patch
 keys-fix-an-error-code-in-request_master_key.patch
 mqueue-fix-a-use-after-free-in-sys_mq_notify.patch
 md-fix-super_offset-endianness-in-super_1_rdev_size_change.patch
+staging-vt6556-vnt_start-fix-missing-call-to-vnt_key_init_table.patch
+staging-comedi-fix-clean-up-of-comedi_class-in-comedi_init.patch
+saa7134-fix-warm-medion-7134-eeprom-read.patch
diff --git a/queue-3.18/staging-comedi-fix-clean-up-of-comedi_class-in-comedi_init.patch b/queue-3.18/staging-comedi-fix-clean-up-of-comedi_class-in-comedi_init.patch
new file mode 100644 (file)
index 0000000..ee54e95
--- /dev/null
@@ -0,0 +1,35 @@
+From a9332e9ad09c2644c99058fcf6ae2f355e93ce74 Mon Sep 17 00:00:00 2001
+From: Ian Abbott <abbotti@mev.co.uk>
+Date: Fri, 16 Jun 2017 19:35:34 +0100
+Subject: staging: comedi: fix clean-up of comedi_class in comedi_init()
+
+From: Ian Abbott <abbotti@mev.co.uk>
+
+commit a9332e9ad09c2644c99058fcf6ae2f355e93ce74 upstream.
+
+There is a clean-up bug in the core comedi module initialization
+functions, `comedi_init()`.  If the `comedi_num_legacy_minors` module
+parameter is non-zero (and valid), it creates that many "legacy" devices
+and registers them in SysFS.  A failure causes the function to clean up
+and return an error.  Unfortunately, it fails to destroy the "comedi"
+class that was created earlier.  Fix it by adding a call to
+`class_destroy(comedi_class)` at the appropriate place in the clean-up
+sequence.
+
+Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/comedi/comedi_fops.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/staging/comedi/comedi_fops.c
++++ b/drivers/staging/comedi/comedi_fops.c
+@@ -2600,6 +2600,7 @@ static int __init comedi_init(void)
+               dev = comedi_alloc_board_minor(NULL);
+               if (IS_ERR(dev)) {
+                       comedi_cleanup_board_minors();
++                      class_destroy(comedi_class);
+                       cdev_del(&comedi_cdev);
+                       unregister_chrdev_region(MKDEV(COMEDI_MAJOR, 0),
+                                                COMEDI_NUM_MINORS);
diff --git a/queue-3.18/staging-vt6556-vnt_start-fix-missing-call-to-vnt_key_init_table.patch b/queue-3.18/staging-vt6556-vnt_start-fix-missing-call-to-vnt_key_init_table.patch
new file mode 100644 (file)
index 0000000..4865d1f
--- /dev/null
@@ -0,0 +1,30 @@
+From dc32190f2cd41c7dba25363ea7d618d4f5172b4e Mon Sep 17 00:00:00 2001
+From: Malcolm Priestley <tvboxspy@gmail.com>
+Date: Sat, 29 Apr 2017 13:03:44 +0100
+Subject: staging: vt6556: vnt_start Fix missing call to vnt_key_init_table.
+
+From: Malcolm Priestley <tvboxspy@gmail.com>
+
+commit dc32190f2cd41c7dba25363ea7d618d4f5172b4e upstream.
+
+The key table is not intialized correctly without this call.
+
+Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/vt6656/main_usb.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/staging/vt6656/main_usb.c
++++ b/drivers/staging/vt6656/main_usb.c
+@@ -539,6 +539,9 @@ static int vnt_start(struct ieee80211_hw
+               goto free_all;
+       }
++      if (vnt_key_init_table(priv))
++              goto free_all;
++
+       priv->int_interval = 1;  /* bInterval is set to 1 */
+       vnt_int_start_interrupt(priv);