TI TUSB7340 xHCI Host Controllers lock up

2017-03-16 Thread Ryan Stowell
Hello,

 I'm having an issue with a pcie connected Texas Instruments TUSB7340
host controller. I've been stress testing an embedded ARM system by
writing then reading back large blocks of data to UAS connected USB
3.0 storage.  A typical test run writes 128GB of data and I'd say
about 75% of the time the run is interrupted by the following crash:

 xhci_hcd 0001:01:00.0: xHCI host not responding to stop endpoint command.
 xhci_hcd 0001:01:00.0: Assuming host is dying, halting host.
 xhci_hcd 0001:01:00.0: Host not halted after 16000 microseconds.
 xhci_hcd 0001:01:00.0: Non-responsive xHCI host is not halting.
 xhci_hcd 0001:01:00.0: Completing active URBs anyway.
 xhci_hcd 0001:01:00.0: HC died; cleaning up
 usb 1-3: USB disconnect, device number 2
 usb 2-1: USB disconnect, device number 2

After this point the host controller will not respond. Removing the
driver and reinserting it produces:

 xhci_hcd 0001:01:00.0: xHCI Host Controller
 xhci_hcd 0001:01:00.0: new USB bus registered, assigned bus number 1
 xhci_hcd 0001:01:00.0: Host not halted after 16000 microseconds.
 xhci_hcd 0001:01:00.0: can't setup: -110
 xhci_hcd 0001:01:00.0: USB bus 1 deregistered
 xhci_hcd 0001:01:00.0: init 0001:01:00.0 fail, -110
 xhci_hcd: probe of 0001:01:00.0 failed with error -110

Only a power cycle brings the host controller back.

My initial attempts were with a 4.4.0 kernel, but I can reproduce it
with 4.9.15 and 4.11-rc2. I don't have enough data yet to say with
certainty, but anecdotally it seems like the crash occurs more
frequently with the newer kernels.

I've tried several different storage devices, and the crash appears
regardless of what I'm writing to.

