Re: [PATCH v3 1/7] seqnum_ops: Introduce Sequence Number Ops

2021-02-05 Thread Shuah Khan
On 2/5/21 2:58 AM, Greg KH wrote: On Wed, Feb 03, 2021 at 11:11:57AM -0700, Shuah Khan wrote: +static inline u32 seqnum32_inc(struct seqnum32 *seq) +{ + atomic_t val = ATOMIC_INIT(seq->seqnum); + + seq->seqnum = (u32) atomic_inc_return(&val); + if (seq->seqnu

[PATCH v3 6/7] drivers/staging/rtl8188eu: convert event_seq to use seqnum_ops

2021-02-03 Thread Shuah Khan
Sequence Number api provides interfaces for unsigned atomic up counters leveraging atomic_t and atomic64_t ops underneath. Convert it to use seqnum_ops. event_seq atomic_t variables are atomic counters. Convert them to use seqnum_ops. Signed-off-by: Shuah Khan --- drivers/staging/rtl8188eu

[PATCH v3 5/7] drivers/staging/rtl8723bs: convert event_seq to use seqnum_ops

2021-02-03 Thread Shuah Khan
Sequence Number api provides interfaces for unsigned atomic up counters leveraging atomic_t and atomic64_t ops underneath. Convert it to use seqnum_ops. event_seq atomic_t variables are atomic counters. Convert them to use seqnum_ops. Signed-off-by: Shuah Khan --- drivers/staging/rtl8723bs

[PATCH v3 7/7] kobject: convert uevent_seqnum to seqnum_ops

2021-02-03 Thread Shuah Khan
Sequence Number api provides interfaces for unsigned atomic up counters leveraging atomic_t and atomic64_t ops underneath. Convert uevent_seqnum atomic counter to use seqnum_ops. Signed-off-by: Shuah Khan --- include/linux/kobject.h | 3 ++- kernel/ksysfs.c | 3 ++- lib

[PATCH v3 4/7] drivers/acpi/apei: convert seqno to seqnum_ops

2021-02-03 Thread Shuah Khan
Sequence Number api provides interfaces for unsigned atomic up counters leveraging atomic_t and atomic64_t ops underneath. Convert seqno atomic counter to use seqnum_ops. Signed-off-by: Shuah Khan --- drivers/acpi/apei/ghes.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH v3 2/7] selftests: lib:test_seqnum_ops: add new test for seqnum_ops

2021-02-03 Thread Shuah Khan
core-api. Sequence Number ops provide interfaces to initialize, increment and get the sequence number. These ops also check for overflow and log message to indicate when overflow occurs. Signed-off-by: Shuah Khan --- Documentation/core-api/seqnum_ops.rst | 9 + MAINTAINERS

[PATCH v3 3/7] drivers/acpi: convert seqno to use seqnum_ops

2021-02-03 Thread Shuah Khan
Sequence Number api provides interfaces for unsigned atomic up counters leveraging atomic_t and atomic64_t ops underneath. Convert seqno atomic counter to use seqnum_ops. Signed-off-by: Shuah Khan --- drivers/acpi/acpi_extlog.c | 8 1 file changed, 4 insertions(+), 4 deletions

[PATCH v3 1/7] seqnum_ops: Introduce Sequence Number Ops

2021-02-03 Thread Shuah Khan
-Identifier: GPL-2.0 + +.. include:: + +.. _seqnum_ops: + +== +Sequence Number Operations +== + +:Author: Shuah Khan +:Copyright: |copy| 2021, The Linux Foundation +:Copyright: |copy| 2021, Shuah Khan + +Sequence Number api provides interfaces for

[PATCH v3 0/7] Introduce Sequence Number Ops

2021-02-03 Thread Shuah Khan
to help catch cases where overflow could lead to problems. Since v2: - Uses atomic_inc_return() for incrementing the sequence number. - No longer uses atomic_read() Shuah Khan (7): seqnum_ops: Introduce Sequence Number Ops selftests: lib:test_seqnum_ops: add new test for seqnum_ops drivers

[PATCH v2 11/13] drivers/staging/rtl8188eu: convert stats to use seqnum_ops

2020-11-13 Thread Shuah Khan
Sequence Number api provides interfaces for unsigned atomic up counters leveraging atomic_t and atomic64_t ops underneath. Convert it to use seqnum_ops. atomic_t variables used for stats are atomic counters. Convert them to use seqnum_ops. Signed-off-by: Shuah Khan --- drivers/staging

[PATCH v2 12/13] drivers/staging/unisys/visorhba: convert stats to use seqnum_ops

2020-11-13 Thread Shuah Khan
Sequence Number api provides interfaces for unsigned atomic up counters leveraging atomic_t and atomic64_t ops underneath. Convert it to use seqnum_ops. atomic_t variable used for error_count are atomic counters. Convert it to use seqnum_ops. Signed-off-by: Shuah Khan --- .../staging/unisys

[PATCH v2 09/13] drivers/staging/rtl8723bs: convert stats to use seqnum_ops

2020-11-13 Thread Shuah Khan
Sequence Number api provides interfaces for unsigned atomic up counters leveraging atomic_t and atomic64_t ops underneath. Convert it to use seqnum_ops. atomic_t variables used for stats are atomic counters. Convert them to use seqnum_ops. Signed-off-by: Shuah Khan --- drivers/staging

Re: [PATCH 12/13] drivers/staging/unisys/visorhba: convert stats to use seqnum_ops

2020-11-10 Thread Shuah Khan
On 11/10/20 1:42 PM, Greg KH wrote: On Tue, Nov 10, 2020 at 12:53:38PM -0700, Shuah Khan wrote: seqnum_ops api is introduced to be used when a variable is used as a sequence/stat counter and doesn't guard object lifetimes. This clearly differentiates atomic_t usages that guard object life

[PATCH 12/13] drivers/staging/unisys/visorhba: convert stats to use seqnum_ops

2020-11-10 Thread Shuah Khan
guard resource lifetimes, device usage and open counts that control state changes, and pm states. atomic_t variables used for error_count and ios_threshold are atomic counters and guarded by max. values. No change to the behavior with this change. Signed-off-by: Shuah Khan --- .../staging/unisys/vis

[PATCH 09/13] drivers/staging/rtl8723bs: convert stats to use seqnum_ops

2020-11-10 Thread Shuah Khan
with _inc() followed by _read(). Signed-off-by: Shuah Khan --- drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 +- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 33 +-- drivers/staging/rtl8723bs/include/rtw_cmd.h | 3 +- .../staging/rtl8723bs/include/rtw_mlme_ext.h | 3

[PATCH 11/13] drivers/staging/rtl8188eu: convert stats to use seqnum_ops

2020-11-10 Thread Shuah Khan
with _inc() followed by _read(). Signed-off-by: Shuah Khan --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 23 ++- .../staging/rtl8188eu/include/rtw_mlme_ext.h | 3 ++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_

Re: [PATCH v3 00/11] Introduce Simple atomic counters

2020-10-16 Thread Shuah Khan
On 10/14/20 5:31 PM, Kees Cook wrote: On Wed, Oct 14, 2020 at 11:17:20AM +0200, Peter Zijlstra wrote: On Tue, Oct 13, 2020 at 08:12:20PM -0600, Shuah Khan wrote: They don't add any new behavior, As Kees mentioned they do give us a way to clearly differentiate atomic usages that can wrap.

Re: [PATCH v3 00/11] Introduce Simple atomic counters

2020-10-13 Thread Shuah Khan
On 10/10/20 5:09 AM, Peter Zijlstra wrote: On Fri, Oct 09, 2020 at 01:45:43PM -0700, Kees Cook wrote: On Fri, Oct 09, 2020 at 09:37:46PM +0200, Peter Zijlstra wrote: On Fri, Oct 09, 2020 at 09:55:55AM -0600, Shuah Khan wrote: Simple atomic counters api provides interfaces for simple atomic

Re: [PATCH v3 00/11] Introduce Simple atomic counters

2020-10-09 Thread Shuah Khan
On 10/9/20 12:03 PM, Kees Cook wrote: On Fri, Oct 09, 2020 at 09:55:55AM -0600, Shuah Khan wrote: Note: Would like to get this into Linux 5.10-rc1 so we can continue updating drivers that can be updated to use this API. If this all looks good, Kees, would you like to take this through your tree

[PATCH v3 00/11] Introduce Simple atomic counters

2020-10-09 Thread Shuah Khan
-- We discussed if binder counters can be non-atomic. For now I left them the same as the RFC patch - using counter_atomic32 -- Unrelated to this patch series: The patch series review uncovered improvements could be made to test_async_driver_probe and vmw_vmci/vmci_guest. I will track t

[PATCH v3 07/11] drivers/android/binder: convert stats, transaction_log to counter_atomic32

2020-10-09 Thread Shuah Khan
an Brauner Signed-off-by: Shuah Khan --- drivers/android/binder.c | 41 --- drivers/android/binder_internal.h | 3 ++- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index f936530a19b0..52

[PATCH v2 07/11] drivers/android/binder: convert stats, transaction_log to counter_atomic32

2020-10-06 Thread Shuah Khan
keep track of the current log entry location. Overflow is handled in the code. Since it is used as a counter, convert it to use counter_atomic32. This conversion doesn't change the overflow wrap around behavior. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Shuah Khan --- drivers/androi

[PATCH v2 00/11] Introduce Simple atomic counters

2020-10-06 Thread Shuah Khan
patch series review uncovered improvements could be made to test_async_driver_probe and vmw_vmci/vmci_guest. I will track these for fixing later. Shuah Khan (11): counters: Introduce counter_atomic* counters selftests:lib:test_counters: add new test for counters drivers/base: convert deferred_tr

Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters

2020-10-06 Thread Shuah Khan
On 9/28/20 5:13 PM, Kees Cook wrote: On Mon, Sep 28, 2020 at 04:41:47PM -0600, Shuah Khan wrote: On 9/26/20 10:29 AM, Kees Cook wrote: On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: 7. Verified that the test module compiles in kunit env. and test module can be loaded

Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters

2020-09-28 Thread Shuah Khan
On 9/28/20 3:17 PM, Joel Fernandes wrote: On Mon, Sep 28, 2020 at 01:34:31PM -0700, Kees Cook wrote: On Sun, Sep 27, 2020 at 07:35:26PM -0400, Joel Fernandes wrote: On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: This patch series is a result of discussion at the refcount_t BOF

Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters

2020-09-28 Thread Shuah Khan
On 9/26/20 10:33 AM, Kees Cook wrote: On Fri, Sep 25, 2020 at 06:13:37PM -0600, Shuah Khan wrote: On 9/25/20 5:52 PM, Kees Cook wrote: On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: -- Addressed Kees's comments: 1. Non-atomic counters renamed to counter_simple3

Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters

2020-09-28 Thread Shuah Khan
On 9/26/20 10:22 AM, Kees Cook wrote: On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: This patch series is a result of discussion at the refcount_t BOF the Linux Plumbers Conference. In this discussion, we identified a need for looking closely and investigating atomic_t usages in

Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters

2020-09-28 Thread Shuah Khan
On 9/26/20 10:29 AM, Kees Cook wrote: On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: 7. Verified that the test module compiles in kunit env. and test module can be loaded to run the test. I meant write it using KUnit interfaces (e.g. KUNIT_EXPECT*(), kunit_test_suite

Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters

2020-09-25 Thread Shuah Khan
On 9/25/20 5:52 PM, Kees Cook wrote: On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: -- Addressed Kees's comments: 1. Non-atomic counters renamed to counter_simple32 and counter_simple64 to clearly indicate size. 2. Added warning for counter_simple* usage a

[PATCH 07/11] drivers/android/binder: convert stats, transaction_log to counter_atomic32

2020-09-25 Thread Shuah Khan
keep track of the current log entry location. Overflow is handled in the code. Since it is used as a counter, convert it to use counter_atomic32. This conversion doesn't change the overflow wrap around behavior. Signed-off-by: Shuah Khan --- drivers/android/binder.c

[PATCH 00/11] Introduce Simple atomic and non-atomic counters

2020-09-25 Thread Shuah Khan
driver_probe and vmw_vmci/vmci_guest. I will track these for fixing later. Shuah Khan (11): counters: Introduce counter_simple* and counter_atomic* counters selftests:lib:test_counters: add new test for counters drivers/base: convert deferred_trigger_count and probe_count to counter_atomic32

[RFC PATCH 07/11] drivers/android/binder: convert stats, transaction_log to counter_atomic

2020-09-22 Thread Shuah Khan
track of the current log entry location. Overflow is handled in the code. Since it is used as a counter, convert it to use counter_atomic. This conversion doesn't change the oveflow wrap around behavior. Signed-off-by: Shuah Khan --- drivers/android/binder.c

[RFC PATCH 00/11] Introduce Simple atomic and non-atomic counters

2020-09-22 Thread Shuah Khan
device usage counts, device open counts, and pm states. 2. Variable is used for stats and counters. 3. The conversion doesn't change the overflow behavior. Please review and let me know if non-stat conversions e.g: probe_count, deferred_trigger_count make sense. Shuah Khan (11): counters: I

Re: [PATCH] staging: ion: remove from the tree

2020-08-27 Thread Shuah Khan
Laura Abbott Cc: Martijn Coenen Cc: Shuah Khan Cc: Sumit Semwal Cc: Suren Baghdasaryan Cc: Todd Kjos Cc: de...@driverdev.osuosl.org Cc: dri-de...@lists.freedesktop.org Cc: linaro-mm-...@lists.linaro.org Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS

[PATCH] tty: Fix WARNING in tty_set_termios

2019-01-25 Thread Shuah Khan
ix the WARN_ON. This fix changes tty_set_termios() to return error and all the callers to check error and bail out. The reproducer is used to reproduce the problem and verify the fix. Reported-by: syzbot+a950165cbb86bdd02...@syzkaller.appspotmail.com Signed-off-by: Shuah Khan --- drivers/bluetoo

Re: [PATCH 2/2] selftests: ion: Add simple test with the vgem driver

2018-02-27 Thread Shuah Khan
On 02/26/2018 06:48 PM, Laura Abbott wrote: > On 02/26/2018 09:07 AM, Shuah Khan wrote: >> On 02/19/2018 11:33 AM, Daniel Vetter wrote: >>> On Mon, Feb 19, 2018 at 10:18:21AM -0800, Laura Abbott wrote: >>>> On 02/19/2018 07:31 AM, Daniel Vetter wrote: >>>>

[PATCH 3.16] staging: usbip stub_rx fix static checker warning on unnecessary checks

2018-02-26 Thread Shuah Khan
sfer_buffer_length > ((~0 >> 1))) => (s32min-s32max > s32max)' drivers/staging/usbip/stub_rx.c:501 stub_recv_cmd_submit() warn: always true condition '(pdu->u.cmd_submit.transfer_buffer_length <= ((~0 >> 1))) => (s32min-s32max <= s32max)' Reported-

Re: [PATCH 2/2] selftests: ion: Add simple test with the vgem driver

2018-02-26 Thread Shuah Khan
On 02/19/2018 11:33 AM, Daniel Vetter wrote: > On Mon, Feb 19, 2018 at 10:18:21AM -0800, Laura Abbott wrote: >> On 02/19/2018 07:31 AM, Daniel Vetter wrote: >>> On Thu, Feb 15, 2018 at 05:24:45PM -0800, Laura Abbott wrote: Ion is designed to be a framework used by other clients who perform >>>

Re: [PATCH 1/2] selftests: ion: Remove some prints

2018-02-26 Thread Shuah Khan
On 02/15/2018 06:24 PM, Laura Abbott wrote: > There's no need to print messages each time we alloc and free. Remove them. > > Signed-off-by: Laura Abbott > --- > tools/testing/selftests/android/ion/ionutils.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/tools/testing/selftests/

Re: [PATCH v2 1/7] selftest: sync: basic tests for sw_sync framework

2016-12-13 Thread Shuah Khan
Hi Gustavo, On 11/01/2016 10:18 AM, Gustavo Padovan wrote: > Hi Emilio, > > 2016-10-19 Emilio López : > >> These tests are based on the libsync test suite from Android. >> This commit lays the ground for future tests, as well as includes >> tests for a variety of basic allocation commands. >> >>

Re: [PATCH v2 0/7] Tests for sync infrastructure

2016-12-02 Thread Shuah Khan
On 12/01/2016 06:17 PM, Shuah Khan wrote: > On 10/19/2016 06:49 AM, Emilio López wrote: >> Hello everyone, >> >> This is a series of tests to exercise the sync kernel infrastructure. It is >> meant to be a test suite for the work Gustavo has been doing to destage

Re: [PATCH v2 0/7] Tests for sync infrastructure

2016-12-01 Thread Shuah Khan
On 10/19/2016 06:49 AM, Emilio López wrote: > Hello everyone, > > This is a series of tests to exercise the sync kernel infrastructure. It is > meant to be a test suite for the work Gustavo has been doing to destage it. > > These tests were originally part of a battery of tests shipping with > An

Re: [PATCH] [media] media: rename media unregister function

2016-03-19 Thread Shuah Khan
there has to be some cleanup releasing resources. I wouldn't make this change. thanks, -- Shuah -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shua...@osg.samsung.com | (970) 217-8978

Re: [PATCH] [media] media: rename media unregister function

2016-03-19 Thread Shuah Khan
On 03/18/2016 08:12 AM, Javier Martinez Canillas wrote: > Hello Shuah, > > On 03/18/2016 11:01 AM, Shuah Khan wrote: >> On 03/18/2016 07:05 AM, Mauro Carvalho Chehab wrote: >>> Now that media_device_unregister() also does a cleanup, rename it >>> t

[PATCH] media: add GFP flag to media_*() that could get called in atomic context

2016-03-12 Thread Shuah Khan
add gfpflags to interffaces, media_create_pad_link(), media_create_intf_link() and media_devnode_create(). Signed-off-by: Shuah Khan Suggested-by: Mauro Carvalho Chehab --- Ran through kbuild-all compile testing. Tested the changes in Win-TV HVR-950Q device drivers/media/dvb-core/dvbdev.c

Re: [RFC PATCH v1 9/9] selftest: sync: disable tests that rely on not yet defined behaviour

2016-03-09 Thread Shuah Khan
+= RUN_TEST(test_consumer_stress_multi_producer_single_consumer); > err += RUN_TEST(test_merge_stress_random_merge); > -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shua...@osg.samsung.com | (970) 217-8978

Re: [RFC PATCH v1 0/9] Tests for sync infrastructure

2016-03-09 Thread Shuah Khan
nc_merge.c > create mode 100644 tools/testing/selftests/sync/sync_stress_consumer.c > create mode 100644 tools/testing/selftests/sync/sync_stress_merge.c > create mode 100644 tools/testing/selftests/sync/sync_stress_parallelism.c > create mode 100644 tools/testing/selftests/sync/s

Re: [PATCH v7 11/44] [media] media: use entity.graph_obj.mdev instead of .parent

2015-08-25 Thread Shuah Khan
On Tue, Aug 25, 2015 at 12:36 AM, Hans Verkuil wrote: > On 08/23/2015 10:17 PM, Mauro Carvalho Chehab wrote: >> From: Javier Martinez Canillas >> >> The struct media_entity has a .parent field that stores a pointer >> to the parent struct media_device. But recently a media_gobj was >> embedded in

Re: [PATCH v7 10/44] [media] media: rename the function that create pad links

2015-08-25 Thread Shuah Khan
alho Chehab > Acked-by: Hans Verkuil > Signed-off-by: Mauro Carvalho Chehab > Changes look good to me. After fixing the commit log: Acked-by: Shuah Khan thanks, -- Shuah -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Val

Re: [PATCH v7 02/44] [media] staging: omap4iss: get entity ID using media_entity_id()

2015-08-24 Thread Shuah Khan
next(&graph))) > - pipe->entities |= 1 << entity->id; > + pipe->entities |= 1 << media_entity_id(entity); > Looks good to me. Acked-by: Shuah Khan thanks, -- Shuah ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 00/19] Update ALSA, and au0828 drivers to use Managed Media Controller API

2015-07-23 Thread Shuah Khan
On 07/22/2015 04:42 PM, Shuah Khan wrote: > This patch series updates ALSA driver, and au0828 core driver to > use Managed Media controller API to share tuner. Please note that > Managed Media Controller API and DVB and V4L2 drivers updates to > use Media Controller API have been adde

[PATCH v2 05/19] media: Convert graph_mutex to a spinlock and call it graph_lock

2015-07-22 Thread Shuah Khan
. Signed-off-by: Shuah Khan --- drivers/media/media-device.c | 14 +++--- drivers/media/media-entity.c | 18 +- include/media/media-device.h | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c

[PATCH v2 09/19] media: platform vsp1: Update graph_mutex to graph_lock spinlock

2015-07-22 Thread Shuah Khan
Update graph_mutex to graph_lock spinlock to be in sync with the Media Conttroller change for the same. Signed-off-by: Shuah Khan --- drivers/media/platform/vsp1/vsp1_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/vsp1/vsp1_video.c b

[PATCH v2 04/19] media: au8522 change to create MC pad for ALSA Audio Out

2015-07-22 Thread Shuah Khan
Add new pad for ALSA Audio Out to au8522_media_pads. Move the au8522_media_pads enum to au8522.h from au8522_priv.h. This will allow au0828-core to use these defines instead of hard-coding the pad values when it creates media graph linking decode pads to other entities. Signed-off-by: Shuah Khan

[PATCH v2 03/19] media: Add ALSA Media Controller devnodes

2015-07-22 Thread Shuah Khan
Add ALSA Media Controller capture, playback, and mixer devnode defines. Signed-off-by: Shuah Khan --- include/uapi/linux/media.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h index 4e816be..4a30ea3 100644 --- a/include/uapi

[PATCH v2 06/19] media: platform exynos4-is: Update graph_mutex to graph_lock spinlock

2015-07-22 Thread Shuah Khan
Update graph_mutex to graph_lock spinlock to be in sync with the Media Conttroller change for the same. Signed-off-by: Shuah Khan --- drivers/media/platform/exynos4-is/fimc-isp-video.c | 8 drivers/media/platform/exynos4-is/fimc-lite.c | 8 drivers/media/platform

[PATCH v2 07/19] media: platform omap3isp: Update graph_mutex to graph_lock spinlock

2015-07-22 Thread Shuah Khan
Update graph_mutex to graph_lock spinlock to be in sync with the Media Conttroller change for the same. Signed-off-by: Shuah Khan --- drivers/media/platform/omap3isp/isp.c | 4 ++-- drivers/media/platform/omap3isp/ispvideo.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff

[PATCH v2 02/19] media: Media Controller register/unregister entity_notify API

2015-07-22 Thread Shuah Khan
-by: Shuah Khan --- drivers/media/media-device.c | 45 include/media/media-device.h | 23 ++ 2 files changed, 68 insertions(+) diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index c55ab50..22565a8 100644

[PATCH v2 00/19] Update ALSA, and au0828 drivers to use Managed Media Controller API

2015-07-22 Thread Shuah Khan
//www.mail-archive.com/linux-media%40vger.kernel.org/msg89493.html Shuah Khan (19): Revert "[media] media: media controller entity framework enhancements for ALSA" media: Media Controller register/unregister entity_notify API media: Add ALSA Media Controller devnodes media: au8

[PATCH v2 01/19] Revert "[media] media: media controller entity framework enhancements for ALSA"

2015-07-22 Thread Shuah Khan
This reverts commit ed64cf1e182fb30fe67652386c0880fcf3302f97. This patch is no longer necessary as the entity register callback is implemented at media_device level. Signed-off-by: Shuah Khan --- drivers/media/media-device.c | 7 --- include/media/media-entity.h | 4 2 files changed

[PATCH v2 10/19] media: platform xilinx: Update graph_mutex to graph_lock spinlock

2015-07-22 Thread Shuah Khan
Update graph_mutex to graph_lock spinlock to be in sync with the Media Conttroller change for the same. Signed-off-by: Shuah Khan --- drivers/media/platform/xilinx/xilinx-dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b

[PATCH v2 19/19] sound/usb: Update ALSA driver to use Managed Media Controller API

2015-07-22 Thread Shuah Khan
ned-off-by: Shuah Khan --- sound/usb/Makefile | 15 +++- sound/usb/card.c | 5 ++ sound/usb/card.h | 1 + sound/usb/media.c| 227 +++ sound/usb/media.h| 52 +++ sound/usb/pcm.c | 15 +++- sound/

[PATCH v2 16/19] media: Change v4l-core to check for tuner availability

2015-07-22 Thread Shuah Khan
Change s_input, s_fmt, s_tuner, s_frequency, querystd, s_hw_freq_seek, and vb2_streamon interfaces that alter the tuner configuration to check for tuner availability by calling v4l_enable_media_tuner(). If tuner isn't free, return -EBUSY. Signed-off-by: Shuah Khan --- drivers/media/v4l2

[PATCH v2 18/19] media: au0828 change to use Managed Media Controller API

2015-07-22 Thread Shuah Khan
() prior to changing tuner settings. If tuner isn't free, return busy condition. Signed-off-by: Shuah Khan --- drivers/media/usb/au0828/au0828-core.c | 184 +++- drivers/media/usb/au0828/au0828-video.c | 72 - drivers/media/usb/au0828/au0828.h

[PATCH v2 17/19] media: dvb-frontend change to check for tuner availability from open

2015-07-22 Thread Shuah Khan
Checking for tuner availability from frontend thread start disrupts video stream. Change to check for tuner and start pipeline from frontend open instead and stop pipeline from frontend release. Signed-off-by: Shuah Khan --- drivers/media/dvb-core/dvb_frontend.c | 43

[PATCH v2 15/19] media: v4l-core add v4l_enable_media_tuner() to check for tuner availability

2015-07-22 Thread Shuah Khan
Add a new interface to be used by v4l-core to invoke enable_source handler in the media_device to find tuner entity connected to the decoder and check is it is available. enable_source handler will activate the link if tuner is available. Signed-off-by: Shuah Khan --- drivers/media/v4l2-core

[PATCH v2 12/19] staging media: omap4iss: Update graph_mutex to graph_lock spinlock

2015-07-22 Thread Shuah Khan
Update graph_mutex to graph_lock spinlock to be in sync with the Media Conttroller change for the same. Signed-off-by: Shuah Khan --- drivers/staging/media/omap4iss/iss.c | 4 ++-- drivers/staging/media/omap4iss/iss_video.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff

[PATCH v2 13/19] media: Add irq safe Media Controller start/stop pipeline API

2015-07-22 Thread Shuah Khan
Add irq safe Media Controller start/stop pipeline API media_entity_pipeline_start_irq() media_entity_pipeline_stop_irq() to be used from inside interrupt context. Signed-off-by: Shuah Khan --- drivers/media/media-entity.c | 80 +--- include/media/media

[PATCH v2 11/19] staging media: davinci_vpfe: Update graph_mutex to graph_lock spinlock

2015-07-22 Thread Shuah Khan
Update graph_mutex to graph_lock spinlock to be in sync with the Media Conttroller change for the same. Signed-off-by: Shuah Khan --- drivers/staging/media/davinci_vpfe/vpfe_video.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/media

[PATCH v2 14/19] media: Add enable_source handler field to struct media_device

2015-07-22 Thread Shuah Khan
drivers such as ALSA that control the media device. Signed-off-by: Shuah Khan --- include/media/media-device.h | 12 1 file changed, 12 insertions(+) diff --git a/include/media/media-device.h b/include/media/media-device.h index e73642c..377102b 100644 --- a/include/media/media-device.h

[PATCH v2 08/19] media: platform s3c-camif: Update graph_mutex to graph_lock spinlock

2015-07-22 Thread Shuah Khan
Update graph_mutex to graph_lock spinlock to be in sync with the Media Conttroller change for the same. Signed-off-by: Shuah Khan --- drivers/media/platform/s3c-camif/camif-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/s3c-camif/camif

Re: [PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single()

2014-06-06 Thread Shuah Khan
ses, dma_alloc_*() interfaces are the ones to use. Please also refer to DMA-API.txt as well. Hope this helps. -- Shuah -- Shuah Khan Senior Linux Kernel Developer - Open Source Group Samsung Research America(Silicon Valley) shuah...@samsung.com | (970) 672-0658 _

Re: [PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single()

2014-06-03 Thread Shuah Khan
. Similarly, it adds an overhead in releasing memory for devres to compared to other dma_unmap_* wrappers. Users need to be aware of that. This overhead is going to be in the performance path when drivers unmap buffers during run-time. Adding Joerg Roedel to the thread. -- Shuah -- Sh

Re: [GIT PULL] Staging driver patches for 3.15-rc1

2014-04-02 Thread Shuah Khan
On Tue, Apr 1, 2014 at 12:48 PM, Greg KH wrote: > The following changes since commit dcb99fd9b08cfe1afe426af4d8d3cbc429190f15: > > Linux 3.14-rc7 (2014-03-16 18:51:24 -0700) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ > tag

[PATCH v2] staging/usbip: fix store_attach() sscanf return value check

2014-03-25 Thread Shuah Khan
: Shuah Khan --- v2: Fixed changelog drivers/staging/usbip/vhci_sysfs.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/usbip/vhci_sysfs.c b/drivers/staging/usbip/vhci_sysfs.c index e098032..1ff24e9 100644 --- a/drivers/staging/usbip/vhci_sysfs.c +++ b/drivers

Re: [PATCH] staging/usbip: fix store_attach() sscanf return value check

2014-03-24 Thread Shuah Khan
On 03/24/2014 06:38 PM, Greg KH wrote: On Mon, Mar 24, 2014 at 05:12:09PM -0600, Shuah Khan wrote: Fix commit - 88fa1ebfa21b5deaaad2dc88ecd9f6af91796cf7 What do you mean by this line? Nothing really. Sloppiness on my part. I was keeping notes as I was chasing the problem and those ended

[PATCH] staging/usbip: fix store_attach() sscanf return value check

2014-03-24 Thread Shuah Khan
. As a result, sscanf() will always fail even when the input buffer is correct. Signed-off-by: Shuah Khan --- drivers/staging/usbip/vhci_sysfs.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/usbip/vhci_sysfs.c b/drivers/staging/usbip/vhci_sysfs.c index

[PATCH] staging/usbip: userspace - fix usbipd SIGSEGV from refresh_exported_devices()

2014-03-24 Thread Shuah Khan
ff-by: Shuah Khan --- drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c index c5bf60b..92

Re: [PATCH 10/12] staging: usbip: userspace: migrate vhci_driver to libudev

2014-03-06 Thread Shuah Khan
failed"); return -1; } diff --git a/drivers/staging/usbip/userspace/libsrc/vhci_driver.h b/drivers/staging/usbip/userspace/libsrc/vhci_driver.h index e72baa0..8a84fdf 100644 --- a/drivers/staging/usbip/userspace/libsrc/vhci_driver.h +++ b/drivers/staging/usbip/userspace

Re: [PATCH 09/12] staging: usbip: userspace: remove class device infrastructure in vhci_driver

2014-03-06 Thread Shuah Khan
| 178 - .../staging/usbip/userspace/libsrc/vhci_driver.h | 4 - 2 files changed, 182 deletions(-) After these changes, is there a need for struct usbip_class_device ?? -- Shuah -- Shuah Khan Senior Linux Kernel Developer - Open Source Group Samsung Research America

Re: [PATCH 08/12] staging: usbip: userspace: migrate usbip_host_driver to libudev

2014-03-06 Thread Shuah Khan
,7 @@ static int recv_request_import(int sockfd) } PACK_OP_IMPORT_REQUEST(0, &req); - dlist_for_each_data(host_driver->edev_list, edev, - struct usbip_exported_device) { + list_for_each(&host_driver->edev_list, edev, node) {

Re: [PATCH 05/12] staging: usbip: userspace: re-add interface information listing

2014-03-06 Thread Shuah Khan
; 0) { + dbg("usbip_net_send failed: pdu_uinf"); Same comment as above. + return -1; + } + } } return 0; You have my Reviewed-by after making the recommended changes. Reviewed-by: Shuah Kh

Re: [PATCH 04/12] staging: usbip: userspace: migrate usbip_list to libudev

2014-03-06 Thread Shuah Khan
sysfs_close_device(intf); - } printf("\n"); - } - ret = 0; Do you need to delete this? Where does ret get set to 0 then? + udev_device_unref(dev); + } err_out: - sysfs_close_bus(ubus); + udev_enumera

Re: [PATCH 03/12] staging: usbip: userspace: migrate usbip_unbind to libudev

2014-03-06 Thread Shuah Khan
- sysfs_close_attribute(unbind_attr); - ret = 0; printf("unbind device on busid %s: complete\n", busid); Could you please change this to an info() -err_close_usbip_host_drv: - sysfs_close_driver(usbip_host_drv); +err_close_udev: + udev_device_unref(dev); + ude

Re: [PATCH 01/12] staging: usbip: userspace: migrate usbip_bind to libudev

2014-03-06 Thread Shuah Khan
SYSFS_BUS_ID_SIZE + 4, "del %s", busid); - dbg("write \"%s\" to %s", buff, match_busid_attr->path); + dbg("write \"%s\" to %s", command, match_busid_attr_path); This messge could be removed. - rc = sysfs_write

[PATCH v2 2/3] staging/usbip: change usbip to include new uapi usbip.h

2014-03-03 Thread Shuah Khan
usbip userspace has duplicated enum definition to report usbip device status maintained by the kernel. A new uapi usbip.h now defines the usbip device status for kernel and userspace to use. Change usbip kernel space to include uapi usbip.h for usbip device status. Signed-off-by: Shuah Khan

[PATCH v2 3/3] staging/usbip: change usbip userspace to include new uapi usbip.h

2014-03-03 Thread Shuah Khan
usbip userspace has duplicated enum definition to report usbip device status maintained by the kernel. A new uapi usbip.h now defines the usbip device status for kernel and userspace to use. Change usbip userspace to include uapi usbip.h for usbip device status. Signed-off-by: Shuah Khan

[PATCH v2 1/3] staging/usbip: add uapi header to export usbip kernel interfaces

2014-03-03 Thread Shuah Khan
. When usbip moves to mainline drivers, this file should be moved under uapi/linux Signed-off-by: Shuah Khan --- drivers/staging/usbip/uapi/usbip.h | 26 ++ 1 file changed, 26 insertions(+) create mode 100644 drivers/staging/usbip/uapi/usbip.h diff --git a/drivers/staging

[PATCH v2 0/3] staging/usbip: add new uapi header usbip.h

2014-03-03 Thread Shuah Khan
. When usbip moves to mainline drivers, this file should be moved under uapi/linux usbip kernel and userspace are changed to use this new header file. Shuah Khan (3): staging/usbip: add uapi header to export usbip kernel interfaces staging/usbip: change usbip to include new uapi usbip.h staging

Re: [PATCH 1/3] staging/usbip: add uapi header to export usbip kernel interfaces

2014-02-28 Thread Shuah Khan
On 02/28/2014 03:15 PM, Greg KH wrote: On Thu, Feb 27, 2014 at 05:27:25PM -0700, Shuah Khan wrote: usbip userspace has duplicated enum definition to report usbip device status maintained by the kernel. Adding an usbip uapi header file will define the kernel - userspace interface for this device

[PATCH 1/3] staging/usbip: add uapi header to export usbip kernel interfaces

2014-02-27 Thread Shuah Khan
usbip userspace has duplicated enum definition to report usbip device status maintained by the kernel. Adding an usbip uapi header file will define the kernel - userspace interface for this device status. Signed-off-by: Shuah Khan --- include/uapi/linux/Kbuild |1 + include/uapi/linux

[PATCH 2/3] staging/usbip: change usbip to include new uapi usbip.h

2014-02-27 Thread Shuah Khan
usbip userspace has duplicated enum definition to report usbip device status maintained by the kernel. A new uapi usbip.h now defines the usbip device status for kernel and userspace to use. Change usbip kernel space to include uapi usbip.h for usbip device status. Signed-off-by: Shuah Khan

[PATCH 0/3] staging/usbip: add new uapi header usbip.h

2014-02-27 Thread Shuah Khan
usbip userspace has duplicated enum definition to report usbip device status maintained by the kernel. Adding an usbip uapi header file will define the kernel - userspace interface for this device status. Shuah Khan (3): staging/usbip: add uapi header to export usbip kernel interfaces staging

[PATCH 3/3] staging/usbip: change usbip userspace to include new uapi usbip.h

2014-02-27 Thread Shuah Khan
usbip userspace has duplicated enum definition to report usbip device status maintained by the kernel. A new uapi usbip.h now defines the usbip device status for kernel and userspace to use. Change usbip userspace to include uapi usbip.h for usbip device status. Signed-off-by: Shuah Khan

[PATCH v2] staging/usbip: userspace to use linux header for usb_device_speed enum, missing speeds to speed_strings array

2014-01-24 Thread Shuah Khan
Remove usb_device_speed enum define from usbip_common.h and change it to include linux/usb/ch9.h instead. Add speed strings for usb wireless and 3.0 to speed_strings array. Signed-off-by: Shuah Khan --- v2: combined the following two userspace patches and addressed comments. https://lkml.org

Re: [PATCH] staging/usbip: Change userspace to use linux include for usb_device_speed enum

2014-01-24 Thread Shuah Khan
On 01/22/2014 10:56 AM, Shuah Khan wrote: Remove usb_device_speed enum define from usbip_common.h and change it to include linux/usb/ch9.h instead. Signed-off-by: Shuah Khan --- drivers/staging/usbip/userspace/libsrc/usbip_common.h | 8 +--- 1 file changed, 1 insertion(+), 7 deletions

Re: [PATCH] staging/usbip: Add missing speeds to userspace speed_strings array

2014-01-24 Thread Shuah Khan
On 01/24/2014 10:31 AM, Thomas Pugliese wrote: On Fri, 24 Jan 2014, Shuah Khan wrote: On 01/24/2014 10:08 AM, Thomas Pugliese wrote: On Wed, 22 Jan 2014, Shuah Khan wrote: Add speed strings for usb wireless and 3.0 to speed_strings array. Signed-off-by: Shuah Khan --- drivers

Re: [PATCH] staging/usbip: Add missing speeds to userspace speed_strings array

2014-01-24 Thread Shuah Khan
On 01/24/2014 10:08 AM, Thomas Pugliese wrote: On Wed, 22 Jan 2014, Shuah Khan wrote: Add speed strings for usb wireless and 3.0 to speed_strings array. Signed-off-by: Shuah Khan --- drivers/staging/usbip/userspace/libsrc/usbip_common.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH] staging/usbip: simplify usbip_dump_usb_device() udev->speed handling

2014-01-24 Thread Shuah Khan
Change usbip_dump_usb_device() to use usb_speed_string() and remove the code that does switch on udev->speed and builds custom speed strings. Signed-off-by: Shuah Khan --- drivers/staging/usbip/usbip_common.c | 22 ++ 1 file changed, 2 insertions(+), 20 deletions(-) d

[PATCH] staging/usbip: Change vhci_hcd store_attach() device information message to include speed string

2014-01-22 Thread Shuah Khan
Change vhci_hcd store_attach() routine to include speed string in its device information message. The current call to dev_info() prints out speed number which is the enum number. Change to call usb_speed_string() to print speed string in addition to the number. Signed-off-by: Shuah Khan

  1   2   >