From: Mark Salter <msalter@redhat.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Frédéric Danis" <frederic.danis.oss@gmail.com>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
"ACPI Devel Maling List" <linux-acpi@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ACPI / scan: Fix regression related to X-Gene UARTs
Date: Fri, 27 Apr 2018 14:24:44 -0400 [thread overview]
Message-ID: <1524853484.5602.32.camel@redhat.com> (raw)
In-Reply-To: <CAJZ5v0g5iB1zoz7S0KBvimqj_ZEQLNX_LZ8g3vBoythJ_ZzjaA@mail.gmail.com>
On Sun, 2018-04-22 at 11:34 +0200, Rafael J. Wysocki wrote:
> On Fri, Apr 20, 2018 at 5:29 AM, Mark Salter <msalter@redhat.com> wrote:
> > Commit e361d1f85855 ("ACPI / scan: Fix enumeration for special UART
> > devices") caused a regression with some X-Gene based platforms (Mustang
> > and M400) with invalid DSDT.
>
> I'm not convinced that making changes to the core ACPI device
> enumeration code in order to cover up for firmware bugs is the right
> approach.
It is unfortunate but the firmware bug predates the change which uncovered
it, so previously working systems no longer work.
>
> > The DSDT makes it appear that the UART
> > device is also a slave device attached to itself. With the above commit
> > the UART won't be enumerated by ACPI scan (slave serial devices shouldn't
> > be). So check for X-Gene UART device and skip slace device check on it.
> >
> > Signed-off-by: Mark Salter <msalter@redhat.com>
> > ---
> > drivers/acpi/scan.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> > index cc234e6a6297..1dcdd0122862 100644
> > --- a/drivers/acpi/scan.c
> > +++ b/drivers/acpi/scan.c
> > @@ -1551,6 +1551,14 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
> > fwnode_property_present(&device->fwnode, "baud")))
> > return true;
> >
> > + /*
> > + * Firmware on some arm64 X-Gene platforms will make the UART
> > + * device appear as both a UART and a slave of that UART. Just
> > + * bail out here for X-Gene UARTs.
> > + */
> > + if (!strcmp(acpi_device_hid(device), "APMC0D08"))
> > + return false;
>
> Is the device ID never to be used outside of the broken configurations?
>
> Even if that's the plan, how are you going to guarantee that anyway?
The device ID will always be used for X-Gene UARTs. Whether the DSDT is
broken or not wouldn't matter because the end result would be the same
(the UART being treated as master rather than a serial bus slave).
The broken firmware looks like this:
Device (URT0)
{
Name (_HID, "APMC0D08") // _HID: Hardware ID
...
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
{
Memory32Fixed (ReadWrite,
0x1C020000, // Address Base
0x00000100, // Address Length
)
UartSerialBusV2 (0x0001C200, DataBitsEight, StopBitsOne,
0x00, LittleEndian, ParityTypeNone, FlowControlNone,
0x0010, 0x0010, "URT0",
0x00, ResourceConsumer, , Exclusive,
)
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
{
0x0000006D,
}
})
...
}
So "URT0" has a UartSerialBusV2 resource which references itself as the bus master.
>
> > +
> > INIT_LIST_HEAD(&resource_list);
> > acpi_dev_get_resources(device, &resource_list,
> > acpi_check_serial_bus_slave,
> > --
prev parent reply other threads:[~2018-04-27 18:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 3:29 [PATCH] ACPI / scan: Fix regression related to X-Gene UARTs Mark Salter
2018-04-22 9:34 ` Rafael J. Wysocki
2018-04-27 18:24 ` Mark Salter [this message]
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=1524853484.5602.32.camel@redhat.com \
--to=msalter@redhat.com \
--cc=frederic.danis.oss@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).