summaryrefslogtreecommitdiffstats
path: root/drivers/media/common/siano/smsdvb-main.c
Commit message (Collapse)AuthorAgeFilesLines
* media: siano: Refactor struct sms_msg_dataRicardo Ribalda2024-05-311-2/+2
| | | | | | | | | | | | | | | | Replace a single element array with a single element field. The endianness conversion code seems to support multiple elements. To avoid changing behavior a pointer to the single element has been used. This is safer than moving to a flex array, because in that case the structure size changes. This fixes the following cocci warning: drivers/media/common/siano/smscoreapi.h:619:5-13: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>"Ahelenia Ziemiańska2024-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Found with git grep 'MODULE_AUTHOR(".*([^)]*@' Fixed with sed -i '/MODULE_AUTHOR(".*([^)]*@/{s/ (/ </g;s/)"/>"/;s/)and/> and/}' \ $(git grep -l 'MODULE_AUTHOR(".*([^)]*@') Also: in drivers/media/usb/siano/smsusb.c normalise ", INC" to ", Inc"; this is what every other MODULE_AUTHOR for this company says, and it's what the header says in drivers/sbus/char/openprom.c normalise a double-spaced separator; this is clearly copied from the copyright header, where the names are aligned on consecutive lines thusly: * Linux/SPARC PROM Configuration Driver * Copyright (C) 1996 Thomas K. Dyas (tdyas@noc.rutgers.edu) * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) but the authorship branding is single-line Link: https://lkml.kernel.org/r/mk3geln4azm5binjjlfsgjepow4o73domjv6ajybws3tz22vb3@tarta.nabijaczleweli.xyz Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* media: siano: fix device register error pathMauro Carvalho Chehab2021-06-171-0/+4
| | | | | | | | | | As reported by smatch: drivers/media/common/siano/smsdvb-main.c:1231 smsdvb_hotplug() warn: '&client->entry' not removed from list If an error occur at the end of the registration logic, it won't drop the device from the list. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
* media: siano: use DEFINE_MUTEX() for mutex lock and LIST_HEAD for list headYe Bin2021-05-211-5/+2
| | | | | | | | | | | | mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). list head can be initialized automatically with LIST_HEAD() rather than explicitly calling INIT_LIST_HEAD(). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Ye Bin <yebin10@huawei.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
* media: media/siano: Fix transmission parameters reporting for ISDB-TNicolas Stuardo Diaz2021-03-231-4/+40
| | | | | | | | | | | | | | | | | | | | | | The currently used functions for converting the transmission mode and guard interval from the internal values to the DVBv5 API values do not return correct values for ISDB broadcasts: - The raw (debugfs) transmission mode is an integer whose values can be 1, 2 or 3, that corresponds to 2K, 4K and 8K FFT modes respectively. However sms_to_mode() expects values 2, 4 or 8. - Guard interval, as defined by smscoreapi.h returns "1 divided by value" instead of 0, 1, 2, and 3 as defined in sms_to_guard_interval_table(). This commit implements ISDB-T specific methods for converting the internal values for the aforementioned parameters to the DVBv5 API values. It also adds support for reporting FEC and time interleaving values for each one of the layers. [mchehab: fix two coding style whitespace warnings] Link: https://lore.kernel.org/linux-media/20201222030522.28774-1-nicolasstuardodiaz@gmail.com Signed-off-by: Nicolas Stuardo Diaz <nicolasstuardodiaz@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
* media: media/siano: kill pointless kmutex definitionsDavidlohr Bueso2021-03-111-7/+7
| | | | | | | | | Use the mutex api instead of renaming the calls for this driver. Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
* media: siano: fix memory leak of debugfs members in smsdvb_hotplugKeita Suzuki2020-11-261-1/+4
| | | | | | | | | | | | When dvb_create_media_graph fails, the debugfs kept inside client should be released. However, the current implementation does not release them. Fix this by adding a new goto label to call smsdvb_debugfs_release. Fixes: 0d3ab8410dcb ("[media] dvb core: must check dvb_create_media_graph()") Signed-off-by: Keita Suzuki <keitasuzuki.park@sslab.ics.keio.ac.jp> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13Thomas Gleixner2019-05-211-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details [based] [from] [clk] [highbank] [c] you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 355 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190519154041.837383322@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* media: dvb: represent min/max/step/tolerance freqs in HzMauro Carvalho Chehab2018-08-021-3/+3
| | | | | | | | | | | | | | | | Right now, satellite frontend drivers specify frequencies in kHz, while terrestrial/cable ones specify in Hz. That's confusing for developers. However, the main problem is that universal frontends capable of handling both satellite and non-satelite delivery systems are appearing. We end by needing to hack the drivers in order to support such hybrid frontends. So, convert everything to specify frontend frequencies in Hz. Tested-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: move dvb kAPI headers to include/mediaMauro Carvalho Chehab2017-12-281-4/+4
| | | | | | | | Except for DVB, all media kAPI headers are at include/media. Move the headers to it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: siano: fix a potential integer overflowGustavo A. R. Silva2017-12-141-1/+1
| | | | | | | | | | | Add suffix ULL to constant 65535 in order to avoid a potential integer overflow. This constant is used in a context that expects an expression of type u64. Addresses-Coverity-ID: 1056806 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] dvb: make DVB frontend *_ops instances "const"Max Kellermann2016-11-181-1/+1
| | | | | | | | | | | | | These are immutable. Making them "const" allows the compiler to move them to the "rodata" section. Note that cxd2841er_t_c_ops cannot be made "const", because cxd2841er_attach() modifies it. Ouch! [mchehab@s-opensource.com: fix merge conflicts] Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] siano: remove get_frontend stubMauro Carvalho Chehab2016-02-041-7/+0
| | | | | | | | There's nothing at siano's get_frontend() callback. So, remove it, as the core will handle it. Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvbdev: Add RF connector if neededMauro Carvalho Chehab2016-01-111-1/+1
| | | | | | | | | | Several pure digital TV devices have a frontend with the tuner integrated on it. Add the RF connector when dvb_create_media_graph() is called on such devices. Tested with siano and dvb_usb_mxl111sf drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media-device: split media initialization and registrationJavier Martinez Canillas2016-01-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The media device node is registered and so made visible to user-space before entities are registered and links created which means that the media graph obtained by user-space could be only partially enumerated if that happens too early before all the graph has been created. To avoid this race condition, split the media init and registration in separate functions and only register the media device node when all the pending subdevices have been registered, either explicitly by the driver or asynchronously using v4l2_async_register_subdev(). The media_device_register() had a check for drivers not filling dev and model fields but all drivers in mainline set them and not doing it will be a driver bug so change the function return to void and add a BUG_ON() for dev being NULL instead. Also, add a media_device_cleanup() function that will destroy the graph_mutex that is initialized in media_device_init(). [mchehab@osg.samsung.com: Fix compilation if !CONFIG_MEDIA_CONTROLLER and remove two warnings added by this changeset] Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvb core: must check dvb_create_media_graph()Mauro Carvalho Chehab2016-01-111-1/+5
| | | | | | | | | | If media controller is enabled and mdev is filled, it should ensure that the media graph will be properly initialized. Enforce that. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvb: Get rid of typedev usage for enumsMauro Carvalho Chehab2015-06-091-3/+3
| | | | | | | | | | | | | | | | | The DVB API was originally defined using typedefs. This is against Kernel CodingStyle, and there's no good usage here. While we can't remove its usage on userspace, we can avoid its usage in Kernelspace. So, let's do it. This patch was generated by this shell script: for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f); do sed "s,${j}_t,enum $j," <$i >a && mv a $i; done; done While here, make CodingStyle fixes on the affected lines. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> # for drivers/media/firewire/*
* [media] use a function for DVB media controller registerMauro Carvalho Chehab2015-03-021-3/+1
| | | | | | | | | | | | | | This is really a simple function, but using it avoids to have if's inside the drivers. Also, the kABI becomes a little more clearer. This shouldn't generate any overhead, and the type check will happen when compiling with MC DVB enabled. So, let's do it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvb: Avoid warnings when compiled without the media controllerMauro Carvalho Chehab2015-03-021-1/+1
| | | | | | | | | | | | | | | drivers/media/usb/dvb-usb-v2/dvb_usb_core.c: In function ‘dvb_usbv2_adapter_dvb_exit’: drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:531:25: warning: unused variable ‘d’ [-Wunused-variable] struct dvb_usb_device *d = adap_to_d(adap); ^ drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:403:13: warning: ‘dvb_usbv2_media_device_register’ defined but not used [-Wunused-function] static void dvb_usbv2_media_device_register(struct dvb_usb_adapter *adap) drivers/media/usb/dvb-usb/dvb-usb-dvb.c:97:13: warning: ‘dvb_usb_media_device_register’ defined but not used [-Wunused-function] static void dvb_usb_media_device_register(struct dvb_usb_adapter *adap) ^ Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvbdev: use adapter arg for dvb_create_media_graph()Mauro Carvalho Chehab2015-03-021-1/+1
| | | | | | | | | | Instead of using media_dev argument for dvb_create_media_graph(), use the adapter. That allows to create a stub for this function, if compiled without DVB support, avoiding to add extra if's at the drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] siano: print a message if DVB register succeedsMauro Carvalho Chehab2015-02-261-1/+1
| | | | | | | | Right now, this is a debug message, misplaced. Promote it to an info message, as it helps to discover if something bad happened during device init. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] siano: get rid of sms_dbg parameterMauro Carvalho Chehab2015-02-261-5/+0
| | | | | | | All siano modules have a sms_dbg parameter. Now that we're using the standard pr_debug() macro, we can get rid of it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] siano: get rid of sms_info()Mauro Carvalho Chehab2015-02-261-5/+5
| | | | | | | On most cases, sms_info() should actually be pr_debug(), but, on other places, it should be pr_info(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] siano: replace sms_debug() by pr_debug()Mauro Carvalho Chehab2015-02-261-11/+11
| | | | | | | There's no reason to use a macro here. Just replace everything, and let those debug messages to be activated via dynamic printk. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] siano: replace sms_err by pr_errMauro Carvalho Chehab2015-02-261-9/+7
| | | | | | | | Originally, sms_err() would be also displaying the line where the error occurs, but the messages are clear enough. Also, the function is always printed. So, no need for it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] siano: use pr_* print functionsMauro Carvalho Chehab2015-02-261-1/+2
| | | | | | | | | | Instead of defining its own set of printk functions, let's use the common Kernel debug logic provided by pr_foo functions. As a first step, let's just define the existing macros as the Kernel ones. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] siano: add support for the media controller at USB driverMauro Carvalho Chehab2015-02-261-0/+20
| | | | | | | | | | | | | Adding support for the media controller for a pure DVB device is simple: just create a struct media_device and add it to the dvb adapter. After creating all DVB devices, we need to call the DVB core, for it to create the media graph. More work is needed for pure DVB tuners, but this is hidden at the Siano driver, just like several others non-hybrid devices. So, this is streight forward. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] siano: fix sparse warningsHans Verkuil2013-10-171-4/+4
| | | | | | | | | | | | drivers/media/common/siano/smsdvb-main.c:47:5: warning: symbol 'sms_to_guard_interval_table' was not declared. Should it be static? drivers/media/common/siano/smsdvb-main.c:54:5: warning: symbol 'sms_to_code_rate_table' was not declared. Should it be static? drivers/media/common/siano/smsdvb-main.c:63:5: warning: symbol 'sms_to_hierarchy_table' was not declared. Should it be static? drivers/media/common/siano/smsdvb-main.c:70:5: warning: symbol 'sms_to_modulation_table' was not declared. Should it be static? drivers/media/common/siano/smscoreapi.c:925:35: warning: cast to restricted __le32 drivers/media/common/siano/smscoreapi.c:926:28: warning: cast to restricted __le32 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] siano: fix divide error on 0 countersBjørn Mork2013-08-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GIT_AUTHOR_DATE=1376465691 I took a quick look at the code and wonder if the problem is caused by an initial zero statistics message? This is all just a wild guess, but if it is correct, then the attached untested patch might fix it... Bjørn >From d78a0599d5b5d4da384eae08bf7da316389dfbe5 Mon Sep 17 00:00:00 2001 ts_packets and ets_packets counters can be 0. Don't fall over if they are. Fixes: [ 846.851711] divide error: 0000 [#1] SMP [ 846.851806] Modules linked in: smsdvb dvb_core ir_lirc_codec lirc_dev ir_sanyo_decoder ir_mce_kbd_decoder ir_sony_decoder ir_jvc_decoder ir_rc6_decoder ir_rc5_decoder ir_nec_decoder rc_hauppauge smsusb smsmdtv rc_core pci_stub vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) parport_pc ppdev lp parport cpufreq_userspace cpufreq_powersave cpufreq_stats cpufreq_conservative rfcomm bnep binfmt_misc uinput nfsd auth_rpcgss oid_registry nfs_acl nfs lockd dns_resolver fscache sunrpc ext4 jbd2 fuse tp_smapi(O) thinkpad_ec(O) loop firewire_sbp2 dm_crypt snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm thinkpad_acpi nvram snd_page_alloc hid_generic snd_seq_midi snd_seq_midi_event arc4 usbhid snd_rawmidi uvcvideo hid iwldvm coretemp kvm_intel mac8021 1 cdc_wdm [ 846.853477] cdc_acm snd_seq videobuf2_vmalloc videobuf2_memops videobuf2_core videodev media kvm radeon r852 ttm joydev cdc_ether usbnet pcmcia mii sm_common nand btusb drm_kms_helper tpm_tis acpi_cpufreq bluetooth iwlwifi nand_ecc drm nand_ids i2c_i801 mtd snd_seq_device iTCO_wdt iTCO_vendor_support r592 memstick lpc_ich mperf tpm yenta_socket pcmcia_rsrc pcmcia_core cfg80211 snd_timer snd pcspkr i2c_algo_bit crc16 i2c_core tpm_bios processor mfd_core wmi psmouse mei_me rfkill mei serio_raw soundcore evdev battery button video ac microcode ext3 mbcache jbd md_mod dm_mirror dm_region_hash dm_log dm_mod sg sr_mod sd_mod cdrom crc_t10dif firewire_ohci sdhci_pci sdhci mmc_core firewire_core crc_itu_t thermal thermal_sys ahci libahci ehci_pci uhci_hcd ehci_hcd libata scsi_mod usbcore e1000 e usb_common [ 846.855310] ptp pps_core [ 846.855356] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G O 3.10-2-amd64 #1 Debian 3.10.5-1 [ 846.855490] Hardware name: LENOVO 4061WFA/4061WFA, BIOS 6FET92WW (3.22 ) 12/14/2011 [ 846.855609] task: ffffffff81613400 ti: ffffffff81600000 task.ti: ffffffff81600000 [ 846.855636] RIP: 0010:[<ffffffffa092be0c>] [<ffffffffa092be0c>] smsdvb_onresponse+0x264/0xa86 [smsdvb] [ 846.863906] RSP: 0018:ffff88013bc03cf0 EFLAGS: 00010046 [ 846.863906] RAX: 0000000000000000 RBX: ffff880133bf6000 RCX: 0000000000000000 [ 846.863906] RDX: 0000000000000000 RSI: ffff88005d3b58c0 RDI: ffff880133bf6000 [ 846.863906] RBP: ffff88005d1da000 R08: 0000000000000058 R09: 0000000000000015 [ 846.863906] R10: 0000000000001a0d R11: 000000000000021a R12: ffff88005d3b58c0 [ 846.863906] R13: ffff88005d1da008 R14: 00000000ffffff8d R15: ffff880036cf5060 [ 846.863906] FS: 0000000000000000(0000) GS:ffff88013bc00000(0000) knlGS:0000000000000000 [ 846.863906] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 846.863906] CR2: 00007f3a4b69ae50 CR3: 0000000036dac000 CR4: 00000000000407f0 [ 846.863906] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 846.863906] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 846.863906] Stack: [ 846.863906] ffff88007a102000 ffff88005d1da000 ffff88005d3b58c0 0000000000085824 [ 846.863906] ffffffffa08c5aa3 ffff88005d1da000 ffff8800a6907390 ffff8800a69073b0 [ 846.863906] ffff8800a6907000 ffffffffa08b642c 000000000000021a ffff8800a69073b0 [ 846.863906] Call Trace: [ 846.863906] <IRQ> [ 846.863906] [ 846.863906] [<ffffffffa08c5aa3>] ? smscore_onresponse+0x1d5/0x353 [smsmdtv] [ 846.863906] [<ffffffffa08b642c>] ? smsusb_onresponse+0x146/0x192 [smsusb] [ 846.863906] [<ffffffffa004cb1a>] ? usb_hcd_giveback_urb+0x6c/0xac [usbcore] [ 846.863906] [<ffffffffa0217be1>] ? ehci_urb_done+0x62/0x72 [ehci_hcd] [ 846.863906] [<ffffffffa0217c82>] ? qh_completions+0x91/0x364 [ehci_hcd] [ 846.863906] [<ffffffffa0219bba>] ? ehci_work+0x8a/0x68e [ehci_hcd] [ 846.863906] [<ffffffff8107336c>] ? timekeeping_get_ns.constprop.10+0xd/0x31 [ 846.863906] [<ffffffff81064d41>] ? update_cfs_rq_blocked_load+0xde/0xec [ 846.863906] [<ffffffff81058ec2>] ? run_posix_cpu_timers+0x25/0x575 [ 846.863906] [<ffffffffa021aa46>] ? ehci_irq+0x211/0x23d [ehci_hcd] [ 846.863906] [<ffffffffa004c0c1>] ? usb_hcd_irq+0x31/0x48 [usbcore] [ 846.863906] [<ffffffff810996fd>] ? handle_irq_event_percpu+0x49/0x1a4 [ 846.863906] [<ffffffff8109988a>] ? handle_irq_event+0x32/0x4b [ 846.863906] [<ffffffff8109bd76>] ? handle_fasteoi_irq+0x80/0xb6 [ 846.863906] [<ffffffff8100e93e>] ? handle_irq+0x18/0x20 [ 846.863906] [<ffffffff8100e657>] ? do_IRQ+0x40/0x95 [ 846.863906] [<ffffffff813883ed>] ? common_interrupt+0x6d/0x6d [ 846.863906] <EOI> [ 846.863906] [ 846.863906] [<ffffffff812a011c>] ? arch_local_irq_enable+0x4/0x8 [ 846.863906] [<ffffffff812a04f3>] ? cpuidle_enter_state+0x52/0xc1 [ 846.863906] [<ffffffff812a0636>] ? cpuidle_idle_call+0xd4/0x143 [ 846.863906] [<ffffffff8101398c>] ? arch_cpu_idle+0x5/0x17 [ 846.863906] [<ffffffff81072571>] ? cpu_startup_entry+0x10d/0x187 [ 846.863906] [<ffffffff816b3d3d>] ? start_kernel+0x3e8/0x3f3 [ 846.863906] [<ffffffff816b3777>] ? repair_env_string+0x54/0x54 [ 846.863906] [<ffffffff816b3598>] ? x86_64_start_kernel+0xf2/0xfd [ 846.863906] Code: 25 09 00 00 c6 83 da 08 00 00 03 8b 45 54 48 01 83 b6 08 00 00 8b 45 50 48 01 83 db 08 00 00 8b 4d 18 69 c1 ff ff 00 00 03 4d 14 <48> f7 f1 89 83 a8 09 00 00 e9 68 fe ff ff 48 8b 7f 10 e8 79 92 [ 846.863906] RIP [<ffffffffa092be0c>] smsdvb_onresponse+0x264/0xa86 [smsdvb] [ 846.863906] RSP <ffff88013bc03cf0> Reference: http://bugs.debian.org/719623 Reported-by: Johannes Rohr <jorohr@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] Missing break statement added in smsdvb-main.cJakob Normark2013-05-211-0/+1
| | | | | | | | Fix missing break that so that n_layers are not accidentally incorrect Kernel version: v3.10-rc1 Signed-off-by: Jakob Normark <jakobnormark@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: use do_div() for 64-bits divisionMauro Carvalho Chehab2013-03-221-3/+6
| | | | | | | | | As reported by Frank Schäfer <fschaefer.oss@googlemail.com>: ERROR: "__divdi3" [drivers/media/common/siano/smsdvb.ko] undefined! Reported-by: Frank Schäfer <fschaefer.oss@googlemail.com> Tested-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: remove the remaining CamelCase compliantsMauro Carvalho Chehab2013-03-211-62/+62
| | | | | | | | Remove the remaining CamelCase checkpatch.pl compliants. There are still a few left, but those are due to USB and DVB APIs. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: convert structure names to lowercaseMauro Carvalho Chehab2013-03-211-6/+6
| | | | | | | There are several structures defined in uppercase. Convert them to lowercase, and simplify their names, when possible. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: get rid of CammelCase from smscoreapi.hMauro Carvalho Chehab2013-03-211-125/+125
| | | | | | | | | | | | | | It is almost impossible to see a compliant with checkpatch.pl on those Siano drivers, as there are simply too much violations on it. So, now that a big change was done, the better is to cleanup the checkpatch compliants. Let's first replace all CammelCase symbols found at smscoreapi.h using camel_case namespace. That removed 144 checkpatch.pl compliants on this file. Of course, the other files need to be fixed accordingly. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: remove doubled new lineMauro Carvalho Chehab2013-03-211-1/+1
| | | | | | | | | | | | | | | sms_debug() and sms_info() already adds a '\n' at the printed strings. No need to add more. That helps to cleanup stuff like: [ 4868.205648] smscore_onresponse: message not handled. [ 4868.205898] smscore_onresponse: message not handled. and: [ 5467.959769] smscore_onresponse: data rate 143069 bytes/secs While here, provides the message name, when the message is not handled by the smsmdtv core. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: fix status report with old firmware and ISDB-TMauro Carvalho Chehab2013-03-211-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This seems to be ever broken. That's the status report with Firmware 2.1, before adding support for sms2270 is: [22273.787218] smsdvb_onresponse: MSG_SMS_GET_STATISTICS_RES [22273.792592] IsRfLocked = 1 [22273.792592] IsDemodLocked = 1 ... [22273.792598] TransmissionMode = -64 ... (all unshown fields are filled with zeros) Of course, transmission mode being a negative number is wrong. So, we need to take a deeper look on it. With the debugfs patches applied, it is possible to see that, instead of filling StatisticsType with 5, and FullSize with the size of the payload (this is what happens with sms2270 and firmware 8.1), those fields are also initialized with zero: StatisticsType = 0 FullSize = 0 IsRfLocked = 1 IsDemodLocked = 1 IsExternalLNAOn = 0 SNR = 0 dB RSSI = 0 dBm InBandPwr = 0 dBm CarrierOffset = 0 Bandwidth = 0 Frequency = 0 Hz TransmissionMode = -64 ModemState = 0 GuardInterval = 0 SystemType = 0 PartialReception = 0 NumOfLayers = 0 SmsToHostTxErrors = 0 The data under "TransmissionMode" varies according with the signal, and it is negative. It also matches the value for InBandPwr when the tuner is on DVB-T (ok, signal doesn't lock, but the power level should be about the same with the antena fixed, and measured at about the same time). So, there's a very high chance that, when StatisticsType is zero, the signal strength is at the same position as Transmission Mode. So, discard all other parameters, and provide only signal/rf lock and signal strength if StatisticsType is 0, for ISDB-T. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: Only feed DVB data when there's a feedMauro Carvalho Chehab2013-03-211-3/+15
| | | | | | | | | | | Right now, the driver sends DVB data even before tunning. It was noticed that this may lead into some mistakes at DVB decode, as the PIDs from wrong channels may be associated with another frequency, as they may already be inside the PID buffers. So, prevent it by not feeding DVB demux with data while there's no feed or while the device is not tuned. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: Fix bandwidth reportMauro Carvalho Chehab2013-03-211-15/+4
| | | | | | | | | | | It was expected that the bandwidth would be following the defines at smscoreapi.h. However, this doesn't work. Instead, this field brings just the bandwidth in MHz. Convert it to Hertz. It should be noticed that, on ISDB, using the _EX request, the field TuneBW seems to show the value that matches the bandwidth code. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: fix PER/BER report on DVBv5Mauro Carvalho Chehab2013-03-211-17/+29
| | | | | | | | | The check for lock logic is broken. Due to that, no PER/BER stats will ever be showed, and the DVBV3 events will be wrong. Also, the per-layer PER/BER stats for ISDB-T are filled with the wrong index. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: fix signal strength and CNR stats measurementsMauro Carvalho Chehab2013-03-211-22/+35
| | | | | | | | | | | There are a number of small issues with the stats refactoring: - InBandPwr better represents the signal strength; - Don't zero signal strength /cnr if no lock; - Fix signal strength/cnr scale; - Don't need to fill PER/BER if not locked, as the code will disable those stats anyway. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: don't request statistics too fastMauro Carvalho Chehab2013-03-211-0/+5
| | | | | | | | As each DVBv3 call may generate an stats overhead, prevent doing it too fast. This is specially useful if a burst of get stats DVBv3 call is sent. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: split debugfs code into a separate fileMauro Carvalho Chehab2013-03-211-0/+1184
To avoid mixing two different things at the same place, move the debugfs code into a separate file. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>