* [PATCH] bus: mhi: host: Only expose controller sysfs attributes on the controller device
@ 2026-11-11 11:56 Slark Xiao
2026-11-13 18:42 ` Jeff Hugo
0 siblings, 1 reply; 7+ messages in thread
From: Slark Xiao @ 2026-11-11 11:56 UTC (permalink / raw)
To: mani, jeff.hugo, bbhatt
Cc: mhi, linux-arm-msm, linux-kernel, Slark Xiao, stable
The serial_number, oem_pk_hash and soc_reset attributes are registered
through mhi_bus_type.dev_groups, so the driver core creates them for
every device on the MHI bus. MHI client devices (the per-channel
devices such as mhi0_DUN or mhi0_MBIM) are also MHI bus devices, so
each of them ends up with its own copies of these files even though
they all operate on the same mhi_controller:
$ ls /sys/bus/mhi/devices/mhi0_DUN/
driver oem_pk_hash power serial_number soc_reset subsystem uevent
This is wrong for several reasons:
- The attributes describe the controller, not the channel. Their
callbacks all dereference mhi_dev->mhi_cntrl and read BHI registers
or issue a controller-wide SoC reset, so writing soc_reset through
mhi0_DUN resets the whole device while looking like a per-channel
operation.
- oem_pk_hash reports failures with dev_err(dev, ...), so a single
failing controller produces one log line per registered channel
device instead of one.
- Userspace has no way to tell which copy is authoritative.
Move the attributes off the bus and attach them to the controller
device only. mhi_register_controller() now installs the group via
mhi_dev->dev.groups before device_add(), while the channel devices
created by mhi_create_devices() are left untouched. No functional
change for the controller device; the files stay at the paths listed
in Documentation/ABI/stable/sysfs-bus-mhi.
Note that trigger_edl was already handled this way, through an explicit
sysfs_create_file() on the controller kobject, which is why it never
appeared on the channel devices.
Fixes: 21cb9b18edea ("bus: mhi: core: Introduce sysfs entries for MHI")
Cc: stable@vger.kernel.org
Signed-off-by: Slark Xiao <slark_xiao@163.com>
---
drivers/bus/mhi/host/init.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/bus/mhi/host/init.c b/drivers/bus/mhi/host/init.c
index fd3050889412..b4b254d1c6b9 100644
--- a/drivers/bus/mhi/host/init.c
+++ b/drivers/bus/mhi/host/init.c
@@ -150,13 +150,21 @@ static ssize_t trigger_edl_store(struct device *dev,
}
static DEVICE_ATTR_WO(trigger_edl);
-static struct attribute *mhi_dev_attrs[] = {
+static struct attribute *mhi_cntrl_dev_attrs[] = {
&dev_attr_serial_number.attr,
&dev_attr_oem_pk_hash.attr,
&dev_attr_soc_reset.attr,
NULL,
};
-ATTRIBUTE_GROUPS(mhi_dev);
+
+static const struct attribute_group mhi_cntrl_dev_group = {
+ .attrs = mhi_cntrl_dev_attrs,
+};
+
+static const struct attribute_group *mhi_cntrl_dev_groups[] = {
+ &mhi_cntrl_dev_group,
+ NULL,
+};
/* MHI protocol requires the transfer ring to be aligned with ring length */
static int mhi_alloc_aligned_ring(struct mhi_controller *mhi_cntrl,
@@ -1019,6 +1027,8 @@ int mhi_register_controller(struct mhi_controller *mhi_cntrl,
dev_set_name(&mhi_dev->dev, "mhi%d", mhi_cntrl->index);
mhi_dev->name = dev_name(&mhi_dev->dev);
+ mhi_dev->dev.groups = mhi_cntrl_dev_groups;
+
/* Init wakeup source */
device_init_wakeup(&mhi_dev->dev, true);
@@ -1455,7 +1465,6 @@ const struct bus_type mhi_bus_type = {
.uevent = mhi_uevent,
.probe = mhi_probe,
.remove = mhi_remove,
- .dev_groups = mhi_dev_groups,
};
static int __init mhi_init(void)
--
2.53.0
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] bus: mhi: host: Only expose controller sysfs attributes on the controller device
2026-11-11 11:56 [PATCH] bus: mhi: host: Only expose controller sysfs attributes on the controller device Slark Xiao
@ 2026-11-13 18:42 ` Jeff Hugo
2026-11-18 7:05 ` Slark Xiao
0 siblings, 1 reply; 7+ messages in thread
From: Jeff Hugo @ 2026-11-13 18:42 UTC (permalink / raw)
To: Slark Xiao, mani, bbhatt; +Cc: mhi, linux-arm-msm, linux-kernel, stable
On 11/11/2026 4:56 AM, Slark Xiao wrote:
> The serial_number, oem_pk_hash and soc_reset attributes are registered
> through mhi_bus_type.dev_groups, so the driver core creates them for
> every device on the MHI bus. MHI client devices (the per-channel
> devices such as mhi0_DUN or mhi0_MBIM) are also MHI bus devices, so
> each of them ends up with its own copies of these files even though
> they all operate on the same mhi_controller:
>
> $ ls /sys/bus/mhi/devices/mhi0_DUN/
> driver oem_pk_hash power serial_number soc_reset subsystem uevent
>
> This is wrong for several reasons:
>
> - The attributes describe the controller, not the channel. Their
> callbacks all dereference mhi_dev->mhi_cntrl and read BHI registers
> or issue a controller-wide SoC reset, so writing soc_reset through
> mhi0_DUN resets the whole device while looking like a per-channel
> operation.
> - oem_pk_hash reports failures with dev_err(dev, ...), so a single
> failing controller produces one log line per registered channel
> device instead of one.
> - Userspace has no way to tell which copy is authoritative.
>
> Move the attributes off the bus and attach them to the controller
> device only. mhi_register_controller() now installs the group via
> mhi_dev->dev.groups before device_add(), while the channel devices
> created by mhi_create_devices() are left untouched. No functional
> change for the controller device; the files stay at the paths listed
> in Documentation/ABI/stable/sysfs-bus-mhi.
>
> Note that trigger_edl was already handled this way, through an explicit
> sysfs_create_file() on the controller kobject, which is why it never
> appeared on the channel devices.
I agree with the rationale, but this does appear to change uAPI. Are you
sure no one is using these on the channel devices?
-Jeff
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re:Re: [PATCH] bus: mhi: host: Only expose controller sysfs attributes on the controller device
2026-11-13 18:42 ` Jeff Hugo
@ 2026-11-18 7:05 ` Slark Xiao
2026-11-20 16:45 ` Jeff Hugo
0 siblings, 1 reply; 7+ messages in thread
From: Slark Xiao @ 2026-11-18 7:05 UTC (permalink / raw)
To: Jeff Hugo; +Cc: mani, bbhatt, mhi, linux-arm-msm, linux-kernel, stable
At 2026-11-14 02:42:46, "Jeff Hugo" <jeff.hugo@oss.qualcomm.com> wrote:
>On 11/11/2026 4:56 AM, Slark Xiao wrote:
>> The serial_number, oem_pk_hash and soc_reset attributes are registered
>> through mhi_bus_type.dev_groups, so the driver core creates them for
>> every device on the MHI bus. MHI client devices (the per-channel
>> devices such as mhi0_DUN or mhi0_MBIM) are also MHI bus devices, so
>> each of them ends up with its own copies of these files even though
>> they all operate on the same mhi_controller:
>>
>> $ ls /sys/bus/mhi/devices/mhi0_DUN/
>> driver oem_pk_hash power serial_number soc_reset subsystem uevent
>>
>> This is wrong for several reasons:
>>
>> - The attributes describe the controller, not the channel. Their
>> callbacks all dereference mhi_dev->mhi_cntrl and read BHI registers
>> or issue a controller-wide SoC reset, so writing soc_reset through
>> mhi0_DUN resets the whole device while looking like a per-channel
>> operation.
>> - oem_pk_hash reports failures with dev_err(dev, ...), so a single
>> failing controller produces one log line per registered channel
>> device instead of one.
>> - Userspace has no way to tell which copy is authoritative.
>>
>> Move the attributes off the bus and attach them to the controller
>> device only. mhi_register_controller() now installs the group via
>> mhi_dev->dev.groups before device_add(), while the channel devices
>> created by mhi_create_devices() are left untouched. No functional
>> change for the controller device; the files stay at the paths listed
>> in Documentation/ABI/stable/sysfs-bus-mhi.
>>
>> Note that trigger_edl was already handled this way, through an explicit
>> sysfs_create_file() on the controller kobject, which is why it never
>> appeared on the channel devices.
>I agree with the rationale, but this does appear to change uAPI. Are you
>sure no one is using these on the channel devices?
>
>-Jeff
Hi Jeff,
For oem_pk_hash and serial_number, all interface returns same value.
I think there is no need to keep these interfaces under the channel
devices.
For soc_reset, it write the register directly and it works for the entire
device rather than a single channel.
So I think there is no problem to remove them.
Additionally, I reported this to Mani a long time ago, and he confirmed
that it was indeed a bug.
2024/7/24:
Slark: Hi Mani, do you think if it's a bug? The soc_reset and other
attr would be enumerated both the mhi0 and other mhi0_PORT
Mani: Gosh, yes
They belong to the controller
Can you send a patch? Else I'll fix it
Thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] bus: mhi: host: Only expose controller sysfs attributes on the controller device
2026-11-18 7:05 ` Slark Xiao
@ 2026-11-20 16:45 ` Jeff Hugo
2026-11-21 7:09 ` Slark Xiao
2026-12-01 17:34 ` Manivannan Sadhasivam
0 siblings, 2 replies; 7+ messages in thread
From: Jeff Hugo @ 2026-11-20 16:45 UTC (permalink / raw)
To: Slark Xiao; +Cc: mani, mhi, linux-arm-msm, linux-kernel, stable
On 11/18/2026 12:05 AM, Slark Xiao wrote:
>
> At 2026-11-14 02:42:46, "Jeff Hugo" <jeff.hugo@oss.qualcomm.com> wrote:
>> On 11/11/2026 4:56 AM, Slark Xiao wrote:
>>> The serial_number, oem_pk_hash and soc_reset attributes are registered
>>> through mhi_bus_type.dev_groups, so the driver core creates them for
>>> every device on the MHI bus. MHI client devices (the per-channel
>>> devices such as mhi0_DUN or mhi0_MBIM) are also MHI bus devices, so
>>> each of them ends up with its own copies of these files even though
>>> they all operate on the same mhi_controller:
>>>
>>> $ ls /sys/bus/mhi/devices/mhi0_DUN/
>>> driver oem_pk_hash power serial_number soc_reset subsystem uevent
>>>
>>> This is wrong for several reasons:
>>>
>>> - The attributes describe the controller, not the channel. Their
>>> callbacks all dereference mhi_dev->mhi_cntrl and read BHI registers
>>> or issue a controller-wide SoC reset, so writing soc_reset through
>>> mhi0_DUN resets the whole device while looking like a per-channel
>>> operation.
>>> - oem_pk_hash reports failures with dev_err(dev, ...), so a single
>>> failing controller produces one log line per registered channel
>>> device instead of one.
>>> - Userspace has no way to tell which copy is authoritative.
>>>
>>> Move the attributes off the bus and attach them to the controller
>>> device only. mhi_register_controller() now installs the group via
>>> mhi_dev->dev.groups before device_add(), while the channel devices
>>> created by mhi_create_devices() are left untouched. No functional
>>> change for the controller device; the files stay at the paths listed
>>> in Documentation/ABI/stable/sysfs-bus-mhi.
>>>
>>> Note that trigger_edl was already handled this way, through an explicit
>>> sysfs_create_file() on the controller kobject, which is why it never
>>> appeared on the channel devices.
>> I agree with the rationale, but this does appear to change uAPI. Are you
>> sure no one is using these on the channel devices?
>>
>> -Jeff
> Hi Jeff,
> For oem_pk_hash and serial_number, all interface returns same value.
> I think there is no need to keep these interfaces under the channel
> devices.
>
> For soc_reset, it write the register directly and it works for the entire
> device rather than a single channel.
>
> So I think there is no problem to remove them.
These are uAPI. The golden rule of the kernel is that we do not break
userspace. It does not matter that their existence is a "bug", if there
is userspace using them, then we must keep them.
I could agree with you assessment that having these items on the channel
device is a mistake (and I do), but that does not change the rule.
So far you have not provided any data to say that userspace is in fact
not using these, and therefore removing them would have no impact.
Without that analysis, I am sorry to say I am uncomfortable proceeding
with this change. Mani is free to ignore my concerns and apply this
patch at his own risk.
-Jeff
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re:Re: [PATCH] bus: mhi: host: Only expose controller sysfs attributes on the controller device
2026-11-20 16:45 ` Jeff Hugo
@ 2026-11-21 7:09 ` Slark Xiao
2026-12-01 17:34 ` Manivannan Sadhasivam
1 sibling, 0 replies; 7+ messages in thread
From: Slark Xiao @ 2026-11-21 7:09 UTC (permalink / raw)
To: Jeff Hugo; +Cc: mani, mhi, linux-arm-msm, linux-kernel, stable
At 2026-11-21 00:45:30, "Jeff Hugo" <jeff.hugo@oss.qualcomm.com> wrote:
>On 11/18/2026 12:05 AM, Slark Xiao wrote:
>>
>> At 2026-11-14 02:42:46, "Jeff Hugo" <jeff.hugo@oss.qualcomm.com> wrote:
>>> On 11/11/2026 4:56 AM, Slark Xiao wrote:
>>>> The serial_number, oem_pk_hash and soc_reset attributes are registered
>>>> through mhi_bus_type.dev_groups, so the driver core creates them for
>>>> every device on the MHI bus. MHI client devices (the per-channel
>>>> devices such as mhi0_DUN or mhi0_MBIM) are also MHI bus devices, so
>>>> each of them ends up with its own copies of these files even though
>>>> they all operate on the same mhi_controller:
>>>>
>>>> $ ls /sys/bus/mhi/devices/mhi0_DUN/
>>>> driver oem_pk_hash power serial_number soc_reset subsystem uevent
>>>>
>>>> This is wrong for several reasons:
>>>>
>>>> - The attributes describe the controller, not the channel. Their
>>>> callbacks all dereference mhi_dev->mhi_cntrl and read BHI registers
>>>> or issue a controller-wide SoC reset, so writing soc_reset through
>>>> mhi0_DUN resets the whole device while looking like a per-channel
>>>> operation.
>>>> - oem_pk_hash reports failures with dev_err(dev, ...), so a single
>>>> failing controller produces one log line per registered channel
>>>> device instead of one.
>>>> - Userspace has no way to tell which copy is authoritative.
>>>>
>>>> Move the attributes off the bus and attach them to the controller
>>>> device only. mhi_register_controller() now installs the group via
>>>> mhi_dev->dev.groups before device_add(), while the channel devices
>>>> created by mhi_create_devices() are left untouched. No functional
>>>> change for the controller device; the files stay at the paths listed
>>>> in Documentation/ABI/stable/sysfs-bus-mhi.
>>>>
>>>> Note that trigger_edl was already handled this way, through an explicit
>>>> sysfs_create_file() on the controller kobject, which is why it never
>>>> appeared on the channel devices.
>>> I agree with the rationale, but this does appear to change uAPI. Are you
>>> sure no one is using these on the channel devices?
>>>
>>> -Jeff
>> Hi Jeff,
>> For oem_pk_hash and serial_number, all interface returns same value.
>> I think there is no need to keep these interfaces under the channel
>> devices.
>>
>> For soc_reset, it write the register directly and it works for the entire
>> device rather than a single channel.
>>
>> So I think there is no problem to remove them.
>
>These are uAPI. The golden rule of the kernel is that we do not break
>userspace. It does not matter that their existence is a "bug", if there
>is userspace using them, then we must keep them.
>
>I could agree with you assessment that having these items on the channel
>device is a mistake (and I do), but that does not change the rule.
>
>So far you have not provided any data to say that userspace is in fact
>not using these, and therefore removing them would have no impact.
>
>Without that analysis, I am sorry to say I am uncomfortable proceeding
>with this change. Mani is free to ignore my concerns and apply this
>patch at his own risk.
>
>-Jeff
Hi Jeff,
I understand your concerns. We must ensure that introducing
modifications does not lead to any unintended side effects.
I checked the import history and found that both serial_number
and oem_pk_hash were added by Mr BHAUMIK Bhatt in commit
"21cb9b18edea bus: mhi: host: core: Introduce sysfsentries for MHI ".
The comment as below:
"OEMs need to read these device-specific hardware information values
through userspace for factory testing purposes"
Actually I have to say we don't have such a factory requirement for
these 2 APIs for all Foxconn MHI devices.
And, we can see the "What" from the Document/ABI/stable/sysfs-bus-mhi:
/sys/bus/mhi/devices/.../serialnumber
/sys/bus/mhi/devices/.../oem_pk_hash
/sys/bus/mhi/devices/.../soc_reset
I believe the formal meaning represented by this path is
/sys/bus/mhi/devices/mhi0/[TARGET SYSFS] or
/sys/bus/mhi/devices/mhi1/[TARGET SYSFS]. But not
/sys/bus/mhi/devices/mhi0/mhi0_DUN/[TARGET SYSFS] or
/sys/bus/mhi/devices/mhi0/mhi0_DIAG/[TARGET SYSFS].
These 4 APIs only soc_reset and trigger_edl would be used
in daily development or usage.
In our local, the frequency shall be:
trigger_edl (normal) > soc_reset( rare) > serial number=oem_pk_hash(almost never)
Hope this explanation helps you understand this issue from
the developer's perspective and our actual needs.
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] bus: mhi: host: Only expose controller sysfs attributes on the controller device
2026-11-20 16:45 ` Jeff Hugo
2026-11-21 7:09 ` Slark Xiao
@ 2026-12-01 17:34 ` Manivannan Sadhasivam
2026-12-02 1:48 ` Slark Xiao
1 sibling, 1 reply; 7+ messages in thread
From: Manivannan Sadhasivam @ 2026-12-01 17:34 UTC (permalink / raw)
To: Jeff Hugo; +Cc: Slark Xiao, mani, mhi, linux-arm-msm, linux-kernel, stable
On 2026-11-20 09:45 -0700, Jeff Hugo wrote:
> On 11/18/2026 12:05 AM, Slark Xiao wrote:
> >
> > At 2026-11-14 02:42:46, "Jeff Hugo" <jeff.hugo@oss.qualcomm.com> wrote:
> >> On 11/11/2026 4:56 AM, Slark Xiao wrote:
> >>> The serial_number, oem_pk_hash and soc_reset attributes are registered
> >>> through mhi_bus_type.dev_groups, so the driver core creates them for
> >>> every device on the MHI bus. MHI client devices (the per-channel
> >>> devices such as mhi0_DUN or mhi0_MBIM) are also MHI bus devices, so
> >>> each of them ends up with its own copies of these files even though
> >>> they all operate on the same mhi_controller:
> >>>
> >>> $ ls /sys/bus/mhi/devices/mhi0_DUN/
> >>> driver oem_pk_hash power serial_number soc_reset subsystem uevent
> >>>
> >>> This is wrong for several reasons:
> >>>
> >>> - The attributes describe the controller, not the channel. Their
> >>> callbacks all dereference mhi_dev->mhi_cntrl and read BHI registers
> >>> or issue a controller-wide SoC reset, so writing soc_reset through
> >>> mhi0_DUN resets the whole device while looking like a per-channel
> >>> operation.
> >>> - oem_pk_hash reports failures with dev_err(dev, ...), so a single
> >>> failing controller produces one log line per registered channel
> >>> device instead of one.
> >>> - Userspace has no way to tell which copy is authoritative.
> >>>
> >>> Move the attributes off the bus and attach them to the controller
> >>> device only. mhi_register_controller() now installs the group via
> >>> mhi_dev->dev.groups before device_add(), while the channel devices
> >>> created by mhi_create_devices() are left untouched. No functional
> >>> change for the controller device; the files stay at the paths listed
> >>> in Documentation/ABI/stable/sysfs-bus-mhi.
> >>>
> >>> Note that trigger_edl was already handled this way, through an explicit
> >>> sysfs_create_file() on the controller kobject, which is why it never
> >>> appeared on the channel devices.
> >> I agree with the rationale, but this does appear to change uAPI. Are you
> >> sure no one is using these on the channel devices?
> >>
> >> -Jeff
> > Hi Jeff,
> > For oem_pk_hash and serial_number, all interface returns same value.
> > I think there is no need to keep these interfaces under the channel
> > devices.
> >
> > For soc_reset, it write the register directly and it works for the entire
> > device rather than a single channel.
> >
> > So I think there is no problem to remove them.
>
> These are uAPI. The golden rule of the kernel is that we do not break
> userspace. It does not matter that their existence is a "bug", if there
> is userspace using them, then we must keep them.
>
That's certainly true.
> I could agree with you assessment that having these items on the channel
> device is a mistake (and I do), but that does not change the rule.
>
> So far you have not provided any data to say that userspace is in fact
> not using these, and therefore removing them would have no impact.
>
> Without that analysis, I am sorry to say I am uncomfortable proceeding
> with this change. Mani is free to ignore my concerns and apply this
> patch at his own risk.
>
No. I didn't suggest dropping the sysfs attributes from the channel devices
altogether. Since these channel attributes are ABIs, they need to be documented
in 'obsolete' directory in the ABI documentation first with a proposed removal
version and then the existing entries in 'stable' needs to be tweaked to be
controller specific. And then we can remove the channel specific attributes
only after the proposed kernel version.
But now I'm really thinking if it is worth doing or not.
- Mani
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re:Re: [PATCH] bus: mhi: host: Only expose controller sysfs attributes on the controller device
2026-12-01 17:34 ` Manivannan Sadhasivam
@ 2026-12-02 1:48 ` Slark Xiao
0 siblings, 0 replies; 7+ messages in thread
From: Slark Xiao @ 2026-12-02 1:48 UTC (permalink / raw)
To: Manivannan Sadhasivam; +Cc: Jeff Hugo, mhi, linux-arm-msm, linux-kernel, stable
At 2026-12-02 01:34:01, "Manivannan Sadhasivam" <mani@kernel.org> wrote:
>On 2026-11-20 09:45 -0700, Jeff Hugo wrote:
>> On 11/18/2026 12:05 AM, Slark Xiao wrote:
>> >
>> > At 2026-11-14 02:42:46, "Jeff Hugo" <jeff.hugo@oss.qualcomm.com> wrote:
>> >> On 11/11/2026 4:56 AM, Slark Xiao wrote:
>> >>> The serial_number, oem_pk_hash and soc_reset attributes are registered
>> >>> through mhi_bus_type.dev_groups, so the driver core creates them for
>> >>> every device on the MHI bus. MHI client devices (the per-channel
>> >>> devices such as mhi0_DUN or mhi0_MBIM) are also MHI bus devices, so
>> >>> each of them ends up with its own copies of these files even though
>> >>> they all operate on the same mhi_controller:
>> >>>
>> >>> $ ls /sys/bus/mhi/devices/mhi0_DUN/
>> >>> driver oem_pk_hash power serial_number soc_reset subsystem uevent
>> >>>
>> >>> This is wrong for several reasons:
>> >>>
>> >>> - The attributes describe the controller, not the channel. Their
>> >>> callbacks all dereference mhi_dev->mhi_cntrl and read BHI registers
>> >>> or issue a controller-wide SoC reset, so writing soc_reset through
>> >>> mhi0_DUN resets the whole device while looking like a per-channel
>> >>> operation.
>> >>> - oem_pk_hash reports failures with dev_err(dev, ...), so a single
>> >>> failing controller produces one log line per registered channel
>> >>> device instead of one.
>> >>> - Userspace has no way to tell which copy is authoritative.
>> >>>
>> >>> Move the attributes off the bus and attach them to the controller
>> >>> device only. mhi_register_controller() now installs the group via
>> >>> mhi_dev->dev.groups before device_add(), while the channel devices
>> >>> created by mhi_create_devices() are left untouched. No functional
>> >>> change for the controller device; the files stay at the paths listed
>> >>> in Documentation/ABI/stable/sysfs-bus-mhi.
>> >>>
>> >>> Note that trigger_edl was already handled this way, through an explicit
>> >>> sysfs_create_file() on the controller kobject, which is why it never
>> >>> appeared on the channel devices.
>> >> I agree with the rationale, but this does appear to change uAPI. Are you
>> >> sure no one is using these on the channel devices?
>> >>
>> >> -Jeff
>> > Hi Jeff,
>> > For oem_pk_hash and serial_number, all interface returns same value.
>> > I think there is no need to keep these interfaces under the channel
>> > devices.
>> >
>> > For soc_reset, it write the register directly and it works for the entire
>> > device rather than a single channel.
>> >
>> > So I think there is no problem to remove them.
>>
>> These are uAPI. The golden rule of the kernel is that we do not break
>> userspace. It does not matter that their existence is a "bug", if there
>> is userspace using them, then we must keep them.
>>
>
>That's certainly true.
It seems unrealistic to expect an MHI contributor to prove that there are
no users utilizing it at the user level. I can't guarantee that there isn't someone
using the interface under channel device. Instead, I believe the original
submitter should clarify the intent behind this design. Unfortunately,
the original submitter seems to be unreachable. His email is no longer
valid.
>
>> I could agree with you assessment that having these items on the channel
>> device is a mistake (and I do), but that does not change the rule.
>>
>> So far you have not provided any data to say that userspace is in fact
>> not using these, and therefore removing them would have no impact.
>>
>> Without that analysis, I am sorry to say I am uncomfortable proceeding
>> with this change. Mani is free to ignore my concerns and apply this
>> patch at his own risk.
>>
>
>No. I didn't suggest dropping the sysfs attributes from the channel devices
>altogether. Since these channel attributes are ABIs, they need to be documented
>in 'obsolete' directory in the ABI documentation first with a proposed removal
>version and then the existing entries in 'stable' needs to be tweaked to be
>controller specific. And then we can remove the channel specific attributes
>only after the proposed kernel version.
>
>But now I'm really thinking if it is worth doing or not.
>
>- Mani
>
In fact, as a long-term contributor and user of MHI, I have never utilized the sysfs
interface under the channel. Additionally, nearly half of the devices that support
MHI are products from Foxconn. I haven't heard of any demand for such usage
from factories, ODM manufacturers, PC vendors, or end users. While I cannot
represent all products, this does reflect some genuine feedback regarding MHI
products.
I have to say that during use, seeing these extra enumerated ports really makes
me feel uncomfortable( I am not quite sure if I might be a bit obsessive).
If you still have a plan to fix this, please let me know.
Thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-12-02 1:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 11:56 [PATCH] bus: mhi: host: Only expose controller sysfs attributes on the controller device Slark Xiao
2026-11-13 18:42 ` Jeff Hugo
2026-11-18 7:05 ` Slark Xiao
2026-11-20 16:45 ` Jeff Hugo
2026-11-21 7:09 ` Slark Xiao
2026-12-01 17:34 ` Manivannan Sadhasivam
2026-12-02 1:48 ` Slark Xiao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®