/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).
Moreover, building this driver as a module triggers an error when the module is loaded:
[ 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:
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.
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).
Moreover, building this driver as a module triggers an error when the module is loaded:
[ 3.447345] sysfs: cannot create duplicate filename '/bus/platform/ devices/ ahci' backtrace+ 0x0/0x138) from [<c00184dc>] (show_stack+ 0x10/0x14) 0x10/0x14) from [<c065c710>] (dump_stack+ 0x74/0x90) 0x74/0x90) from [<c004e2fc>] (warn_slowpath_ common+ 0x68/0x8c) common+ 0x68/0x8c) from [<c004e3b4>] (warn_slowpath_ fmt+0x30/ 0x40) fmt+0x30/ 0x40) from [<c01a901c>] (sysfs_ add_one+ 0x84/0xa4) add_one+ 0x84/0xa4) from [<c01a9c20>] (sysfs_ do_create_ link_sd+ 0xd0/0x200) do_create_ link_sd+ 0xd0/0x200) from [<c03bb5a8>] (bus_add_ device+ 0xc4/0x17c) device+ 0xc4/0x17c) from [<c03b98d8>] (device_ add+0x38c/ 0x668) add+0x38c/ 0x668) from [<c03bdc3c>] (platform_ device_ add+0xbc/ 0x258) device_ add+0xbc/ 0x258) from [<bf01234c>] (imx_ahci_ probe+0x17c/ 0x1e8 [ahci_imx]) probe+0x17c/ 0x1e8 [ahci_imx]) from [<c03bd7a8>] (platform_ drv_probe+ 0x18/0x1c) drv_probe+ 0x18/0x1c) from [<c03bc378>] (driver_ probe_device+ 0x130/0x374) probe_device+ 0x130/0x374) from [<c03ba718>] (bus_for_ each_drv+ 0x44/0x8c) each_drv+ 0x44/0x8c) from [<c03bc1dc>] (device_ attach+ 0x70/0x88) attach+ 0x70/0x88) from [<c03bb6e4>] (bus_probe_ device+ 0x84/0xa8) device+ 0x84/0xa8) from [<c03b992c>] (device_ add+0x3e0/ 0x668) add+0x3e0/ 0x668) from [<c03bdc3c>] (platform_ device_ add+0xbc/ 0x258) device_ add+0xbc/ 0x258) from [<bf01234c>] (imx_ahci_ probe+0x17c/ 0x1e8 [ahci_imx]) probe+0x17c/ 0x1e8 [ahci_imx]) from [<c03bd7a8>] (platform_ drv_probe+ 0x18/0x1c) drv_probe+ 0x18/0x1c) from [<c03bc378>] (driver_ probe_device+ 0x130/0x374) probe_device+ 0x130/0x374) from [<c03bc648>] (__driver_ attach+ 0x8c/0x90) attach+ 0x8c/0x90) from [<c03ba7b4>] (bus_for_ each_dev+ 0x54/0x88) each_dev+ 0x54/0x88) from [<c03bb914>] (bus_add_ driver+ 0xe8/0x260) driver+ 0xe8/0x260) from [<c03bcb44>] (driver_ register+ 0x78/0x14c) register+ 0x78/0x14c) from [<c0008814>] (do_one_ initcall+ 0xe0/0x198) initcall+ 0xe0/0x198) from [<c00a9844>] (load_module+ 0x1074/ 0x1778) 0x1074/ 0x1778) from [<c00aa004>] (SyS_init_ module+ 0xbc/0x120) module+ 0xbc/0x120) from [<c00146c0>] (ret_fast_ syscall+ 0x0/0x30) cadf7527998f7b9 343803c433' err -11
[ 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_
[ 3.479916] [<c00184dc>] (show_stack+
[ 3.488040] [<c065c710>] (dump_stack+
[ 3.497066] [<c004e2fc>] (warn_slowpath_
[ 3.498634] 32regs : 709.200 MB/sec
[ 3.498640] xor: using function: arm4regs (1087.600 MB/sec)
[ 3.516510] [<c004e3b4>] (warn_slowpath_
[ 3.525557] [<c01a901c>] (sysfs_
[ 3.535207] [<c01a9c20>] (sysfs_
[ 3.545004] [<c03bb5a8>] (bus_add_
[ 3.553770] [<c03b98d8>] (device_
[ 3.562958] [<c03bdc3c>] (platform_
[ 3.573456] [<bf01234c>] (imx_ahci_
[ 3.583774] [<c03bd7a8>] (platform_
[ 3.593562] [<c03bc378>] (driver_
[ 3.603174] [<c03ba718>] (bus_for_
[ 3.612093] [<c03bc1dc>] (device_
[ 3.621018] [<c03bb6e4>] (bus_probe_
[ 3.629853] [<c03b992c>] (device_
[ 3.639031] [<c03bdc3c>] (platform_
[ 3.649509] [<bf01234c>] (imx_ahci_
[ 3.659810] [<c03bd7a8>] (platform_
[ 3.669588] [<c03bc378>] (driver_
[ 3.679106] [<c03bc648>] (__driver_
[ 3.688175] [<c03ba7b4>] (bus_for_
[ 3.697266] [<c03bb914>] (bus_add_
[ 3.706353] [<c03bcb44>] (driver_
[ 3.715532] [<c0008814>] (do_one_
[ 3.724617] [<c00a9844>] (load_module+
[ 3.733707] [<c00aa004>] (SyS_init_
[ 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: ec957d9a18384ea
[ 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 /soc/sata@ 02200000 0=fsl,imx6q- ahci of:NsataT< NULL>Cfsl, imx6q-ahci
OF_NAME=sata
OF_FULLNAME=
OF_COMPATIBLE_
OF_COMPATIBLE_N=1
MODALIAS=
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