No USB support on Armel

Bug #791552 reported by Tobin Davis on 2011-06-01
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Linux
Invalid
Undecided
Unassigned
gcc-4.6-armel-cross (Ubuntu)
High
Unassigned
Natty
Undecided
Unassigned
Oneiric
High
Unassigned
linux (Ubuntu)
High
Unassigned
Natty
Undecided
Paolo Pisati
Oneiric
High
Unassigned
linux-ti-omap4 (Ubuntu)
High
Bryan Wu
Natty
Undecided
Paolo Pisati
Oneiric
High
Bryan Wu

Bug Description

SRU Justification:

Impact: when compiled with gcc 4.6, we loose usb on every omap* hw.
Fix: see attached patch.
Testcase: compile an omap[4] kernel with gcc 4.6 and boot it, you will notice there are no usb devices present.

beagle xm, natty kernel and gcc 4.6:

flag@ubuntu:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

versus

beagle xm, natty kernel and gcc 4.6 + ehci fix:

flag@ubuntu:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 03f0:5307 Hewlett-Packard

===
Neither the beagle (rev C4) nor the beagle XM (rev B) USB ports work with the 2.6.39 kernel. Without USB, there is no keyboard or network.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-omap 2.6.39.3.4
ProcVersionSignature: User Name 2.6.39-3.10-omap 2.6.39
Uname: Linux 2.6.39-3-omap armv7l
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices: Error: [Errno 2] No such file or directory
Architecture: armel
ArecordDevices: Error: [Errno 2] No such file or directory
CurrentDmesg: [ 70.234100] Adding 524284k swap on /SWAP.swap. Priority:-1 extents:137 across:793660k SS
Date: Wed Jun 1 13:03:46 2011
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
ProcKernelCmdLine: ro elevator=noop vram=12M omapfb.mode=dvi:1280x720MR-16@60 mpurate=1000 root=UUID=2ef1c514-c425-4402-acf8-0a515a608d3a fixrtc quiet splash console=ttyO2,115200n8
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)

Tobin Davis (gruemaster) wrote :
tags: added: iso-testing
Paolo Pisati (p-pisati) wrote :

the issue was still present on imx51 when loading the parport module in case parport_pc was enabled.

Paolo Pisati (p-pisati) wrote :

and disabling PARPORT_PC fixes it.

Paolo Pisati (p-pisati) wrote :
Download full text (3.5 KiB)

[flag@newluxor ubuntu-oneiric]$ git log --oneline -1
5da5c79 UBUNTU: Ubuntu-2.6.39-3.10

compiling an oneiric kernel with gcc 4.6 make me reproduce the problem:

[ 0.000000] Linux version 2.6.39-3-omap (root@newluxor) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.0-10ubuntu2) ) #10 Fri Jun 3 17:18:12 CEST 2011 (Ubuntu 2.6.39-3.10-omap 2.6.39)
...
flag@ubuntu:~$ ifconfig eth0
eth0: error fetching interface information: Device not found
flag@ubuntu:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

[flag@newluxor ~]$ dpkg -l | grep 4.6 | grep arm
ii cpp-4.6-arm-linux-gnueabi 4.6.0-10ubuntu2cross1.49 The GNU C preprocessor
ii g++-4.6-arm-linux-gnueabi 4.6.0-10ubuntu2cross1.49 The GNU C++ compiler
ii gcc-4.6-arm-linux-gnueabi 4.6.0-10ubuntu2cross1.49 The GNU C compiler
ii gcc-4.6-arm-linux-gnueabi-base 4.6.0-10ubuntu2cross1.49 The GNU Compiler Collection (base package)
pi libgcc1-armel-cross 1:4.6.0-10ubuntu2cross1.65 GCC support library
ii libgomp1-armel-cross 4.6.0-10ubuntu2cross1.49 GCC OpenMP (GOMP) support library
ii libmudflap0-4.6-dev-armel-cross 4.6.0-10ubuntu2cross1.49 GCC mudflap support libraries (development files)
ii libmudflap0-armel-cross 4.6.0-10ubuntu2cross1.49 GCC mudflap shared support libraries
ii libstdc++6-4.6-dev-armel-cross 4.6.0-10ubuntu2cross1.49 The GNU Standard C++ Library v3 (development files)
ii libstdc++6-4.6-pic-armel-cross 4.6.0-10ubuntu2cross1.49 The GNU Standard C++ Library v3 (shared library subset kit)
ii libstdc++6-armel-cross 4.6.0-10ubuntu2cross1.49 The GNU Standard C++ Library v3

while, if i recompile the same tree with gcc 4.5, everything works as expected:

