Commit Graph

17 Commits

Author SHA1 Message Date
Peter Zijlstra c5ac12693f arch: Mass conversion of smp_mb__*()
Mostly scripted conversion of the smp_mb__* barriers.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-55dhyhocezdw1dg7u19hmh1u@git.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-arch@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: 4e857c58efeb99393cba5a5d0d8ec7117183137c
[joonwoop@codeaurora.org: fixed trivial merge conflict.]
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2014-08-15 11:45:28 -07:00
Antti Palosaari 96d7ca5ec9 [media] dvb_usb_v2: rework USB streaming logic
Control flow order changed a little bit. HW PID filter is now
disabled also when streaming is stopped - earlier it was just
set only when streaming was started.
Control flow is now:
* set streaming status bit
* submit USB streaming packets
* enable HW PID filter
* ask device to start streaming
* N x add PID to device HW PID filter
... streaming video ...
* N x remove PID from device HW PID filter
* ask device to stop streaming
* disable HW PID filter
* kill USB streaming packets
* clear streaming status bit

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:02:04 -03:00
Antti Palosaari 6d7cfec413 [media] dvb_usb_v2: make checkpatch.pl happy
New checkpatch version likes to see strings not to split multiple
lines even those are exceeding 80 line length.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 09:59:56 -03:00
Antti Palosaari bdecbe43e3 [media] dvb_usb_v2: replace Kernel userspace lock with wait queue
There was sync mutex which was held over userspace. That is very
wrong and could cause deadlock if different userspace process is
used to "unlock". Wait queue seems to be correct solution for
that kind of synchronizing issue so use it instead.
lock debug gives following bug report:
================================================
[ BUG: lock held when returning to user space! ]
3.9.0-rc1+ #38 Tainted: G           O
------------------------------------------------
tzap/4614 is leaving the kernel with locks still held!
1 lock held by tzap/4614:

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 09:58:49 -03:00
Antti Palosaari 37b44a0f04 [media] dvb_usb_v2: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_RC_CORE) || defined(CONFIG_RC_CORE_MODULE)
with:
 #if IS_ENABLED(CONFIG_RC_CORE)

Reported-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:20:13 -02:00
Antti Palosaari ac1c86c857 [media] dvb_usb_v2: change rc polling active/deactive logic
Use own flag to mark when rc polling is active/deactive and make
decisions, like start/stop polling on suspend/resume, against that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:20:03 -02:00
Antti Palosaari ef3824029d [media] dvb_usb_v2: use dummy function defines instead stub functions
I think it is better (cheaper) to use dummy defines for functions
that has no meaning when remote controller is disabled by Kconfig.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:19:55 -02:00
Antti Palosaari 0c87c66aa3 [media] dvb_usb_v2: make remote controller optional
Make it possible to compile dvb_usb_v2 driver without the remote
controller (RC-core).

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:15:07 -02:00
Mauro Carvalho Chehab d033a308d8 Merge remote-tracking branch 'linus/master' into staging/for_v3.8
* linus/master: (1428 commits)
  futex: avoid wake_futex() for a PI futex_q
  watchdog: using u64 in get_sample_period()
  writeback: put unused inodes to LRU after writeback completion
  mm: vmscan: check for fatal signals iff the process was throttled
  Revert "mm: remove __GFP_NO_KSWAPD"
  proc: check vma->vm_file before dereferencing
  UAPI: strip the _UAPI prefix from header guards during header installation
  include/linux/bug.h: fix sparse warning related to BUILD_BUG_ON_INVALID
  Linux 3.7-rc7
  powerpc/eeh: Do not invalidate PE properly
  ALSA: hda - Fix build without CONFIG_PM
  of/address: sparc: Declare of_iomap as an extern function for sparc again
  PM / QoS: fix wrong error-checking condition
  bnx2x: remove redundant warning log
  vxlan: fix command usage in its doc
  8139cp: revert "set ring address before enabling receiver"
  MPI: Fix compilation on MIPS with GCC 4.4 and newer
  MIPS: Fix crash that occurs when function tracing is enabled
  MIPS: Merge overlapping bootmem ranges
  jbd: Fix lock ordering bug in journal_unmap_buffer()
  ...
2012-11-28 07:22:38 -02:00
Antti Palosaari 2d9e7ea690 [media] dvb_usb_v2: fix pid_filter callback error logging
Code block braces were missing which leds broken error logging and compiler warning.

drivers/media/usb/dvb-usb-v2/dvb_usb_core.c: In function 'dvb_usb_ctrl_feed':
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:291:12: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Milan Tuma <milan.olin@seznam.cz>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-08 09:34:33 +01:00
Mauro Carvalho Chehab 691a5502e3 [media] dvb-usb-v2: get rid of warning: no previous prototype
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:227:5: warning: no previous prototype for 'dvb_usbv2_adapter_stream_init' [-Wmissing-prototypes]
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:239:5: warning: no previous prototype for 'dvb_usbv2_adapter_stream_exit' [-Wmissing-prototypes]
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:372:5: warning: no previous prototype for 'dvb_usbv2_adapter_dvb_init' [-Wmissing-prototypes]
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:444:5: warning: no previous prototype for 'dvb_usbv2_adapter_dvb_exit' [-Wmissing-prototypes]
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:460:5: warning: no previous prototype for 'dvb_usbv2_device_power_ctrl' [-Wmissing-prototypes]
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:557:5: warning: no previous prototype for 'dvb_usbv2_adapter_frontend_init' [-Wmissing-prototypes]
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:626:5: warning: no previous prototype for 'dvb_usbv2_adapter_frontend_exit' [-Wmissing-prototypes]
drivers/media/usb/dvb-usb-v2/usb_urb.c:115:5: warning: no previous prototype for 'usb_urb_free_urbs' [-Wmissing-prototypes]
drivers/media/usb/dvb-usb-v2/usb_urb.c:208:5: warning: no previous prototype for 'usb_free_stream_buffers' [-Wmissing-prototypes]
drivers/media/usb/dvb-usb-v2/usb_urb.c:226:5: warning: no previous prototype for 'usb_alloc_stream_buffers' [-Wmissing-prototypes]

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27 18:13:24 -02:00
Antti Palosaari 2a858486e0 [media] dvb_usb_v2: fix error handling for .tuner_attach()
fe was not set NULL after it was destroyed in tuner attach fail
error case. Due to that it was destroyed again and Kernel oopsed.

Reported-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-27 15:16:31 -03:00
Antti Palosaari 0fe688f138 [media] dvb_usb_v2: call streaming_ctrl() before kill urbs
Logically it is better ask hardware to stop streaming before
killing urbs carrying stream. Earlier it was just opposite.
Now code runs:
* submit urbs
* start streaming
** streaming ongoing **
* stop streaming
* kill urbs

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-27 15:14:08 -03:00
Antti Palosaari 15d0883663 [media] dvb_usb_v2: .reset_resume() support
Add .reset_resume() support.
Also some other small changes for suspend / resume.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 19:19:11 -03:00
Antti Palosaari 06bae1227a [media] dvb_frontend: implement suspend / resume
Move initial suspend / resume support from dvb_usb_v2 to dvb_frontend
as it is dvb general feature that could be used all dvb devices.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 19:18:43 -03:00
Antti Palosaari 0898b95409 [media] dvb_usb_v2: implement power-management for suspend
Put device full sleep on suspend, wake-up it on resume and acquire
retune in order to return same television channel.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 19:17:02 -03:00
Mauro Carvalho Chehab 786baecfe7 [media] dvb-usb: move it to drivers/media/usb/dvb-usb
As media/dvb will be removed, move it to a proper place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 23:26:31 -03:00
Renamed from drivers/media/dvb/dvb-usb-v2/dvb_usb_core.c (Browse further)