From 3f933ff6e1e6234f7786a6002046ddf7e247932c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 26 Mar 2012 14:58:09 -0700 Subject: [PATCH] 3.2-stable patches added patches: lgdt330x-fix-signedness-error-in-i2c_read_demod_bytes.patch mxl111sf-fix-error-on-stream-stop-in-mxl111sf_ep6_streaming_ctrl.patch pvrusb2-fix-7mhz-8mhz-dvb-t-tuner-support-for-hvr1900-rev-d1f5.patch --- ...edness-error-in-i2c_read_demod_bytes.patch | 50 +++++++++++++++++++ ...-stop-in-mxl111sf_ep6_streaming_ctrl.patch | 42 ++++++++++++++++ ...t-tuner-support-for-hvr1900-rev-d1f5.patch | 48 ++++++++++++++++++ queue-3.2/series | 3 ++ 4 files changed, 143 insertions(+) create mode 100644 queue-3.2/lgdt330x-fix-signedness-error-in-i2c_read_demod_bytes.patch create mode 100644 queue-3.2/mxl111sf-fix-error-on-stream-stop-in-mxl111sf_ep6_streaming_ctrl.patch create mode 100644 queue-3.2/pvrusb2-fix-7mhz-8mhz-dvb-t-tuner-support-for-hvr1900-rev-d1f5.patch diff --git a/queue-3.2/lgdt330x-fix-signedness-error-in-i2c_read_demod_bytes.patch b/queue-3.2/lgdt330x-fix-signedness-error-in-i2c_read_demod_bytes.patch new file mode 100644 index 00000000000..e30e67cf6fe --- /dev/null +++ b/queue-3.2/lgdt330x-fix-signedness-error-in-i2c_read_demod_bytes.patch @@ -0,0 +1,50 @@ +From 34817174fca0c5512c2d5b6ea0fc37a0337ce1d8 Mon Sep 17 00:00:00 2001 +From: Xi Wang +Date: Tue, 14 Feb 2012 14:32:41 -0300 +Subject: [media] lgdt330x: fix signedness error in i2c_read_demod_bytes() + +From: Xi Wang + +commit 34817174fca0c5512c2d5b6ea0fc37a0337ce1d8 upstream. + +The error handling in lgdt3303_read_status() and lgdt330x_read_ucblocks() +doesn't work, because i2c_read_demod_bytes() returns a u8 and (err < 0) +is always false. + + err = i2c_read_demod_bytes(state, 0x58, buf, 1); + if (err < 0) + return err; + +Change the return type of i2c_read_demod_bytes() to int. Also change +the return value on error to -EIO to make (err < 0) work. + +Signed-off-by: Xi Wang +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/dvb/frontends/lgdt330x.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/media/dvb/frontends/lgdt330x.c ++++ b/drivers/media/dvb/frontends/lgdt330x.c +@@ -104,8 +104,8 @@ static int i2c_write_demod_bytes (struct + * then reads the data returned for (len) bytes. + */ + +-static u8 i2c_read_demod_bytes (struct lgdt330x_state* state, +- enum I2C_REG reg, u8* buf, int len) ++static int i2c_read_demod_bytes(struct lgdt330x_state *state, ++ enum I2C_REG reg, u8 *buf, int len) + { + u8 wr [] = { reg }; + struct i2c_msg msg [] = { +@@ -118,6 +118,8 @@ static u8 i2c_read_demod_bytes (struct l + ret = i2c_transfer(state->i2c, msg, 2); + if (ret != 2) { + printk(KERN_WARNING "lgdt330x: %s: addr 0x%02x select 0x%02x error (ret == %i)\n", __func__, state->config->demod_address, reg, ret); ++ if (ret >= 0) ++ ret = -EIO; + } else { + ret = 0; + } diff --git a/queue-3.2/mxl111sf-fix-error-on-stream-stop-in-mxl111sf_ep6_streaming_ctrl.patch b/queue-3.2/mxl111sf-fix-error-on-stream-stop-in-mxl111sf_ep6_streaming_ctrl.patch new file mode 100644 index 00000000000..51bfca4a7f5 --- /dev/null +++ b/queue-3.2/mxl111sf-fix-error-on-stream-stop-in-mxl111sf_ep6_streaming_ctrl.patch @@ -0,0 +1,42 @@ +From 3be5bb71fbf18f83cb88b54a62a78e03e5a4f30a Mon Sep 17 00:00:00 2001 +From: Michael Krufky +Date: Sun, 18 Mar 2012 14:35:57 -0300 +Subject: [media] mxl111sf: fix error on stream stop in mxl111sf_ep6_streaming_ctrl() + +From: Michael Krufky + +commit 3be5bb71fbf18f83cb88b54a62a78e03e5a4f30a upstream. + +Remove unnecessary register access in mxl111sf_ep6_streaming_ctrl() + +This code breaks driver operation in kernel 3.3 and later, although +it works properly in 3.2 Disable register access to 0x12 for now. + +Signed-off-by: Michael Krufky +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/dvb/dvb-usb/mxl111sf.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/drivers/media/dvb/dvb-usb/mxl111sf.c ++++ b/drivers/media/dvb/dvb-usb/mxl111sf.c +@@ -351,15 +351,13 @@ static int mxl111sf_ep6_streaming_ctrl(s + adap_state->ep6_clockphase, + 0, 0); + mxl_fail(ret); ++#if 0 + } else { + ret = mxl111sf_disable_656_port(state); + mxl_fail(ret); ++#endif + } + +- mxl111sf_read_reg(state, 0x12, &tmp); +- tmp &= ~0x04; +- mxl111sf_write_reg(state, 0x12, tmp); +- + return ret; + } + diff --git a/queue-3.2/pvrusb2-fix-7mhz-8mhz-dvb-t-tuner-support-for-hvr1900-rev-d1f5.patch b/queue-3.2/pvrusb2-fix-7mhz-8mhz-dvb-t-tuner-support-for-hvr1900-rev-d1f5.patch new file mode 100644 index 00000000000..06648bb9abf --- /dev/null +++ b/queue-3.2/pvrusb2-fix-7mhz-8mhz-dvb-t-tuner-support-for-hvr1900-rev-d1f5.patch @@ -0,0 +1,48 @@ +From 9ab2393fc3e460cd2040de1483918eb17abb822f Mon Sep 17 00:00:00 2001 +From: Michael Krufky +Date: Tue, 7 Feb 2012 13:28:33 -0300 +Subject: [media] pvrusb2: fix 7MHz & 8MHz DVB-T tuner support for HVR1900 rev D1F5 + +From: Michael Krufky + +commit 9ab2393fc3e460cd2040de1483918eb17abb822f upstream. + +The D1F5 revision of the WinTV HVR-1900 uses a tda18271c2 tuner +instead of a tda18271c1 tuner as used in revision D1E9. To +account for this, we must hardcode the frontend configuration +to use the same IF frequency configuration for both revisions +of the device. + +6MHz DVB-T is unaffected by this issue, as the recommended +IF Frequency configuration for 6MHz DVB-T is the same on both +c1 and c2 revisions of the tda18271 tuner. + +Signed-off-by: Michael Krufky +Cc: Mike Isely +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/video/pvrusb2/pvrusb2-devattr.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c ++++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c +@@ -320,7 +320,17 @@ static struct tda829x_config tda829x_no_ + .probe_tuner = TDA829X_DONT_PROBE, + }; + ++static struct tda18271_std_map hauppauge_tda18271_dvbt_std_map = { ++ .dvbt_6 = { .if_freq = 3300, .agc_mode = 3, .std = 4, ++ .if_lvl = 1, .rfagc_top = 0x37, }, ++ .dvbt_7 = { .if_freq = 3800, .agc_mode = 3, .std = 5, ++ .if_lvl = 1, .rfagc_top = 0x37, }, ++ .dvbt_8 = { .if_freq = 4300, .agc_mode = 3, .std = 6, ++ .if_lvl = 1, .rfagc_top = 0x37, }, ++}; ++ + static struct tda18271_config hauppauge_tda18271_dvb_config = { ++ .std_map = &hauppauge_tda18271_dvbt_std_map, + .gate = TDA18271_GATE_ANALOG, + .output_opt = TDA18271_OUTPUT_LT_OFF, + }; diff --git a/queue-3.2/series b/queue-3.2/series index 454abf5dff6..69b76389fd0 100644 --- a/queue-3.2/series +++ b/queue-3.2/series @@ -103,3 +103,6 @@ proc-ns-use-d_set_d_op-api-to-set-dentry-ops-in-proc_ns_instantiate.patch iommu-amd-fix-section-warning-for-prealloc_protection_domains.patch sysctl-protect-poll-in-entries-that-may-go-away.patch hwmon-fam15h_power-correct-sign-extension-of-running_avg_capture.patch +lgdt330x-fix-signedness-error-in-i2c_read_demod_bytes.patch +pvrusb2-fix-7mhz-8mhz-dvb-t-tuner-support-for-hvr1900-rev-d1f5.patch +mxl111sf-fix-error-on-stream-stop-in-mxl111sf_ep6_streaming_ctrl.patch -- 2.47.3