[ 0.000000] Linux version 2.6.39-3-omap (root@newluxor) (gcc version 4.5.3 (Ubuntu/Linaro 4.5.3-1ubuntu2) ) #10 Fri Jun 3 16:07:23 CEST 2011 (Ubuntu 2.6.39-3.10-omap 2.6.39)
...
flag@ubuntu:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 7e:cf:20:cb:ca:dd
          BROADCAST MULTICAST MTU:1492 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

flag@ubuntu:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 03f0:5307 Hewlett-Packard

[flag@newluxor ~]$ dpkg -l | grep 4.5 | grep arm
ii cpp-4.5-arm-linux-gnueabi 4.5.3-1ubuntu2cross1.48 The GNU C preprocessor
ii cpp-arm-linux-gnueabi 4:4.5.2-8 The GNU C preprocessor (c...

Read more...

Paolo Pisati (p-pisati) wrote :

and while here, disregard comments #2 and #3, cut&paste to the wrong tab.

Paolo Pisati (p-pisati) wrote :

and i can confirm the same exact problem is present in linux-linaro-natty:

http://pastebin.ubuntu.com/620786/

Fathi Boudra (fboudra) on 2011-06-07
tags: added: linaro
Oliver Grawert (ogra) on 2011-06-10
Changed in linux (Ubuntu):
importance: Undecided → High
Changed in linux (Ubuntu Oneiric):
milestone: none → oneiric-alpha-2
Changed in gcc-4.6-armel-cross (Ubuntu Oneiric):
importance: Undecided → High
milestone: none → oneiric-alpha-2
Paolo Pisati (p-pisati) wrote :

it seems we are not the only one having this issue:

https://lists.yoctoproject.org/pipermail/poky/2011-April/005703.html
https://lists.yoctoproject.org/pipermail/poky/2011-May/005763.html

and in the continuation of this thread there's some low level debugging (and a couple of workarounds that didn't succeed on a vanilla 2.6.38):

https://lists.yoctoproject.org/pipermail/poky/2011-June/006634.html

moreover this issue in present in omap4 too.

Michael Hope (michaelh1) wrote :

This is a instance of:
 http://gcc.gnu.org/ml/gcc/2011-02/msg00035.html

The kernel source marks ehci_regs as packed. gcc 4.6 treats all accesses to packed structures as unaligned and ends up reading the status register multiple times.

This isn't a problem with GCC but may be fixed by the kernel team through GCC.

Changed in gcc-4.6-armel-cross (Ubuntu Oneiric):
status: New → Invalid
Paolo Pisati (p-pisati) wrote :

the attached patch fixes this issue (1395401 in linus tree).

and here is a an omap3 kernel compiled with gcc4.6 and this fix applied: http://people.canonical.com/~ppisati/lp791552/linux-image-2.6.38-10-omap_2.6.38-10.44~gcc4.6-ehcifix_armel.deb

Changed in linux (Ubuntu Oneiric):
status: New → In Progress
Paolo Pisati (p-pisati) wrote :
description: updated
Paolo Pisati (p-pisati) on 2011-06-22
description: updated
Tim Gardner (timg-tpi) on 2011-06-22
Changed in linux (Ubuntu Oneiric):
status: In Progress → Fix Released
Changed in linux (Ubuntu Natty):
assignee: nobody → Paolo Pisati (p-pisati)
status: New → Fix Committed
Changed in linux-ti-omap4 (Ubuntu Oneiric):
status: New → Fix Released
Changed in linux-ti-omap4 (Ubuntu Natty):
assignee: nobody → Paolo Pisati (p-pisati)
status: New → Fix Committed
Changed in gcc-4.6-armel-cross (Ubuntu Natty):
status: New → Invalid
Changed in linux-linaro:
status: New → Invalid
Tobin Davis (gruemaster) on 2011-07-05
summary: - No USB support on beagle/beagleXM
+ No USB support on Armel
Tobin Davis (gruemaster) wrote :

Reverting to confirmed as the latest oneiric kernel (linux-image-2.6.38-1309-omap4 2.6.38-1309.13) has this issue and the fix doesn't appear to be in any current kernel.

Changed in linux-ti-omap4 (Ubuntu Oneiric):
status: Fix Released → Confirmed
Bryan Wu (cooloney) on 2011-07-06
Changed in linux-ti-omap4 (Ubuntu Oneiric):
assignee: nobody → Bryan Wu (cooloney)
importance: Undecided → High
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-ti-omap4 - 2.6.38-1309.14

---------------
linux-ti-omap4 (2.6.38-1309.14) oneiric; urgency=low

  [ Upstream Kernel Changes ]

  * USB: ehci: remove structure packing from ehci_def
    - LP: #791552
 -- Andy Whitcroft <email address hidden> Wed, 06 Jul 2011 09:03:41 +0100

Changed in linux-ti-omap4 (Ubuntu Oneiric):
status: In Progress → Fix Released
Herton R. Krzesinski (herton) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem, but seems we need gcc 4.6 to trigger the issue.

As this can only be verified on arm currently, with a specific compiler version, please check the current natty and natty linux-ti-omap4 trees, build it with gcc 4.6, and verify everything is ok. If the problem is solved, change the tag 'verification-needed-natty' to 'verification-done-natty'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

tags: added: verification-needed-natty
Tobin Davis (gruemaster) wrote :

Verified that natty 2.6.38-1209.13 works as it should.

tags: added: verification-done-natty
removed: verification-needed-natty
Ricardo Salveti (rsalveti) wrote :

Tobin, did you rebuild the natty kernel with gcc 4.6 before testing it?

Oliver Grawert (ogra) wrote :

why would he need to ? the binary package we provide from either natty-proposed or natty-updates will be built with 4.5 in any case (to be honest i dont really get why we have a natty task on this bug at all)

... neither linux nor linux-ti-omap4 will ever be built with 4.6 in the archive for natty and the oneiric trees have the fix.

Launchpad Janitor (janitor) wrote :
Download full text (13.4 KiB)

This bug was fixed in the package linux - 2.6.38-11.48

---------------
linux (2.6.38-11.48) natty-proposed; urgency=low

  [Herton R. Krzesinski]

  * Release Tracking Bug
    - LP: #818175

  [ Upstream Kernel Changes ]

  * Revert "HID: magicmouse: ignore 'ivalid report id' while switching
    modes"
    - LP: #814250

linux (2.6.38-11.47) natty-proposed; urgency=low

  [Steve Conklin]

  * Release Tracking Bug
    - LP: #811180

  [ Keng-Yu Lin ]

  * SAUCE: Revert: "dell-laptop: Toggle the unsupported hardware
    killswitch"
    - LP: #775281

  [ Ming Lei ]

  * SAUCE: fix yama_ptracer_del lockdep warning
    - LP: #791019

  [ Stefan Bader ]

  * SAUCE: Re-enable RODATA for i386 virtual
    - LP: #809838

  [ Tim Gardner ]

  * [Config] Add grub-efi as a recommended bootloader for server and
    generic
    - LP: #800910
  * SAUCE: rtl8192se: Force a build for a 2.6/3.0 kernel
    - LP: #805494

  [ Upstream Kernel Changes ]

  * Revert "bridge: Forward reserved group addresses if !STP"
    - LP: #793702
  * Fix up ABI directory
  * bonding: Incorrect TX queue offset, CVE-2011-1581
    - LP: #792312
    - CVE-2011-1581
  * fs/partitions/efi.c: corrupted GUID partition tables can cause kernel
    oops
    - LP: #795418
    - CVE-2011-1577
  * usbnet/cdc_ncm: add missing .reset_resume hook
    - LP: #793892
  * ath5k: Disable fast channel switching by default
    - LP: #767192
  * mm: vmscan: correctly check if reclaimer should schedule during
    shrink_slab
    - LP: #755066
  * mm: vmscan: correct use of pgdat_balanced in sleeping_prematurely
    - LP: #755066
  * ALSA: hda - Use LPIB for ATI/AMD chipsets as default
    - LP: #741825
  * ALSA: hda - Enable snoop bit for AMD controllers
    - LP: #741825
  * ALSA: hda - Enable sync_write workaround for AMD generically
    - LP: #741825
  * cpuidle: menu: fixed wrapping timers at 4.294 seconds
    - LP: #774947
  * drm/i915: Fix gen6 (SNB) missed BLT ring interrupts.
    - LP: #761065
  * USB: ehci: remove structure packing from ehci_def
    - LP: #791552
  * drm/i915: disable PCH ports if needed when disabling a CRTC
    - LP: #791752
  * kmemleak: Do not return a pointer to an object that kmemleak did not
    get
    - LP: #793702
  * kmemleak: Initialise kmemleak after debug_objects_mem_init()
    - LP: #793702
  * Fix _OSC UUID in pcc-cpufreq
    - LP: #793702
  * CPU hotplug, re-create sysfs directory and symlinks
    - LP: #793702
  * Fix memory leak in cpufreq_stat
    - LP: #793702
  * net: recvmmsg: Strip MSG_WAITFORONE when calling recvmsg
    - LP: #793702
  * ftrace: Only update the function code on write to filter files
    - LP: #793702
  * qla2xxx: Fix hang during driver unload when vport is active.
    - LP: #793702
  * qla2xxx: Fix virtual port failing to login after chip reset.
    - LP: #793702
  * qla2xxx: Fix vport delete hang when logins are outstanding.
    - LP: #793702
  * powerpc/kdump64: Don't reference freed memory as pacas
    - LP: #793702
  * powerpc/kexec: Fix memory corruption from unallocated slaves
    - LP: #793702
  * x86, cpufeature: Fix cpuid leaf 7 feature detection
    - LP: #793702
  * ath9k_hw: do noise floor calibration only on required chain...

