All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: "Rafael J. Wysocki" <rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org>
Cc: Octavian Purdila
	<octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Len Brown <lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Matt Fleming
	<matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	Joel Becker <jlbec-aKy9MeLSZ9dg9hUCZPvPmw@public.gmane.org>,
	"linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-i2c <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-spi <linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Irina Tirdea
	<irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Leonard Crestez
	<leonard.crestez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v5 2/8] acpi: fix enumeration (visited) flags for bus rescans
Date: Thu, 7 Jul 2016 12:00:13 +0300	[thread overview]
Message-ID: <20160707090013.GK23527@lahna.fi.intel.com> (raw)
In-Reply-To: <31239967.dEXrvihxAE-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>

On Wed, Jul 06, 2016 at 11:09:44PM +0200, Rafael J. Wysocki wrote:
> On Wednesday, July 06, 2016 06:37:46 PM Octavian Purdila wrote:
> > On Wed, Jul 6, 2016 at 6:03 PM, Mika Westerberg
> > <mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> wrote:
> > > On Fri, Jul 01, 2016 at 11:19:06PM +0300, Octavian Purdila wrote:
> > >> If the ACPI tables changes as a result of a dinamically loaded table and
> > >> a bus rescan is required the enumeration/visited flag are not
> > >> consistent.
> > >>
> > >> I2C/SPI are not directly enumerated in acpi_bus_attach(), however the
> > >> visited flag is set. This makes it impossible to check if an ACPI device
> > >> has already been enumerated by the I2C and SPI subsystems. To fix this
> > >> issue we only set the visited flags if the device is not I2C or SPI.
> > >>
> > >> With this change we also need to remove setting visited to false from
> > >> acpi_bus_attach(), otherwise if we rescan already enumerated I2C/SPI
> > >> devices we try to re-enumerate them.
> > >>
> > >> Note that I2C/SPI devices can be enumerated either via a scan handler
> > >> (when using PRP0001) or via regular device_attach(). In either case
> > >> the flow goes through acpi_default_enumeration() which makes it the
> > >> ideal place to mark the ACPI device as enumerated.
> > >
> > > Hmm, this somehow fails to enumerate PRP0001 devices.
> > >
> > > I'm adding following SSDT to my initrd and the resulting device is never
> > > enumerated on SPI bus (it exists in /sys/bus/acpi/devices). If I use
> > > normal ACPI IDs (non-PRP0001) then it works fine.
> > >
> > 
> > I specifically tested with PRP0001 via initrd with I2C, I am not sure
> > why it does not work on SPI. I'll give it a try tomorrow when I have
> > access to my setup.
> 
> OK, I'll wait for this test to conclude before applying the series, then. :-)

I tested again and it works fine. I probably had an older version of the
series applied or something like that. Now, I'm able to see my AT25 SPI
eeprom successfully probed:

[    7.264705] at25 spi-PRP0001:00: 1 KByte at25 eeprom, pagesize 32

Sorry about the confusion.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Octavian Purdila <octavian.purdila@intel.com>,
	Len Brown <lenb@kernel.org>,
	Matt Fleming <matt@codeblueprint.co.uk>,
	Mark Brown <broonie@kernel.org>, Wolfram Sang <wsa@the-dreams.de>,
	Joel Becker <jlbec@evilplan.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	linux-efi@vger.kernel.org, linux-i2c <linux-i2c@vger.kernel.org>,
	linux-spi <linux-spi@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Irina Tirdea <irina.tirdea@intel.com>,
	Leonard Crestez <leonard.crestez@intel.com>
Subject: Re: [PATCH v5 2/8] acpi: fix enumeration (visited) flags for bus rescans
Date: Thu, 7 Jul 2016 12:00:13 +0300	[thread overview]
Message-ID: <20160707090013.GK23527@lahna.fi.intel.com> (raw)
In-Reply-To: <31239967.dEXrvihxAE@vostro.rjw.lan>

On Wed, Jul 06, 2016 at 11:09:44PM +0200, Rafael J. Wysocki wrote:
> On Wednesday, July 06, 2016 06:37:46 PM Octavian Purdila wrote:
> > On Wed, Jul 6, 2016 at 6:03 PM, Mika Westerberg
> > <mika.westerberg@linux.intel.com> wrote:
> > > On Fri, Jul 01, 2016 at 11:19:06PM +0300, Octavian Purdila wrote:
> > >> If the ACPI tables changes as a result of a dinamically loaded table and
> > >> a bus rescan is required the enumeration/visited flag are not
> > >> consistent.
> > >>
> > >> I2C/SPI are not directly enumerated in acpi_bus_attach(), however the
> > >> visited flag is set. This makes it impossible to check if an ACPI device
> > >> has already been enumerated by the I2C and SPI subsystems. To fix this
> > >> issue we only set the visited flags if the device is not I2C or SPI.
> > >>
> > >> With this change we also need to remove setting visited to false from
> > >> acpi_bus_attach(), otherwise if we rescan already enumerated I2C/SPI
> > >> devices we try to re-enumerate them.
> > >>
> > >> Note that I2C/SPI devices can be enumerated either via a scan handler
> > >> (when using PRP0001) or via regular device_attach(). In either case
> > >> the flow goes through acpi_default_enumeration() which makes it the
> > >> ideal place to mark the ACPI device as enumerated.
> > >
> > > Hmm, this somehow fails to enumerate PRP0001 devices.
> > >
> > > I'm adding following SSDT to my initrd and the resulting device is never
> > > enumerated on SPI bus (it exists in /sys/bus/acpi/devices). If I use
> > > normal ACPI IDs (non-PRP0001) then it works fine.
> > >
> > 
> > I specifically tested with PRP0001 via initrd with I2C, I am not sure
> > why it does not work on SPI. I'll give it a try tomorrow when I have
> > access to my setup.
> 
> OK, I'll wait for this test to conclude before applying the series, then. :-)

I tested again and it works fine. I probably had an older version of the
series applied or something like that. Now, I'm able to see my AT25 SPI
eeprom successfully probed:

[    7.264705] at25 spi-PRP0001:00: 1 KByte at25 eeprom, pagesize 32

Sorry about the confusion.

  parent reply	other threads:[~2016-07-07  9:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01 20:19 [PATCH v5 0/8] ACPI overlays Octavian Purdila
2016-07-01 20:19 ` Octavian Purdila
2016-07-01 20:19 ` [PATCH v5 2/8] acpi: fix enumeration (visited) flags for bus rescans Octavian Purdila
2016-07-06 15:03   ` Mika Westerberg
2016-07-06 15:37     ` Octavian Purdila
2016-07-06 21:09       ` Rafael J. Wysocki
     [not found]         ` <31239967.dEXrvihxAE-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2016-07-07  9:00           ` Mika Westerberg [this message]
2016-07-07  9:00             ` Mika Westerberg
2016-07-07  9:28   ` Mika Westerberg
2016-07-01 20:19 ` [PATCH v5 3/8] acpi: add support for ACPI reconfiguration notifiers Octavian Purdila
2016-07-07  9:34   ` Mika Westerberg
2016-07-01 20:19 ` [PATCH v5 4/8] i2c: add support for ACPI reconfigure notifications Octavian Purdila
2016-07-04  0:34   ` Wolfram Sang
     [not found] ` <1467404352-27101-1-git-send-email-octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-07-01 20:19   ` [PATCH v5 1/8] Documentation: acpi: add SSDT overlays documentation Octavian Purdila
2016-07-01 20:19     ` Octavian Purdila
     [not found]     ` <1467404352-27101-2-git-send-email-octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-07-07  9:25       ` Mika Westerberg
2016-07-07  9:25         ` Mika Westerberg
2016-07-01 20:19   ` [PATCH v5 5/8] spi: add support for ACPI reconfigure notifications Octavian Purdila
2016-07-01 20:19     ` Octavian Purdila
2016-07-03 12:10     ` Mark Brown
2016-07-01 20:19   ` [PATCH v5 6/8] efi: load SSTDs from EFI variables Octavian Purdila
2016-07-01 20:19     ` Octavian Purdila
2016-07-02  8:18     ` Geert Uytterhoeven
2016-07-04 12:00     ` Matt Fleming
2016-07-06  0:34   ` [PATCH v5 0/8] ACPI overlays Rafael J. Wysocki
2016-07-06  0:34     ` Rafael J. Wysocki
2016-07-06  6:29     ` Octavian Purdila
2016-07-01 20:19 ` [PATCH v5 7/8] acpi: add support for configfs Octavian Purdila
2016-07-07  9:39   ` Mika Westerberg
2016-07-01 20:19 ` [PATCH v5 8/8] acpi: add support for loading SSDTs via configfs Octavian Purdila
2016-07-07  9:42   ` Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160707090013.GK23527@lahna.fi.intel.com \
    --to=mika.westerberg-vuqaysv1563yd54fqh9/ca@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=jlbec-aKy9MeLSZ9dg9hUCZPvPmw@public.gmane.org \
    --cc=lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=leonard.crestez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org \
    --cc=octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.