Re: [PATCH] usb: Add Device Tree support to XHCI Platform driver

2013-07-18 Thread Xenia Ragiadakou
On 07/19/2013 02:12 AM, Sarah Sharp wrote: On Thu, Jul 18, 2013 at 06:35:13PM -0400, Al Cooper wrote: Add Device Tree match table. Setup dma_mask and coherent_dma_mask if they're not already set. Signed-off-by: Al Cooper alcoop...@gmail.com --- drivers/usb/host/xhci-plat.c | 18

[RFC] xhci: add trace for debug messages related to changing contexts

2013-07-22 Thread Xenia Ragiadakou
This patch defines a new trace event, which is called xhci_dbg_context_change and belongs in the event class xhci_log_msg, and adds tracepoints for tracing the debug messages related to context updates performed with Configure Endpoint and Evaluate Context commands. Signed-off-by: Xenia

[RFC v4] xhci: fix dma mask setup in xhci.c

2013-07-23 Thread Xenia Ragiadakou
to find out the addressing capabilities of xHC was removed since its value is already cached in xhci-hccparams. - hcd-self.controller was replaced with the dev variable since it is already available. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Cc: Andy Shevchenco andy.shevche

Re: [RFC v4] xhci: fix dma mask setup in xhci.c

2013-07-24 Thread Xenia Ragiadakou
Hi Andy, Thanks for your remarks. I forward your mail to the usb list. Sorry about the double mails that you received, i forgot that i had CC you and Al Cooper inside the patch. On 07/24/2013 04:32 PM, Andy Shevchenko wrote: On Wed, Jul 24, 2013 at 4:56 AM, Xenia Ragiadakou burzalod

[RFC v2] xhci: add trace for debug messages related to changing contexts

2013-07-30 Thread Xenia Ragiadakou
This patch defines a new trace event, which is called xhci_dbg_context_change and belongs in the event class xhci_log_msg, and adds tracepoints for tracing the debug messages related to context updates performed with Configure Endpoint and Evaluate Context commands. Signed-off-by: Xenia

[RFC 2/4] xhci: add trace for debug messages related to endpoint reset

2013-07-30 Thread Xenia Ragiadakou
This patch defines a new trace event, which is called xhci_dbg_reset_ep and belongs in the event class xhci_log_msg, and adds tracepoints that trace the debug messages associated with resetting an endpoint after the reception of a STALL packet. Signed-off-by: Xenia Ragiadakou burzalod

[RFC 4/4] xhci: add xhci_cmd_completion trace event

