lkml.org 
[lkml]   [2017]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 09/22] scsi: hisi_sas: retrieve SAS address for pci-based controller
    On Wed, May 17, 2017 at 12:49 PM, John Garry <john.garry@huawei.com> wrote:
    > For a pci-based controller, retrieve the SAS address from the
    > ACPI tables.
    >
    > The retrieval is based on the ACPI device node name. Sample is
    > as follows:
    > Scope(_SB)
    > {
    > Device(SAS0) {
    > Name(_HID, "HISI0163")
    > Name (_DSD, Package () {
    > ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
    > Package () {
    > Package (2) {"sas-addr", Package() {0x50, 0x01, 0x88, 0x20, 0x16, 00, 00, 0x00}},
    > }
    > })
    > }
    > }
    >
    > If the ACPI node or node property is not available, then we fall
    > back on a default address.
    >
    > Signed-off-by: John Garry <john.garry@huawei.com>

    Since this uses the _DSD information that was introduced for compatibility
    between device tree and ACPI based data, why not write the code so that
    it can work for both?

    Ideally this should just look up the property for pci_dev->fwnode, but I'm
    not entirely sure if this works the same way on ACPI and DT today.

    Arnd

    \
     
     \ /
      Last update: 2017-05-17 14:38    [W:4.082 / U:23.788 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site