lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Vcr2nVHAgvegW=t70bBFhhk3w23HkT_Y+MZM00nkziZSQ@mail.gmail.com>
Date: Thu, 31 Jul 2025 11:46:30 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Cryolitia PukNgae <liziyao@...ontech.com>
Cc: Alex Lanzano <lanzano.alex@...il.com>, Jonathan Cameron <jic23@...nel.org>, 
	Lars-Peter Clausen <lars@...afoo.de>, David Lechner <dlechner@...libre.com>, Nuno Sá <nuno.sa@...log.com>, 
	Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Yao Zi <ziyao@...root.org>, WangYuli <wangyuli@...ontech.com>, 
	Jun Zhan <zhanjun@...ontech.com>
Subject: Re: [PATCH] iio: imu: bmi270: Match ACPI ID found on newer GPD firmware

On Thu, Jul 31, 2025 at 5:06 AM Cryolitia PukNgae <liziyao@...ontech.com> wrote:

First of all, please do not top-post!

> Thank you for your reply. I apologize for the confusion regarding the
> PNP VID assignment - you are absolutely correct that "BMI0260" is not an
> official Bosch PNP ID. Let me provide a more detailed context.
>
> GPD devices originally used BMI160 sensors with the "BMI0160" PNP ID.
> When they switched to BMI260 sensors in newer hardware, they reused the
> existing Windows driver which accepts both "BMI0160" and "BMI0260" IDs.

This part is missing in the commit message.
But the question is how many DSDTs we know that are using it?
I have checked

- https://www.catalog.update.microsoft.com/Search.aspx?q=bosch%20BMI0260
  (no results)

- duckduckgo.com gives many links, one of which is interesting, i.e.
  https://treexy.com/products/driver-fusion/database/sensors/bosch/accelerometer/
  that gives the list of the IDs in I assume Bosch issued drivers.

Can you find the link to the official Bosch sensor driver for this
family of sensors with the ID list provided (line on that link I
found)?
This may give us a reference and actually make it more clear in the
future (also this makes an evidence for these IDs to be
official which I was asking for during review of
https://lore.kernel.org/lkml/20241020220011.212395-1-justin@justinweiss.com/.

> Consequently, they kept "BMI0160" in DSDT tables for new BMI260 devices,
> causing driver mismatches in Linux.

No doubts.

> Current Situation:
>    1. GPD updated BIOS v0.40+ for newer devices to report "BMI0260" for
> BMI260 sensors to avoid loading bmi160 driver on Linux. While this isn't
> Bosch's VID:
>    2. Bosch's official Windows driver uses "BMI0260" as a compatible ID

Yeah, please provide a link.

>    3. The ID "BMI0160" already exists in mainline (drivers/iio/imu/bmi160)

Yes, I know, and that is a problem, but we can't solve it as that boat
already sailed.

>    4. We're seeing real devices shipping with "BMI0260" in DSDT

Can you list them in the commit message?

> Given the challenges we've faced in communicating with GPD regarding
> Linux support, it seems unlikely that we can push for another change;
> they are solely focused on ensuring compatibility with Bosch's official
> Windows driver. Unfortunately, I do not have the means to contact Bosch
> and urge them to abandon the use of these non-standard IDs.
>
> Given existing devices use "BMI0260" and Windows drivers validate this
> ID pattern, I propose temporarily adding it to bmi270_acpi_match as a
> compatibility measure. This would immediately benefit already existing
> users.

Right, but the problem with the fake IDs that already existed in the
devices on the market is the justification when adding them to Linux.
I also request to have a communication between vendors of the device
(HW) and platform that uses that HW with a fake (wrong) ID to make it
clear that this is a clear abuse of the ACPI specification. And next
time they should be aware of this.

> I'm happy to provide DSDT excerpts from GPD Win Max 2 2023 devices
> showing the "BMI0260" declaration if needed.

Yes, this is a must (but not limited to, see above what else is required).

> Thank you for your time and guidance.

> 在 2025/7/31 04:57, Andy Shevchenko 写道:
> > On Wed, Jul 30, 2025 at 2:56 PM Cryolitia PukNgae via B4 Relay
> > <devnull+liziyao.uniontech.com@...nel.org> wrote:
> >>
> >> From: Cryolitia PukNgae <liziyao@...ontech.com>
> >>
> >> Some GPD devices ship a buggy firmware that describes on-device BMI260
> >> with ACPI ID "BMI0160". Since this is fixed in BIOS update v0.40,
> >> let's match the correct ID to detect the device. The buggy ID "BMI0160"
> >> is kept as well to maintain compatibility with older firmwares.
> >
> > No, it's not true. See below why,
> >
> >> ---
> >> Some GPD devices ship a buggy firmware that describes on-device BMI260
> >> with ACPI ID "BMI0160". Since this is fixed in BIOS update v0.40[1],
> >> let's match the correct ID to detect the device. The buggy ID "BMI0160"
> >> is kept as well to maintain compatibility with older firmwares.
> >>
> >> Link: http://download.softwincn.com/WIN%20Max%202024/Max2-7840-BIOS-V0.41.zip
> >>
> >> [1]. See the update nodes in the archive file above
> >
> > Yeah... I think you need one more attempt to fix it right.

It looks like BOSC0260 is also listed in the driver. Why can't you use that one?

...

> >>   static const struct acpi_device_id bmi270_acpi_match[] = {
> >>          /* GPD Win Mini, Aya Neo AIR Pro, OXP Mini Pro, etc. */
> >>          { "BMI0160",  (kernel_ulong_t)&bmi260_chip_info },
> >
> > Unbelievable! How is the above supposed to work? Do we have DMI quirks
> > in both drivers (bmi160 and bmi270)?
> >
> >> +       /* GPD Win Max 2 2023(sincice BIOS v0.40), etc. */
> >> +       { "BMI0260",  (kernel_ulong_t)&bmi260_chip_info },
> >
> > For the record this is incorrect ACPI ID, nor PNP ID for Bosh, unless
> > I missed that https://www.bensonmedical.com/ is bought by Bosh or part
> > of the groups of the companies.,
> >
> >>          { }
> >>   };
> >
> > Can you work with Bosh to resolve this as soon as possible and use a
> > real Bosh ACPI ID (BOSCxxxx) or PNP ID (BSGxxxx)?
> > Also, each ACPI ID adding patch (when it's incorrect) must provide a
> > DSDT excerpt in the commit message to show this. Ideally this also
> > should be confirmed by the vendor of the device (GPD) that the ID is
> > incorrect and a correct one needs to be used.


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