From: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>
To: gregkh@linuxfoundation.org
Cc: atharvatiwarilinuxdev@gmail.com, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org
Subject: Re: [PATCH v2] usb: acpi: Get correct location data for Apple macs
Date: Mon, 23 Nov 2026 02:01:09 -0500 [thread overview]
Message-ID: <20261123070110.11736-1-atharvatiwarilinuxdev@gmail.com> (raw)
In-Reply-To: <2026112344-jaybird-glancing-b56a@gregkh>
> Please slow down, there is no rush. One patch per 24 hours max.
K, i did not know this, sorry.
> Again, why is this needed and not just calculated at the one place you
actually use it?
So i use it here:
static struct acpi_device *
usb_acpi_find_companion_for_port(struct usb_port *port_dev)
{
struct acpi_device *adev;
adev = usb_acpi_get_companion_for_port(port_dev);
if (!adev)
return NULL;
usb_acpi_get_connect_type(port_dev, adev->handle);
/* Apple's location overrides the _PLD derived one */
if (is_apple_location)
usb_acpi_apple_get_location(port_dev, adev);
return adev;
}
And its calculated it here:
static void usb_acpi_apple_detect_ssp(acpi_handle xhc1)
{
bool found = false;
acpi_walk_namespace(ACPI_TYPE_DEVICE, xhc1, ACPI_UINT32_MAX,
usb_acpi_apple_ssp_cb, NULL, &found, NULL);
is_apple_location = found;
}
so its used PER port, so if there are 7 HS and 6 SS ports
And you suggest that i calculated at the one place i use it, so
i would have to walk the acpi namespace 11 times in that scenario
instead i can just cache it in a global variable like is_apple_location
so i only have to walk the acpi namespace 1 time.
prev parent reply other threads:[~2026-11-23 7:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 6:25 [PATCH v2] usb: acpi: Get correct location data for Apple macs Atharva Tiwari
2026-11-23 6:45 ` Greg Kroah-Hartman
2026-11-23 7:01 ` Atharva Tiwari [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=20261123070110.11736-1-atharvatiwarilinuxdev@gmail.com \
--to=atharvatiwarilinuxdev@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.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