Re: [PATCH] usb: acpi: Get correct location data for Apple macs

From: Greg KH

Date: Mon Nov 23 2026 - 01:01:58 EST


On Mon, Nov 23, 2026 at 12:57:57AM -0500, Atharva Tiwari wrote:
> > Local static variables are usually not a good idea. Why is this needed
> > as it's only referenced once?
>
> is_apple_location signifies that SSD methods are available in the ACPI bus,
> if we dont check this there might be a situation like:
>
> Is internal USB Controller = true
> x86_apple_machine = true
> is_apple_machine (Are there any SSD methods in the hub) = false
>
> So all USB2.0 ports will get a error, and all USB3.0 ports will succeed and
> provide wrong info.

Sure, but again, you only check it once, why not just do the logic there
then and not have any local variables?

> And btw the SSD methods are only used in new intel macs (2016+), so this becomes necessary.

So how have these old systems been working so far with Linux?

greg k-h