Commit Graph

2525 Commits

Author SHA1 Message Date
Matthias Benesch
adc1d21eec V4L/DVB: ngene: Remove firmware debugging
Remove firmware debugging, because setting ngene_fw_debug and requesting
firmware from file causes a kernel error.

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:53 -03:00
Matthias Benesch
8bba2607f1 V4L/DVB: ngene: Added Media-Pointer MP-S2/CineS2 DVB-S2 Twin Tuner
Added support for nGene based Media-Pointer DVB-S2 twin tuner cards.

[mchehab@redhat.com: Fix compilation error: unknown field ‘ref_clk’]

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:53 -03:00
Matthias Benesch
6ed36e6670 V4L/DVB: ngene: Additional clean-up
Remove and disable unnecessary code. Disable define ONE_ADAPTER.

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:53 -03:00
Oliver Endriss
0027ebb73e V4L/DVB: ngene: Always use firmware loader
Always use firmware loader.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:53 -03:00
Oliver Endriss
83f3c7157e V4L/DVB: ngene: Driver compiles now
Remove LNBH21 routines, disable code which broke compilation.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:53 -03:00
Matthias Benesch
dae52d009f V4L/DVB: ngene: Initial check-in
Add Micronas nGene PCIe bridge driver.

The source code was provided by Micronas / Ralph Metzler,
and has been reformatted to comply with Linux Codingstyle.

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:53 -03:00
Jiri Slaby
e3a0cc62c8 V4L/DVB: media: dvb/af9015, add hashes support
So as a final patch, add support for hash and one hash entry
for MSI digi vox mini II:
iManufacturer 1 Afatech
iProduct      2 DVB-T 2
iSerial       3 010101010600001

It is now handled with proper IR and key map tables.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:52 -03:00
Jiri Slaby
26c3b8b060 V4L/DVB: media: dvb/af9015, refactor remote setting
Add af9015_setup structure to hold (right now only remote) setup
of distinct receivers.

Add af9015_setup_match for matching ids against tables.

This is for easier matching different kind of ids against tables
to obtain setups. Currently module parameters and usb vendor ids
are switched into and matched against tables. Hashes will follow.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:52 -03:00
Jiri Slaby
634d2d757a V4L/DVB: media: dvb/af9015, factor out remote setting
This is just a code shuffle without functional changes. For easier
review of later changes, i.e. preparation.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:52 -03:00
Jiri Slaby
6c614044ff V4L/DVB: media: dvb/af9015, implement eeprom hashing
This will be useful for matching of IR tables later.

We read the eeprom anyway for dumping. Switch the dumping to
print_hex_dump_bytes and compute hash above that by
hash = 0;
for (u32 VAL) in (eeprom):
  hash *= GOLDEN_RATIO_PRIME_32
  hash += VAL; // while preserving endinaness

The computation is moved earlier to the flow, namely from
af9015_af9013_frontend_attach to af9015_read_config, so that
we can access the sum in af9015_read_config already.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:52 -03:00
Andrew Morton
08c45cd585 V4L/DVB: drivers/media/dvb/frontends/stv090x.c: fix use-uninitlalised
Mad guess.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Manu Abraham <manu@linuxtv.org>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:51 -03:00
Andrew Morton
690c79ae7a V4L/DVB: drivers/media/dvb/frontends/stv090x.c: fix use-uninitialised
drivers/media/dvb/frontends/stv090x.c: In function 'stv090x_blind_search':
drivers/media/dvb/frontends/stv090x.c:1967: warning: 'coarse_fail' may be used uninitialized in this function

Cc: Manu Abraham <manu@linuxtv.org>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Manu Abraham <manu@linuxtv.org>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:51 -03:00
Roel Kluin
407df29363 V4L/DVB: dvb: return -ENOMEM if kzalloc failed in dvb_usb_device_init()
If in a cold state and the download succeeded ret is zero, but we
should return -ENOMEM.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:51 -03:00
Márton Németh
5d26b64432 V4L/DVB: smsir: make local variables static
Make the file local parameters static.

This will remove the following sparse warnings (see "make C=1"):
 * warning: symbol 'ir_pos' was not declared. Should it be static?
 * warning: symbol 'ir_word' was not declared. Should it be static?
 * warning: symbol 'ir_toggle' was not declared. Should it be static?

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:51 -03:00
Massimo Del Fedele
3d36f5c652 V4L/DVB: m920x: Add support for Pinnacle PCTV310e card
Adds support to Pinnacle PCTV310e hybrid tuner card, for DVB-T and
remote control, still no analog video.

[mchehab@redhat.com: fix CodingStyle issues]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:51 -03:00
Roel Kluin
fb3ab105a5 V4L/DVB: stv0900: dereference of state->internal in fe_stv0900_error stv0900_init_internal()
state->internal allocation may fail as well as the allocation of
stv0900_first_inode or new_node->next_inode in append_internal().

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:50 -03:00
Jean Delvare
2abf6dd8e8 V4L/DVB: dvb/bt8xx: Clean-up init and exit functions
The init and exit functions are needlessly complex. Remove the bloat:
* Drop irrelevant/outdated comments.
* Remove useless bt878_pci_driver_registered global variable.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:49 -03:00
Stefan Richter
1e4348c85a V4L/DVB: firedtv: reduce memset()s
Before each FCP transdaction, the entire 512 bytes of the FCP frame were
cleared, then values filled in.

Clear only the bytes between filled-in bytes and end of the
  - request frame, or
  - response frame if data from a larger response will be needed, or
  - whole frame if data from a variable length response will be taken.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:48 -03:00
Stefan Richter
6385c5bf98 V4L/DVB: firedtv: remove check for interrupting signal
FCP transactions as well as CMP transactions were serialized with
mutex_lock_interruptible.  It is extremely unlikly though that a signal
will arrive while a concurrent process holds the mutex.  And even if one
does, the duration of a transaction is reasonably short (1.2 seconds if
all retries time out, usually much shorter).

Hence simplify the code to plain mutex_lock.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:48 -03:00
Stefan Richter
3fb80ef3bc V4L/DVB: firedtv: do not DMA-map stack addresses
This is a portability fix and reduces stack usage.

The DMA mapping API cannot map on-stack addresses, as explained in
Documentation/DMA-mapping.txt.  Convert the two cases of on-stack packet
payload buffers in firedtv (payload of write requests in avc_write and
of lock requests in cmp_lock) to slab-allocated memory.

We use the 512 bytes sized FCP frame buffer in struct firedtv for this
purpose.  Previously it held only incoming FCP responses, now it holds
pending FCP requests and is then overwriten by an FCP response from the
tuner subunit.  Ditto for CMP lock requests and responses.  Accesses to
the payload buffer are serialized by fdtv->avc_mutex.

As a welcome side effect, stack usage of the AV/C transaction functions
is reduced by 512 bytes.

Alas, avc_register_remote_control() is a special case:  It previously
did not wait for a response.  To fit better in with the other FCP
transactions, let it wait for an interim response.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:48 -03:00
Huang Weiyi
2c1fee024d V4L/DVB: [Mantis] remove duplicated #include
Remove duplicated #include('s) in
  drivers/media/dvb/mantis/mantis_hif.c
  drivers/media/dvb/mantis/mantis_pci.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:46 -03:00
Márton Németh
43e3e6d9df V4L/DVB: dib0090: cleanup dib0090_dcc_freq()
'extern' is not needed at function definition.

This will remove the following sparse warning (see "make C=1"):
 * function 'dib0090_dcc_freq' with external linkage has definition

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:46 -03:00
Márton Németh
936c05e7f6 V4L/DVB: stv0900: make more local functions static
Some functions are only used locally so mark them static.

This will remove the following sparse warnings (see "make C=1"):
 * symbol 'extract_mask_pos' was not declared. Should it be static?
 * symbol 'stv0900_initialize' was not declared. Should it be static?
 * symbol 'stv0900_get_mclk_freq' was not declared. Should it be static?
 * symbol 'stv0900_set_mclk' was not declared. Should it be static?
 * symbol 'stv0900_get_err_count' was not declared. Should it be static?

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:46 -03:00
Márton Németh
521e86eb43 V4L/DVB: stv0900: make local functions static
The functions stv0900_sw_algo() and stv0900_set_dvbs1_track_car_loop() are only used
locally so mark them static.

This will remove the following sparse warnings (see "make C=1"):
 * symbol 'stv0900_sw_algo' was not declared. Should it be static?
 * symbol 'stv0900_set_dvbs1_track_car_loop' was not declared. Should it be static?

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:46 -03:00
Thiago Farina
6e3924aa8d V4L/DVB: dvb-core: remove unnecessary casting of kmalloc
drivers/media/dvb/dvb-core/dvb_frontend.c |    6 ++----

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:46 -03:00
Igor M. Liplianin
5eb3291fe8 V4L/DVB: dm1105: use macro for read/write registers
This is for better readability and smaller size of code lines.
Also it is for future improvements like GPIO handling.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:42 -03:00
Igor M. Liplianin
34d2f9bf18 V4L/DVB: dm1105: use dm1105_dev & dev instead of dm1105dvb
This is for better readability and smaller size of code.
Also it is similar to other drivers.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:42 -03:00
Igor M. Liplianin
ed7c847aef V4L/DVB: dm1105: connect splitted else-if statements
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:41 -03:00
Igor M. Liplianin
b4a0e816fb V4L/DVB: Add Support for DVBWorld DVB-S2 PCI 2004D card
The PCI card contains dm1105 PCI bridge and ds3000 demod.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:41 -03:00
Abylay Ospan
0726681a70 V4L/DVB: 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card. 22kHz logic controlled by demod
22-kHz tone can be driven in two ways:
1. LNBH24 can produce 22kHz continuous tone when TEN=1 ( 22 KHz tone output is
always activated ).
2. LNBH24 can reproduce 22kHz tone timings from DSQIN or EXTM pin's when TEN=0.
From LNBH24 datasheet:
"In order to improve design flexibility an external tone input pin is
available (EXTM). The EXTM is a Logic input pin which activates the 22 kHz
tone output, on the VoTX pin, by using the LNBH24 integrated tone generator
(similar to the DSQIN pin function). In fact, the output tone waveform
characteristics will always be internally controlled by the LNBH24 tone
generator and the EXTM signal will be used as a timing control for DiSEqC tone
data encoding on the VoTX output."

In NetUP Dual DVB-S2-CI card 22kHz tone timings on EXTM pin produced by
STV0900 demod:
.set_tone  = stv0900_set_tone

redefine to "set_tone = lnbp21_set_tone" is not correct for "NetUP Dual
DVB-S2-CI card".

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:41 -03:00
Arvo Järve
225ee0ca19 V4L/DVB (13989): [TDA8261] Fix TDA8261 I2C read bug
The TDA8261 driver would crash when reading more than a byte as described.

ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff
[ 8.430350] KNC1-2: MAC addr = 00:09:d6:65:2d:91
[ 8.610008] saa7146 (1) saa7146_i2c_writeout [irq]: timed out waiting for end of xfer
[ 8.734457] stb0899_attach: Attaching STB0899
[ 8.768481] tda8261_attach: Attaching TDA8261 8PSK/QPSK tuner
[ 8.768485] DVB: registering adapter 2 frontend 0 (STB0899 Multistandard)...

Once I launch scan-s2:
scan-s2 -vvvv -a 2 -s 1 -l UNIVERSAL /usr/share/dvb/dvb-s/Hotbird-13.0E

I see the following via dmesg:

[ 435.040017] saa7146 (1) saa7146_i2c_writeout [irq]: timed out waiting for end of xfer
[ 435.778648] tda8261_get_bandwidth: Bandwidth=40000000
[ 435.781781] tda8261_get_bandwidth: Bandwidth=40000000
[ 435.783311] tda8261_set_state: Step size=1, Divider=1000, PG=0x793 (1939)
[ 435.783512] tda8261_set_state: Waiting to Phase LOCK
[ 435.810134] tda8261_get_status: Tuner Phase Locked
[ 435.810137] tda8261_set_state: Tuner Phase locked: status=1
[ 435.810139] tda8261_set_frequency: Frequency=1939000
[ 435.810141] tda8261_get_frequency: Frequency=7574
[ 435.830008] tda8261_get_bandwidth: Bandwidth=40000000
[ 436.402814] tda8261_get_bandwidth: Bandwidth=40000000
[ 436.405946] tda8261_get_bandwidth: Bandwidth=40000000
[ 436.407458] general protection fault: 0000 [#1] SMP
[ 436.407527] last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
[ 436.407560] CPU 0
[ 436.407601] Modules linked in: tda8261 stb0899 dvb_pll mt352 lnbp21 budget_av saa7146_vv snd_hda_codec_realtek videodev stv0299 v4l1_compat coretemp snd_hda_intel v4l2_compat_ioctl32 i915 videobuf_dma_sg b2c2_flexcop_pci snd_hda_codec budget_ci videobuf_core b2c2_flexcop ir_common w83627ehf drm snd_hwdep cx24123 budget_core hwmon_vid snd_pcm cx24113 dvb_core iptable_filter snd_timer i2c_algo_bit ip_tables saa7146 s5h1420 snd ttpci_eeprom soundcore intel_agp video serio_raw pcspkr lp snd_page_alloc x_tables output parport pata_it8213 e1000e
[ 436.408757] Pid: 1410, comm: kdvb-ad-2-fe-0 Not tainted 2.6.31-14-server #48-Ubuntu C2SBC-Q
[ 436.408818] RIP: 0010:[<ffffffffa00241a1>] [<ffffffffa00241a1>] tda8261_set_state+0x51/0x250 [tda8261]
[ 436.408903] RSP: 0018:ffff88013649bc70 EFLAGS: 00010283
[ 436.408945] RAX: 00000000000f1748 RBX: ffff880138870680 RCX: 0000000000000018
[ 436.408990] RDX: ffff88013649bcd0 RSI: 0000000000000001 RDI: ffff880135273010
[ 436.409035] RBP: ffff88013649bcc0 R08: 0000000000000001 R09: 0000000000000002
[ 436.409081] R10: ffff88013649bc40 R11: 0000000055555556 R12: 00000000001d9638
[ 436.409126] R13: 38ffffffa0261568 R14: 0000000000000000 R15: ffff880135273010
[ 436.409172] FS: 0000000000000000(0000) GS:ffff880028022000(0000) knlGS:0000000000000000
[ 436.409232] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
[ 436.409274] CR2: 00007fff925e4cd8 CR3: 000000013642a000 CR4: 00000000000406f0
[ 436.409320] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 436.409365] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 436.409411] Process kdvb-ad-2-fe-0 (pid: 1410, threadinfo ffff88013649a000, task ffff88013658ad60)
[ 436.409473] Stack:
[ 436.409508] ffff880136ee2af1 00000000bcd5d166 ffff000200000068 0000000035273000
[ 436.409608] <0> 0000000000000001 ffff880135273000 ffffffffa0265260 00003473bc000000
[ 436.409758] <0> 0000000000000000 ffff88013a4e05e0 ffff88013649bd00 ffffffffa025f133
[ 436.409938] Call Trace:
[ 436.409978] [<ffffffffa025f133>] tda8261_set_frequency+0x23/0x70 [budget_av]
[ 436.410027] [<ffffffffa026ed09>] ? stb0899_i2c_gate_ctrl+0x49/0xf0 [stb0899]
[ 436.410074] [<ffffffffa026e259>] ? stb0899_write_reg+0x19/0x20 [stb0899]
[ 436.410121] [<ffffffffa02716e2>] stb0899_dvbs_algo+0x3a2/0x13c8 [stb0899]
[ 436.410170] [<ffffffff813cdd0d>] ? i2c_transfer+0xbd/0x100
[ 436.410215] [<ffffffffa026e13c>] ? stb0899_write_regs+0xac/0x1b0 [stb0899]
[ 436.410262] [<ffffffffa026f239>] stb0899_search+0x489/0x750 [stb0899]
[ 436.410308] [<ffffffff8107d153>] ? down_interruptible+0x33/0x60
[ 436.410360] [<ffffffffa00c34ec>] dvb_frontend_thread+0x57c/0x720 [dvb_core]
[ 436.410407] [<ffffffff81078620>] ? autoremove_wake_function+0x0/0x40
[ 436.410457] [<ffffffffa00c2f70>] ? dvb_frontend_thread+0x0/0x720 [dvb_core]
[ 436.410504] [<ffffffff81078236>] kthread+0xa6/0xb0
[ 436.410547] [<ffffffff810130aa>] child_rip+0xa/0x20
[ 436.410589] [<ffffffff81078190>] ? kthread+0x0/0xb0
[ 436.410631] [<ffffffff810130a0>] ? child_rip+0x0/0x20
[ 436.410672] Code: 00 03 00 00 4c 8b 6b 10 c7 45 cc 00 00 00 00 0f 84 e8 01 00 00 44 8b 22 41 8d 84 24 10 81 f1 ff 3d 80 4f 12 00 0f 87 af 01 00 00 <41> 8b 75 04 31 d2 48 c7 c7 d8 46 02 a0 89 f0 8b 0c 85 f0 45 02
[ 436.411950] RIP [<ffffffffa00241a1>] tda8261_set_state+0x51/0x250 [tda8261]
[ 436.412015] RSP <ffff88013649bc70>
[ 436.412064] ---[ end trace c1d7ae4d9e05c51b ]---

Signed-off-by: Arvo Järve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:38 -03:00
Oliver Endriss
d8b5a8e449 V4L/DVB (13988): [STV090x] Configuration parameters adc1_range, adc2_range, tuner_bbgain
Add parameters adc1_range, adc2_range and tuner_bbgain to the config struct.
Defaults: adc1_range = adc2_range = 2Vpp, tuner_bbgain = 10db

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:38 -03:00
Oliver Endriss
41894b9700 V4L/DVB (13987): [STV090x] Quit processing if the tuner did not lock
Exit stv090x_algo() if the tuner did not lock. This might happen due to
missing signal or invalid/incomplete tuning parameters.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:38 -03:00
Oliver Endriss
2c1f750ba3 V4L/DVB (13986): [STV090x] Disable I2C gate on error
The I2C gate must also be disabled, if a tuner command failed.
Otherwise the tuner mutex would be locked forever.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:38 -03:00
Andreas Regel
76b9ef9795 V4L/DVB (13985): [STV090x] reset mclk and dev_ver of internal structure after allocating
When mclk is not 0 then it will never be set to the correct value and
the Demodulator will not work.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:38 -03:00
Andreas Regel
93e32cdafb V4L/DVB (13984): [BUDGET] Use a tuner clock output divider of 2 for TT S2-1600.
This gives the STV090x and improved clock signal (rectangle instead of sine).

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:37 -03:00
Andreas Regel
ca108b39a7 V4L/DVB (13983): [STV6110x] add clk_div member to stv6110x_config structure
Using clk_div member of stv6110x_config structure the tuner's clock
output divider can be configured. It is set in stv6110x_attach.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:37 -03:00
Andreas Regel
9045e72944 V4L/DVB (13982): [STV090x] setup master clock in stv090x_init instead of stv090x_setup.
This is needed when clock input is driven from tuner and an output
divider different from 1 is used.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:37 -03:00
Andreas Regel
ec2d3a62ef V4L/DVB (13981): [STV6110x] Add a local register map for each instance of the driver.
Before there was used a static register map that could lead to issues
when there are are multiple adapters with the STV6110(A).

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel
0c3f9fd807 V4L/DVB (13980): [STV6110x] Added function stv6110x_write_regs
The function stv6110x_write_regs is used to write several registers at once.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel
f91e59cb5e V4L/DVB (13979): [STV090x] Added possibility to set a fixed TS output clock.
This could be useful for p.e. Common Interface applications where data rate is limited.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel
c369b7c282 V4L/DVB (13978): [STV090x] set FE_HAS_SIGNAL flag in stv090x_read_status when locked.
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel
729cbafaca V4L/DVB (13977): [STV090x] Test for valid frequency before starting to tune
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel
96506a5086 V4L/DVB (13976): [STV090x] Added mutex protection around tuner I2C access.
With this change it is possible to have the same I2C address for both tuners.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel
97f7a2ae1a V4L/DVB (13975): [STV090x] Added internal structure with shared settings and data.
As the STV0900 features two demodulation paths in one chip there is
some information used by both instances of the driver when used in
dual mode. This information is now shared in an internal structure
referenced by I2C adapter and address.

Do initialisation of the demodulator only once when used in dual mode.
Moved global mutex demod_lock to internal structure.
Moved dev_ver and mclk to internal structure.
Removed unused tuner_refclk from stv090x_state.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel
b79c6df705 V4L/DVB (13974): [STV090x] Fix locking reliabilty issues in automatic mode.
In automatic S/S2 detection mode, locking of a DVB-S transponder could
fail when coming from a DVB-S2 transponder. This change fixes the issue
by first disabling DVB-S and DVB-S2 mode before enabling it again.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Abylay Ospan
ceb59cf068 V4L/DVB (13936): 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card
22-kHz tone can be driven in two ways:
1. LNBH24 can produce 22kHz continuous tone when TEN=1 ( 22 KHz tone output is
always activated ).
2. LNBH24 can reproduce 22kHz tone timings from DSQIN or EXTM pin's when TEN=0.
From LNBH24 datasheet:
"In order to improve design flexibility an external tone input pin is
available (EXTM). The EXTM is a Logic input pin which activates the 22 kHz
tone output, on the VoTX pin, by using the LNBH24 integrated tone generator
(similar to the DSQIN pin function). In fact, the output tone waveform
characteristics will always be internally controlled by the LNBH24 tone
generator and the EXTM signal will be used as a timing control for DiSEqC tone
data encoding on the VoTX output."

In NetUP Dual DVB-S2-CI card 22kHz tone timings on EXTM pin produced by
STV0900 demod:
.set_tone  = stv0900_set_tone

redefine to "set_tone = lnbp21_set_tone" is not correct for "NetUP Dual
DVB-S2-CI card".

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Peter Huewe
310b26286e V4L/DVB (13947): add __init/__exit macros to drivers/media/dvb/bt8xx/bt878.c
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of

drivers/media/dvb/bt8xx/bt878.c

Please have a look at the small patch and either pull it through
your tree, or please ack' it so Jiri can pull it through the trivial
tree.

Patch against linux-next-tree, 22. Dez 08:38:18 CET 2009
but also present in linus tree.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Joe Perches
42a39e0592 V4L/DVB (13969): frontends/si21xx.c: Remove #define TRUE/FALSE, use bool
And a little code refactoring/neatening around the removals

Reduces object size a little bit:

new:
$ size drivers/media/dvb/frontends/si21xx.o
   text	   data	    bss	    dec	    hex	filename
   8984	     56	   1816	  10856	   2a68	drivers/media/dvb/frontends/si21xx.o
old:
$ size drivers/media/dvb/frontends/si21xx.o
   text	   data	    bss	    dec	    hex	filename
   9084	     56	   1792	  10932	   2ab4	drivers/media/dvb/frontends/si21xx.o

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Jiri Slaby
78b06e0201 V4L/DVB (13965): zl10039, jump to error on error
Stanse found an unreachable statement in zl10039_attach. There is
a `break' followed by `goto error'. Remove that break, so that it
can handle the error.

Cc: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Jiri Slaby
b46d37e61f V4L/DVB (13963): siano, fix memory leak
Stanse found a memory leak in smscore_gpio_configure. buffer is not
freed/assigned on all paths. Fix that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:34 -03:00
Dan Carpenter
211635654c V4L/DVB (13956): fix weird array index in zl10036.c
I was initially concerned about the weird array index (the 2 bumps
into the next row of the array).  Matthias Schwarzott look at the
datasheet and it turns out it should be zl10036_init_tab[1][0] |= 0x01;

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:34 -03:00
Stefan Richter
b2ad41f9ef V4L/DVB (13953): firedtv: add missing NULL pointer check
If there is ever going to be a FireDTV or FloppyDTV firmware which does
not provide a minimal ASCII textual descriptor for Model_Id --- or if
the descriptor is provided indirectly in a descriptor directory ---
the ieee1394 variant of the device probe of firedtv would dereference a
NULL pointer.  The firewire variant of firedtv's device probe is not
affected.

The fix makes sure that such an unexpected firmware is safely recognized
by fdtv_alloc as an unknown firmware.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:33 -03:00
Tobias Klauser
7b2d3983f2 V4L/DVB (13950): usb-friio: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:33 -03:00
Julia Lawall
21ead03bdd V4L/DVB (13949): Move a dereference below a NULL test
If the NULL test is necessary, then the dereference should be moved below
the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:33 -03:00
Alexey Dobriyan
e0572325d2 V4L/DVB (13946): proc_fops: convert av7110
Drop S_IRUGO, proc entry doesn't contain read hooks.
Drop S_IFREG, simply unnecessary.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:33 -03:00
Devin Heitmueller
6a2071006b V4L/DVB (13930): dib0700: rework IR logic for firmware 1.20
When firmware 1.20 was introduced, the dib0700 switched from a polling model
using a USB control message, to the messages being delivered on a USB bulk
pipe.  The code I originally added would do a blocking read on the pipe with a
50ms timeout.  Because the dvb-usb-remote code makes use of the global
workqueue, this resulted in the global workqueue being blocked 50% of the
time.  Also, the synchronous urb_bulk_msg() call would burn excess CPU time
(reflected as an abnormal increase in the system's load average when devices
were connected).

Rework the logic so that we now setup an asynchronous callback on the bulk
pipe, so that we now only handle RC data when it arrives on the pipe.  Note
that we provide a stub function for the RC polling callback so that we can
continue to leverage the shared code in dvb-usb-rc for the setting up of the
input device.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:32 -03:00
Mauro Carvalho Chehab
fb8253baa0 V4L/DVB (13879): dvb_frontend: report what ioctl were called on debug mode
When printing that an iocl were called, report the ioctl number.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:27 -03:00
Mauro Carvalho Chehab
639544d78c V4L/DVB (13878): dvb_frontend: Print dump on get after filling the data
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:27 -03:00
Mauro Carvalho Chehab
b4622c14a1 V4L/DVB (13848): smsdvb: Add the proper status for IsRfLocked
Now, if RF is locked but demod is not locked, it will report:
>>> tuning status == 0x03

This happens, for example, if the device is on DVB-T, and the video
standard is ISDB-T.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab
25f9461a03 V4L/DVB (13847): smsdvb: Remove a wrong debug message
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab
5eb23975b4 V4L/DVB (13846): smsdvb: Properly implement stats for both DVB and ISDB-T
After taking a look at the driver's history and doing some tests with
DVB and ISDB-T, it was noticed that the stats were incomplete, for
ISDB-T, and weren't working for DVB.

Fixed the code and added a debug code to print the complete stats at
dmesg. This debug is useful to improve the stats of this driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab
643e15a0f4 V4L/DVB (13845): smsdvb: Fix the frequency switch that broke with v5 API conversion
Bandwidth is in Hz, not in kHz.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab
e85c97a050 V4L/DVB (13844): smsdvb: Properly report the Delivery System
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab
910ef763c1 V4L/DVB (13843): dib8000: Properly report Delivery System as SYS_ISDBT
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab
cf4fab720c V4L/DVB (13842): smsdvb: Convert it to use DVB API v5 (S2API)
Based on a patch originally written by Michael Krufky <mkrufky@linuxtv.org>
for a preliminar S2API spec.

The patch were ported to the S2API and had the ISDB-T API additions to
honor the auto mode, while keep allowing manual tuning.

Tested with both the original dvb-apps and the new dvb-apps-isdbt scan,
that uses a different channel.conf and uses S2API with ISDB-T extensions.

Thanks-to: Michael Krufky <mkrufky@linuxtv.org> for his first version
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
Mauro Carvalho Chehab
67ae1d26bd V4L/DVB (13841): smsdvb: Make stats to work
Siano series of patches seemed to cause a regression on reporting DTV
statistics. Due to that, signal indication weren't received, preventing
applications like scan to work.

Tested with ISDB-T signals and got the same scan result as with a
dib0700/dib8000 device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
Michael Krufky
dcb0c53331 V4L/DVB (13840): smsusb: Add ISDB-T firmware for Hauppauge WinTV-Nova-T-MiniStick
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
Michael Krufky
6b26fcea51 V4L/DVB (13839): smsdvb: add ISDB-T as DVB-T tuning support hack
Activate ISDB-T mode using module option default_mode=6.

hack: use 4 lower bits in frequency for segment number

[mchehab@redhat.com: fix merge conflicts and CodingStyle]
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
David Wong
c245c75c41 V4L/DVB (13838): atbm8830: use AGC setting from config
Improves ATBM8830 reception by using per card AGC configuration rather
than register default.

Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
Igor M. Liplianin
cd79d33e16 V4L/DVB (13818): Add Prof 7500 DVB-S2 USB card
The card based on stv0903 demod, stb6100 tuner.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:24 -03:00
Mauro Carvalho Chehab
971e8298de V4L/DVB (13680): ir: use unsigned long instead of enum
When preparing the linux-next patches, I got those errors:

include/media/ir-core.h:29: warning: left shift count >= width of type
In file included from include/media/ir-common.h:29,
                 from drivers/media/video/ir-kbd-i2c.c:50:
drivers/media/video/ir-kbd-i2c.c: In function ‘ir_probe’:
drivers/media/video/ir-kbd-i2c.c:324: warning: left shift count >= width of type

Unfortunately, enum is 32 bits on i386. As we define IR_TYPE_OTHER as 1<<63,
it won't work on non 64 bits arch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:24 -03:00
Mauro Carvalho Chehab
e93854da88 V4L/DVB (13634): ir-core: allow passing IR device parameters to ir-core
Adds an structure to ir_input_register to contain IR device characteristics,
like supported protocols and a callback to handle protocol event changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:23 -03:00
Stefan Richter
109d28152b Merge tag 'v2.6.33' for its firewire changes since last branch point
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-02-24 20:33:45 +01:00
Ben Hutchings
fc4a7f9308 V4L/DVB: cxusb: Select all required frontend and tuner modules
cxusb uses the atbm8830 and lgs8gxx (not lgs8gl5) frontends and the
max2165 tuner, so it needs to select them.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-19 03:19:01 -02:00
Richard Guenther
c1db53b366 V4L/DVB: dvb: l64781.ko broken with gcc 4.5
I'm trying to fix it on the GCC side (PR43007), but the module is
quite stupid in using ULL constants to operate on u32 values:

static int apply_frontend_param (struct dvb_frontend* fe, struct
dvb_frontend_parameters *param)
{
...
 static const u32 ppm = 8000;
 u32 spi_bias;
...

 spi_bias *= 1000ULL;
 spi_bias /= 1000ULL + ppm/1000;

which causes current GCC 4.5 to emit calls to __udivdi3 for i?86 again.

This patch fixes this issue.

Signed-off-by: Richard Guenther <rguenther@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-19 03:19:01 -02:00
David S. Miller
2bb4646fce Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-02-16 22:09:29 -08:00
Jiri Pirko
4cd24eaf0c net: use netdev_mc_count and netdev_mc_empty when appropriate
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss
anything). Used spatch and did small tweaks and conding style changes when
it was suitable.

Jirka

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 11:38:58 -08:00
Daniel Mack
3ad2f3fbb9 tree-wide: Assorted spelling fixes
In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Joe Perches <joe@perches.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-09 11:13:56 +01:00
Francesco Lavra
691c9ae099 V4L/DVB: dvb-core: fix initialization of feeds list in demux filter
A DVB demultiplexer device can be used to set up either a PES filter or
a section filter. In the former case, the ts field of the feed union of
struct dmxdev_filter is used, in the latter case the sec field of the
same union is used.
The ts field is a struct list_head, and is currently initialized in the
open() method of the demux device. When for a given demuxer a section
filter is set up, the sec field is played with, thus if a PES filter
needs to be set up after that the ts field will be corrupted, causing a
kernel oops.
This fix moves the list head initialization to
dvb_dmxdev_pes_filter_set(), so that the ts field is properly
initialized every time a PES filter is set up.

Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Cc: stable <stable@kernel.org>
Reviewed-by: Andy Walls <awalls@radix.net>
Tested-by: hermann pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-08 10:47:17 -02:00
Mauro Carvalho Chehab
bc081cc869 V4L/DVB: dvb_demux: Don't use vmalloc at dvb_dmx_swfilter_packet
As dvb_dmx_swfilter_packet() is protected by a spinlock, it shouldn't sleep.
However, vmalloc() may call sleep. So, move the initialization of
dvb_demux::cnt_storage field to a better place.

Reviewed-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-08 10:46:58 -02:00
Mauro Carvalho Chehab
adefdceef4 V4L/DVB: Fix the risk of an oops at dvb_dmx_release
dvb_dmx_init tries to allocate virtual memory for 2 pointers: filter and feed.

If the second vmalloc fails, filter is freed, but the pointer keeps pointing
to the old place. Later, when dvb_dmx_release() is called, it will try to
free an already freed memory, causing an OOPS.

Reviewed-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-08 10:45:24 -02:00
Peter Huewe
60c14a1507 media/dvb: add __init/__exit macros to bt878.c
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of

drivers/media/dvb/bt8xx/bt878.c

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-05 12:22:33 +01:00
David S. Miller
51c24aaaca Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-01-23 00:31:06 -08:00
Linus Torvalds
2faae42233 Merge branch 'mantis' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'mantis' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (117 commits)
  V4L/DVB (13851): Fix Input dependency for Mantis
  V4L/DVB(13824a): mantis: Fix __devexit bad annotations
  V4L/DVB (13808b): mantis: replace DMA_nnBIT_MASK to DMA_BIT_MASK(32)
  V4L/DVB (13808): [Mantis/Hopper] Build update for Mantis/Hopper based cards
  V4L/DVB(13808a): mantis: convert it to the new ir-core register/unregister functions
  V4L/DVB (13812): [Mantis/Hopper] Update Copyright header
  V4L/DVB (13811): [MB86A16] Update Copyright header
  V4L/DVB (13810): [MB86A16] Use DVB_* macros
  V4L/DVB (13809): Fix Checkpatch violations
  V4L/DVB (13807): Fix: Free device in the device registration failure case
  V4L/DVB (13806): Register and Initialize Remote control
  V4L/DVB (13805): Fix: Unregister the frontend before detaching
  V4L/DVB (13804): Remove unused I2C Adapter ID
  V4L/DVB (13803): Remove unused dependency on CU1216
  V4L/DVB (13802): [Mantis/Hopper] Fix all build related warnings
  V4L/DVB (13801): [MB86A16] Use the search callback
  V4L/DVB (13800): [Mantis] I2C optimization. Required delay is much lesser than 1mS.
  V4L/DVB (13799): [Mantis] Unregister frontend
  V4L/DVB (13798): [Mantis] Enable power for all cards, use byte mode only on relevant devices
  V4L/DVB (13797): [Mantis/Hopper/TDA665x] Large overhaul,
  ...
