imx6: sata fixes

Bug #1240038 reported by Paolo Pisati
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Paolo Pisati
Saucy
Fix Released
Medium
Paolo Pisati

Bug Description

SRU Justification:

Impact:

/dev/sda doesn't show up on imx6 board and while support for the sata controller was submitted upstream[1], we were missing a dts snippet that didn't make the 3.11 window (but entered as part of 3.12, thus i cherry-picked plus some mechanical
modification to make it apply).

Moreover, building this driver as a module triggers an error when loading:

[ 3.447345] sysfs: cannot create duplicate filename '/bus/platform/devices/ahci'
[ 3.454799] Modules linked in: ahci_imx(F+) xor(F+) zlib_deflate(F) libcrc32c(F)
[ 3.462343] CPU: 0 PID: 193 Comm: modprobe Tainted: GF 3.11.0-13-generic #20~imx6sata
[ 3.471223] [<c001dd70>] (unwind_backtrace+0x0/0x138) from [<c00184dc>] (show_stack+0x10/0x14)
[ 3.479916] [<c00184dc>] (show_stack+0x10/0x14) from [<c065c710>] (dump_stack+0x74/0x90)
[ 3.488040] [<c065c710>] (dump_stack+0x74/0x90) from [<c004e2fc>] (warn_slowpath_common+0x68/0x8c)
[ 3.497066] [<c004e2fc>] (warn_slowpath_common+0x68/0x8c) from [<c004e3b4>] (warn_slowpath_fmt+0x30/0x40)
[ 3.498634] 32regs : 709.200 MB/sec
[ 3.498640] xor: using function: arm4regs (1087.600 MB/sec)
[ 3.516510] [<c004e3b4>] (warn_slowpath_fmt+0x30/0x40) from [<c01a901c>] (sysfs_add_one+0x84/0xa4)
[ 3.525557] [<c01a901c>] (sysfs_add_one+0x84/0xa4) from [<c01a9c20>] (sysfs_do_create_link_sd+0xd0/0x200)
[ 3.535207] [<c01a9c20>] (sysfs_do_create_link_sd+0xd0/0x200) from [<c03bb5a8>] (bus_add_device+0xc4/0x17c)
[ 3.545004] [<c03bb5a8>] (bus_add_device+0xc4/0x17c) from [<c03b98d8>] (device_add+0x38c/0x668)
[ 3.553770] [<c03b98d8>] (device_add+0x38c/0x668) from [<c03bdc3c>] (platform_device_add+0xbc/0x258)
[ 3.562958] [<c03bdc3c>] (platform_device_add+0xbc/0x258) from [<bf01234c>] (imx_ahci_probe+0x17c/0x1e8 [ahci_imx])
[ 3.573456] [<bf01234c>] (imx_ahci_probe+0x17c/0x1e8 [ahci_imx]) from [<c03bd7a8>] (platform_drv_probe+0x18/0x1c)
[ 3.583774] [<c03bd7a8>] (platform_drv_probe+0x18/0x1c) from [<c03bc378>] (driver_probe_device+0x130/0x374)
[ 3.593562] [<c03bc378>] (driver_probe_device+0x130/0x374) from [<c03ba718>] (bus_for_each_drv+0x44/0x8c)
[ 3.603174] [<c03ba718>] (bus_for_each_drv+0x44/0x8c) from [<c03bc1dc>] (device_attach+0x70/0x88)
[ 3.612093] [<c03bc1dc>] (device_attach+0x70/0x88) from [<c03bb6e4>] (bus_probe_device+0x84/0xa8)
[ 3.621018] [<c03bb6e4>] (bus_probe_device+0x84/0xa8) from [<c03b992c>] (device_add+0x3e0/0x668)
[ 3.629853] [<c03b992c>] (device_add+0x3e0/0x668) from [<c03bdc3c>] (platform_device_add+0xbc/0x258)
[ 3.639031] [<c03bdc3c>] (platform_device_add+0xbc/0x258) from [<bf01234c>] (imx_ahci_probe+0x17c/0x1e8 [ahci_imx])
[ 3.649509] [<bf01234c>] (imx_ahci_probe+0x17c/0x1e8 [ahci_imx]) from [<c03bd7a8>] (platform_drv_probe+0x18/0x1c)
[ 3.659810] [<c03bd7a8>] (platform_drv_probe+0x18/0x1c) from [<c03bc378>] (driver_probe_device+0x130/0x374)
[ 3.669588] [<c03bc378>] (driver_probe_device+0x130/0x374) from [<c03bc648>] (__driver_attach+0x8c/0x90)
[ 3.679106] [<c03bc648>] (__driver_attach+0x8c/0x90) from [<c03ba7b4>] (bus_for_each_dev+0x54/0x88)
[ 3.688175] [<c03ba7b4>] (bus_for_each_dev+0x54/0x88) from [<c03bb914>] (bus_add_driver+0xe8/0x260)
[ 3.697266] [<c03bb914>] (bus_add_driver+0xe8/0x260) from [<c03bcb44>] (driver_register+0x78/0x14c)
[ 3.706353] [<c03bcb44>] (driver_register+0x78/0x14c) from [<c0008814>] (do_one_initcall+0xe0/0x198)
[ 3.715532] [<c0008814>] (do_one_initcall+0xe0/0x198) from [<c00a9844>] (load_module+0x1074/0x1778)
[ 3.724617] [<c00a9844>] (load_module+0x1074/0x1778) from [<c00aa004>] (SyS_init_module+0xbc/0x120)
[ 3.733707] [<c00aa004>] (SyS_init_module+0xbc/0x120) from [<c00146c0>] (ret_fast_syscall+0x0/0x30)
[ 3.742781] ---[ end trace 17860721d4bad439 ]---
[ 3.748403] ahci-imx: probe of ahci failed with error -17
[ 3.763773] Request for unknown module key 'Magrathea: Glacier signing key: ec957d9a18384eacadf7527998f7b9343803c433' err -11
[ 3.768979] platform ahci: failed to claim resource 0
[ 3.769006] ahci-imx: probe of ahci failed with error -16

as it appears it's the same driver that tries to create the same sysfile multiple times, failing:

root@ubuntu-desktop:~# cat /sys/bus/platform/devices/ahci/uevent
OF_NAME=sata
OF_FULLNAME=/soc/sata@02200000
OF_COMPATIBLE_0=fsl,imx6q-ahci
OF_COMPATIBLE_N=1
MODALIAS=of:NsataT<NULL>Cfsl,imx6q-ahci

Statically compiling support for AHCI_IMX works workaround this problem (and all the other kernel supporting this board - indeed - compile this driver statically BTW), so until a proper fix is found, i propose to compile it in.

Fix:

apply the two patches below

Testcase:

compile a patched kernel and boot it

[1] http://www.spinics.net/lists/linux-ide/msg45823.html

Revision history for this message
Paolo Pisati (p-pisati) wrote :
Revision history for this message
Paolo Pisati (p-pisati) wrote :
Paolo Pisati (p-pisati)
description: updated
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 1240038

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
tags: added: patch
Andy Whitcroft (apw)
Changed in linux (Ubuntu Saucy):
importance: Undecided → Medium
assignee: nobody → Paolo Pisati (p-pisati)
status: Incomplete → Fix Committed
Revision history for this message
Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-saucy' to 'verification-done-saucy'.

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

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-saucy
Paolo Pisati (p-pisati)
tags: added: verification-done-saucy
removed: verification-needed-saucy
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (18.4 KiB)

This bug was fixed in the package linux - 3.11.0-13.20

---------------
linux (3.11.0-13.20) saucy; urgency=low

  [ Brad Figg ]

  * Release Tracking Bug
    - LP: #1242793

  [ Paolo Pisati ]

  * [Config] amhf: VIRTIO_CONSOLE=y
    - LP: #1237982
  * [Config] AHCI_IMX=y
    - LP: #1240038

  [ Tim Gardner ]

  * [Config] CONFIG_USB_OTG=n for all arches
    - LP: #1047527
  * dm-raid4-5: Fix compile issues
    - LP: #1241086
  * [Config] CONFIG_DM_RAID45=m
    - LP: #1241086

  [ Upstream Kernel Changes ]

  * Revert "cw1200: Don't perform SPI transfers in interrupt context"
    - LP: #1237530
  * block: Fix bio_copy_data()
    - LP: #1237530
  * sysv: Add forgotten superblock lock init for v7 fs
    - LP: #1237530
  * bcache: Fix a dumb journal discard bug
    - LP: #1237530
  * bcache: Strip endline when writing the label through sysfs
    - LP: #1237530
  * bcache: Fix for when no journal entries are found
    - LP: #1237530
  * bcache: Fix a writeback performance regression
    - LP: #1237530
  * bcache: Fix a flush/fua performance bug
    - LP: #1237530
  * bcache: Fix a dumb CPU spinning bug in writeback
    - LP: #1237530
  * bcache: Fix a shrinker deadlock
    - LP: #1237530
  * bcache: Fix for handling overlapping extents when reading in a btree
    node
    - LP: #1237530
  * bcache: Fix flushes in writeback mode
    - LP: #1237530
  * kernel/reboot.c: re-enable the function of variable reboot_default
    - LP: #1237530
  * x86/reboot: Add quirk to make Dell C6100 use reboot=pci automatically
    - LP: #1237530
  * tools lib lk: Uninclude linux/magic.h in debugfs.c
    - LP: #1237530
  * x86, efi: Don't map Boot Services on i386
    - LP: #1237530
  * mei: make me client counters less error prone
    - LP: #1237530
  * mei: bus: stop wait for read during cl state transition
    - LP: #1237530
  * mei: cancel stall timers in mei_reset
    - LP: #1237530
  * tty: Fix SIGTTOU not sent with tcflush()
    - LP: #1237530
  * serial: tegra: fix tty-kref leak
    - LP: #1237530
  * serial: pch_uart: fix tty-kref leak in rx-error path
    - LP: #1237530
  * serial: pch_uart: fix tty-kref leak in dma-rx path
    - LP: #1237530
  * ARM: 7837/3: fix Thumb-2 bug in AES assembler code
    - LP: #1237530
  * staging: vt6656: [BUG] main_usb.c oops on device_close move flag
    earlier.
    - LP: #1237530
  * staging: vt6656: [BUG] iwctl_siwencodeext return if device not open
    - LP: #1237530
  * drm/i915/tv: clear adjusted_mode.flags
    - LP: #1237530
  * cw1200: Use a threaded oneshot irq handler for cw1200_spi
    - LP: #1237530
  * xhci: Ensure a command structure points to the correct trb on the
    command ring
    - LP: #1237530
  * xhci: Fix oops happening after address device timeout
    - LP: #1237530
  * USB: fix PM config symbol in uhci-hcd, ehci-hcd, and xhci-hcd
    - LP: #1237530
  * xhci: Fix race between ep halt and URB cancellation
    - LP: #1237530
  * USB: OHCI: accept very late isochronous URBs
    - LP: #1237530
  * USB: UHCI: accept very late isochronous URBs
    - LP: #1237530
  * USB: Fix breakage in ffs_fs_mount()
    - LP: #1237530
  * fsl/usb: Resolve PHY_CLK_VLD instability issue for ULPI phy
    - LP: #1237530
  *...

Changed in linux (Ubuntu Saucy):
status: Fix Committed → Fix Released
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
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.