Bug 215732 - Marvell 88SE9230: cannot create duplicate filename in sysfs
Summary: Marvell 88SE9230: cannot create duplicate filename in sysfs
Status: NEW
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA (show other bugs)
Hardware: ARM Linux
: P1 low
Assignee: Tejun Heo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-23 11:06 UTC by Mathias Bavay
Modified: 2022-04-04 08:24 UTC (History)
0 users

See Also:
Kernel Version: 5.15.29
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg (48.52 KB, text/plain)
2022-03-23 11:06 UTC, Mathias Bavay
Details
dmesg when no disks are attached to the Marvell adapter (46.84 KB, text/plain)
2022-04-04 08:24 UTC, Mathias Bavay
Details

Description Mathias Bavay 2022-03-23 11:06:20 UTC
As seen on a RockPro64 SBC (based on Rockship RK3399 ARM), a Marvell 88SE9230 based pcie <-> sata adapter triggers the following message:

[   20.507056] sysfs: cannot create duplicate filename '/devices/platform/f8000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/remapped_nvme'
[   20.507152] CPU: 0 PID: 532 Comm: bash Not tainted 5.15.29-rockchip64 #trunk.0010
[   20.507255] Hardware name: Pine64 RockPro64 v2.1 (DT)
[   20.507281] Call trace:
[   20.507287]  dump_backtrace+0x0/0x200
[   20.507339]  show_stack+0x18/0x28
[   20.507359]  dump_stack_lvl+0x68/0x84
[   20.507380]  dump_stack+0x18/0x34
[   20.507396]  sysfs_warn_dup+0x64/0x80
[   20.507419]  sysfs_add_file_mode_ns+0x17c/0x1b0
[   20.507438]  sysfs_add_file_to_group+0x7c/0xc8
[   20.507457]  ahci_init_one+0x284/0xcd0
[   20.507475]  local_pci_probe+0x40/0xb0
[   20.507497]  pci_device_probe+0x118/0x1b0
[   20.507516]  really_probe+0xbc/0x428
[   20.507532]  __driver_probe_device+0x114/0x188
[   20.507548]  device_driver_attach+0x30/0x68
[   20.507564]  bind_store+0xa8/0x130
[   20.507580]  drv_attr_store+0x24/0x38
[   20.507594]  sysfs_kf_write+0x44/0x58
[   20.507612]  kernfs_fop_write_iter+0x138/0x1c8
[   20.507631]  new_sync_write+0x104/0x188
[   20.507648]  vfs_write+0x24c/0x370
[   20.507662]  ksys_write+0x68/0xf0
[   20.507677]  __arm64_sys_write+0x1c/0x28
[   20.507692]  invoke_syscall+0x44/0x108
[   20.507712]  el0_svc_common.constprop.3+0x84/0xf8
[   20.507730]  do_el0_svc+0x24/0x88
[   20.507747]  el0_svc+0x20/0x50
[   20.507764]  el0t_64_sync_handler+0x90/0xb8
[   20.507780]  el0t_64_sync+0x180/0x184

This happens when doing ahci binding, either manually or with the following udev rule:
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1b4b", ATTR{device}=="0x9230", RUN+="/bin/bash -c 'echo %k > /sys/bus/pci/drivers/ahci/bind'"

(please note that it is mandatory to do the ahci binding, otherwise the drives are not seen).

Here is the output of lspci:
00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd RK3399 PCI Express Root Port
01:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9230 PCIe SATA 6Gb/s Controller (rev 11)
Comment 1 Mathias Bavay 2022-03-23 11:06:57 UTC
Created attachment 300609 [details]
dmesg
Comment 2 Mathias Bavay 2022-04-04 08:24:18 UTC
Created attachment 300688 [details]
dmesg when no disks are attached to the Marvell adapter

I've tried to start without any disks attached to the adapter, it throws the same error and stack trace.

Note You need to log in before you can comment on or make changes to this bug.