[Patch] net: dwc_eth_qos - works with fixed-phy

Ramon Fried rfried.dev at gmail.com
Sat Feb 18 21:11:24 CET 2023


On Fri, Feb 17, 2023 at 5:03 AM Marek Vasut <marex at denx.de> wrote:
>
> On 2/16/23 17:45, Nicole Battenfeld wrote:
> >
> > Am 16.02.23 um 02:39 schrieb Marek Vasut:
> >> On 2/15/23 17:16, Elmar Psilog wrote:
> >>> Let the EQoS in imx8mp handle fixed-phy too.
> >>> Without that patch it lost track to the node to scan
> >>> speed and duplex.
> >>> Patch was created by Marek Vasut, just tested by me.
> >>>
> >>> Signed-off-by: Elmar Psilog <epsi at gmx.de>
> >>> ---
> >>> drivers/net/dwc_eth_qos.c
> >>> 1 file changed
> >>
> >> If you were to use 'git format-patch' and 'git send-email', those
> >> tools would generate the correct Subject and diffstat etc. for you.
> >> Also have a look at scripts/checkpatch.pl to validate whether a patch
> >> is correct.
> >>
> >>> diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
> >>> index afc47b56ff..10915d8e47 100644
> >>> --- a/drivers/net/dwc_eth_qos.c
> >>> +++ b/drivers/net/dwc_eth_qos.c
> >>> @@ -785,9 +785,21 @@ static int eqos_start(struct udevice *dev)
> >>>           */
> >>>          if (!eqos->phy) {
> >>>                  int addr = -1;
> >>> -               addr = eqos_get_phy_addr(eqos, dev);
> >>> -               eqos->phy = phy_connect(eqos->mii, addr, dev,
> >>> - eqos->config->interface(dev));
> >>> +               ofnode fixed_node;
> >>> +
> >>> +               if (IS_ENABLED(CONFIG_PHY_FIXED)) {
> >>> +                       fixed_node =
> >>> ofnode_find_subnode(dev_ofnode(dev),
> >>> +                               "fixed-link");
> >>> +                       if (ofnode_valid(fixed_node)) {
> >>> +                               eqos->phy =
> >>> fixed_phy_create(dev_ofnode(dev));
> >>> +                               eqos->phy_of_node = fixed_node;
> >>> +                       }
> >>> +               }
> >>> +               if (!eqos->phy) {
> >>> +                       addr = eqos_get_phy_addr(eqos, dev);
> >>> +                       eqos->phy = phy_connect(eqos->mii, addr, dev,
> >>> eqos->config->interface(dev));
> >>> +               }
> >>> +
> >>>                  if (!eqos->phy) {
> >>>                          pr_err("phy_connect() failed");
> >>>                          goto err_stop_resets;
> >>
> >> +CC Ramon the network maintainer .
> >
> >
> > New attempt: used script to check and fix and used git format-patch.
> >
> > Also base is latest trunk, not v2023.1 as before.
> >
> > Hope this fits your needs, otherwise I afraid I need detailed instruction.
>
> Basically the process is documented at length here:
>
> https://u-boot.readthedocs.io/en/latest/develop/sending_patches.html
>
> which is very much identical to even lengthier Linux patch submission
> guidelines:
>
> https://www.kernel.org/doc/html/latest/process/submitting-patches.html
>
> If you use git send-email , that will do most of the work for you,
> including correct formatting etc. The invocation is something like:
>
> $ git send-email --annotate --to=u-boot at lists.denx.de
> --cc=additional-person at to.copy --cc=one at more.person -1 <commit ID>
>
> Note that you do have to configure SMTP access in git-config for that to
> work.
>
> You had the patch right very much the first time, except for a few style
> issues, like [Patch] instead of [PATCH] in the subject, patch itself was
> malformed likely due to copy-paste, and the checkpatch issues had to be
> addressed . When sending a new revision, include changelog in the patch
> below the --- below diffstat, and also make sure the Subjects reads
> [PATCH v2], git send-email -v2 does that for you (and -v3 does v3 etc.).
> You're almost there, no worries.
>
> Wait for Ramon to review this patch and then send V2 if needed.
Okay by me, please send a fresh V2 so we can apply it easily.


More information about the U-Boot mailing list