[PATCH v3 08/13] usb: hub: Power on connected M.2 E-key connectors with power sequencing API
Chen-Yu Tsai
wenst at chromium.org
Fri Jul 3 06:20:03 PDT 2026
On Fri, Jul 3, 2026 at 9:16 PM Bartosz Golaszewski <brgl at kernel.org> wrote:
>
> On Fri, 3 Jul 2026 14:58:56 +0200, Chen-Yu Tsai <wenst at chromium.org> said:
> > On Fri, Jul 3, 2026 at 8:41 PM Bartosz Golaszewski <brgl at kernel.org> wrote:
> >>
> >> So this is only needed to not have to track the state in a separate field?
> >
> > Correct. Reading the field is not the problem. Updating it is, as the
> > fields are packed bitfields, and Sashiko suggested that locking would
> > be needed, though it may have been for the peer port, which has since
> > been removed.
> >
>
> I'm not sure if it is. The user controlls the handle. We could argue, it's up
> to them to provide synchroniztion. We only assign the target and pwrseq fields
> once in pwrseq_match_device() and only change the powered_on field later with
> pwrseq_power_on/off(). Unless the user does something weird, we should be
> alright. Maybe a small note in the kernel doc would be in order.
I was refering to the status bitfields in |struct usb_port|. As you already
explained I think the pwrseq stuff is fine.
ChenYu
More information about the linux-arm-kernel
mailing list