Changed in linux (Ubuntu Natty):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :
Download full text (38.0 KiB)

This bug was fixed in the package linux-ti-omap4 - 2.6.38-1209.15

---------------
linux-ti-omap4 (2.6.38-1209.15) natty-proposed; urgency=low

  * Release tracking bug
    - LP: #837761

  [ Paolo Pisati ]

  * [Config] Turn on CONFIG_USER_NS and DEVPTS_MULTIPLE_INSTANCES.
    - LP: #787749

  [ Tim Gardner ]

  * [Config] Add enic/fnic to nic-modules udeb, CVE-2011-1020
    - LP: #801610

  [ Upstream Kernel Changes ]

  * mpt2sas: prevent heap overflows and unchecked reads
    - LP: #780546
  * agp: fix arbitrary kernel memory writes
    - LP: #775809
  * can: add missing socket check in can/raw release
    - LP: #780546
  * agp: fix OOM and buffer overflow
    - LP: #775809
  * bonding: Incorrect TX queue offset, CVE-2011-1581
    - LP: #792312
    - CVE-2011-1581
  * fs/partitions/efi.c: corrupted GUID partition tables can cause kernel
    oops
    - LP: #795418
    - CVE-2011-1577
  * can: Add missing socket check in can/bcm release.
    - LP: #796502
    - CVE-2011-1598
  * USB: ehci: remove structure packing from ehci_def
    - LP: #791552
  * taskstats: don't allow duplicate entries in listener mode,
    CVE-2011-2484
    - LP: #806390
    - CVE-2011-2484
  * ext4: init timer earlier to avoid a kernel panic in __save_error_info,
    CVE-2011-2493
    - LP: #806929
    - CVE-2011-2493
  * dccp: handle invalid feature options length, CVE-2011-1770
    - LP: #806375
    - CVE-2011-1770
  * pagemap: close races with suid execve, CVE-2011-1020
    - LP: #813026
    - CVE-2011-1020
  * report errors in /proc/*/*map* sanely, CVE-2011-1020
    - LP: #813026
    - CVE-2011-1020
  * close race in /proc/*/environ, CVE-2011-1020
    - LP: #813026
    - CVE-2011-1020
  * auxv: require the target to be tracable (or yourself), CVE-2011-1020
    - LP: #813026
    - CVE-2011-1020
  * deal with races in /proc/*/{syscall, stack, personality}, CVE-2011-1020
    - LP: #813026
    - CVE-2011-1020
  * rose: Add length checks to CALL_REQUEST parsing, CVE-2011-1493
    - LP: #816550
    - CVE-2011-1493
  * GFS2: make sure fallocate bytes is a multiple of blksize, CVE-2011-2689
    - LP: #819572
    - CVE-2011-2689
  * Bluetooth: l2cap and rfcomm: fix 1 byte infoleak to userspace.
    - LP: #819569
    - CVE-2011-2492
  * Add mount option to check uid of device being mounted = expect uid,
    CVE-2011-1833
    - LP: #732628
    - CVE-2011-1833
  * ipv6: make fragment identifications less predictable, CVE-2011-2699
    - LP: #827685
    - CVE-2011-2699
  * perf: Fix software event overflow, CVE-2011-2918
    - LP: #834121
    - CVE-2011-2918
  * proc: fix oops on invalid /proc/<pid>/maps access, CVE-2011-1020
    - LP: #813026
    - CVE-2011-1020

linux-ti-omap4 (2.6.38-1209.13) natty; urgency=low

  [ Tim Gardner ]

  * Release Tracking Bug
    - LP: #772381

  [ Brad Figg ]

  * Ubuntu-2.6.38-9.43

  [ Bryan Wu ]

  * merge Ubuntu-2.6.38-9.43
  * cherry-pick 6 patches from u2 of 'for-ubuntu' branch
  * [Config] Sync up configs for 2.6.38.4

  [ Herton Ronaldo Krzesinski ]

  * SAUCE: Revert "x86, hibernate: Initialize mmu_cr4_features during boot"
    - LP: #764758

  [ Leann Ogasawara ]

  * [Config] updateconfigs for 2.6.38.4

  [ Paolo Pisati ]

  * [Conf...

Changed in linux-ti-omap4 (Ubuntu Natty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers