Re: [PATCH] Staging: rtl8723au: os_intfs: fixed case statement is variable issue

2016-08-11 Thread sunbing
On Aug 11, 2016, at 23:25, Jes Sorensen wrote: > Bing Sun writes: >> Fixed sparse parse error: >> Expected constant expression in case statement. >> >> Signed-off-by: Bing Sun >> --- >> drivers/staging/rtl8723au/os_dep/os_intfs.c | 11 +-- >> 1 file changed, 5 insertions(+), 6 deletion

[PATCH 3/6] staging: media: lirc: lirc_sasem: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/staging/media/lirc/lirc_sasem.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_sasem.c b/drivers/staging/media/lirc/lirc_sasem.c index 2218d0042030ed..b080f

[PATCH 2/6] staging: media: lirc: lirc_imon: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/staging/media/lirc/lirc_imon.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_imon.c b/drivers/staging/media/lirc/lirc_imon.c index ff1

[PATCH 6/6] staging: vt6656: main_usb: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/staging/vt6656/main_usb.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index ac4fecb30d0e9c

[PATCH 0/6] staging: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
This per-subsystem series is part of a tree wide cleanup. usb_alloc_urb() uses kmalloc which already prints enough information on failure. So, let's simply remove those "allocation failed" messages from drivers like we did already for other -ENOMEM cases. gkh acked this approach when we talked abou

[PATCH 4/6] staging: most: hdm-usb: hdm_usb: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/staging/most/hdm-usb/hdm_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c index aeae071f2

[PATCH 1/6] staging: comedi: drivers: usbduxfast: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/staging/comedi/drivers/usbduxfast.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c

[PATCH 5/6] staging: rtl8192u: r8192U_core: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/staging/rtl8192u/r8192U_core.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index dd0970fa

[PATCH] staging/android: add Doc for SW_SYNC ioctl interface

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan This interface is hidden from kernel headers and it is intended for use only for testing. So testers would have to add the ioctl information internally. This is to prevent misuse of this feature. v2: take in Eric suggestions for the Documentation v3: really take in Eric su

Re: [PATCH v3 4/5] staging/android: add Doc for SW_SYNC ioctl interface

2016-08-11 Thread Gustavo Padovan
2016-08-11 Eric Engestrom : > On Thu, Aug 11, 2016 at 12:26:43PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > This interface is hidden from kernel headers and it is intended for use > > only for testing. So testers would have to add the ioctl information > > internally. This i

Re: [PATCH v3 4/5] staging/android: add Doc for SW_SYNC ioctl interface

2016-08-11 Thread Eric Engestrom
On Thu, Aug 11, 2016 at 12:26:43PM -0300, Gustavo Padovan wrote: > From: Gustavo Padovan > > This interface is hidden from kernel headers and it is intended for use > only for testing. So testers would have to add the ioctl information > internally. This is to prevent misuse of this feature. > >

RE: [PATCH net 3/4] hv_netvsc: protect module refcount by checking net_device_ctx->vf_netdev

2016-08-11 Thread Haiyang Zhang
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, August 11, 2016 6:59 AM > To: net...@vger.kernel.org > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Haiyang > Zhang ; KY Srinivasan > Subject: [PATCH net 3/4] hv_netvsc: protec

RE: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-11 Thread Haiyang Zhang
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, August 11, 2016 6:59 AM > To: net...@vger.kernel.org > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Haiyang > Zhang ; KY Srinivasan > Subject: [PATCH net 2/4] hv_netvsc: reset

RE: [PATCH net 4/4] hv_netvsc: avoid deadlocks between rtnl lock and netvsc_inject_disable()

2016-08-11 Thread Haiyang Zhang
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, August 11, 2016 6:59 AM > To: net...@vger.kernel.org > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Haiyang > Zhang ; KY Srinivasan > Subject: [PATCH net 4/4] hv_netvsc: avoid

RE: [PATCH net 1/4] hv_netvsc: don't lose VF information

2016-08-11 Thread Haiyang Zhang
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, August 11, 2016 6:59 AM > To: net...@vger.kernel.org > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Haiyang > Zhang ; KY Srinivasan > Subject: [PATCH net 1/4] hv_netvsc: don't

[PATCH v3 3/5] staging/android: prepare sw_sync files for de-staging

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan remove file paths in the comments and add short description about each file. v2: remove file paths instead of just change them. v3: improve header description as sugggested by Eric Signed-off-by: Gustavo Padovan Reviewed-by: Eric Engestrom --- drivers/staging/android/s

[PATCH v3 2/5] staging/android: move trace/sync.h to sync_trace.h

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan The common behaviour for trace headers is to have them in the same folder they are used, instead of creating a special trace/ directory. Signed-off-by: Gustavo Padovan Reviewed-by: Eric Engestrom --- drivers/staging/android/sw_sync.c | 2 +- drivers/

[PATCH v3 4/5] staging/android: add Doc for SW_SYNC ioctl interface

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan This interface is hidden from kernel headers and it is intended for use only for testing. So testers would have to add the ioctl information internally. This is to prevent misuse of this feature. v2: take in Eric suggestions for the Documentation Signed-off-by: Gustavo Pad

[PATCH v3 5/5] dma-buf/sw_sync: de-stage SW_SYNC

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan SW_SYNC allows to run tests on the sync_file framework via debugfs on /sync/sw_sync Opening and closing the file triggers creation and release of a sync timeline. To create fences on this timeline the SW_SYNC_IOC_CREATE_FENCE ioctl should be used. To increment the timeline

[PATCH v3 0/5] de-stage SW_SYNC validation frawework

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan Hi Greg, This is the last step in the Sync Framwork de-stage task. It de-stage the SW_SYNC validation framework and the sync_debug info debugfs file. The first 2 patches are clean up and improvements and the rest is preparation to de-stage and then finally the actual de-st

[PATCH v3 1/5] staging/android: do not let userspace trigger WARN_ON

2016-08-11 Thread Gustavo Padovan
From: Gustavo Padovan Closing the timeline without waiting all fences to signal is not a critical failure, it is just bad usage from userspace so avoid calling WARN_ON in this case. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 d

Re: [PATCH] Staging: rtl8723au: os_intfs: fixed case statement is variable issue

2016-08-11 Thread Jes Sorensen
Bing Sun writes: > Fixed sparse parse error: > Expected constant expression in case statement. > > Signed-off-by: Bing Sun > --- > drivers/staging/rtl8723au/os_dep/os_intfs.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/rtl8723au/os_dep/os_

RE: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-11 Thread Yuval Mintz
> +static void netvsc_inject_enable(struct net_device_context > +*net_device_ctx) { > + net_device_ctx->vf_inject = true; > +} > + > +static void netvsc_inject_disable(struct net_device_context > +*net_device_ctx) { > + net_device_ctx->vf_inject = false; > + > + /* Wait for currently ac

Re: [PATCH v2 0/6] de-stage SW_SYNC validation frawework

2016-08-11 Thread Gustavo Padovan
Hi Eric, 2016-08-11 Eric Engestrom : > On Mon, Aug 08, 2016 at 06:24:16PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Hi Greg, > > > > This is the last step in the Sync Framwork de-stage task. It de-stage > > the SW_SYNC validation framework and the sync_debug info debugfs

Re: [PATCH v2 1/6] staging/android: remove doc from sw_sync

2016-08-11 Thread Gustavo Padovan
Hi Pavel, 2016-08-09 Pavel Machek : > On Mon 2016-08-08 18:24:17, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > SW_SYNC should never be used by other pieces of the kernel apart from > > sync_debug as it is only a Sync File Validation Framework, so hide any > > info to avoid confuse t

[PATCH] Staging: rtl8723au: os_intfs: fixed case statement is variable issue

2016-08-11 Thread Bing Sun
Fixed sparse parse error: Expected constant expression in case statement. Signed-off-by: Bing Sun --- drivers/staging/rtl8723au/os_dep/os_intfs.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c b/drivers/staging/rtl8723

[PATCH v2 RESEND 0/4] Drivers: hv: balloon: fix WS2012 memory hotplug issues and do some cleanup

2016-08-11 Thread Vitaly Kuznetsov
Changes since v2: - I'm sorry, I screwed up Alex's address, this is just a resend. Changes since v1: - Keep ol_waitevent and wait when kernel memory onlining is disabled [Alex Ng] Crashes with Hyper-V balloon driver are reported with WS2012 (non-R2), hosts I was able to identify two issues which

[PATCH v2 RESEND 1/4] Drivers: hv: balloon: keep track of where ha_region starts

2016-08-11 Thread Vitaly Kuznetsov
Windows 2012 (non-R2) does not specify hot add region in hot add requests and the logic in hot_add_req() is trying to find a 128Mb-aligned region covering the request. It may also happen that host's requests are not 128Mb aligned and the created ha_region will start before the first specified PFN.

[PATCH v2 RESEND 3/4] Drivers: hv: balloon: don't wait for ol_waitevent when memhp_auto_online is enabled

2016-08-11 Thread Vitaly Kuznetsov
With the recently introduced in-kernel memory onlining (MEMORY_HOTPLUG_DEFAULT_ONLINE) these is no point in waiting for pages to come online in the driver and we can get rid of the waiting. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv_balloon.c | 14 -- 1 file changed, 8 inserti

[PATCH v2 RESEND 4/4] Drivers: hv: balloon: replace ha_region_mutex with spinlock

2016-08-11 Thread Vitaly Kuznetsov
lockdep reports possible circular locking dependency when udev is used for memory onlining: systemd-udevd/3996 is trying to acquire lock: ((memory_chain).rwsem){.+}, at: [] __blocking_notifier_call_chain+0x4e/0xc0 but task is already holding lock: (&dm_device.ha_region_mutex){+.+.+.},

[PATCH v2 RESEND 2/4] Drivers: hv: balloon: account for gaps in hot add regions

2016-08-11 Thread Vitaly Kuznetsov
I'm observing the following hot add requests from the WS2012 host: hot_add_req: start_pfn = 0x108200 count = 330752 hot_add_req: start_pfn = 0x158e00 count = 193536 hot_add_req: start_pfn = 0x188400 count = 239616 As the host doesn't specify hot add regions we're trying to create 128Mb-aligned re

[PATCH v2 4/4] Drivers: hv: balloon: replace ha_region_mutex with spinlock

2016-08-11 Thread Vitaly Kuznetsov
lockdep reports possible circular locking dependency when udev is used for memory onlining: systemd-udevd/3996 is trying to acquire lock: ((memory_chain).rwsem){.+}, at: [] __blocking_notifier_call_chain+0x4e/0xc0 but task is already holding lock: (&dm_device.ha_region_mutex){+.+.+.},

[PATCH v2 2/4] Drivers: hv: balloon: account for gaps in hot add regions

2016-08-11 Thread Vitaly Kuznetsov
I'm observing the following hot add requests from the WS2012 host: hot_add_req: start_pfn = 0x108200 count = 330752 hot_add_req: start_pfn = 0x158e00 count = 193536 hot_add_req: start_pfn = 0x188400 count = 239616 As the host doesn't specify hot add regions we're trying to create 128Mb-aligned re

[PATCH v2 1/4] Drivers: hv: balloon: keep track of where ha_region starts

2016-08-11 Thread Vitaly Kuznetsov
Windows 2012 (non-R2) does not specify hot add region in hot add requests and the logic in hot_add_req() is trying to find a 128Mb-aligned region covering the request. It may also happen that host's requests are not 128Mb aligned and the created ha_region will start before the first specified PFN.

[PATCH v2 3/4] Drivers: hv: balloon: don't wait for ol_waitevent when memhp_auto_online is enabled

2016-08-11 Thread Vitaly Kuznetsov
With the recently introduced in-kernel memory onlining (MEMORY_HOTPLUG_DEFAULT_ONLINE) these is no point in waiting for pages to come online in the driver and we can get rid of the waiting. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv_balloon.c | 14 -- 1 file changed, 8 inserti

[PATCH v2 0/4] Drivers: hv: balloon: fix WS2012 memory hotplug issues and do some cleanup

2016-08-11 Thread Vitaly Kuznetsov
Changes since v1: - Keep ol_waitevent and wait when kernel memory onlining is disabled [Alex Ng] Crashes with Hyper-V balloon driver are reported with WS2012 (non-R2), hosts I was able to identify two issues which I fix with first two patches of this series. Patches 3 removes wait on ol_waitevent

Re: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-11 Thread Vitaly Kuznetsov
Yuval Mintz writes: >> +static void netvsc_inject_enable(struct net_device_context >> +*net_device_ctx) { >> +net_device_ctx->vf_inject = true; >> +} >> + >> +static void netvsc_inject_disable(struct net_device_context >> +*net_device_ctx) { >> +net_device_ctx->vf_inject = false; >> + >>

[PATCH net 4/4] hv_netvsc: avoid deadlocks between rtnl lock and netvsc_inject_disable()

2016-08-11 Thread Vitaly Kuznetsov
Here is a deadlock scenario: - netvsc_vf_up() schedules netvsc_notify_peers() work and quits. - netvsc_vf_down() runs before netvsc_notify_peers() gets executed. As it is being executed from netdev notifier chain we hold rtnl lock when we get here. - we enter netvsc_inject_disable() and loop an

[PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-11 Thread Vitaly Kuznetsov
We reset vf_inject on VF going down (netvsc_vf_down()) but we don't on VF removal (netvsc_unregister_vf()) so vf_inject stays 'true' while vf_netdev is already NULL and we're trying to inject packets into NULL net device in netvsc_recv_callback() causing kernel to crash. Signed-off-by: Vitaly Kuzn

[PATCH net 3/4] hv_netvsc: protect module refcount by checking net_device_ctx->vf_netdev

2016-08-11 Thread Vitaly Kuznetsov
We're not guaranteed to see NETDEV_REGISTER/NETDEV_UNREGISTER notifications only once per VF but we increase/decrease module refcount unconditionally. Check vf_netdev to make sure we don't take/release it twice. We presume that only one VF per netvsc device may exist. Signed-off-by: Vitaly Kuznets

[PATCH net 0/4] hv_netvsc: fixes for VF removal path

2016-08-11 Thread Vitaly Kuznetsov
Kernel crash is reported after VF is removed and detached from netvsc device. My investigation led me to PATCH2 of this series but PATCH1 is required to support the change. I also noticed a couple of other issues while debugging and I fix them with PATCH3 and PATCH4. Please review. Vitaly Kuznets

[PATCH net 1/4] hv_netvsc: don't lose VF information

2016-08-11 Thread Vitaly Kuznetsov
struct netvsc_device is not suitable for storing VF information as this structure is being destroyed on MTU change / set channel operation (see rndis_filter_device_remove()). Move all VF related stuff to struct net_device_context which is persistent. Signed-off-by: Vitaly Kuznetsov --- drivers/n

Re: [PATCH v2 6/6] dma-buf/sw_sync: de-stage SW_SYNC

2016-08-11 Thread Eric Engestrom
On Mon, Aug 08, 2016 at 06:24:22PM -0300, Gustavo Padovan wrote: > From: Gustavo Padovan > > SW_SYNC allows to run tests on the sync_file framework via debugfs on > > /sync/sw_sync > > Opening and closing the file triggers creation and release of a sync > timeline. To create fences on this time

Re: [PATCH v2 5/6] staging/android: add Doc for SW_SYNC ioctl interface

2016-08-11 Thread Eric Engestrom
On Mon, Aug 08, 2016 at 06:24:21PM -0300, Gustavo Padovan wrote: > From: Gustavo Padovan > > This interface is hidden from kernel headers and it is intended for use > only for testing. So testers would have to add the ioctl information > internally. This is to prevent misuse of this feature. > >

Re: [PATCH v2 4/6] staging/android: prepare sw_sync files for de-staging

2016-08-11 Thread Eric Engestrom
On Mon, Aug 08, 2016 at 06:24:20PM -0300, Gustavo Padovan wrote: > From: Gustavo Padovan > > remove file paths in the comments and add short description about each > file. > > v2: remove file paths instead of just change them. > > Signed-off-by: Gustavo Padovan > --- > drivers/staging/android

Re: [PATCH v2 3/6] staging/android: move trace/sync.h to sync_trace.h

2016-08-11 Thread Eric Engestrom
On Mon, Aug 08, 2016 at 06:24:19PM -0300, Gustavo Padovan wrote: > From: Gustavo Padovan > > The common behaviour for trace headers is to have them in the same folder > they are used, instead of creating a special trace/ directory. > > Signed-off-by: Gustavo Padovan Reviewed-by: Eric Engestrom

Re: [PATCH v2 0/6] de-stage SW_SYNC validation frawework

2016-08-11 Thread Eric Engestrom
On Mon, Aug 08, 2016 at 06:24:16PM -0300, Gustavo Padovan wrote: > From: Gustavo Padovan > > Hi Greg, > > This is the last step in the Sync Framwork de-stage task. It de-stage > the SW_SYNC validation framework and the sync_debug info debugfs file. > > The first 2 patches are clean up and impro

Re: [PATCH 3/4] Drivers: hv: balloon: get rid on ol_waitevent

2016-08-11 Thread Vitaly Kuznetsov
"Alex Ng (LIS)" writes: >> -Original Message- >> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> Sent: Friday, August 5, 2016 3:49 AM >> To: de...@linuxdriverproject.org >> Cc: linux-ker...@vger.kernel.org; Haiyang Zhang ; KY >> Srinivasan ; Alex Ng (LIS) >> Subject: [PATCH 3/4] D

Re: [PATCH 0/2] Drivers: hv: vmbus: make bus ids in sysfs persistent

2016-08-11 Thread Vitaly Kuznetsov
KY Srinivasan writes: >> -Original Message- >> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> Sent: Tuesday, August 9, 2016 1:46 AM >> To: de...@linuxdriverproject.org >> Cc: linux-ker...@vger.kernel.org; Haiyang Zhang ; >> KY Srinivasan >> Subject: [PATCH 0/2] Drivers: hv: vmbus

Re: staging: ks7010: Replace three printk() calls by pr_err()

2016-08-11 Thread Wolfram Sang
On Wed, Aug 10, 2016 at 09:41:37PM +0200, SF Markus Elfring wrote: > >> Please and and use pr_fmt > > > > Can't we use dev_* on the SDIO device? > > How should a connection be constructed from the data structure > "sdio_device_id" > to the corresponding device information for such an use case?