[PATCH 1/1] staging: usbip: remove an unnecessary lock in usbip_event_happened. The variable "happened" is local. So I think there is no need to lock here.

2012-11-04 Thread Harvey Yang
From: harvey.yang Signed-off-by: harvey.yang --- drivers/staging/usbip/usbip_event.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/staging/usbip/usbip_event.c b/drivers/staging/usbip/usbip_event.c index d332a34..668f8e0 100644 --- a/drivers/staging/usbip/us

Re: [PATCH 1/1] staging: usbip: remove an unnecessary lock in usbip_event_happened. The variable "happened" is local. So I think there is no need to lock here.

2012-11-04 Thread harvey yang
I think no need to make 'happened' static as we just check 'ud->event' feild. Maybe making this function inline would make more sense. inline int usbip_event_happened(struct usbip_device *ud) { return ud->event ? 1 : 0; } Thanks Harvey On Mon, Nov 5, 2012 at 1:34 PM, Prashant Shah wrot

[PATCH 1/1] usb: usbip: userspace: remove the port state file when detaching port.

2012-11-15 Thread Harvey Yang
with the last detached port state file remaining , usbip reports error on attaching. So clean up the state files on detaching. Signed-off-by: Harvey Yang --- drivers/staging/usbip/userspace/src/usbip_detach.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a

[PATCH 1/1] staging: usbip: put usb_device and kill event handler thread in error cleanups.

2012-11-06 Thread Harvey Yang
From: harvey.yang If probe returns with error, the kthread is still alive even when all usbip modules unloaded. So do cleanups in error handler. Signed-off-by: harvey.yang --- drivers/staging/usbip/stub_dev.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/st

[PATCH 1/1] staging: usbip: make the code consistent using the variable name 'vhci' instead of 'dum'.

2012-11-10 Thread Harvey Yang
Signed-off-by: Harvey Yang --- drivers/staging/usbip/vhci_hcd.c | 80 +++--- 1 files changed, 40 insertions(+), 40 deletions(-) diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index 620d1be..6771668 100644 --- a/drivers/staging

[RFC] usb: add 'usb_get_intf()' call into the probe methods of drivers for usb interfaces.

2012-11-18 Thread harvey yang
Hi, all I checked many usb drivers in the mainline kernel which do not record this reference in their probe methods. But according to the documents about this function, we shoud record this reference in our probe methods, just as the call to 'usb_get_dev()' to reference a usb device. Are these usb

[PATCH V2 1/1] mwifiex: add tx info to skb when forming mgmt frame

2013-07-01 Thread Harvey Yang
From: Huawei Yang In function 'mwifiex_write_data_complete' it need tx info to find the mwifiex_private to updates statistics and wake up tx queues. Or we may trigger tx queues timeout when transmitting lots of mgmt frames. Signed-off-by: Huawei Yang --- drivers/net/wireless/mwifiex/cfg80211.c

[PATCH 1/1] mwifiex: add tx info to skb when forming mgmt frame

2013-07-01 Thread Harvey Yang
From: Huawei Yang In function 'mwifiex_write_data_complete' it need tx info to find the mwifiex_private to updates statistics and wake up tx queues. Or we may trigger tx queues timeout when transmitting lots of mgmt frames burstly. Signed-off-by: Huawei Yang --- drivers/net/wireless/mwifiex/

Re: [RFC] usb: add 'usb_get_intf()' call into the probe methods of drivers for usb interfaces.

2012-11-20 Thread harvey yang
Thanks for your comments :) Harvey On Wed, Nov 21, 2012 at 12:09 AM, Alan Stern wrote: > On Mon, 19 Nov 2012, harvey yang wrote: > >> Hi, all >> I checked many usb drivers in the mainline kernel which do not record >> this reference in their probe methods. But ac

[RFC PATCH 0/2] staging: usbip: refine the spinlock

2012-11-23 Thread Harvey Yang
pts. Maybe to achieve a good performance there is no need to use the interrupt safe spinlock. Just replace them with a non interrupt safe version. Harvey Yang (2): staging: usbip: use interrupt safe spinlock to avoid potential deadlock. staging: usbip: replace the interrupt safe spinl

[PATCH 1/1] net: ipv4: refine the logic for determining daddr in ip_queue_xmit.

2013-01-14 Thread Harvey Yang
The destination address daddr is faddr if source route option is set, otherwise it is inet_daddr. So use if-else to assign the value. Signed-off-by: Harvey Yang --- net/ipv4/ip_output.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_output.c b/net/ipv4

[PATCH 0/2] staging: usbip: refine the lock

2013-01-07 Thread Harvey Yang
good performance there is no need to use the interrupt safe spinlock. Just replace them with a non interrupt safe version. Harvey Yang (2): staging: usbip: use interrupt safe spinlock to avoid potential deadlock. staging: usbip: replace the interrupt safe spinlocks with co

[PATCH 1/2] staging: usbip: use interrupt safe spinlock to avoid potential deadlock.

2013-01-07 Thread Harvey Yang
Signed-off-by: Harvey Yang --- drivers/staging/usbip/stub_dev.c| 34 +- drivers/staging/usbip/stub_rx.c |4 ++-- drivers/staging/usbip/usbip_event.c |6 -- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/drivers/staging

[PATCH 2/2] staging: usbip: replace the interrupt safe spinlocks with common ones.

2013-01-07 Thread Harvey Yang
Signed-off-by: Harvey Yang --- drivers/staging/usbip/vhci_hcd.c | 76 -- drivers/staging/usbip/vhci_rx.c | 10 ++--- drivers/staging/usbip/vhci_tx.c | 14 +++ 3 files changed, 42 insertions(+), 58 deletions(-) diff --git a/drivers/staging/usbip