Re: [PATCH] Staging: rtl8192e prohibit deferencing of NULL pointer

2014-06-18 Thread Valentina Manea
On Wed, Jun 18, 2014 at 11:16 AM, Andreas Platschek wrote: > > rx_dropped: > -ieee->stats.rx_dropped++; > +if (ieee != NULL) { > +ieee->stats.rx_dropped++; > +} > return 0; Style nit: don't use braces around a single statement. Tina

Re: [PATCH 00/18] Resend of usbip-utils migration patches and various other fixes

2014-03-09 Thread Valentina Manea
I was notified that one of the patches in the series (staging: usbip: claim ports used by shared devices) breaks the build. I take full responsability for this as I haven't compiled the kernel with allyesconfig and I am sorry. This can be fixed by moving struct dev_state, usb_hub_claim_port() and

[PATCH 13/18] staging: usbip: userspace: increase version to 2.0

2014-03-08 Thread Valentina Manea
Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/usbip/userspace/configure.ac b/drivers/staging/usbip/userspace/configure.ac index 25bf160..607d05c 100644 --- a/drivers/staging

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

2014-03-08 Thread Valentina Manea
This patch migrates vhci_driver to libudev. Signed-off-by: Valentina Manea Reviewed-by: Shuah Khan --- .../staging/usbip/userspace/libsrc/usbip_common.h | 1 - .../staging/usbip/userspace/libsrc/vhci_driver.c | 154 ++--- .../staging/usbip/userspace/libsrc/vhci_driver.h

[PATCH 18/18] staging: usbip: userspace: add hwdata as optional dependency in README

2014-03-08 Thread Valentina Manea
This is an optional dependency since USB/IP can fully work without it. However, it is needed to display device information such as vendor. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/README | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/usbip

[PATCH 12/18] staging: usbip: userspace: update dependencies in README

2014-03-08 Thread Valentina Manea
Add libudev as dependency and remove libsysfs. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/usbip/userspace/README b/drivers/staging/usbip/userspace/README index 00a1658

[PATCH 17/18] staging: usbip: userspace: don't throw error when trying to read configuration specific attributes

2014-03-08 Thread Valentina Manea
When a device has just been bound to usbip-host but the client hasn't set a configuration on it, certain attributes will not exist. Don't treat this as an error. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/libsrc/usbip_common.c | 17 +++-- 1 file c

[PATCH 06/18] staging: usbip: userspace: add new list API

2014-03-08 Thread Valentina Manea
Take the linked list implementation from the Linux Kernel and strip it down to what it is needed. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/libsrc/list.h | 136 ++ 1 file changed, 136 insertions(+) create mode 100644 drivers/staging/usbip

[PATCH 14/18] staging: usbip: let client choose device configuration

2014-03-08 Thread Valentina Manea
Since usbip-host is now a device driver and the client has full access to the shared device, it makes sense to let the client choose device configuration. Signed-off-by: Valentina Manea --- drivers/staging/usbip/stub_dev.c | 10 +- drivers/staging/usbip/stub_rx.c | 26

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

2014-03-08 Thread Valentina Manea
This patch modifies usbip_host_driver to use libudev. Signed-off-by: Valentina Manea Reviewed-by: Shuah Khan --- .../staging/usbip/userspace/libsrc/usbip_common.c | 76 ++ .../staging/usbip/userspace/libsrc/usbip_common.h | 5 +- .../usbip/userspace/libsrc/usbip_host_driver.c

[PATCH 07/18] staging: usbip: userspace: move sysfs_utils to libsrc

2014-03-08 Thread Valentina Manea
Since it offers a API to both usbip tools and libusbip, it is more appropriate to be place in the library. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/libsrc/Makefile.am | 3 ++- .../staging/usbip/userspace/libsrc/sysfs_utils.c | 31 ++ .../staging

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

2014-03-08 Thread Valentina Manea
The class device lists were used only when being initialized, being populated and being destroyed. They had no real meaning and thus the code was useless. Signed-off-by: Valentina Manea --- .../staging/usbip/userspace/libsrc/vhci_driver.c | 178 - .../staging/usbip

[PATCH 15/18] staging: usbip: trigger driver probing after unbinding from usbip-host

2014-03-08 Thread Valentina Manea
A sysfs attribute is used to announce kernel space that a new driver probing session should be triggered for the just unbinded device. In order to have the address of struct device associated to this USB device, a new member has been added to struct bus_id_priv. Signed-off-by: Valentina Manea

[PATCH 16/18] staging: usbip: claim ports used by shared devices

2014-03-08 Thread Valentina Manea
A device should not be able to be used concurrently both by the server and the client. Claiming the port used by the shared device ensures no interface drivers bind to it and that it is not usable from the server. Signed-off-by: Valentina Manea Acked-by: Alan Stern --- drivers/staging/usbip

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

2014-03-08 Thread Valentina Manea
This patch modifies usbip_unbind to use libudev. Signed-off-by: Valentina Manea Reviewed-by: Shuah Khan --- drivers/staging/usbip/userspace/src/usbip_unbind.c | 93 +++--- 1 file changed, 29 insertions(+), 64 deletions(-) diff --git a/drivers/staging/usbip/userspace/src

[PATCH 11/18] staging: usbip: userspace: remove libsysfs flag and autoconf check

2014-03-08 Thread Valentina Manea
libsysfs is now completely removed from USB/IP. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/configure.ac | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/usbip/userspace/configure.ac b/drivers/staging/usbip/userspace/configure.ac index a5193c6

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

2014-03-08 Thread Valentina Manea
This was deleted in the driver conversion patch. It didn't need to be deleted; showing more information is ok. Signed-off-by: Valentina Manea Reviewed-by: Shuah Khan --- drivers/staging/usbip/userspace/src/usbip_list.c | 20 +++- drivers/staging/usbip/userspace/src/usb

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

2014-03-08 Thread Valentina Manea
This patch modifies usbip_list to use libudev. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/src/usbip_list.c | 133 +-- 1 file changed, 50 insertions(+), 83 deletions(-) diff --git a/drivers/staging/usbip/userspace/src/usbip_list.c b/drivers/staging

[PATCH 00/18] Resend of usbip-utils migration patches and various other fixes

2014-03-08 Thread Valentina Manea
This is a resend of the patches sent a few days ago, including the migration of USB/IP userspace side to use libudev instead of libsysfs and various other fixes, all ordered in a big patch series. The patches have been modified according to received feedback. Valentina Manea (18): staging

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

2014-03-08 Thread Valentina Manea
This patch adds autoconf check for libudev and migrates usbip_bind to the new library. libsysfs will still be used until all userspace is modified. Signed-off-by: Valentina Manea Reviewed-by: Shuah Khan --- drivers/staging/usbip/userspace/configure.ac | 6 + .../staging/usbip

[PATCH 02/18] staging: usbip: userspace: remove useless libsysfs includes

2014-03-08 Thread Valentina Manea
This patch removes useless libsysfs.h includes in various userspace files. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/src/usbip_attach.c | 1 - drivers/staging/usbip/userspace/src/usbip_detach.c | 2 -- drivers/staging/usbip/userspace/src/usbip_network.h | 1 - 3 files

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

2014-03-05 Thread Valentina Manea
On Wed, Mar 5, 2014 at 12:15 PM, Dan Carpenter wrote: > On Wed, Mar 05, 2014 at 12:42:59PM +0300, Dan Carpenter wrote: >> On Tue, Mar 04, 2014 at 09:10:41PM +0200, Valentina Manea wrote: >> > diff --git a/drivers/staging/usbip/userspace/libsrc/usbip_common.h >> &

Re: [PATCH] staging: usbip: userspace: increase version to 2.0

2014-03-05 Thread Valentina Manea
On Tue, Mar 4, 2014 at 9:20 PM, Greg KH wrote: > On Tue, Mar 04, 2014 at 09:16:39PM +0200, Valentina Manea wrote: >> Signed-off-by: Valentina Manea >> --- >> drivers/staging/usbip/userspace/configure.ac | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >>

[PATCH v2] staging: usbip: claim ports used by shared devices

2014-03-05 Thread Valentina Manea
A device should not be able to be used concurrently both by the server and the client. Claiming the port used by the shared device ensures no interface drivers bind to it and that it is not usable from the server. Signed-off-by: Valentina Manea --- Changes since v1: * add commit description

[PATCH] staging: usbip: userspace: add hwdata as optional dependency in README

2014-03-04 Thread Valentina Manea
This is an optional dependency since USB/IP can fully work without it. However, it is needed to display device information such as vendor. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/README | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/usbip

[PATCH] staging: usbip: userspace: don't throw error when trying to read configuration specific attributes

2014-03-04 Thread Valentina Manea
When a device has just been bound to usbip-host but the client hasn't set a configuration on it, certain attributes will not exist. Don't treat this as an error. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/libsrc/usbip_common.c | 17 +++-- 1 file c

[PATCH] staging: usbip: claim ports used by shared devices

2014-03-04 Thread Valentina Manea
Signed-off-by: Valentina Manea --- drivers/staging/usbip/stub_dev.c | 22 ++ drivers/usb/core/devio.c | 17 - drivers/usb/core/hub.c | 2 ++ drivers/usb/core/usb.h | 6 +- include/linux/usb.h | 23

[PATCH] staging: usbip: trigger driver probing after unbinding from usbip-host

2014-03-04 Thread Valentina Manea
A sysfs attribute is used to announce kernel space that a new driver probing session should be triggered for the just unbinded device. In order to have the address of struct device associated to this USB device, a new member has been added to struct bus_id_priv. Signed-off-by: Valentina Manea

[PATCH] staging: usbip: let client choose device configuration

2014-03-04 Thread Valentina Manea
Since usbip-host is now a device driver and the client has full access to the shared device, it makes sense to let the client choose device configuration. Signed-off-by: Valentina Manea --- drivers/staging/usbip/stub_dev.c | 10 +- drivers/staging/usbip/stub_rx.c | 26

[PATCH] staging: usbip: userspace: increase version to 2.0

2014-03-04 Thread Valentina Manea
Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/usbip/userspace/configure.ac b/drivers/staging/usbip/userspace/configure.ac index 25bf160..607d05c 100644 --- a/drivers/staging

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

2014-03-04 Thread Valentina Manea
This patch migrates vhci_driver to libudev. Signed-off-by: Valentina Manea --- .../staging/usbip/userspace/libsrc/usbip_common.h | 1 - .../staging/usbip/userspace/libsrc/vhci_driver.c | 154 ++--- .../staging/usbip/userspace/libsrc/vhci_driver.h | 5 +- 3 files changed

[PATCH 06/12] staging: usbip: userspace: add new list API

2014-03-04 Thread Valentina Manea
Add a new list API from CCAN. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/libsrc/Makefile.am | 3 +- .../staging/usbip/userspace/libsrc/build_assert.h | 40 ++ .../staging/usbip/userspace/libsrc/check_type.h| 64 +++ .../staging/usbip/userspace/libsrc

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

2014-03-04 Thread Valentina Manea
This patch modifies usbip_unbind to use libudev. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/src/usbip_unbind.c | 92 +++--- 1 file changed, 29 insertions(+), 63 deletions(-) diff --git a/drivers/staging/usbip/userspace/src/usbip_unbind.c b/drivers

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

2014-03-04 Thread Valentina Manea
This patch modifies usbip_host_driver to use libudev. Signed-off-by: Valentina Manea --- .../staging/usbip/userspace/libsrc/usbip_common.c | 74 ++ .../staging/usbip/userspace/libsrc/usbip_common.h | 5 +- .../usbip/userspace/libsrc/usbip_host_driver.c | 282

[PATCH 12/12] staging: usbip: userspace: update dependencies in README

2014-03-04 Thread Valentina Manea
Add libudev as dependency and remove libsysfs. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/usbip/userspace/README b/drivers/staging/usbip/userspace/README index 00a1658

[PATCH 07/12] staging: usbip: userspace: move sysfs_utils to libsrc

2014-03-04 Thread Valentina Manea
Since it offers a API to both usbip tools and libusbip, it is more appropriate to be place in the library. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/libsrc/Makefile.am | 3 +- .../staging/usbip/userspace/libsrc/sysfs_utils.c | 36 ++ .../staging

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

2014-03-04 Thread Valentina Manea
The class device lists were used only when being initialized, being populated and being destroyed. They had no real meaning and thus the code was useless. Signed-off-by: Valentina Manea --- .../staging/usbip/userspace/libsrc/vhci_driver.c | 178 - .../staging/usbip

[PATCH 11/12] staging: usbip: userspace: remove libsysfs flag and autoconf check

2014-03-04 Thread Valentina Manea
libsysfs is now completely removed from USB/IP. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/configure.ac | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/usbip/userspace/configure.ac b/drivers/staging/usbip/userspace/configure.ac index a5193c6

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

2014-03-04 Thread Valentina Manea
This was deleted in the driver conversion patch. It didn't need to be deleted; showing more information is ok. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/src/usbip_list.c | 20 +++- drivers/staging/usbip/userspace/src/usbipd.c | 16 ++

[PATCH 02/12] staging: usbip: userspace: remove useless libsysfs includes

2014-03-04 Thread Valentina Manea
This patch removes useless libsysfs.h includes in various userspace files. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/src/usbip_attach.c | 1 - drivers/staging/usbip/userspace/src/usbip_detach.c | 2 -- drivers/staging/usbip/userspace/src/usbip_network.h | 1 - 3 files

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

2014-03-04 Thread Valentina Manea
This patch modifies usbip_list to use libudev. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/src/usbip_list.c | 137 +-- 1 file changed, 51 insertions(+), 86 deletions(-) diff --git a/drivers/staging/usbip/userspace/src/usbip_list.c b/drivers/staging

[PATCH 00/12] Migrate usbip-utils to libudev

2014-03-04 Thread Valentina Manea
with sysfs. Valentina Manea (12): staging: usbip: userspace: migrate usbip_bind to libudev staging: usbip: userspace: remove useless libsysfs includes staging: usbip: userspace: migrate usbip_unbind to libudev staging: usbip: userspace: migrate usbip_list to libudev staging: usbip

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

2014-03-04 Thread Valentina Manea
This patch adds autoconf check for libudev and migrates usbip_bind to the new library. libsysfs will still be used until all userspace is modified. Signed-off-by: Valentina Manea --- drivers/staging/usbip/userspace/configure.ac | 6 + .../staging/usbip/userspace/libsrc/usbip_common.h

[PATCH v3] staging: usbip: convert usbip-host driver to usb_device_driver

2014-01-23 Thread Valentina Manea
, there is no need to bind/unbind each interface, just the device as a whole. Signed-off-by: Valentina Manea --- Changes since v2: * re-add check for empty device list drivers/staging/usbip/stub.h | 2 +- drivers/staging/usbip/stub_dev.c | 150

Re: [PATCH] staging: usbip: convert usbip-host driver to usb_device_driver

2014-01-23 Thread Valentina Manea
> If you don't bind the interfaces, they will naturally bind to their > normal drivers on the host. You probably don't want that to happen. > (Although, at the moment, I don't see how you can prevent it.) > That's true but, the way I see USB/IP general use case, the drivers from the host the devi

[PATCH v2] staging: usbip: convert usbip-host driver to usb_device_driver

2014-01-23 Thread Valentina Manea
, there is no need to bind/unbind each interface, just the device as a whole. Signed-off-by: Valentina Manea --- Changes since v1: * add extra information to the commit message * remove a comment that was no longer available * export USB functions as GPL drivers/staging

Re: [PATCH] staging: usbip: convert usbip-host driver to usb_device_driver

2014-01-23 Thread Valentina Manea
On Thu, Jan 23, 2014 at 9:09 PM, Greg KH wrote: > On Thu, Jan 23, 2014 at 08:36:46PM +0200, Valentina Manea wrote: >> This driver was previously an interface driver. Since USB/IP >> exports a whole device, not just an interface, it would make >> sense to be a device driver.

[PATCH] staging: usbip: convert usbip-host driver to usb_device_driver

2014-01-23 Thread Valentina Manea
: Valentina Manea --- drivers/staging/usbip/stub.h | 2 +- drivers/staging/usbip/stub_dev.c | 150 - drivers/staging/usbip/stub_main.c | 6 +- drivers/staging/usbip/stub_rx.c| 2 +- .../usbip/userspace

[PATCH] staging: usbip: userspace: add support for viewing imported devices

2014-01-07 Thread Valentina Manea
:6211) 2-1 -> usbip://192.168.122.152:3240/1-1 -> remote bus/dev 001/002 Signed-off-by: Valentina Manea Reviewed-by: Ilija Hadzic --- Resubmitting this patch as I still didn't get any reply from Greg after 2 weeks. .../staging/usbip/userspace/libsrc/vhci

[PATCH v3] staging: usbip: userspace: add support for viewing imported devices

2013-12-24 Thread Valentina Manea
:6211) 2-1 -> usbip://192.168.122.152:3240/1-1 -> remote bus/dev 001/002 Signed-off-by: Valentina Manea --- Changes since v2: * fix trailing whitespace error * change commit title to reflect that this is a userspace patch .../staging/usbip/userspace/libsrc/vh

[PATCH v2] staging: usbip: add support for viewing imported devices

2013-12-23 Thread Valentina Manea
:6211) 2-1 -> usbip://192.168.122.152:3240/1-1 -> remote bus/dev 001/002 Signed-off-by: Valentina Manea --- Changes since v1: * remove devid from the printed info * arrange formatting a bit * don't bail out when port file doesn't exist, jus

[PATCH] staging: usbip: add support for viewing imported devices

2013-12-23 Thread Valentina Manea
:6211) 2-1 -> usbip://192.168.122.152:3240/1-1 (remote devid 00010002 (bus/dev 001/002)) Signed-off-by: Valentina Manea --- .../staging/usbip/userspace/libsrc/vhci_driver.c | 59 ++ .../staging/usbip/userspace/libsrc/vhci_driver.h | 2 + drivers/staging/usbip/u