2013-07-30 Thread Xenia Ragiadakou
in handle_cmd_completion(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 2 ++ drivers/usb/host/xhci-trace.h | 28 2 files changed, 30 insertions(+) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index

[RFC 3/4] xhci: add xhci_address_ctx trace event

2013-07-30 Thread Xenia Ragiadakou
in xhci_address_device(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-trace.h | 42 ++ drivers/usb/host/xhci.c | 7 +++ 2 files changed, 49 insertions(+) diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci

[RFC 1/4] xhci: add trace for debug messages related to quirks

2013-07-30 Thread Xenia Ragiadakou
This patch defines a new trace event, which is called xhci_dbg_quirks and belongs in the event class xhci_log_msg, and adds tracepoints that trace the debug messages associated with xHCs' quirks. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-hub.c | 7

Re: [RFC 1/4] xhci: add trace for debug messages related to quirks

2013-07-30 Thread Xenia Ragiadakou
On 07/31/2013 04:13 AM, Steven Rostedt wrote: On Wed, 2013-07-31 at 03:56 +0300, Xenia Ragiadakou wrote: #define PORT_WAKE_BITS (PORT_WKOC_E | PORT_WKDISC_E | PORT_WKCONN_E) #define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_WRC | PORT_OCC | \ @@ -528,8 +529,10 @@ void

[RFC v4] xhci: add traces for debug messages in xhci_address_device()

2013-07-30 Thread Xenia Ragiadakou
cast (unsigned long long) is removed from le64_to_cpu(xhci-dcbaa-dev_context_ptrs[udev-slot_id]) to reduce line length below 80 characters. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from version 3: Remove trailing newline from strings posted to the trace ring buffer

[RFC v2 3/4] xhci: add xhci_address_ctx trace event

2013-07-30 Thread Xenia Ragiadakou
in xhci_address_device(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-trace.h | 42 ++ drivers/usb/host/xhci.c | 7 +++ 2 files changed, 49 insertions(+) diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci

[RFC v2 1/4] xhci: add trace for debug messages related to quirks

2013-07-30 Thread Xenia Ragiadakou
This patch defines a new trace event, which is called xhci_dbg_quirks and belongs in the event class xhci_log_msg, and adds tracepoints that trace the debug messages associated with xHCs' quirks. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from version 1: Remove

[RFC v3] xhci: add trace for debug messages related to changing contexts

2013-07-30 Thread Xenia Ragiadakou
This patch defines a new trace event, which is called xhci_dbg_context_change and belongs in the event class xhci_log_msg, and adds tracepoints for tracing the debug messages related to context updates performed with Configure Endpoint and Evaluate Context commands. Signed-off-by: Xenia

[RFC v2 2/4] xhci: add trace for debug messages related to endpoint reset

2013-07-30 Thread Xenia Ragiadakou
This patch defines a new trace event, which is called xhci_dbg_reset_ep and belongs in the event class xhci_log_msg, and adds tracepoints that trace the debug messages associated with resetting an endpoint after the reception of a STALL packet. Signed-off-by: Xenia Ragiadakou burzalod

[RFC v2 4/4] xhci: add xhci_cmd_completion trace event

2013-07-30 Thread Xenia Ragiadakou
in handle_cmd_completion(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 2 ++ drivers/usb/host/xhci-trace.h | 28 2 files changed, 30 insertions(+) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index

[RFC v5] xhci: fix dma mask setup in xhci.c

2013-08-05 Thread Xenia Ragiadakou
was replaced with the dev variable since it is already available. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from version 4: - Change the initialization code in xhci_plat_probe() to avoid unnecessary second assignment of the dma_mask if the dma_mask pointer is initialized

[RFC v5] xhci: add traces for debug messages in xhci_address_device()

2013-08-05 Thread Xenia Ragiadakou
/xhci-trace.c new file mode 100644 index 000..7cf30c8 --- /dev/null +++ b/drivers/usb/host/xhci-trace.c @@ -0,0 +1,15 @@ +/* + * xHCI host controller driver + * + * Copyright (C) 2013 Xenia Ragiadakou + * + * Author: Xenia Ragiadakou + * Email : burzalod...@gmail.com + * + * This program is free

[RFC v3 1/4] xhci: add trace for debug messages related to quirks

2013-08-05 Thread Xenia Ragiadakou
This patch defines a new trace event, which is called xhci_dbg_quirks and belongs in the event class xhci_log_msg, and adds tracepoints that trace the debug messages associated with xHCs' quirks. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from version 2: Add

[RFC v3 4/4] xhci: add xhci_cmd_completion trace event

2013-08-05 Thread Xenia Ragiadakou
and flags as well as the command's type and fields using the trace-cmd tool and the appropriate plugin. Also, a tracepoint is added in handle_cmd_completion(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from version 2: - Rename xhci_log_cmd class to xhci_log_event and make

[RFC v3 2/4] xhci: add trace for debug messages related to endpoint reset

2013-08-05 Thread Xenia Ragiadakou
This patch defines a new trace event, which is called xhci_dbg_reset_ep and belongs in the event class xhci_log_msg, and adds tracepoints that trace the debug messages associated with resetting an endpoint after the reception of a STALL packet. Signed-off-by: Xenia Ragiadakou burzalod

[RFC v3 3/4] xhci: add xhci_address_ctx trace event

2013-08-05 Thread Xenia Ragiadakou
in xhci_address_device(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from version 2: Fix the TP_printk() by typecasting __entry-ctx_dma to unsigned long long so that it will be printed appropriately with the printing format %llx. drivers/usb/host/xhci-trace.h | 42

[RFC 3/3] xhci: trace debug statements related to ring expansion

2013-08-12 Thread Xenia Ragiadakou
-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-mem.c | 3 ++- drivers/usb/host/xhci-ring.c | 4 ++-- drivers/usb/host/xhci-trace.h | 5 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index

[RFC v2 2/3] xhci: trace debug messages related to driver initialization and unload

2013-08-13 Thread Xenia Ragiadakou
in xhci_mem_init(), since val is already declared as unsigned int. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-mem.c | 110 ++ drivers/usb/host/xhci-trace.h | 5 ++ drivers/usb/host/xhci.c | 66

[RFC 1/2] xhci: remove unused argument from xhci_giveback_urb_in_irq()

2013-08-16 Thread Xenia Ragiadakou
This patch removes the adjective argument from xhci_giveback_urb_in_irq(), since it is not used in the function anymore. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb

[RFC 2/2] xhci: refactor handle_cmd_completion() switch into separate function

2013-08-16 Thread Xenia Ragiadakou
and drop_flags, mainly to reduce line length and code dublication. Also, the variable ep_ring, that was assigned in the case TRB_CONFIG_EP but never used, was removed. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 158

[RFC v2 2/2] xhci: refactor handle_cmd_completion() switch branches into functions

2013-08-22 Thread Xenia Ragiadakou
to reduce code dublication and line length. - The variable ep_ring, that was assigned in the case TRB_CONFIG_EP but never used, was removed. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from version 1: Create separate functions for each switch case branch, instead

[RFC] xhci: add trace for missed periodic transfers

2013-08-22 Thread Xenia Ragiadakou
further data, for IN endpoints, or because the endpoint's ring is empty, for OUT endpoints, or due to xHC internal buffers' overrun or underrun caused by excessive latency on the transfer path. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 19

[RFC v2 1/2] xhci: remove unused argument from xhci_giveback_urb_in_irq()

2013-08-22 Thread Xenia Ragiadakou
This patch removes the adjective argument from xhci_giveback_urb_in_irq(), since it is not used in the function anymore. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb

Re: 3.10.4: kmemleak in usb_get_bos_descriptor()?

2013-08-23 Thread Xenia Ragiadakou
On 08/14/2013 08:24 AM, Sarah Sharp wrote: On Fri, Aug 09, 2013 at 05:14:48PM -0400, Alan Stern wrote: On Fri, 9 Aug 2013, Greg KH wrote: On Thu, Aug 08, 2013 at 10:07:19PM +0200, Martin MOKREJŠ wrote: Hi, I get plenty of these in /sys/kernel/debug/kmemleak: unreferenced object

[RFC v3 18/18] xhci: add trace for missed periodic transfers

2013-08-23 Thread Xenia Ragiadakou
further data, for IN endpoints, or because the endpoint's ring is empty, for OUT endpoints, or due to xHC internal buffers' overrun or underrun caused by excessive latency on the transfer path. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 19

[RFC v3 06/18] xhci: refactor TRB_RESET_DEV case into function

2013-08-23 Thread Xenia Ragiadakou
, which is available, there is no need to determine it again. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c

[RFC v3 02/18] xhci: rename existing functions

2013-08-23 Thread Xenia Ragiadakou
This patch renames the function handlers of a triggered Command Completion Event that correspond to each command type into 'xhci_handle_cmd_type'. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 18 -- 1 file changed, 8 insertions(+), 10

[RFC v3 08/18] xhci: refactor TRB_EVAL_CONTEXT case into function

2013-08-23 Thread Xenia Ragiadakou
This patch refactors the code in TRB_EVAL_CONTEXT switch case in handle_cmd_completion() into a fuction named xhci_handle_cmd_eval_ctx(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions

[RFC v3 04/18] xhci: refactor TRB_DISABLE_SLOT case into function

2013-08-23 Thread Xenia Ragiadakou
This patch refactors the code in TRB_DISABLE_SLOT switch case in handle_cmd_completion() into a fuction named xhci_handle_cmd_disable_slot(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 21 ++--- 1 file changed, 14 insertions(+), 7

[RFC v3 11/18] xhci: add variable 'cmd_comp_code' in handle_cmd_completion()

2013-08-23 Thread Xenia Ragiadakou
This patch adds a new variable 'cmd_comp_code' to hold the command completion status code aiming to reduce code duplication and to improve code readability. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 20 1 file changed, 8

[RFC v3 10/18] xhci: refactor TRB_CONFIG_EP case into function

2013-08-23 Thread Xenia Ragiadakou
-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 112 +++ 1 file changed, 60 insertions(+), 52 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index b96..7103bd9 100644 --- a/drivers/usb/host

[RFC v3 05/18] xhci: refactor TRB_ADDR_DEV case into function

2013-08-23 Thread Xenia Ragiadakou
This patch refactors the code in TRB_ADDR_DEV switch case in handle_cmd_completion() into a fuction named xhci_handle_cmd_addr_dev(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff

[RFC v3 14/18] xhci: replace 'xhci-cmd_ring-dequeue' with 'trb' in stop_ep cmd handler

2013-08-23 Thread Xenia Ragiadakou
This patch replaces 'xhci-cmd_ring-dequeue' with 'trb', the address of the command TRB, since it is available to reduce line length. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[RFC v3 15/18] xhci: add argument 'slot_id' in stop_ep, set_deq and reset_ep cmd handlers

2013-08-23 Thread Xenia Ragiadakou
calculation in each of them. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 7a58095..405db44 100644 --- a/drivers

[RFC v3 13/18] xhci: add variable 'cmd_type' in handle_cmd_completion()

2013-08-23 Thread Xenia Ragiadakou
This patch adds a new variable 'cmd_type' to hold the command type so that switch cases can be simplified by removing TRB_TYPE() macro. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 27 ++- 1 file changed, 14 insertions(+), 13

[RFC v3 12/18] xhci: add variable 'cmd_trb' in handle_cmd_completion()

2013-08-23 Thread Xenia Ragiadakou
This patch adds a new variable 'cmd_trb' to hold the address of the command TRB, that is associated with the command completion event, and to replace repetitions of xhci-cmd_ring-dequeue into the code. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 15

[RFC v3 09/18] xhci: remove unused 'ep_ring' variable in handle_cmd_completion()

2013-08-23 Thread Xenia Ragiadakou
This patch removes the variable 'ep_ring' that is assigned in TRB_CONFIG_EP switch case but never used. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci

[RFC v3 03/18] xhci: refactor TRB_ENABLE_SLOT case into function

2013-08-23 Thread Xenia Ragiadakou
This patch refactors the code in TRB_ENABLE_SLOT switch case in handle_cmd_completion() into a fuction named xhci_handle_cmd_enable_slot(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 17 - 1 file changed, 12 insertions(+), 5 deletions

[RFC v3 17/18] xhci: add label 'update_ring' in handle_cmd_completion()

2013-08-23 Thread Xenia Ragiadakou
This patch adds the label 'update_ring' for the common code path: inc_deq(xhci, xhci-cmd_ring); return; Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c

[RFC v3 01/18] xhci: remove unused argument from xhci_giveback_urb_in_irq()

2013-08-23 Thread Xenia Ragiadakou
This patch removes the adjective argument from xhci_giveback_urb_in_irq(), since it is not used in the function anymore. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from version 2: The original patchset was splitted into multiple 'single change' patches to help patch

Re: [RFC v3 17/18] xhci: add label 'update_ring' in handle_cmd_completion()

2013-08-23 Thread Xenia Ragiadakou
On 08/23/2013 04:19 PM, Sergei Shtylyov wrote: Hello. On 23-08-2013 12:15, Xenia Ragiadakou wrote: This patch adds the label 'update_ring' for the common code path: inc_deq(xhci, xhci-cmd_ring); return; Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci

Re: [RFC v3 03/18] xhci: refactor TRB_ENABLE_SLOT case into function

2013-08-24 Thread Xenia Ragiadakou
On 08/25/2013 12:48 AM, Oliver Neukum wrote: On Fri, 2013-08-23 at 11:15 +0300, Xenia Ragiadakou wrote: This patch refactors the code in TRB_ENABLE_SLOT switch case in handle_cmd_completion() into a fuction named xhci_handle_cmd_enable_slot(). Hi, it would be nice, in fact probably

Re: 3.10.4: kmemleak in usb_get_bos_descriptor()?

2013-08-26 Thread Xenia Ragiadakou
On 08/23/2013 05:07 PM, Alan Stern wrote: On Fri, 23 Aug 2013, Xenia Ragiadakou wrote: Martin is right; the BOS descriptors are leaked in usb_reset_and_verify_device(). We need to store the old descriptor, compare it with the new one following the reset, and delete one of them afterward. I

[RFC] usbcore: compare and release one bos descriptor in usb_reset_and_verify_device()

2013-08-26 Thread Xenia Ragiadakou
. In the original code, none of the two descriptors was deallocated leading to memory leaks. This patch compares the old bos descriptor with the new one to detect change in firmware and releases the newly allocated bos descriptor to prevent memory leak. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com

[RFC v2] usbcore: compare and release one bos descriptor in usb_reset_and_verify_device()

2013-08-26 Thread Xenia Ragiadakou
. In the original code, none of the two descriptors was deallocated leading to memory leaks. This patch compares the old bos descriptor with the new one to detect change in firmware and releases the newly allocated bos descriptor to prevent memory leak. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com

[RFC 1/4] xhci: replace USB_MAXINTERFACES with config-desc.bNumInterface

2013-08-26 Thread Xenia Ragiadakou
interfaces while USB_MAXINTERFACES is 32. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index ba0ec0a..787076e 100644 --- a/drivers/usb/host

[RFC 4/4] xhci: remove conversion from generic to pci device in xhci_mem.c

2013-08-26 Thread Xenia Ragiadakou
This patch removes the to_pci_dev() conversion performed to generic struct device since it is not actually useful (the pointer to the generic device can be used directly rather through a conversion to pci_dev) and it is pci bus specific. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com

[RFC 3/4] xhci: remove unnecessary check in xhci_free_stream_info()

2013-08-26 Thread Xenia Ragiadakou
This patch removes the unneccessary check 'if (stream_info)' because there is already a check few lines above which ensures that stream_info is not NULL. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-mem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH 1/4] ehci: remove ehci_vdbg() verbose debugging statements

2013-08-29 Thread Xenia Ragiadakou
This patch removes ehci_vdbg debugging statements from EHCI host controller driver because they produce too much information, lowering the signal to noise ratio when debugging, and because they are not used anymore. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/ehci

[PATCH 4/4] ehci: enable debugging code when CONFIG_DYNAMIC_DEBUG is set

2013-08-29 Thread Xenia Ragiadakou
The debugging code for ehci is enabled to run if the DEBUG flag is defined. This patch enables the debugging code also when the kernel is configured with dynamic debugging on. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/ehci-dbg.c | 8 drivers/usb/host

[PATCH 3/4] ehci: remove duplicate debug_async_open() prototype in ehci-dbg.c

2013-08-29 Thread Xenia Ragiadakou
This patch removes the duplicate of debug_async_open() prototype following three lines below the debug_async_open() declaration. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/ehci-dbg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/host/ehci-dbg.c b

[PATCH 2/4] ehci: remove debugging statement with ehci statistics in ehci_stop()

2013-08-29 Thread Xenia Ragiadakou
This patch removes the ehci statictics information output in ehci_stop() because they do not provide interesting info. At any case, the current statistics can be viewed by reading the 'registers' file in debugfs. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/ehci

Re: [RFC v2] usbcore: compare and release one bos descriptor in usb_reset_and_verify_device()

2013-08-29 Thread Xenia Ragiadakou
On 08/29/2013 02:21 PM, Martin MOKREJŠ wrote: Hi Xenia, thank you for the patch. I tried to reproduce the error with patched 3.10.9 kernel but it seems the kmemleak is indeed gone. Provided I get only these lines logged which used to be followed by kmemleak findings I believe the original

Re: Include parent hub number in current warning message Parent hub missing LPM exit latency info

2013-08-29 Thread Xenia Ragiadakou
On 08/29/2013 04:31 PM, Martin MOKREJŠ wrote: Actually, there is some new bug I haven't seen before (this is 3.10.9 kernel). First of all, I see my TI XHCI controller does not use MSI-X anymore, will have to check my .config why is it so. Second, it should have IRQ 45 and 46 according to dmesg.

Re: [PATCH] usbcore: compare and release one bos descriptor in usb_reset_and_verify_device()

2013-08-29 Thread Xenia Ragiadakou
On 08/29/2013 08:53 PM, Greg KH wrote: On Thu, Aug 29, 2013 at 08:37:57PM +0300, Xenia Ragiadakou wrote: In usb_reset_and_verify_device(), hub_port_init() allocates a new bos descriptor to hold the value read by the device. The new bos descriptor has to be compared with the old one in order

[PATCH v2] usbcore: compare and release one bos descriptor in usb_reset_and_verify_device()

2013-08-29 Thread Xenia Ragiadakou
. In the original code, none of the two descriptors was deallocated leading to memory leaks. This patch compares the old bos descriptor with the new one to detect change in firmware and releases the newly allocated bos descriptor to prevent memory leak. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com

Re: Include parent hub number in current warning message Parent hub missing LPM exit latency info

2013-08-29 Thread Xenia Ragiadakou
On 08/29/2013 11:32 PM, Alan Stern wrote: On Thu, 29 Aug 2013, Martin MOKREJŠ wrote: [snip] I understand your point but don't think this is the case. OK, please show me why is LPM not available. If USB is complaining about that being disabled it could tell me based on what attribute at least.

Re: Include parent hub number in current warning message Parent hub missing LPM exit latency info

2013-08-30 Thread Xenia Ragiadakou
On 08/29/2013 04:31 PM, Martin MOKREJŠ wrote: Actually, there is some new bug I haven't seen before (this is 3.10.9 kernel). First of all, I see my TI XHCI controller does not use MSI-X anymore, will have to check my .config why is it so. Why are you saying that xhci does not use MSI-X? Can

Re: [PATCH v3] usbcore: compare and release one bos descriptor in usb_reset_and_verify_device()

2013-08-30 Thread Xenia Ragiadakou
On 08/31/2013 04:25 AM, Greg KH wrote: On Sat, Aug 31, 2013 at 04:20:09AM +0300, Xenia Ragiadakou wrote: In usb_reset_and_verify_device(), hub_port_init() allocates a new bos descriptor to hold the value read by the device. The new bos descriptor has to be compared with the old one in order

Re: [PATCH v3] usbcore: compare and release one bos descriptor in usb_reset_and_verify_device()

2013-08-31 Thread Xenia Ragiadakou
On 08/31/2013 07:52 AM, Greg KH wrote: On Sat, Aug 31, 2013 at 04:52:47AM +0300, Xenia Ragiadakou wrote: On 08/31/2013 04:25 AM, Greg KH wrote: On Sat, Aug 31, 2013 at 04:20:09AM +0300, Xenia Ragiadakou wrote: In usb_reset_and_verify_device(), hub_port_init() allocates a new bos descriptor

[PATCH 1/3] usbcore: set lpm_capable field for LPM capable root hubs

2013-08-31 Thread Xenia Ragiadakou
This patch sets the lpm_capable field for root hubs with LPM capabilities. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Reported-by: Martin MOKREJS mmokr...@gmail.com Suggested-by: Alan Stern st...@rowland.harvard.edu --- drivers/usb/core/hcd.c | 1 + drivers/usb/core/hub.c | 7

[PATCH 3/3] usbcore: fix read of usbdevfs_ctrltransfer fields in proc_control()

2013-08-31 Thread Xenia Ragiadakou
Urb fields are stored in struct usbdevfs_ctrltransfer in CPU byteorder and not in little endian, so there is no need to be converted. This bug was reported by sparse. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/core/devio.c | 6 ++ 1 file changed, 2 insertions(+), 4

[PATCH 2/3] usbcore: fix incorrect type in assignment in usb_set_lpm_parameters()

2013-08-31 Thread Xenia Ragiadakou
the assignmenment to [udev/hub]_u2_del variables. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Reported-by: kbuild test robot fengguang...@intel.com --- drivers/usb/core/hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core

Re: [PATCH 1/3] usbcore: set lpm_capable field for LPM capable root hubs

2013-09-01 Thread Xenia Ragiadakou
On 09/01/2013 06:04 AM, Greg KH wrote: On Sun, Sep 01, 2013 at 02:56:42AM +0200, Martin MOKREJŠ wrote: Martin MOKREJŠ wrote: Hi Xenia, I tried these 3 patches and ... I will rather leave it up to you to decide if everything went right. Attached is a diff of dmesg from unpatched and patched

[PATCH] usbcore: add check on usb device's state before trying to disable lpm

2013-09-01 Thread Xenia Ragiadakou
usb_submit_urb() will fail). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/core/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index fe8d95d..a6c10f0 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core

[PATCH v2] usbcore: add check on usb device's state before trying to disable lpm

2013-09-01 Thread Xenia Ragiadakou
usb_submit_urb() will fail). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Reported-by: Martin MOKREJS mmokr...@gmail.com --- drivers/usb/core/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index fe8d95d..a6c10f0 100644

[RFC v4 13/19] xhci: add variable 'cmd_trb' in handle_cmd_completion()

2013-09-03 Thread Xenia Ragiadakou
This patch adds a new variable 'cmd_trb' to hold the address of the command TRB, that is associated with the command completion event, and to replace repetitions of xhci-cmd_ring-dequeue into the code. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Acked-by: Sarah Sharp sarah.a.sh

[RFC v4 11/19] xhci: refactor TRB_CONFIG_EP case into function

2013-09-03 Thread Xenia Ragiadakou
xhci_handle_cmd_config_ep(). There were added two additional variables, 'add_flags' and 'drop_flags', to reduce line length below 80 chars and improve code readability. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v3: -add reason for new function creation in change log

[RFC v4 18/19] xhci: add label 'update_ring' in handle_cmd_completion()

2013-09-03 Thread Xenia Ragiadakou
This patch adds the label 'update_ring' for the common code path: inc_deq(xhci, xhci-cmd_ring); return; Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v3: remove return statement drivers/usb/host/xhci-ring.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

[RFC v4 04/19] xhci: refactor TRB_DISABLE_SLOT case into function

2013-09-03 Thread Xenia Ragiadakou
xhci_handle_cmd_disable_slot(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v3: add reason for new function creation in change log drivers/usb/host/xhci-ring.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host

[RFC v4 02/19] xhci: rename existing Command Completion Event handlers

2013-09-03 Thread Xenia Ragiadakou
to reference to them more easily. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Acked-by: Sarah Sharp sarah.a.sh...@linux.intel.com --- drivers/usb/host/xhci-ring.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb

[RFC v4 10/19] xhci: remove unused 'ep_ring' variable in handle_cmd_completion()

2013-09-03 Thread Xenia Ragiadakou
This patch removes the variable 'ep_ring' that is assigned in TRB_CONFIG_EP switch case but never used. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci

[RFC v4 16/19] xhci: add argument 'slot_id' in stop_ep, set_deq and reset_ep cmd handlers

2013-09-03 Thread Xenia Ragiadakou
calculation in each of them. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 485ce5c..9cb0f42 100644 --- a/drivers

[RFC v4 15/19] xhci: replace 'xhci-cmd_ring-dequeue' with 'trb' in stop_ep cmd handler

2013-09-03 Thread Xenia Ragiadakou
This patch replaces 'xhci-cmd_ring-dequeue' with 'trb', the address of the command TRB, since it is available to reduce line length. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Acked-by: Sarah Sharp sarah.a.sh...@linux.intel.com --- drivers/usb/host/xhci-ring.c | 6 ++ 1 file

[RFC v4 08/19] xhci: refactor TRB_NEC_GET_FW case into function

2013-09-03 Thread Xenia Ragiadakou
xhci_handle_cmd_nec_get_fw(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v3: add reason for new function creation in change log drivers/usb/host/xhci-ring.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/xhci

[RFC v4 07/19] xhci: refactor TRB_RESET_DEV case into function

2013-09-03 Thread Xenia Ragiadakou
xhci_handle_cmd_reset_dev(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v3: add reason for new function creation in change log drivers/usb/host/xhci-ring.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/xhci

[RFC v4 14/19] xhci: add variable 'cmd_type' in handle_cmd_completion()

2013-09-03 Thread Xenia Ragiadakou
This patch adds a new variable 'cmd_type' to hold the command type so that switch cases can be simplified by removing TRB_TYPE() macro improving code readability. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v3: update changelog to report the reason for such change

[RFC v4 09/19] xhci: refactor TRB_EVAL_CONTEXT case into function

2013-09-03 Thread Xenia Ragiadakou
xhci_handle_cmd_eval_ctx(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v3: add reason for new function creation in change log drivers/usb/host/xhci-ring.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci

[RFC v4 12/19] xhci: add variable 'cmd_comp_code' in handle_cmd_completion()

2013-09-03 Thread Xenia Ragiadakou
This patch adds a new variable 'cmd_comp_code' to hold the command completion status code aiming to reduce code duplication and to improve code readability. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Acked-by: Sarah Sharp sarah.a.sh...@linux.intel.com --- drivers/usb/host/xhci-ring.c

[RFC v4 17/19] xhci: replace 'event' with 'cmd_comp_code' in set_deq and reset_ep handlers

2013-09-03 Thread Xenia Ragiadakou
This patch replaces the 'event' argument of xhci_handle_cmd_set_deq() and xhci_handle_cmd_reset_ep(), which is used to retrieve the command completion status code, with the cmd_comp_code directly, since it is available. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Acked-by: Sarah Sharp

[RFC v4 01/19] xhci: remove unused argument from xhci_giveback_urb_in_irq()

2013-09-03 Thread Xenia Ragiadakou
This patch removes the adjective argument from xhci_giveback_urb_in_irq(), since it is not used in the function anymore. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Acked-by: Sarah Sharp sarah.a.sh...@linux.intel.com --- drivers/usb/host/xhci-ring.c | 8 1 file changed, 4

[RFC v4 03/19] xhci: refactor TRB_ENABLE_SLOT case into function

2013-09-03 Thread Xenia Ragiadakou
xhci_handle_cmd_enable_slot(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v3: add reason for new function creation in change log drivers/usb/host/xhci-ring.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci

[RFC v4 06/19] xhci: use completion event's slot id rather than dig it out of command

2013-09-03 Thread Xenia Ragiadakou
. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v3: -the above change is performed now in a separate patch -a warning is triggered in case the slot id reported in event trb is different from the slot id renoted in command trb drivers/usb/host/xhci-ring.c | 5 +++-- 1 file

[PATCH v3] usbcore: check usb device's state before sending a Set SEL control transfer

2013-09-04 Thread Xenia Ragiadakou
Set SEL control urbs cannot be sent to a device in unconfigured state. This patch adds a check in usb_req_set_sel() to ensure the usb device's state is USB_STATE_CONFIGURED. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Reported-by: Martin MOKREJS mmokr...@gmail.com Suggested-by: Sarah

Re: [PATCH v3] usbcore: check usb device's state before sending a Set SEL control transfer

2013-09-06 Thread Xenia Ragiadakou
On 09/04/2013 09:25 PM, Martin MOKREJŠ wrote: Hi Xenia, thank you. I tested this patch on 3.11 kernel and the messages don't appear anymore upon LPM-capable device disconnect (tested with ASMedia AS2105 devices). Not much to show here, there is just no error/warning related to LPM while

Re: [RFC v4 06/19] xhci: use completion event's slot id rather than dig it out of command

2013-09-09 Thread Xenia Ragiadakou
On 09/04/2013 08:39 AM, Xenia Ragiadakou wrote: Since the slot id retrieved from the command TRB matches the one in Slot ID field of the command completion event, which is available, there is no need to determine it again. This patch removes the uneccessary reassignment to slot id and adds

[RFC v5 02/19] xhci: rename existing Command Completion Event handlers

2013-09-09 Thread Xenia Ragiadakou
to reference to them more easily. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Acked-by: Sarah Sharp sarah.a.sh...@linux.intel.com --- drivers/usb/host/xhci-ring.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb

[RFC v5 13/19] xhci: add variable 'cmd_trb' in handle_cmd_completion()

2013-09-09 Thread Xenia Ragiadakou
This patch adds a new variable 'cmd_trb' to hold the address of the command TRB, that is associated with the command completion event, and to replace repetitions of xhci-cmd_ring-dequeue into the code. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Acked-by: Sarah Sharp sarah.a.sh

[RFC v5 10/19] xhci: remove unused 'ep_ring' variable in handle_cmd_completion()

2013-09-09 Thread Xenia Ragiadakou
This patch removes the variable 'ep_ring' that is assigned in TRB_CONFIG_EP switch case but never used. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- drivers/usb/host/xhci-ring.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci

[RFC v5 07/19] xhci: refactor TRB_RESET_DEV case into function

2013-09-09 Thread Xenia Ragiadakou
xhci_handle_cmd_reset_dev(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v3: add reason for new function creation in change log drivers/usb/host/xhci-ring.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/xhci

[RFC v5 19/19] xhci: add trace for missed periodic transfers

2013-09-09 Thread Xenia Ragiadakou
'xhci_dbg_missed_periodic_tx', to trace the debug statements related to missed periodic transfers. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v3: -make changelog more clear -add two additional tracepoints drivers/usb/host/xhci-ring.c | 26

[RFC v5 12/19] xhci: add variable 'cmd_comp_code' in handle_cmd_completion()

2013-09-09 Thread Xenia Ragiadakou
This patch adds a new variable 'cmd_comp_code' to hold the command completion status code aiming to reduce code duplication and to improve code readability. Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com Acked-by: Sarah Sharp sarah.a.sh...@linux.intel.com --- drivers/usb/host/xhci-ring.c

[RFC v5 04/19] xhci: refactor TRB_DISABLE_SLOT case into function

2013-09-09 Thread Xenia Ragiadakou
xhci_handle_cmd_disable_slot(). Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v3: add reason for new function creation in change log drivers/usb/host/xhci-ring.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host

[RFC v5 16/19] xhci: add argument 'slot_id' in stop_ep, set_deq and reset_ep cmd handlers

2013-09-09 Thread Xenia Ragiadakou
calculation in each of them. Also, a WARN_ON() was added in case the slot ids reported by command TRB and event TRB differ (although according to xhci spec rev1.0 that should not happen) Signed-off-by: Xenia Ragiadakou burzalod...@gmail.com --- Differences from v4: -add a WARN_ON() in case the two slot id

  1   2   >