Re: [PATCH v2 net-next 2/2] net: phy: air_en8811h: Add the Airoha EN8811H PHY driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The only way I can see around this problem would be to look up the
> PHY in order to get a pointer to the struct phy_device in the network
> device's probe function, and attach the PHY there _before_ you register
> the network device. You can then return EPROBE_DEFER and, because you
> are returning it in a .probe function, the probe will be retried once
> other probes in the system (such as your PHY driver) have finished.
> This also means that userspace doesn't see the appearance of the
> non-functional network device until it's ready, and thus can use
> normal hotplug mechanisms to notice the network device.

What i'm thinking is we add another op to phy_driver dedicated to
firmware download. We let probe run as is, so the PHY is registered
and available. But if the firmware op is set, we start a thread and
call the op in it. Once the op exits, we signal a completion event.
phy_attach_direct() would then wait on the completion.

This is however taking us further and further away from the standard
device model.

       Andrew





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux