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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 15 Jan 2018 13:33:45 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Hans de Goede <hdegoede@...hat.com>
Cc:     "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Len Brown <lenb@...nel.org>,
        MyungJoo Ham <myungjoo.ham@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Chen-Yu Tsai <wens@...e.org>,
        Thierry Reding <thierry.reding@...il.com>,
        linux-pwm@...r.kernel.org, linux-acpi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ACPI / LPSS: Do not instiate a platform_dev for devs
 without a mmio resource

On Mon, 2018-01-15 at 11:36 +0200, Mika Westerberg wrote:
> On Sun, Jan 14, 2018 at 09:01:48PM +0100, Hans de Goede wrote:
> > acpi_lpss_create_device() skips handling LPSS devices which do not
> > have
> > a mmio resources in their resource list (typically these devices are
> > disabled by the firmware). But since the LPSS code does not bind to
> > the
> > device, acpi_bus_attach() ends up still creating a platform device
> > for
> > it and the regular platform_driver for the ACPI HID still tries to
> > bind
> > to it.
> > 
> > This happens e.g. on some boards which do not use the pwm-controller
> > and have an empty or invalid resource-table for it. Currently this
> > causes
> > these error messages to get logged:
> > [    3.281966] pwm-lpss 80862288:00: invalid resource
> > [    3.287098] pwm-lpss: probe of 80862288:00 failed with error -22
> > 
> > This commit stops the undesirable creation of a platform_device for
> > disabled LPSS devices by setting pnp.type.platform_id to 0. Note
> > that
> > acpi_scan_attach_handler() also sets pnp.type.platform_id to 0 when
> > there
> > is a matching handler for the device and that handler has no attach
> > callback, so we simply behave as a handler without an attach
> > function
> > in this case.
> > 
> > Signed-off-by: Hans de Goede <hdegoede@...hat.com>
> 
> Seems like a good way to fix it IMHO,

Yeah, looks much better for my opinion than previous hack to PWM
platform driver.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

> 
> Acked-by: Mika Westerberg <mika.westerberg@...ux.intel.com>

-- 
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