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]
Date:   Tue, 17 Oct 2023 00:46:17 +0000
From:   "Wu, Wentong" <wentong.wu@...el.com>
To:     Hans de Goede <hdegoede@...hat.com>,
        "Shevchenko, Andriy" <andriy.shevchenko@...el.com>
CC:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "oneukum@...e.com" <oneukum@...e.com>,
        "wsa@...nel.org" <wsa@...nel.org>,
        "andi.shyti@...ux.intel.com" <andi.shyti@...ux.intel.com>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "bartosz.golaszewski@...aro.org" <bartosz.golaszewski@...aro.org>,
        "linus.walleij@...aro.org" <linus.walleij@...aro.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
        "linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
        "sakari.ailus@...ux.intel.com" <sakari.ailus@...ux.intel.com>,
        "Wang, Zhifeng" <zhifeng.wang@...el.com>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v20 1/4] usb: Add support for Intel LJCA device

> From: Hans de Goede <hdegoede>
> On 10/16/23 18:05, Shevchenko, Andriy wrote:
> > On Mon, Oct 16, 2023 at 06:44:21PM +0300, Wu, Wentong wrote:
> >>> From: gregkh@...uxfoundation.org
> >>> On Mon, Oct 16, 2023 at 03:05:09PM +0000, Wu, Wentong wrote:
> >>>>> From: Shevchenko, Andriy
> >>>>> On Mon, Oct 16, 2023 at 08:52:28AM +0300, Wu, Wentong wrote:
> >
> > ...
> >
> >>>>> But this does not confirm if you have such devices. Moreover, My
> >>>>> question about _CID per function stays the same. Why firmware is
> >>>>> not using
> >>> it?
> >>>>
> >>>> Yes, both _ADR and _CID can stop growing list in the driver. And
> >>>> for _ADR, it also only require one ID per function. I don't know
> >>>> why BIOS team doesn't select _CID, but I have suggested use _ADR
> >>>> internally, and , to make things moving forward, the driver adds
> >>>> support for _ADR here
> >>> first.
> >>>>
> >>>> But you're right, _CID is another solution as well, we will discuss
> >>>> it with firmware team more.
> >>>
> >>> Should I revert this series now until this gets sorted out?
> >>
> >> Current _ADR support is a solution, I don't think _CID is better than
> >> _ADR to both stop growing list in driver and support the shipped hardware at
> the same time.
> >>
> >> Andy, what's your idea?
> >
> > In my opinion if _CID can be made, it's better than _ADR. As using
> > _ADR like you do is a bit of grey area in the ACPI specification.
> > I.o.w. can you get a confirmation, let's say, from Microsoft, that
> > they will go your way for other similar devices?
> >
> > Btw, Microsoft has their own solution actually using _ADR for the so
> > called "wired" USB devices. Is it your case? If so, I'm not sure why
> > _HID has been used from day 1...

Thanks for your info, we will discuss more with them, but I also think we
should keep this series and I will do the follow up as Hans' suggest.

> > Also I suggest to wait for Hans' opinion on the topic.
> 
> I definitely don't think we should revert the entire series since this supports
> actual hw which has already been shipping for years.

Totally agree, thanks

> 
> But if the _ADR support is only there to support future hw and it is not even
> certain yet that that future hw is actually going to be using _ADR support then I
> believe that a follow-up patch to drop _ADR support for now is in order. We can
> then re-introduce it (revert the follow up patch) if future hw actually starts using
> _ADR support.

Yes, thanks.

> 
> Specifically what I'm suggesting is something like the following:
> 
> diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c index
> c9decd0396d4..e1bbaf964786 100644
> --- a/drivers/usb/misc/usb-ljca.c
> +++ b/drivers/usb/misc/usb-ljca.c
> @@ -457,8 +457,8 @@ static void ljca_auxdev_acpi_bind(struct ljca_adapter
> *adap,
>  				  u64 adr, u8 id)
>  {
>  	struct ljca_match_ids_walk_data wd = { 0 };
> -	struct acpi_device *parent, *adev;
>  	struct device *dev = adap->dev;
> +	struct acpi_device *parent;
>  	char uid[4];
> 
>  	parent = ACPI_COMPANION(dev);
> @@ -466,17 +466,7 @@ static void ljca_auxdev_acpi_bind(struct ljca_adapter
> *adap,
>  		return;
> 
>  	/*
> -	 * get auxdev ACPI handle from the ACPI device directly
> -	 * under the parent that matches _ADR.
> -	 */
> -	adev = acpi_find_child_device(parent, adr, false);
> -	if (adev) {
> -		ACPI_COMPANION_SET(&auxdev->dev, adev);
> -		return;
> -	}
> -
> -	/*
> -	 * _ADR is a grey area in the ACPI specification, some
> +	 * Currently LJCA hw does not use _ADR instead current
>  	 * platforms use _HID to distinguish children devices.
>  	 */
>  	switch (adr) {
> 
> As a follow-up patch to the existing series.
> 
> Regards,
> 
> Hans

Powered by blists - more mailing lists