beagle: omap3: usb is dead

Bug #1061599 reported by Paolo Pisati
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Paolo Pisati
Quantal
Fix Released
Undecided
Paolo Pisati

Bug Description

SRU Justification:

    Impact: usb hud is dead on omap3 boards (beagles)
    Fix: see the attached patches.
    Testcase: boot the board with an unpatched kernel and see there's no nic, mouse, keyb, etcetc; try again with a patched kernel and check again nic, mouse, keyb, etcetc

===

This bug is actually a twofold problem:

1) config for our omap kernel had a problem

enabling USB_[EHCI|OHCI]_HCD_PLATFORM we actually overwrote the OMAP EHCI/OHCI bits:

/home/ppisati/ubuntu-quantal/drivers/usb/host/ehci-hcd.c:1394:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
/home/ppisati/ubuntu-quantal/drivers/usb/host/ehci-hcd.c:1289:0: note: this is the location of the previous definition

drivers/usb/host/ehci-hcd.c:

1289:
#ifdef CONFIG_USB_EHCI_HCD_OMAP
#include "ehci-omap.c"
#define PLATFORM_DRIVER ehci_hcd_omap_driver
#endif

1394:
#ifdef CONFIG_USB_EHCI_HCD_PLATFORM
#include "ehci-platform.c"
#define PLATFORM_DRIVER ehci_platform_driver
#endif

and later in ehci_init():

#ifdef PLATFORM_DRIVER
    retval = platform_driver_register(&PLATFORM_DRIVER);
    if (retval < 0)
        goto clean0;
#endif

2) upstream broke ehci implementation since 3.5 (and it's still broken ATM)

Since the 3.5 tree, usb ehci for omap3 has been plagued with problems up to the point that it was disabled upstream:

[flag@newluxor linux-2.6]$ git show 06b4ba5
commit 06b4ba529528fbf9c24ce37b7618f4b0264750e2
Author: Kevin Hilman <email address hidden>
Date: Fri Jul 6 11:20:28 2012 -0700

    ARM: OMAP2+: omap2plus_defconfig: EHCI driver is not stable, disable it

    The EHCI driver is not stable enough to be enabled by default. In v3.5,
    it has at least the following problems:

    - warning dump during bootup
    - hang during suspend
    - prevents CORE powerdomain from entering retention during idle (even
      when no USB devices connected.)

    This demonstrates that this driver has not been thoroughly tested and
    therfore should not be enabled in the default defconfig.

    In addition, the problems above cause new PM regressions which need be
    addressed before this driver should be enabled in the default
    defconfig.

    Signed-off-by: Kevin Hilman <email address hidden>
    Signed-off-by: Tony Lindgren <email address hidden>

and lately this situation has spiraled down to the point where enabling it at boot triggers an oops and a subsequent dead usb hub:

vanilla 3.5 omap2plus_defconfig + ehci:

...
[ 4.200103] omap_wdt: OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
[ 4.208526] twl4030_wdt twl4030_wdt: Failed to register misc device
[ 4.215240] twl4030_wdt: probe of twl4030_wdt failed with error -16
[ 4.225860] omap_hsmmc omap_hsmmc.0: Failed to get debounce clk
[ 4.262084] hub 1-0:1.0: state 7 ports 3 chg 0004 evt 0000
[ 4.267913] hub 1-0:1.0: port 2, status 0501, change 0000, 480 Mb/s
[ 4.332305] platform ehci-omap.0: port 2 reset complete, port enabled
[ 4.339050] platform ehci-omap.0: GetStatus port:2 status 001005 0 ACK POWER sig=se0 PE CONNECT
[ 4.410400] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 4.418884] pgd = c0004000
[ 4.421722] [00000000] *pgd=00000000
[ 4.425476] Internal error: Oops: 5 [#1] SMP ARM
[ 4.430297] Modules linked in:
[ 4.433471] CPU: 0 Not tainted (3.5.0 #16)
[ 4.438110] PC is at hub_port_init+0x28c/0x968
[ 4.442749] LR is at hub_port_init+0xc4/0x968
[ 4.447296] pc : [<c030b2bc>] lr : [<c030b0f4>] psr: 60000013
[ 4.447296] sp : df905eb8 ip : c05a9eb4 fp : 00000000
[ 4.459259] r10: 00000000 r9 : df306400 r8 : 00000032
[ 4.464691] r7 : df30ac00 r6 : 00000002 r5 : 00000000 r4 : df2a7400
[ 4.471496] r3 : 00000000 r2 : c059e324 r1 : c059e348 r0 : df2a7468
[ 4.478302] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 4.485900] Control: 10c5387d Table: 80004019 DAC: 00000017
[ 4.491912] Process khubd (pid: 236, stack limit = 0xdf9042f8)
[ 4.497985] Stack: (0xdf905eb8 to 0xdf906000)
[ 4.502532] 5ea0: 00000002 df306400
[ 4.511047] 5ec0: 00000002 00000000 00000004 c008a078 00000001 00000002 00000003 df300400
[ 4.519561] 5ee0: 00000000 c044acb0 00000001 df2a7400 df30ac00 df300400 df300418 df306400
[ 4.528106] 5f00: 00000002 00000000 00000002 c030eb30 00000501 00000000 c059f090 c0656600
[ 4.536621] 5f20: 107e9dd6 00000000 df306408 df30a820 df30ac9c df30a800 00000004 df306401
[ 4.545135] 5f40: df306470 df30ac00 df306468 df30ac00 df30a820 df300400 00000009 c0065144
[ 4.553680] 5f60: 00000000 df904000 00000000 df88c100 c005cff4 df905f74 df905f74 00000000
[ 4.562194] 5f80: 00000501 c008a078 df82ff20 df82fef8 00000000 c030e4c0 00000013 00000000
[ 4.570709] 5fa0: 00000000 00000000 00000000 c005c8f8 00000000 00000000 00000000 00000000
[ 4.579254] 5fc0: 00000000 dead4ead ffffffff ffffffff c0700330 00000000 00000000 c0561550
[ 4.587768] 5fe0: df905fe0 df905fe0 df82fef8 c005c874 c0014154 c0014154 00000000 00000000
[ 4.596313] [<c030b2bc>] (hub_port_init+0x28c/0x968) from [<c030eb30>] (hub_thread+0x670/0x13d8)
[ 4.605468] [<c030eb30>] (hub_thread+0x670/0x13d8) from [<c005c8f8>] (kthread+0x84/0x90)
[ 4.613922] [<c005c8f8>] (kthread+0x84/0x90) from [<c0014154>] (kernel_thread_exit+0x0/0x8)
[ 4.622619] Code: e59f2690 e5933080 e2840068 e59f1688 (e593e000)
[ 4.629089] ---[ end trace 6fcdeaed28ce1f31 ]---
[ 4.790161] usbcore: registered new interface driver usbhid
...

ATM there's no activity upstream to resolve this bug in a sound way but a patch was posted to linux-omap that resolves it:

http://<email address hidden>/msg73115.html

While it's not upstream, the patch touches only omap3 clock code so it's safe for all the other flavours and it's the only
option we have right now.

The aforementioned patch coupled with disabling the generic ehci/ohci driver implementation fix the usb bus on omap3.

Tags: patch
Paolo Pisati (p-pisati)
Changed in linux (Ubuntu):
assignee: nobody → Paolo Pisati (p-pisati)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1061599

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Paolo Pisati (p-pisati)
description: updated
Paolo Pisati (p-pisati)
description: updated
Paolo Pisati (p-pisati)
description: updated
Paolo Pisati (p-pisati)
description: updated
description: updated
description: updated
Revision history for this message
Paolo Pisati (p-pisati) wrote :
Revision history for this message
Paolo Pisati (p-pisati) wrote :
Revision history for this message
Paolo Pisati (p-pisati) wrote :
Revision history for this message
Paolo Pisati (p-pisati) wrote :
description: updated
tags: added: patch
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Quantal):
status: Incomplete → Fix Committed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Clock fix for omap3 (point 2 of the bug)" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.5.0-17.28

---------------
linux (3.5.0-17.28) quantal-proposed; urgency=low

  [ Andy Whitcroft ]

  * [packaging] we already have a valid src_pkg_name
  * [packaging] allow us to select which builds have uefi signed versions

  [ James M Leddy ]

  * SAUCE: input: fix weird issue of synaptics psmouse sync lost after
    resume
    - LP: #717970

  [ Paolo Pisati ]

  * SAUCE: omap3 clocks .dev_id = NULL
    - LP: #1061599
  * [Config] omap: disable USB_[EHCI|OHCI]_HCD_PLATFORM
    - LP: #1061599
  * [Config] omap: enforce USB_[EHCI|OHCI]_HCD_PLATFORM=n
    - LP: #1061599

  [ Stefan Bader ]

  * SAUCE: net/ipv4: Always flush route cache on unregister batch call
    - LP: #1021471

  [ Upstream Kernel Changes ]

  * Bluetooth: Add USB_VENDOR_AND_INTERFACE_INFO() for Broadcom/Foxconn
    - LP: #1030233

  [ Wen-chien Jesse Sung ]

  * SAUCE: Bluetooth: Remove rules for matching Broadcom vendor specific
    IDs
    - LP: #1030233
 -- Leann Ogasawara <email address hidden> Tue, 09 Oct 2012 11:23:41 -0700

Changed in linux (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.