There appears to be quite a list of errata posted for the TUSB73x0
host controllers: ( http://www.ti.com/lit/er/sllz076/sllz076.pdf ) and
I noticed that recently Roger Quadros added a patch to address one of
the issues. This patch didn't resolve my issue however.

There appeared to be some discussion about other issues with this chip
over the years, the most recent being (
http://marc.info/?l=linux-usb=147745611801558=2 ) but I can't tell
from recent sources what specific issues if any have been resolved and
adopted into the driver.

I'm not very familiar with the USB stack so I'm hoping someone here
can help point me in the right direction.

Thanks for any help anyone can offer,

Ryan
--
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


[no subject]

2016-12-15 Thread Ryan
 auth 12a8a74f subscribe linux-usb ryanphilip...@googlemail.com
--
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


DWC3 question

2016-01-30 Thread Ryan
Hello,

I am seeing that drivers/usb/dwc3/otg.c makes calls to functions in
dwc3-exynos.c
However, this does not apply to gadget.c driver
(drivers/usb/dwc3/usb/dwc3/gadget.c)

Why is this? As a result, i am not seeing runtime-pm getting executed
when the gadget is plugged out.


Am i missing something here.


Thanks for your time.

Thanks,
ryan
--
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


Re: [PATCH 1/2 v3] ARM: ep93xx_defconfig: cleanup ep93xx_defconfig

2013-10-17 Thread Ryan Mallon
On 18/10/13 05:25, H Hartley Sweeten wrote:

 Generate ep93xx_defconfig by doing:
 
 make ep93xx_defconfig
 make savedefconfig
 mv defconfig arch/arm/configs/ep93xx_defconfig
 
 No functional change. This just refreshes the ep93xx_defconfig to make it
 easier and cleaner when adding new entries.
 
 Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com


Acked-by: Ryan Mallon rmal...@gmail.com

 Cc: Ryan Mallon rmal...@gmail.com
 Cc: Alan Stern st...@rowland.harvard.edu
 Cc: Lennert Buytenhek ker...@wantstofly.org
 Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
 Cc: Olof Johansson o...@lixom.net
 Cc: Russell King li...@arm.linux.org.uk
 ---
  arch/arm/configs/ep93xx_defconfig | 16 ++--
  1 file changed, 2 insertions(+), 14 deletions(-)
 
 diff --git a/arch/arm/configs/ep93xx_defconfig 
 b/arch/arm/configs/ep93xx_defconfig
 index 806005a..8eccbcb 100644
 --- a/arch/arm/configs/ep93xx_defconfig
 +++ b/arch/arm/configs/ep93xx_defconfig
 @@ -1,15 +1,14 @@
 -CONFIG_EXPERIMENTAL=y
  CONFIG_SYSVIPC=y
  CONFIG_IKCONFIG=y
  CONFIG_IKCONFIG_PROC=y
  CONFIG_LOG_BUF_SHIFT=14
 -CONFIG_SYSFS_DEPRECATED_V2=y
  CONFIG_EXPERT=y
  CONFIG_SLAB=y
  CONFIG_MODULES=y
  CONFIG_MODULE_UNLOAD=y
  CONFIG_MODULE_FORCE_UNLOAD=y
  # CONFIG_BLK_DEV_BSG is not set
 +CONFIG_PARTITION_ADVANCED=y
  # CONFIG_IOSCHED_CFQ is not set
  CONFIG_ARCH_EP93XX=y
  CONFIG_CRUNCH=y
 @@ -47,11 +46,8 @@ CONFIG_IPV6=y
  CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug
  # CONFIG_FW_LOADER is not set
  CONFIG_MTD=y
 -CONFIG_MTD_CONCAT=y
 -CONFIG_MTD_PARTITIONS=y
  CONFIG_MTD_REDBOOT_PARTS=y
  CONFIG_MTD_CMDLINE_PARTS=y
 -CONFIG_MTD_CHAR=y
  CONFIG_MTD_BLOCK=y
  CONFIG_MTD_CFI=y
  CONFIG_MTD_CFI_ADV_OPTIONS=y
 @@ -67,15 +63,14 @@ CONFIG_SCSI=y
  # CONFIG_SCSI_PROC_FS is not set
  CONFIG_BLK_DEV_SD=y
  CONFIG_NETDEVICES=y
 -CONFIG_NET_ETHERNET=y
  CONFIG_EP93XX_ETH=y
  CONFIG_USB_RTL8150=y
  # CONFIG_INPUT is not set
  # CONFIG_SERIO is not set
  # CONFIG_VT is not set
 +# CONFIG_LEGACY_PTYS is not set
  CONFIG_SERIAL_AMBA_PL010=y
  CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
 -# CONFIG_LEGACY_PTYS is not set
  # CONFIG_HW_RANDOM is not set
  CONFIG_I2C=y
  CONFIG_I2C_CHARDEV=y
 @@ -86,7 +81,6 @@ CONFIG_WATCHDOG=y
  CONFIG_EP93XX_WATCHDOG=y
  CONFIG_USB=y
  CONFIG_USB_DEBUG=y
 -CONFIG_USB_DEVICEFS=y
  CONFIG_USB_DYNAMIC_MINORS=y
  CONFIG_USB_OHCI_HCD=y
  CONFIG_USB_STORAGE=y
 @@ -100,24 +94,18 @@ CONFIG_RTC_DRV_EP93XX=y
  CONFIG_EXT2_FS=y
  CONFIG_EXT3_FS=y
  # CONFIG_EXT3_FS_XATTR is not set
 -CONFIG_INOTIFY=y
  CONFIG_VFAT_FS=y
  CONFIG_TMPFS=y
  CONFIG_JFFS2_FS=y
  CONFIG_NFS_FS=y
 -CONFIG_NFS_V3=y
  CONFIG_ROOT_NFS=y
 -CONFIG_PARTITION_ADVANCED=y
  CONFIG_NLS_CODEPAGE_437=y
  CONFIG_NLS_ISO8859_1=y
  CONFIG_MAGIC_SYSRQ=y
 -CONFIG_DEBUG_KERNEL=y
  CONFIG_DEBUG_SLAB=y
  CONFIG_DEBUG_SPINLOCK=y
  CONFIG_DEBUG_MUTEXES=y
 -# CONFIG_RCU_CPU_STALL_DETECTOR is not set
  CONFIG_DEBUG_USER=y
 -CONFIG_DEBUG_ERRORS=y
  CONFIG_DEBUG_LL=y
  # CONFIG_CRYPTO_ANSI_CPRNG is not set
  CONFIG_LIBCRC32C=y


--
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


Re: [PATCH v2] usb: ohci: remove ep93xx bus glue platform driver

2013-10-16 Thread Ryan Mallon
On 17/10/13 01:43, Alan Stern wrote:

 On Wed, 16 Oct 2013, Hartley Sweeten wrote:
 
 On Tuesday, October 15, 2013 5:57 PM, Ryan Mallon wrote:
 
 Gah, defconfig changes are a pest. I assume the other removed options
 are implicitly selected, and their removal is the result of
 re-minimising the defconfig? Can you put a note about this is the
 changelog please.

 Yah... It's a mess.

 All I did was:
 make ARCH=arm ep93xx_defconfig
 make ARCH=arm menuconfig # enable USB_OHCI_HCD_PLATFORM
 make ARCH=arm savedefconfig
 mv defconfig arch/arm/configs/ep93xx_defconfig

 Looks like the last time the ep93xx_defconfig was refreshed was:

 commit 07a8c03f3e06129e847acd068b8b89c13357ee64
 Author: Uwe Kleine-König u.kleine-koe...@pengutronix.de
 Date:   Thu Jun 10 07:12:18 2010 +0200

 ARM: reduce defconfigs

 Hence the ugly changes.
 
 It's awfully hard to believe that enabling USB_OHCI_HCD_PLATFORM is 
 responsible for all those other changes.


The 'make savedefconfig' step minimises the defconfig by removing any
options that are implicitly selected or options that no longer exist.
E.g: 4d42942c: 'mtd: make MTD_CONCAT support mandatory' is responsible
for CONFIG_MTD_CONCAT disappearing from the defconfig. Looks the other
MTD options have also been removed.

CONFIG_NFS_V3, for example, got removed because it is implicit as of:
981f9fac: 'NFS: Turn v3 on by default'.

'make savedefconfig' also has an annoying tendency to shuffle items
around, presumably because the Kconfig files have changed. This is
why, for example, the:

  # CONFIG_LEGACY_PTYS is not set

line got moved in the diff.

Interestingly CONFIG_INOTIFY got removed because that option doesn't
exist anymore. I can't find the exact commit, but things have been
moved around and the option is now called CONFIG_INOTIFY_USER (so
whoever made the change probably didn't scan through all the 
defconfigs). It does mean that ep93xx lost support for inotify at
some point. Since nobody has complained, I don't think it is a huge
loss.

In short, yes the 'make savedefconfig' step is annoying because it
creates weird diffs. However, the diffs are correct (cleaning up
unused options, etc). The diffs should be inspected to catch things
like the inotify case, but otherwise there should be no functional
changes.

 
 Maybe this should be done in two stages.  First create a patch that
 describes the differences resulting from:
 
 make ARCH=arm ep93xx_defconfig
 make ARCH=arm savedefconfig
 mv defconfig arch/arm/configs/ep93xx_defconfig


 Then do this patch on top of that one.
 

Yeah, I think a pre-patch for ep93xx: make savedefconfig would be
best.

Are you happy to collect all these patches once they are done? I
could take the ep93xx parts, but my tree typically only has a 
small handful of patches each merge window, so it is probably easier
if you grab them all.

Thanks,
~Ryan

--
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


Re: [PATCH v2] usb: ohci: remove ep93xx bus glue platform driver

2013-10-15 Thread Ryan Mallon
On 16/10/13 11:47, H Hartley Sweeten wrote:
 Convert ep93xx to use the OHCI platform driver and remove the
 ohci-ep93xx bus glue driver.
 
 Enable CONFIG_OHCI_HCD_PLATFORM and refresh the ep93xx_defconfig
 so that USB is still enabled by default on the EP93xx platform.
 
 Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
 Cc: Alan Stern st...@rowland.harvard.edu
 Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
 Cc: Ryan Mallon rmal...@gmail.com
 Cc: Olof Johansson o...@lixom.net
 ---
 v2: Use the (*power_off) callback for (*power_suspend), as suggested
 by Alan Stern.
 Remove the Kconfig change to USB_OHCI_HCD_PLATFORM and refresh
 the ep93xx_defconfig to enable this option, as suggested by Alan Stern.
 
  arch/arm/configs/ep93xx_defconfig |  17 +---
  arch/arm/mach-ep93xx/clock.c  |   2 +-
  arch/arm/mach-ep93xx/core.c   |  40 -
  drivers/usb/host/ohci-ep93xx.c| 184 
 --
  drivers/usb/host/ohci-hcd.c   |  18 
  5 files changed, 40 insertions(+), 221 deletions(-)
  delete mode 100644 drivers/usb/host/ohci-ep93xx.c
 
 diff --git a/arch/arm/configs/ep93xx_defconfig 
 b/arch/arm/configs/ep93xx_defconfig
 index 806005a..6ac5ea7 100644
 --- a/arch/arm/configs/ep93xx_defconfig
 +++ b/arch/arm/configs/ep93xx_defconfig
 @@ -1,15 +1,14 @@
 -CONFIG_EXPERIMENTAL=y
  CONFIG_SYSVIPC=y
  CONFIG_IKCONFIG=y
  CONFIG_IKCONFIG_PROC=y
  CONFIG_LOG_BUF_SHIFT=14
 -CONFIG_SYSFS_DEPRECATED_V2=y
  CONFIG_EXPERT=y
  CONFIG_SLAB=y
  CONFIG_MODULES=y
  CONFIG_MODULE_UNLOAD=y
  CONFIG_MODULE_FORCE_UNLOAD=y
  # CONFIG_BLK_DEV_BSG is not set
 +CONFIG_PARTITION_ADVANCED=y
  # CONFIG_IOSCHED_CFQ is not set
  CONFIG_ARCH_EP93XX=y
  CONFIG_CRUNCH=y
 @@ -47,11 +46,8 @@ CONFIG_IPV6=y
  CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug
  # CONFIG_FW_LOADER is not set
  CONFIG_MTD=y
 -CONFIG_MTD_CONCAT=y
 -CONFIG_MTD_PARTITIONS=y
  CONFIG_MTD_REDBOOT_PARTS=y
  CONFIG_MTD_CMDLINE_PARTS=y
 -CONFIG_MTD_CHAR=y
  CONFIG_MTD_BLOCK=y
  CONFIG_MTD_CFI=y
  CONFIG_MTD_CFI_ADV_OPTIONS=y
 @@ -67,15 +63,14 @@ CONFIG_SCSI=y
  # CONFIG_SCSI_PROC_FS is not set
  CONFIG_BLK_DEV_SD=y
  CONFIG_NETDEVICES=y
 -CONFIG_NET_ETHERNET=y
  CONFIG_EP93XX_ETH=y
  CONFIG_USB_RTL8150=y
  # CONFIG_INPUT is not set
  # CONFIG_SERIO is not set
  # CONFIG_VT is not set
 +# CONFIG_LEGACY_PTYS is not set
  CONFIG_SERIAL_AMBA_PL010=y
  CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
 -# CONFIG_LEGACY_PTYS is not set
  # CONFIG_HW_RANDOM is not set
  CONFIG_I2C=y
  CONFIG_I2C_CHARDEV=y
 @@ -86,9 +81,9 @@ CONFIG_WATCHDOG=y
  CONFIG_EP93XX_WATCHDOG=y
  CONFIG_USB=y
  CONFIG_USB_DEBUG=y
 -CONFIG_USB_DEVICEFS=y
  CONFIG_USB_DYNAMIC_MINORS=y
  CONFIG_USB_OHCI_HCD=y
 +CONFIG_USB_OHCI_HCD_PLATFORM=y
  CONFIG_USB_STORAGE=y
  CONFIG_USB_SERIAL=y
  CONFIG_USB_SERIAL_CONSOLE=y
 @@ -100,24 +95,18 @@ CONFIG_RTC_DRV_EP93XX=y
  CONFIG_EXT2_FS=y
  CONFIG_EXT3_FS=y
  # CONFIG_EXT3_FS_XATTR is not set
 -CONFIG_INOTIFY=y
  CONFIG_VFAT_FS=y
  CONFIG_TMPFS=y
  CONFIG_JFFS2_FS=y
  CONFIG_NFS_FS=y
 -CONFIG_NFS_V3=y
  CONFIG_ROOT_NFS=y
 -CONFIG_PARTITION_ADVANCED=y
  CONFIG_NLS_CODEPAGE_437=y
  CONFIG_NLS_ISO8859_1=y
  CONFIG_MAGIC_SYSRQ=y
 -CONFIG_DEBUG_KERNEL=y
  CONFIG_DEBUG_SLAB=y
  CONFIG_DEBUG_SPINLOCK=y
  CONFIG_DEBUG_MUTEXES=y
 -# CONFIG_RCU_CPU_STALL_DETECTOR is not set
  CONFIG_DEBUG_USER=y
 -CONFIG_DEBUG_ERRORS=y
  CONFIG_DEBUG_LL=y
  # CONFIG_CRYPTO_ANSI_CPRNG is not set
  CONFIG_LIBCRC32C=y

Gah, defconfig changes are a pest. I assume the other removed options
are implicitly selected, and their removal is the result of
re-minimising the defconfig? Can you put a note about this is the
changelog please.

 +static struct clk *ep93xx_ohci_host_clock;
 +
 +static int ep93xx_ohci_power_on(struct platform_device *pdev)
 +{
 + if (!ep93xx_ohci_host_clock) {
 + ep93xx_ohci_host_clock = devm_clk_get(pdev-dev, NULL);
 + if (IS_ERR(ep93xx_ohci_host_clock))
 + return PTR_ERR(ep93xx_ohci_host_clock);
 + }
 +
 + clk_enable(ep93xx_ohci_host_clock);
 +
 + return 0;

Nit:

return clk_enable(ep93xx_ohci_host_clock);

~Ryan
--
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


Re: [PATCH] usb: ohci: remove ep93xx bus glue platform driver

2013-10-14 Thread Ryan Mallon
On 15/10/13 08:35, H Hartley Sweeten wrote:
 Convert ep93xx to use the OHCI platform driver and remove the
 ohci-ep93xx bus glue driver.
 
 Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
 Cc: Alan Stern st...@rowland.harvard.edu
 Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
 Cc: Ryan Mallon rmal...@gmail.com
 ---

 diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
 index b3f20d7..2c8f2db 100644
 --- a/drivers/usb/host/Kconfig
 +++ b/drivers/usb/host/Kconfig
 @@ -472,7 +472,7 @@ config USB_CNS3XXX_OHCI
  
  config USB_OHCI_HCD_PLATFORM
   tristate Generic OHCI driver for a platform device
 - default n
 + default y if ARCH_EP93XX

Shouldn't we select USB_OHCI_HCD_PLATFORM, e.g. something like:

config ARCH_EP93XX_USB
tristate USB OHCI support
default y
select USB_OHCI_HCD_PLATFORM

In arch/arm/mach-ep93xx/Kconfig rather than polluting
drivers/usb/host/Kconfig with arch specific stuff?

~Ryan

--
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


Re: [PATCH] usb: ohci: remove ep93xx bus glue platform driver

2013-10-14 Thread Ryan Mallon
On 15/10/13 08:35, H Hartley Sweeten wrote:
 Convert ep93xx to use the OHCI platform driver and remove the
 ohci-ep93xx bus glue driver.
 
 Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
 Cc: Alan Stern st...@rowland.harvard.edu
 Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
 Cc: Ryan Mallon rmal...@gmail.com

Cc'ed Olof, who wanted to see what the patches looked like.

I think the overall code reduction is probably worth the small increase
in arch/arm code size.

~Ryan

 ---
  arch/arm/mach-ep93xx/clock.c   |   2 +-
  arch/arm/mach-ep93xx/core.c|  45 +-
  drivers/usb/host/Kconfig   |   2 +-
  drivers/usb/host/ohci-ep93xx.c | 184 
 -
  drivers/usb/host/ohci-hcd.c|  18 
  5 files changed, 43 insertions(+), 208 deletions(-)
  delete mode 100644 drivers/usb/host/ohci-ep93xx.c
 
 diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c
 index c95dbce..39ef3b6 100644
 --- a/arch/arm/mach-ep93xx/clock.c
 +++ b/arch/arm/mach-ep93xx/clock.c
 @@ -212,7 +212,7 @@ static struct clk_lookup clocks[] = {
   INIT_CK(NULL,   hclk, clk_h),
   INIT_CK(NULL,   apb_pclk, clk_p),
   INIT_CK(NULL,   pll2, clk_pll2),
 - INIT_CK(ep93xx-ohci,  NULL,   clk_usb_host),
 + INIT_CK(ohci-platform,NULL,   clk_usb_host),
   INIT_CK(ep93xx-keypad,NULL,   clk_keypad),
   INIT_CK(ep93xx-fb,NULL,   clk_video),
   INIT_CK(ep93xx-spi.0, NULL,   clk_spi),
 diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
 index 3f12b88..5489824 100644
 --- a/arch/arm/mach-ep93xx/core.c
 +++ b/arch/arm/mach-ep93xx/core.c
 @@ -36,6 +36,7 @@
  #include linux/export.h
  #include linux/irqchip/arm-vic.h
  #include linux/reboot.h
 +#include linux/usb/ohci_pdriver.h
  
  #include mach/hardware.h
  #include linux/platform_data/video-ep93xx.h
 @@ -297,22 +298,58 @@ static struct platform_device ep93xx_rtc_device = {
   .resource   = ep93xx_rtc_resource,
  };
  
 +/*
 + * EP93xx OHCI USB Host
 + */
 +
 +static struct clk *ep93xx_ohci_host_clock;
 +
 +static int ep93xx_ohci_power_on(struct platform_device *pdev)
 +{
 + if (!ep93xx_ohci_host_clock) {
 + ep93xx_ohci_host_clock = devm_clk_get(pdev-dev, NULL);
 + if (IS_ERR(ep93xx_ohci_host_clock))
 + return PTR_ERR(ep93xx_ohci_host_clock);
 + }
 +
 + clk_enable(ep93xx_ohci_host_clock);
 +
 + return 0;
 +}
 +
 +static void ep93xx_ohci_power_off(struct platform_device *pdev)
 +{
 + clk_disable(ep93xx_ohci_host_clock);
 +}
 +
 +static void ep93xx_ohci_power_suspend(struct platform_device *pdev)
 +{
 + ep93xx_ohci_power_off(pdev);
 +}
 +
 +static struct usb_ohci_pdata ep93xx_ohci_pdata = {
 + .power_on   = ep93xx_ohci_power_on,
 + .power_off  = ep93xx_ohci_power_off,
 + .power_suspend  = ep93xx_ohci_power_suspend,
 +};
  
  static struct resource ep93xx_ohci_resources[] = {
   DEFINE_RES_MEM(EP93XX_USB_PHYS_BASE, 0x1000),
   DEFINE_RES_IRQ(IRQ_EP93XX_USB),
  };
  
 +static u64 ep93xx_ohci_dma_mask = DMA_BIT_MASK(32);
  
  static struct platform_device ep93xx_ohci_device = {
 - .name   = ep93xx-ohci,
 + .name   = ohci-platform,
   .id = -1,
 + .num_resources  = ARRAY_SIZE(ep93xx_ohci_resources),
 + .resource   = ep93xx_ohci_resources,
   .dev= {
 - .dma_mask   = 
 ep93xx_ohci_device.dev.coherent_dma_mask,
 + .dma_mask   = ep93xx_ohci_dma_mask,
   .coherent_dma_mask  = DMA_BIT_MASK(32),
 + .platform_data  = ep93xx_ohci_pdata,
   },
 - .num_resources  = ARRAY_SIZE(ep93xx_ohci_resources),
 - .resource   = ep93xx_ohci_resources,
  };
  
  
 diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
 index b3f20d7..2c8f2db 100644
 --- a/drivers/usb/host/Kconfig
 +++ b/drivers/usb/host/Kconfig
 @@ -472,7 +472,7 @@ config USB_CNS3XXX_OHCI
  
  config USB_OHCI_HCD_PLATFORM
   tristate Generic OHCI driver for a platform device
 - default n
 + default y if ARCH_EP93XX
   ---help---
 Adds an OHCI host driver for a generic platform device, which
 provides a memory space and an irq.
 diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c
 deleted file mode 100644
 index 84a20d5..000
 --- a/drivers/usb/host/ohci-ep93xx.c
 +++ /dev/null
 @@ -1,184 +0,0 @@
 -/*
 - * OHCI HCD (Host Controller Driver) for USB.
 - *
 - * (C) Copyright 1999 Roman Weissgaerber wei...@vienna.at
 - * (C) Copyright 2000-2002 David Brownell dbrown...@users.sourceforge.net
 - * (C) Copyright 2002

Re: Help with xHCI, uvcvideo driver, and Unknown event condition, HC probably busted

2013-03-29 Thread Ryan Press
Hi Ezequiel,

Thanks so much for replying, I worried my call for help would just
become more buried.

On Fri, Mar 29, 2013 at 3:34 PM, Ezequiel Garcia
ezequiel.gar...@free-electrons.com wrote:
 Hi Ryan,

 Small world, uh?

 On Tue, Mar 26, 2013 at 02:55:48PM -0700, Ryan Press wrote:
 I'm working to get the 3.9-rc1 kernel working on the Globalscale
 Mirabox 
 http://www.globalscaletechnologies.com/p-58-mirabox-development-kit.aspx.
  The PCIe driver by Thomas Petazzoni is not in mainline yet but I have
 his latest patch; this is required for the FL1009 host controller.

 I have everything mostly working.  A USB 3.0 SSD works great, I tested
 un-buffered speed at 120 MB/s.  I am trying to get a USB 2.0 video
 capture device working and I'm running into problems.  So far I have
 tested using the uvcvideo and stk1160.  They both fail with xhci_hcd
 :02:00.0: ERROR Unknown event condition, HC probably busted,
 although the uvcvideo device does work for perhaps a minute with
 smooth video.  Sometimes it resets the host controller and the
 attached SSD goes offline.

 On a different ARM box running 3.8-rc1 kernel the stk1160 is known
 working, albeit it has only a USB 2.0 host controller.  So I don't
 suspect this driver necessarily.

 Below is my dmesg log.  I would think the PCIe driver could be the
 problem but because the USB 3.0 SSD works perfectly I'm not sure this
 is the case.  Does anyone have insight into what's going on?


 As the stk1160 author, I'm glad to see someone is using it ;-)

Wow, I didn't realize you wrote that as well.  Thanks!  This is really
the driver I want to use.


 FWIW, stk1160 (as any other video device) uses isochronous
 URBs while your SSD (any other storage) *probably* uses bulk URBs.

 I'm not sure if this has anything to do with your problem,
 but at least it means you shouldn't compare those devices as similar.

Yeah, I know; many years ago I wrote a WDM USB video driver, but now
I'm more a hardware guy.  I was just thinking that if it was some
underlying problem with the PCIe, I would also see it with the SSD.
But I'm sure there's more than meets my eye.


 I'll see what I can do about it and let you know.

Great!  This is really the last big problem I'm having and it would be
fantastic to resolve it.

Thanks,
Ryan
--
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


Help with xHCI, uvcvideo driver, and Unknown event condition, HC probably busted

2013-03-26 Thread Ryan Press
I'm working to get the 3.9-rc1 kernel working on the Globalscale
Mirabox 
http://www.globalscaletechnologies.com/p-58-mirabox-development-kit.aspx.
 The PCIe driver by Thomas Petazzoni is not in mainline yet but I have
his latest patch; this is required for the FL1009 host controller.

I have everything mostly working.  A USB 3.0 SSD works great, I tested
un-buffered speed at 120 MB/s.  I am trying to get a USB 2.0 video
capture device working and I'm running into problems.  So far I have
tested using the uvcvideo and stk1160.  They both fail with xhci_hcd
:02:00.0: ERROR Unknown event condition, HC probably busted,
although the uvcvideo device does work for perhaps a minute with
smooth video.  Sometimes it resets the host controller and the
attached SSD goes offline.

On a different ARM box running 3.8-rc1 kernel the stk1160 is known
working, albeit it has only a USB 2.0 host controller.  So I don't
suspect this driver necessarily.

Below is my dmesg log.  I would think the PCIe driver could be the
problem but because the USB 3.0 SSD works perfectly I'm not sure this
is the case.  Does anyone have insight into what's going on?

Thanks in advance!
Ryan


*lspci -vvv -nn*

root@vanputer:~# lspci -vvv -nn
00:01.0 PCI bridge [0604]: Marvell Technology Group Ltd. Device
[11ab:7846] (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+
Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF+ FastB2B+ ParErr+ DEVSEL=?? TAbort+ TAbort+
MAbort+ SERR+ PERR+ INTx+
Latency: 0, Cache Line Size: 64 bytes
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: f000-0fff
Memory behind bridge: fff0-000f
Prefetchable memory behind bridge: fff0-000f
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast TAbort-
TAbort- MAbort- SERR- PERR-
BridgeCtl: Parity+ SERR+ NoISA+ VGA+ MAbort+ Reset+ FastB2B+
PriDiscTmr+ SecDiscTmr+ DiscTmrStat+ DiscTmrSERREn+
Capabilities: [fc] chain broken

00:02.0 PCI bridge [0604]: Marvell Technology Group Ltd. Device
[11ab:7846] (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+
Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF+ FastB2B+ ParErr+ DEVSEL=?? TAbort+ TAbort+
MAbort+ SERR+ PERR+ INTx+
Latency: 0, Cache Line Size: 64 bytes
Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
I/O behind bridge: f000-0fff
Memory behind bridge: e000-e00f
Prefetchable memory behind bridge: fff0-000f
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast TAbort-
TAbort- MAbort- SERR- PERR-
BridgeCtl: Parity+ SERR+ NoISA+ VGA+ MAbort+ Reset+ FastB2B+
PriDiscTmr+ SecDiscTmr+ DiscTmrStat+ DiscTmrSERREn+
Capabilities: [fc] chain broken

02:00.0 USB controller [0c03]: Fresco Logic FL1009 USB 3.0 Host
Controller [1b73:1009] (rev 02) (prog-if 30 [XHCI])
Subsystem: Fresco Logic Device [1b73:]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+
Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast TAbort-
TAbort- MAbort- SERR- PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 104
Region 0: Memory at e000 (64-bit, non-prefetchable) [size=64K]
Region 2: Memory at e001 (64-bit, non-prefetchable) [size=4K]
Region 4: Memory at e0011000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA
PME(D0+,D1+,D2-,D3hot+,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+
Address:   Data: 
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s
unlimited, L1 unlimited
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal-
Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq-
AuxPwr- TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0
unlimited, L1 unlimited
ClockPM- Surprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train-
SlotClk+ DLActive-
BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported