Hi list,
Linux kernel (3.12.8) fails to setup EHCI debug port on my Sandy Bridge
server. This seems to be a normal thing as I tried on other machines and
got the same result.
This is the EHCI host controller information (printed by lspci -vvv)
00:1a.0 USB controller: Intel Corporation C600/X
[0.00] ehci_setup failed
[0.00] Malformed early option 'kgdbdbgp'
... ...
It fails in dbgp_ehci_startup().
Thanks,
Allen
On 2/19/2014 1:01 AM, Felipe Balbi wrote:
On Tue, Feb 18, 2014 at 09:01:29AM -0800, Greg KH wrote:
On Tue, Feb 18, 2014 at 02:46:00PM +0800, Lu, Baolu wrote
Hi,
On 05/13/2016 07:17 PM, Mark Brown wrote:
> On Thu, May 05, 2016 at 01:32:57PM +0800, Lu Baolu wrote:
>
>> +gpiod = gpiod_get(dev, "gpio", GPIOD_ASIS);
>> +if (IS_ERR(gpiod))
>> +return ERR_PTR(-ENODEV);
>> +config->
faces.
struct portmux_dev *portmux_register(struct portmux_desc *desc);
void portmux_unregister(struct portmux_dev *pdev);
I will add below ones.
struct portmux_dev *portmux_lookup_by_name(char *name);
int portmux_switch(struct portmux_dev *pdev, enum port_role);
The normal usage mode is
1) the mux device is registered as soon as a mux is detected with
portmux_register();
2) In components like USB PHY or changer drivers, the mux could
be retrieved with portmux_lookup_by_name() and controlled via
portmux_switch().
Is this helpful?
Best regards,
Lu Baolu
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
x could
>> > be retrieved with portmux_lookup_by_name() and controlled via
>> > portmux_switch().
>> >
>> > Is this helpful?
> It works for me, and we can improve it later if needed.
Okay, thanks.
Best regards,
Lu Baolu
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
mux could be found in Cherry Trail and
Broxton devices.
All patches have been verified to work on Intel's BayTrail,
CherryTrail, and Broxton P platforms.
Lu Baolu (7):
regulator: fixed: add support for ACPI interface
usb: mux: add generic code for dual role port mux
usb: mux: add d
users are able
to control the port role from user space.
Some other archs (e.g. Renesas R-Car gen2 SoCs) need an external mux to
swap usb roles as well. This code could also be leveraged for those archs.
Signed-off-by: Lu Baolu
Reviewed-by: Heikki Krogerus
Reviewed-by: Felipe Balbi
owner per platform_no_drv_owner.cocci]
Suggested-by: David Cohen
Signed-off-by: Lu Baolu
Reviewed-by: Felipe Balbi
Acked-by: Lee Jones
---
drivers/mfd/Kconfig| 8 +
drivers/mfd/Makefile | 1 +
drivers/mfd/intel-vuport.c | 86 ++
3
mux switch.
Signed-off-by: Lu Baolu
Reviewed-by: Felipe Balbi
---
drivers/usb/host/pci-quirks.c| 42 +++-
drivers/usb/host/xhci-ext-caps.h | 2 ++
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb
Add a maintainer entry for Intel USB dual role mux drivers and
add myself as a maintainer.
Signed-off-by: Lu Baolu
---
MAINTAINERS | 10 ++
1 file changed, 10 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index ed1229e..edaeebe 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
Several Intel PCHs and SOCs have an internal mux that is used to
share one USB port between device controller and host controller.
The mux is handled through the Dual Role Configuration Register.
Signed-off-by: Heikki Krogerus
Signed-off-by: Lu Baolu
Signed-off-by: Wu Hao
Reviewed-by: Felipe
Chanwoo Choi]
Signed-off-by: David Cohen
Signed-off-by: Lu Baolu
Reviewed-by: Heikki Krogerus
Reviewed-by: Felipe Balbi
Reviewed-by: Chanwoo Choi
---
drivers/usb/mux/Kconfig | 13 +++
drivers/usb/mux/Makefile | 1 +
drivers/usb/mux/portmux-intel-gpio.c | 183
Add support to retrieve fixed voltage configure information through
ACPI interface. This is needed for Intel Bay Trail devices, where a
GPIO is used to control the USB vbus.
Signed-off-by: Lu Baolu
---
drivers/regulator/fixed.c | 46 ++
1 file changed
Hi Heikki,
On 05/30/2016 04:16 PM, Heikki Krogerus wrote:
> Hi Baolu,
>
> On Mon, May 30, 2016 at 01:51:44PM +0800, Lu Baolu wrote:
>> Add a maintainer entry for Intel USB dual role mux drivers and
>> add myself as a maintainer.
>>
>> Signed-off-by: Lu B
Hi,
On 05/30/2016 08:53 PM, Lu Baolu wrote:
> Hi Heikki,
>
> On 05/30/2016 04:16 PM, Heikki Krogerus wrote:
>> Hi Baolu,
>>
>> On Mon, May 30, 2016 at 01:51:44PM +0800, Lu Baolu wrote:
>>> Add a maintainer entry for Intel USB dual role mux driver
Several Intel PCHs and SOCs have an internal mux that is used to
share one USB port between device controller and host controller.
The mux is handled through the Dual Role Configuration Register.
Signed-off-by: Heikki Krogerus
Signed-off-by: Lu Baolu
Signed-off-by: Wu Hao
Reviewed-by: Felipe
Add a maintainer entry for Intel USB dual role mux drivers and
add myself as a maintainer.
Signed-off-by: Lu Baolu
---
MAINTAINERS | 10 ++
1 file changed, 10 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 7304d2e..56a98d2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
mux switch.
Signed-off-by: Lu Baolu
Reviewed-by: Felipe Balbi
---
drivers/usb/host/pci-quirks.c| 42 +++-
drivers/usb/host/xhci-ext-caps.h | 2 ++
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb
owner per platform_no_drv_owner.cocci]
Suggested-by: David Cohen
Signed-off-by: Lu Baolu
Reviewed-by: Felipe Balbi
Acked-by: Lee Jones
---
drivers/mfd/Kconfig| 8 +
drivers/mfd/Makefile | 1 +
drivers/mfd/intel-vuport.c | 86 ++
3
users are able
to control the port role from user space.
Some other archs (e.g. Renesas R-Car gen2 SoCs) need an external mux to
swap usb roles as well. This code could also be leveraged for those archs.
Signed-off-by: Lu Baolu
Reviewed-by: Heikki Krogerus
Reviewed-by: Felipe Balbi
mux could be found in Cherry Trail and
Broxton devices.
All patches have been verified on Intel's BayTrail, CherryTrail,
and Broxton P platforms.
Lu Baolu (7):
regulator: fixed: add support for ACPI interface
usb: mux: add generic code for dual role port mux
usb: mux: add drive
Chanwoo Choi]
Signed-off-by: David Cohen
Signed-off-by: Lu Baolu
Reviewed-by: Heikki Krogerus
Reviewed-by: Felipe Balbi
Reviewed-by: Chanwoo Choi
---
drivers/usb/mux/Kconfig | 13 +++
drivers/usb/mux/Makefile | 1 +
drivers/usb/mux/portmux-intel-gpio.c | 183
Add support to retrieve fixed voltage configure information through
ACPI interface. This is needed for Intel Bay Trail devices, where a
GPIO is used to control the USB vbus.
Signed-off-by: Lu Baolu
---
drivers/regulator/fixed.c | 46 ++
1 file changed
Hi Peter,
On 06/03/2016 03:41 PM, Peter Chen wrote:
> On Thu, Jun 02, 2016 at 09:37:24AM +0800, Lu Baolu wrote:
>> > Several Intel platforms implement USB dual role by having completely
>> > separate xHCI and dwc3 IPs in PCH or SOC silicons. These two IPs share
>> &g
Hi Peter,
On 06/04/2016 10:28 AM, Peter Chen wrote:
> On Sat, Jun 04, 2016 at 12:06:06AM +0800, Lu Baolu wrote:
>>> from my point,it is a dual-role switch
>>> driver too,
>> No, it's not a dual-role switch driver, but a driver for USB port
>> multiplexing.
equirement, we
> should improve it, Roger also provide an example of dual role switch with
> USB3 based on his OTG core.
Why do we need an OTG framework to support a device driver?
Is it something like a bus or class driver?
Best regards,
Lu Baolu
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Jun,
On 06/06/2016 09:08 AM, Jun Li wrote:
>
>> -Original Message-
>> From: Lu Baolu [mailto:baolu...@linux.intel.com]
>> Sent: Sunday, June 05, 2016 4:47 PM
>> To: Jun Li ; Peter Chen
>> Cc: felipe.ba...@linux.intel.com; Mathias Nyman ;
>> Gre
Hi Peter,
On 06/06/2016 10:05 AM, Peter Chen wrote:
> On Sun, Jun 05, 2016 at 04:46:55PM +0800, Lu Baolu wrote:
>> Hi,
>>
>> On 06/05/2016 04:33 PM, Jun Li wrote:
>>>> Port mux is part of dual role switch, but not the whole thing.
>>>>> Dual role sw
Hi Peter,
On 06/06/2016 09:25 AM, Peter Chen wrote:
> On Sun, Jun 05, 2016 at 02:55:56PM +0800, Lu Baolu wrote:
>> Hi Peter,
>>
>> On 06/04/2016 10:28 AM, Peter Chen wrote:
>>> On Sat, Jun 04, 2016 at 12:06:06AM +0800, Lu Baolu wrote:
>>>>> from my po
ocumentation/ABI/testing/sysfs-bus-platform.
>
> I agree with Roger that the dual-role switch part in your code is better
> to use OTG framework to reduce redundancy.
I agree that we should use dual-role framework for role switch. Actually,
my code doesn't do this work. It only adds a generic framework for port
mux device and two mux device drivers used in Intel platform.
Best regards,
Lu Baolu
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
t we have concern, do dual role switch through
> OTG/dual-role core, not do it by itself.
That really depends on how do you define "dual role". Can you please
provide an unambiguous definition of "dual role" used in OTG/dual-role
framework?
Best regards,
Lu Baolu
>
>
OTG/dual-role code, my understanding is that "dual-role" is a
"reduced OTG" which is for DRD devices lacking of some OTG negotiation
protocols.
We really can't say "it's the scope of OTG/dual-role" whenever it comes to
"host and peripheral".
Best regards,
Lu Baolu
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
t run an unnecessary OTG state machine, even thought it
has nothing to do with my system, only because the two sides of my port
mux device is a host and peripheral controller.
Why?
Best regards,
Lu Baolu
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Greg,
On 06/08/2016 12:45 PM, Greg Kroah-Hartman wrote:
> On Thu, Jun 02, 2016 at 09:37:28AM +0800, Lu Baolu wrote:
>> In some Intel platforms, a single usb port is shared between USB host
>> and device controllers. The shared port is under control of a switch
>> which is
Hi Greg,
On 06/08/2016 11:45 PM, Greg Kroah-Hartman wrote:
> On Wed, Jun 08, 2016 at 03:56:04PM +0800, Lu Baolu wrote:
>> Hi Greg,
>>
>> On 06/08/2016 12:45 PM, Greg Kroah-Hartman wrote:
>>> On Thu, Jun 02, 2016 at 09:37:28AM +0800, Lu Baolu wrote:
>>>>
Hi Felipe and Heikki,
On 06/08/2016 12:42 PM, Greg Kroah-Hartman wrote:
> On Thu, Jun 02, 2016 at 09:37:23AM +0800, Lu Baolu wrote:
>> Add support to retrieve fixed voltage configure information through
>> ACPI interface. This is needed for Intel Bay Trail devices, where a
>
Hi Greg,
On 06/09/2016 10:39 AM, Lu Baolu wrote:
> Hi Greg,
>
> On 06/08/2016 11:45 PM, Greg Kroah-Hartman wrote:
>> On Wed, Jun 08, 2016 at 03:56:04PM +0800, Lu Baolu wrote:
>>> Hi Greg,
>>>
>>> On 06/08/2016 12:45 PM, Greg Kroah-Hartman wrote:
>>
Hi Greg,
On 06/18/2016 08:58 AM, Greg Kroah-Hartman wrote:
> On Thu, Jun 16, 2016 at 08:27:41AM +0800, Lu Baolu wrote:
>> Hi Greg,
>>
>> On 06/09/2016 10:39 AM, Lu Baolu wrote:
>>> Hi Greg,
>>>
>>> On 06/08/2016 11:45 PM, Greg Kroah-Hartman wrote:
&
Hi,
On 07/07/2016 05:53 AM, Joseph Salisbury wrote:
> BugLink: http://bugs.launchpad.net/bugs/1498667
>
> As reported in BugLink, this device has an issue with Linux Power Management
> so
s/"Linux Power Management"/"USB Link Power Management"
Best regards,
L
river? Is your usb device self powered?
Best regards,
Lu Baolu
>
> Signed-off-by: Pengcheng Li
> ---
> drivers/usb/core/hub.c | 6 +-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index bee1351..cd71bb
Hi,
On 07/12/2016 09:48 AM, Lipengcheng wrote:
> Hi,
>
>> -Original Message-----
>> From: Lu Baolu [mailto:baolu...@linux.intel.com]
>> Sent: Tuesday, July 12, 2016 8:42 AM
>> To: Lipengcheng; gre...@linuxfoundation.org; st...@rowland.harvard.edu;
>>
struct usb_charger_current *values);
> +extern int usb_charger_get_current(struct usb_charger *uchger,
> +unsigned int *min, unsigned int *max);
> +
> +extern int usb_charger_set_cur_limit_by_type(struct usb_charger *uchger,
> + enum usb_charger_type type,
> + unsigned int cur_limit);
> +extern int usb_charger_set_cur_limit_by_gadget(struct usb_gadget *gadget,
> +unsigned int cur_limit);
> +
> +extern int usb_charger_plug_by_gadget(struct usb_gadget *gadget,
> + unsigned long state);
> +extern enum usb_charger_type usb_charger_get_type(struct usb_charger
> *uchger);
> +extern int usb_charger_detect_type(struct usb_charger *uchger);
> +extern enum usb_charger_state usb_charger_get_state(struct usb_charger
> *uchger);
> +
> +extern int usb_charger_init(struct usb_gadget *ugadget);
> +extern int usb_charger_exit(struct usb_gadget *ugadget);
You don't need to put "extern" here.
Please use "scripts/checkpatch.pl --strict" to check this.
> +#else
> +static inline struct usb_charger *usb_charger_find_by_name(const char *name)
> +{
> + return ERR_PTR(-ENODEV);
> +}
> +
> +static inline int usb_charger_register_notify(struct usb_charger *uchger,
> + struct notifier_block *nb)
> +{
> + return 0;
> +}
> +
> +static inline int usb_charger_unregister_notify(struct usb_charger *uchger,
> + struct notifier_block *nb)
> +{
> + return 0;
> +}
> +
> +static inline int usb_charger_set_current(struct usb_charger *uchger,
> + struct usb_charger_current *values)
> +{
> + return 0;
> +}
> +
> +static inline int usb_charger_get_current(struct usb_charger *uchger,
> + unsigned int *min, unsigned int *max)
> +{
> + return 0;
> +}
> +
> +static inline int
> +usb_charger_set_cur_limit_by_type(struct usb_charger *uchger,
> + enum usb_charger_type type,
> + unsigned int cur_limit)
> +{
> + return 0;
> +}
> +
> +static inline int
> +usb_charger_set_cur_limit_by_gadget(struct usb_gadget *gadget,
> + unsigned int cur_limit)
> +{
> + return 0;
> +}
> +
> +static inline enum usb_charger_type
> +usb_charger_get_type(struct usb_charger *uchger)
> +{
> + return UNKNOWN_TYPE;
> +}
> +
> +static inline enum usb_charger_state
> +usb_charger_get_state(struct usb_charger *uchger)
> +{
> + return USB_CHARGER_REMOVE;
> +}
> +
> +static inline int usb_charger_detect_type(struct usb_charger *uchger)
> +{
> + return 0;
> +}
> +
> +static inline int usb_charger_plug_by_gadget(struct usb_gadget *gadget,
> + unsigned long state)
> +{
> + return 0;
> +}
> +
> +static inline int usb_charger_init(struct usb_gadget *ugadget)
> +{
> + return 0;
> +}
> +
> +static inline int usb_charger_exit(struct usb_gadget *ugadget)
> +{
> + return 0;
> +}
> +#endif
> +
> +#endif /* __LINUX_USB_CHARGER_H__ */
> diff --git a/include/uapi/linux/usb/charger.h
> b/include/uapi/linux/usb/charger.h
> new file mode 100644
> index 000..3c56ec4
> --- /dev/null
> +++ b/include/uapi/linux/usb/charger.h
> @@ -0,0 +1,31 @@
> +/*
> + * This file defines the USB charger type and state that are needed for
> + * USB device APIs.
> + */
> +
> +#ifndef _UAPI__LINUX_USB_CHARGER_H
> +#define _UAPI__LINUX_USB_CHARGER_H
> +
> +/*
> + * USB charger type:
> + * SDP (Standard Downstream Port)
> + * DCP (Dedicated Charging Port)
> + * CDP (Charging Downstream Port)
> + * ACA (Accessory Charger Adapters)
> + */
> +enum usb_charger_type {
> + UNKNOWN_TYPE,
> + SDP_TYPE,
> + DCP_TYPE,
> + CDP_TYPE,
> + ACA_TYPE,
> +};
> +
> +/* USB charger state */
> +enum usb_charger_state {
> + USB_CHARGER_DEFAULT,
> + USB_CHARGER_PRESENT,
> + USB_CHARGER_REMOVE,
> +};
> +
> +#endif /* _UAPI__LINUX_USB_CHARGER_H */
Best regards,
Lu Baolu
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
/*
> + * usb_charger_unregister() - Unregister a usb charger.
> + * @uchger - the usb charger to be unregistered.
> + */
> +static int usb_charger_unregister(struct usb_charger *uchger)
> +{
> + ida_simple_remove(&usb_charger_ida, uchger->id);
> + sysfs_remove_
the memory
>> > in usb_charger_init(). Isn't usb_charger_exit() a better place?
> The usb_charger_exit() will issue usb_charger_unregister() and we need
> use the usb_charger structure in usb_charger_unregister() to
> unregister the usb charger.
>
This seems not to be a
Member @mem in struct dwc3 is not used in any places. Clean up it.
Signed-off-by: Lu Baolu
---
drivers/usb/dwc3/core.c | 1 -
drivers/usb/dwc3/core.h | 3 ---
2 files changed, 4 deletions(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 7287a76..3dc535a 100644
--- a
This patch add dbc debug device support in usb_debug driver.
Signed-off-by: Lu Baolu
Acked-by: Johan Hovold
---
drivers/usb/serial/usb_debug.c | 28 +---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial
ocks.
This requires to delay setting up debugging hardware and
registering boot console until the memblocks are filled.
Cc: Ingo Molnar
Cc: x...@kernel.org
Signed-off-by: Lu Baolu
---
Documentation/kernel-parameters.txt | 1 +
arch/x86/kernel/early_printk.c | 5 +
arch/x86/kern
c.c
new file mode 100644
index 000..939fff2
--- /dev/null
+++ b/drivers/usb/early/xhci-dbc.c
@@ -0,0 +1,1097 @@
+/**
+ * xhci-dbc.c - xHCI debug capability early driver
+ *
+ * Copyright (C) 2016 Intel Corporation
+ *
+ * Author: Lu Baolu
+ *
+ * This program is free software; you can redistr
Add Documentation/usb/usb3-debug-port.txt. This document includes
the user guide for USB3 debug port.
Cc: linux-...@vger.kernel.org
Signed-off-by: Lu Baolu
---
Documentation/usb/usb3-debug-port.txt | 87 +++
1 file changed, 87 insertions(+)
create mode 100644
1->v2:
- Refactor the duplicate code in xdbc_early_start() and
xdbc_handle_external_reset().
- Free resources when hardware not used any more.
- Refine the user guide document.
Lu Baolu (4):
usb: dbc: early driver for xhci debug capability
x86: add support for earlyprintk via USB3 de
xhci_handle_event(). Otherwise, those errors are just
ignored silently.
This patch cleans up this by replacing the setting of error_bitmask
with the kernel print functions, so that users can easily check and
report the errors happened in xhci_handle_event().
Signed-off-by: Lu Baolu
---
drivers/usb
Hi,
On 10/19/2016 02:52 PM, Mathias Nyman wrote:
> Hi
>
> On 19.10.2016 03:53, Lu Baolu wrote:
>> In xhci_handle_event(), when errors are detected, driver always sets
>> a bit in error_bitmask (one member of the xhci private driver data).
>> That means users have to re
Hi Jani,
On 10/19/2016 03:48 PM, Jani Nikula wrote:
> On Wed, 19 Oct 2016, Lu Baolu wrote:
>> Add Documentation/usb/usb3-debug-port.txt. This document includes
>> the user guide for USB3 debug port.
> If you're adding completely new files, please at least con
Hi Peter,
Thanks for your comments.
On 10/19/2016 09:09 PM, Peter Zijlstra wrote:
> On Wed, Oct 19, 2016 at 08:18:22AM +0800, Lu Baolu wrote:
>> +++ b/drivers/usb/early/xhci-dbc.c
>> +static int xdbc_bulk_write(const char *bytes, int size)
>> +{
>> +unsigned
looks like it should mostly work.
>
Thank you again.
Your comments make sense to me. I will remove the lock and work
queue usages in the new version.
Best regards,
Lu Baolu
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@
Hi,
On 10/20/2016 04:30 PM, Jani Nikula wrote:
> On Thu, 20 Oct 2016, Lu Baolu wrote:
>> Hi Jani,
>>
>> On 10/19/2016 03:48 PM, Jani Nikula wrote:
>>> On Wed, 19 Oct 2016, Lu Baolu wrote:
>>>> Add Documentation/usb/usb3-debug-port.txt. This document i
xhci_handle_event(). Otherwise, those errors are just
ignored silently.
This patch cleans up this by replacing the setting of error_bitmask
with the kernel print functions, so that users can easily check and
report the errors happened in xhci_handle_event().
Signed-off-by: Lu Baolu
---
Changelog
Add Documentation/usb/usb3-debug-port.txt. This document includes
the user guide for USB3 debug port.
Cc: linux-...@vger.kernel.org
Signed-off-by: Lu Baolu
---
Documentation/usb/usb3-debug-port.txt | 89 +++
1 file changed, 89 insertions(+)
create mode 100644
ocks.
This requires to delay setting up debugging hardware and
registering boot console until the memblocks are filled.
Cc: Ingo Molnar
Cc: x...@kernel.org
Signed-off-by: Lu Baolu
---
Documentation/kernel-parameters.txt | 1 +
arch/x86/kernel/early_printk.c | 5 +
arch/x86/kern
c.c
new file mode 100644
index 000..728a1a0
--- /dev/null
+++ b/drivers/usb/early/xhci-dbc.c
@@ -0,0 +1,1050 @@
+/**
+ * xhci-dbc.c - xHCI debug capability early driver
+ *
+ * Copyright (C) 2016 Intel Corporation
+ *
+ * Author: Lu Baolu
+ *
+ * This program is free software; you can redistr
This patch add dbc debug device support in usb_debug driver.
Signed-off-by: Lu Baolu
Acked-by: Johan Hovold
---
drivers/usb/serial/usb_debug.c | 28 +---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial
2->v3:
- Removed spinlock usage.
- Removed work queue usage.
- Refined the user guide document.
v1->v2:
- Refactor the duplicate code in xdbc_early_start() and
xdbc_handle_external_reset().
- Free resources when hardware not used any more.
- Refine the user guide document.
Hi,
On 10/25/2016 02:36 PM, Greg Kroah-Hartman wrote:
> On Tue, Oct 25, 2016 at 12:32:41PM +0800, Lu Baolu wrote:
>> xHCI debug capability (DbC) is an optional but standalone
>> functionality provided by an xHCI host controller. With DbC
>> hardware initialized, the system
Hi,
On 10/25/2016 05:32 PM, Jani Nikula wrote:
> On Tue, 25 Oct 2016, Lu Baolu wrote:
>> Add Documentation/usb/usb3-debug-port.txt. This document includes
>> the user guide for USB3 debug port.
> It's in reStructuredText, please name it .rst.
Sure.
Best regards,
Lu Ba
ly_start() and
xdbc_handle_external_reset().
- Free resources when hardware not used any more.
- Refine the user guide document.
Lu Baolu (4):
usb: dbc: early driver for xhci debug capability
x86: add support for earlyprintk via USB3 debug port
usb: serial: usb_debug: add support for db
This patch add dbc debug device support in usb_debug driver.
Signed-off-by: Lu Baolu
Acked-by: Johan Hovold
---
drivers/usb/serial/usb_debug.c | 28 +---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial
Add Documentation/usb/usb3-debug-port.rst. This document includes
the user guide for USB3 debug port.
Cc: linux-...@vger.kernel.org
Signed-off-by: Lu Baolu
---
Documentation/usb/usb3-debug-port.rst | 95 +++
1 file changed, 95 insertions(+)
create mode 100644
ew file mode 100644
index 000..728a1a0
--- /dev/null
+++ b/drivers/usb/early/xhci-dbc.c
@@ -0,0 +1,1050 @@
+/**
+ * xhci-dbc.c - xHCI debug capability early driver
+ *
+ * Copyright (C) 2016 Intel Corporation
+ *
+ * Author: Lu Baolu
+ *
+ * This program is free software; you can redistr
ocks.
This requires to delay setting up debugging hardware and
registering boot console until the memblocks are filled.
Cc: Ingo Molnar
Cc: x...@kernel.org
Signed-off-by: Lu Baolu
---
Documentation/kernel-parameters.txt | 1 +
arch/x86/kernel/early_printk.c | 5 +
arch/x86/kern
hci driver. It is time to get rid of addr_dev
and use the completion in the command structure instead.
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci-mem.c | 1 -
drivers/usb/host/xhci.c | 18 ++
drivers/usb/host/xhci.h | 1 -
3 files changed, 10 insertions(+), 10
cmd_completion in struct xhci_virt_device is legacy. With command
strutcture and command queue introduced in xhci, cmd_completion is
not used any more. This patch removes it.
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci-mem.c | 1 -
drivers/usb/host/xhci.h | 1 -
2 files changed, 2
Hi,
On 11/03/2016 07:36 PM, Mathias Nyman wrote:
> On 03.11.2016 12:22, Sergei Shtylyov wrote:
>> On 11/3/2016 9:48 AM, Lu Baolu wrote:
>>
>>> cmd_completion in struct xhci_virt_device is legacy. With command
>>> strutcture and command queue intr
structure and the command queue to xhci driver.
It's better to move slot_id from xhci_hcd structure to xhci_command
structure. Hence the race source is removed.
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci-ring.c | 8
drivers/usb/host/xhci.c | 2 +-
drivers/usb/host/xhci
Hi,
On 11/09/2016 05:23 PM, Thomas Gleixner wrote:
> On Tue, 1 Nov 2016, Lu Baolu wrote:
>> +static int __init xdbc_init(void)
>> +{
> ...
>> +base = ioremap_nocache(xdbc.xhci_start, xdbc.xhci_length);
>> +if (!base) {
>> +xdbc_tra
Hi,
On 11/09/2016 05:37 PM, Thomas Gleixner wrote:
> On Tue, 1 Nov 2016, Lu Baolu wrote:
>> +static void early_xdbc_write(struct console *con, const char *str, u32 n)
>> +{
>> +int chunk, ret;
>> +static char buf[XDBC_MAX_PACKET];
>> +int use_cr = 0
rresponding USB device stays in unresponsive state.
This patch enhances xHCI driver on this by printing out
the malformed TRB and clearing the endpoint Error state.
Tested-by: Wang Wendy
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci-ring.c | 35 +++
drivers/
Hi,
On 11/11/2016 09:03 AM, Lu Baolu wrote:
> When xHCI host sees a malformed TRB in a transfer ring,
> it will generate a transfer event with the completion
> code set to COMP_TRB_ERR (5), and sets the endpoint
> state in output endpoint context to EP_STATE_ERROR.
> The endpoi
rresponding USB device stays in unresponsive state.
This patch enhances xHCI driver on this by printing out
the malformed TRB and clearing the endpoint Error state.
Tested-by: Wang Wendy
Signed-off-by: Lu Baolu
---
Change log:
v1->v2:
- Correct the email of Tested-by.
drivers/usb/hos
Hi,
On 11/10/2016 04:56 PM, Thomas Gleixner wrote:
> On Thu, 10 Nov 2016, Lu Baolu wrote:
>> On 11/09/2016 05:37 PM, Thomas Gleixner wrote:
>>> On Tue, 1 Nov 2016, Lu Baolu wrote:
>>>> +static void early_xdbc_write(struct console *con, const char *str, u32 n)
Hi,
On 11/11/2016 10:24 AM, Lu Baolu wrote:
>> The only thing you can do to make this work is to prevent printing in NMI
>> > context:
>> >
>> > write()
>> > {
>> >if (in_nmi())
>> >return;
>> >
>>
Hi Peter,
On 11/10/2016 07:44 PM, Peter Zijlstra wrote:
> On Thu, Nov 10, 2016 at 09:56:41AM +0100, Thomas Gleixner wrote:
>> On Thu, 10 Nov 2016, Lu Baolu wrote:
>>> This seems to be a common issue for all early printk drivers.
>> No. The other early printk drivers like
Hi Peter,
On 11/11/2016 08:28 PM, Peter Zijlstra wrote:
> On Fri, Nov 11, 2016 at 12:33:29PM +0800, Lu Baolu wrote:
>
>> Things become complicated when it comes to USB debug port.
>> But it's still addressable.
>>
>> At this time, we can do it like this.
&g
Add Documentation/usb/usb3-debug-port.rst. This document includes
the user guide for USB3 debug port.
Cc: linux-...@vger.kernel.org
Signed-off-by: Lu Baolu
---
Documentation/usb/usb3-debug-port.rst | 95 +++
1 file changed, 95 insertions(+)
create mode 100644
ew file mode 100644
index 000..5ac4223
--- /dev/null
+++ b/drivers/usb/early/xhci-dbc.c
@@ -0,0 +1,1068 @@
+/**
+ * xhci-dbc.c - xHCI debug capability early driver
+ *
+ * Copyright (C) 2016 Intel Corporation
+ *
+ * Author: Lu Baolu
+ *
+ * This program is free software; you can redistr
ocks.
This requires to delay setting up debugging hardware and
registering boot console until the memblocks are filled.
Cc: Ingo Molnar
Cc: x...@kernel.org
Signed-off-by: Lu Baolu
---
Documentation/kernel-parameters.txt | 1 +
arch/x86/kernel/early_printk.c | 5 +
arch/x86/kern
This patch add dbc debug device support in usb_debug driver.
Signed-off-by: Lu Baolu
Acked-by: Johan Hovold
---
drivers/usb/serial/usb_debug.c | 28 +---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial
guide document.
v1->v2:
- Refactor the duplicate code in xdbc_early_start() and
xdbc_handle_external_reset().
- Free resources when hardware not used any more.
- Refine the user guide document.
Lu Baolu (4):
usb: dbc: early driver for xhci debug capability
x86: add support for ear
stop endpoint commands. If the timer is the tail end of the last
- * stop endpoint command, and the endpoint's command is still pending, we
assume
- * the host is dying.
Best regards,
Lu Baolu
>
> We also need to clean up the command queue before trying to halt the
> xHCI host in xh
Hi,
On 12/01/2016 02:04 PM, Baolin Wang wrote:
> Hi Baolu,
>
> On 1 December 2016 at 13:45, Lu Baolu wrote:
>> Hi,
>>
>> On 11/30/2016 05:02 PM, Baolin Wang wrote:
>>> If the hardware never responds to the stop endpoint command, the
>>> URBs will
Hi,
On 12/01/2016 03:35 PM, Baolin Wang wrote:
> On 1 December 2016 at 14:35, Lu Baolu wrote:
>> Hi,
>>
>> On 12/01/2016 02:04 PM, Baolin Wang wrote:
>>> Hi Baolu,
>>>
>>> On 1 December 2016 at 13:45, Lu Baolu wrote:
>>>> Hi,
>&
Hi,
On 12/01/2016 04:03 PM, Baolin Wang wrote:
> On 1 December 2016 at 15:44, Lu Baolu wrote:
>> Hi,
>>
>> On 12/01/2016 03:35 PM, Baolin Wang wrote:
>>> On 1 December 2016 at 14:35, Lu Baolu wrote:
>>>> Hi,
>>>>
>>>> On 12/01/
# v3.16+
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci-ring.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index bdf6b13..13e05f6 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/h
Hi,
On 12/02/2016 12:18 PM, Baolin Wang wrote:
> On 2 December 2016 at 10:29, Lu Baolu wrote:
>> handle_cmd_completion() frees a command structure which might
>> be still referenced by xhci->current_cmd. This might cause
>> problem when xhci->current_cmd is accessed af
Hi,
On 12/02/2016 09:39 PM, Mathias Nyman wrote:
> On 02.12.2016 04:29, Lu Baolu wrote:
>> handle_cmd_completion() frees a command structure which might
>> be still referenced by xhci->current_cmd. This might cause
>> problem when xhci->current_cmd is accessed after t
atch for that one case
> it seems that patch 2/2 can be replaced by a single line change:
>
> if (!xhci->current_cmd || timer_pending(&xhci->cmd_timer))
>
> Right?
>
> -Mathias
>
It seems that the watch dog algorithm for command queue becomes
more and more complica
Hi,
On 12/20/2016 02:06 PM, Baolin Wang wrote:
> Hi,
>
> On 20 December 2016 at 12:29, Lu Baolu wrote:
>> Hi Mathias,
>>
>> On 12/19/2016 08:13 PM, Mathias Nyman wrote:
>>> On 19.12.2016 13:34, Baolin Wang wrote:
>>>> Hi Mathias,
>>>>
Hi,
On 12/20/2016 02:46 PM, Baolin Wang wrote:
> On 20 December 2016 at 14:39, Lu Baolu wrote:
>> Hi,
>>
>> On 12/20/2016 02:06 PM, Baolin Wang wrote:
>>> Hi,
>>>
>>> On 20 December 2016 at 12:29, Lu Baolu wrote:
>>>> Hi Mathias,
>
n");
368 xhci_cleanup_command_queue(xhci);
369 } else {
370 unsigned long flags;
371
372 spin_lock_irqsave(&xhci->lock, flags);
373 xhci_handle_stopped_cmd_ring(xhci,
xhci_next_queued_cmd(xhci));
374 spin_u
>current_cmd);
1327 spin_unlock_irqrestore(&xhci->lock, flags);
This part of code is tricky. I have no idea about in which case should this
code be executed? Anyway, we shouldn't call xhci_handle_stopped_cmd_ring()
here, right?
1328 return;
1329 }
Best regards,
Lu Baolu
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
33] ? kthread_delayed_work_timer_fn+0x80/0x80
[ 528.511755] ret_from_fork+0x24/0x30
Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver")
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci-dbgcap.c | 20
drivers/usb/host/xhci-dbgtty.c | 20 --
1 - 100 of 653 matches
Mail list logo