2010-01-18 14:07:07 -08:00
Manu Abraham
fcd89de3bd V4L/DVB (13851): Fix Input dependency for Mantis
>
>
>
> CONFIG_INPUT=n

As reported by Randy Dunlap <randy.dunlap@oracle.com>:
> ERROR: "ir_input_register" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
> ERROR: "ir_input_unregister" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
> ERROR: "ir_input_init" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
> ERROR: "input_free_device" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
> ERROR: "input_allocate_device" [drivers/media/dvb/mantis/mantis_core.ko] undefined!

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 12:01:45 -02:00
Mauro Carvalho Chehab
4cf0b3f130 V4L/DVB(13824a): mantis: Fix __devexit bad annotations
WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x13d7): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
The function __devinit mantis_pci_probe() references
a function __devexit mantis_i2c_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_i2c_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x1433): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
The function __devinit mantis_pci_probe() references
a function __devexit mantis_pci_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_pci_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x185e): Section mismatch in reference from the function hopper_pci_probe() to the function
.devexit.text:mantis_i2c_exit()
The function __devinit hopper_pci_probe() references
a function __devexit mantis_i2c_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_i2c_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x18ba): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
The function __devinit hopper_pci_probe() references
a function __devexit mantis_pci_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_pci_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x68b8): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
The function __devinit mantis_pci_probe() references
a function __devexit mantis_i2c_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_i2c_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6914): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
The function __devinit mantis_pci_probe() references
a function __devexit mantis_pci_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_pci_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6d3f): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_i2c_exit()
The function __devinit hopper_pci_probe() references
a function __devexit mantis_i2c_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_i2c_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6d9b): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
The function __devinit hopper_pci_probe() references
a function __devexit mantis_pci_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_pci_exit() so it may be used outside an exit section.

WARNING: drivers/media/built-in.o(.devinit.text+0x14634): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
The function __devinit mantis_pci_probe() references
a function __devexit mantis_i2c_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_i2c_exit() so it may be used outside an exit section.

WARNING: drivers/media/built-in.o(.devinit.text+0x14690): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
The function __devinit mantis_pci_probe() references
a function __devexit mantis_pci_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_pci_exit() so it may be used outside an exit section.

WARNING: drivers/media/built-in.o(.devinit.text+0x14abb): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_i2c_exit()
The function __devinit hopper_pci_probe() references
a function __devexit mantis_i2c_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_i2c_exit() so it may be used outside an exit section.

WARNING: drivers/media/built-in.o(.devinit.text+0x14b17): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
The function __devinit hopper_pci_probe() references
a function __devexit mantis_pci_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_pci_exit() so it may be used outside an exit section.

Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 12:01:44 -02:00
Mauro Carvalho Chehab
184ac7535e V4L/DVB (13808b): mantis: replace DMA_nnBIT_MASK to DMA_BIT_MASK(32)
drivers/media/dvb/mantis/mantis_pci.c: In function ‘mantis_pci_init’:
drivers/media/dvb/mantis/mantis_pci.c:76: warning: ‘DMA_nnBIT_MASK’ is deprecated

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:45 -02:00
Manu Abraham
8873c61f1f V4L/DVB (13808): [Mantis/Hopper] Build update for Mantis/Hopper based cards
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:45 -02:00
Mauro Carvalho Chehab
9c0832e399 V4L/DVB(13808a): mantis: convert it to the new ir-core register/unregister functions
Fix a merge conflict between mantis and IR cleanups

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:45 -02:00
Manu Abraham
8825a0970c V4L/DVB (13812): [Mantis/Hopper] Update Copyright header
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:45 -02:00
Manu Abraham
4cd191fba4 V4L/DVB (13811): [MB86A16] Update Copyright header
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:45 -02:00
Manu Abraham
28fddb7cd5 V4L/DVB (13810): [MB86A16] Use DVB_* macros
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham
f5ae4f6f48 V4L/DVB (13809): Fix Checkpatch violations
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham
1e42dc7890 V4L/DVB (13807): Fix: Free device in the device registration failure case
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham
a1497357dc V4L/DVB (13806): Register and Initialize Remote control
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham
c5e598a6f8 V4L/DVB (13805): Fix: Unregister the frontend before detaching
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham
0ac6e141eb V4L/DVB (13804): Remove unused I2C Adapter ID
Signed-off-by: <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham
83dbe82bd7 V4L/DVB (13803): Remove unused dependency on CU1216
Thanks to Matthias Wachter <mathias@waechter.wiz.at>
for pointing it out.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham
0bdc799b8b V4L/DVB (13802): [Mantis/Hopper] Fix all build related warnings
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:43 -02:00