From: Arnd Bergmann <arnd@arndb.de>
To: Brijesh Singh <brijesh.singh@amd.com>
Cc: Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org, hdegoede@redhat.com,
linux-ide@vger.kernel.org
Subject: Re: [PATCH v2] ata: add AMD Seattle platform driver
Date: Fri, 29 Jan 2016 22:22:39 +0100 [thread overview]
Message-ID: <3904852.c3HykPsQQ2@wuerfel> (raw)
In-Reply-To: <56A7A534.6040208@amd.com>
On Tuesday 26 January 2016 10:56:20 Brijesh Singh wrote:
>
> On 01/26/2016 06:17 AM, Arnd Bergmann wrote:
> >
> > I think it needs more work: The changelog describes it as a normal
> > driver, but based on the previous discussion, this is just a hack
> > to work around broken BIOS versions that can no longer be fixed in
> > the field, and there has not been a decision what the proper
> > representation should be in ACPI.
> >
> I am not sure if we should label this driver as a hack to workaround the
> broken BIOS. Unfortunately SoC did not implemented the enclosure management
> per spec. Its not BIOS issue.
The BIOS issue is how the hardware workaround is represented. The
idea of ACPI is to hide this kind of glitch from the operating system
instead of forcing it to have a driver for each hardware variant.
> > The patch also fails to address the devicetree based case, even though
> > we did come to a conclusion that the current behavior is a regression
> > (compared to what we had in drivers/ide/) and that there is a relatively
> > simple fix to do it right.
> >
> I did looked at your recommendation for extending libahci to use ledtrig_ide_activity()
> but as I pointed out in previous discussion this function is missing several key features
> from EM (enclosure management) pov. e.g missing the slot number, missing the locate and fault led.
> In case of EM, each port will have at least three leds (activity, locate and fault).
> Since these LED's are part of EM hence we need to ensure that tools like ledmon and ledctl (which uses libahci sysfs) works well.
I'd assume this can be easily extended, we just need to come up with
a naming scheme for the LEDs so we can identify them in DT.
> The main question is, what is recommended approach to override libachi enclosure managements
> transfer led messages function? A platform driver or something else.
>
> Tejun and/or Hans do you have any recommendation ?
I think for the DT case, a platform driver that registers itself to the LED
subsystem is the best way. You probably still want to put the hardware
register into a "syscon" device that contains the entire set of registers
around it (presumably more hacks for other hardware features), and then
just reference the register using a regmap from the LED driver. The generic
AHCI driver can then get extended with supports for the LED subsystem, to
look for specific LEDs by name based on lot number and type of LED.
Those can be present on any machine with a generic AHCI implementation,
and can be easily implemented using the GPIO-LED driver on machines that
don't have a special purpose register for them.
For the ACPI case, I still think that an AML call from the AHCI driver
is the most logical solution. You mentioned that you believe that calling
into the AML interpreter up to 100 times per second is a noticeable
overhead, but I doubt that and would like to see actual number backing
that up. Note that most of the time, the status of the LEDs won't even
change, so the driver does not have to call into the AML while I/O
is in progress, or while it is stopped, only for the transition or in
case of locate and fault events that should be extremely rare.
Arnd
next prev parent reply other threads:[~2016-01-29 21:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-14 16:31 [PATCH v2] ata: add AMD Seattle platform driver Brijesh Singh
2016-01-20 21:24 ` Brijesh Singh
2016-01-25 20:43 ` Tejun Heo
2016-01-26 9:36 ` Hans de Goede
2016-03-16 20:12 ` Brijesh Singh
2016-01-26 12:17 ` Arnd Bergmann
2016-01-26 16:56 ` Brijesh Singh
2016-01-29 21:22 ` Arnd Bergmann [this message]
2016-01-29 21:31 ` One Thousand Gnomes
2016-02-01 18:56 ` Brijesh Singh
2016-02-01 20:14 ` Arnd Bergmann
2016-02-01 22:15 ` Brijesh Singh
2016-02-02 14:08 ` Arnd Bergmann
2016-02-02 18:37 ` Brijesh Singh
2016-02-05 14:50 ` Arnd Bergmann
2016-02-05 17:23 ` Brijesh Singh
2016-02-08 18:12 ` Brijesh Singh
2016-03-16 21:07 ` Tejun Heo
2016-03-17 17:36 ` Arnd Bergmann
2016-03-18 18:36 ` Brijesh Singh
2016-03-18 20:19 ` Tejun Heo
2016-04-14 9:08 ` Matthias Brugger
2016-04-14 22:14 ` Brijesh Singh
2016-04-13 19:15 ` Tejun Heo
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=3904852.c3HykPsQQ2@wuerfel \
--to=arnd@arndb.de \
--cc=brijesh.singh@amd.com \
--cc=hdegoede@redhat.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox