From nobody Mon Dec 19 15:16:28 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NbNbF5ZY1z1FyTC; Mon, 19 Dec 2022 15:16:41 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NbNbF1lCJz3D0L; Mon, 19 Dec 2022 15:16:41 +0000 (UTC) (envelope-from ganbold@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-il1-x12c.google.com with SMTP id z9so4861004ilu.10; Mon, 19 Dec 2022 07:16:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=A81ZDYFbUP0Vfj3CoiFLAzkD0SI6VzTA23xH16v19aU=; b=SAGTx+h54okXbGUBDRnmc3LDbDxoXcSvY50Nc8sgoOOgNFwK8KThxz8AHbp8VxYy35 pvJIqj1cRpj7phKZ5kLRypYf3wThCvqC0gqSRE8PF4RYGuqGyNTaOoi4Ftu9ufxtuDnF byoIC3LR33950Gd/m6ruds3OuHj7LyBJbv7i+eCnNs5bJofcKVxYinmZyIpGBl44V1EV yRIzWyMTwNY0d3YZ+QH/LTdiS6gcnR9bXPs1ZAgX8DsgC+oi1oykNVq1NJoF/yoltOma hdPH8YAMD/wB/dXgbJdUzPWM+rP1vs8dYnHHPIIFdjJiXdHSyfgjyjCpQI9r7rDOVYbL Mkiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=A81ZDYFbUP0Vfj3CoiFLAzkD0SI6VzTA23xH16v19aU=; b=e+aDguHxjHx4BNJa3OPjiHgEQrrnIjcH2OwdlhJvqlgyv9p/g3WuLnAaa/z/X0Tyhu aDEVdkSvjjX24SducXlqsvabLrGiH5rHxVpa8ncJTzQwqNmPezDeuZ06vKTOpGitHoFy OccbWLD+NPF8AcCx9i1AGB5Uxe8TJkwlgwvSHsc259Mb9PRM/jHDCYxjp5d15cLJHBYL MWiOM/RcRmH0cV80VsRbFzKHsYZLXENS7wSgUfUDLH6Tfa/EQ4MkLb2KHNBsUgQ+Y4RN SwhcVXWB6MZ4B/eV1eUudsknvHeEJEhYKweBIeniGnm2lq28w/WkOt0j7GGKieMvSQBt r2wg== X-Gm-Message-State: ANoB5pkLwl1xaqLMGoyPkyDTsoDo2SXc9pZbF0P0ArLbtHrWHZGio5Kj H1HWWYfBLaokEY/ZuimI0QOV2yO7GIg09BQZSBAauOnp X-Google-Smtp-Source: AA0mqf6MJWP4j4krb9/x6KLgof6WjMvZv1dAaUhmgHulQjOaYf/LamOkeP1sp4RvR4g1qdwLVx7jhK6TEieNlu+RvHM= X-Received: by 2002:a05:6e02:804:b0:303:983d:b30a with SMTP id u4-20020a056e02080400b00303983db30amr4218030ilm.11.1671463000098; Mon, 19 Dec 2022 07:16:40 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202212191310.2BJDAErn075666@gitrepo.freebsd.org> <20221219151812.0b94c79f6df7f724de5b961b@bidouilliste.com> In-Reply-To: <20221219151812.0b94c79f6df7f724de5b961b@bidouilliste.com> From: Ganbold Tsagaankhuu Date: Mon, 19 Dec 2022 23:16:28 +0800 Message-ID: Subject: Re: git: 6692670f58f9 - main - Enable setting the phy id. To: Emmanuel Vadot Cc: Ganbold Tsagaankhuu , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000604e3305f02fceff" X-Rspamd-Queue-Id: 4NbNbF1lCJz3D0L X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000604e3305f02fceff Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Dec 19, 2022 at 10:18 PM Emmanuel Vadot wrote: > On Mon, 19 Dec 2022 13:10:14 GMT > Ganbold Tsagaankhuu wrote: > > > The branch main has been updated by ganbold: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D6692670f58f9069e59bc0c958fdaefb= 9bea5f726 > > > > commit 6692670f58f9069e59bc0c958fdaefb9bea5f726 > > Author: S=C3=B8ren Schmidt > > AuthorDate: 2022-12-19 12:56:51 +0000 > > Commit: Ganbold Tsagaankhuu > > CommitDate: 2022-12-19 13:08:42 +0000 > > > > Enable setting the phy id. > > > > It is needed for the RK356X combo phy. > > How so ? > > The id must be set in the phynode creation with phynode_create so I > don't understand why you need this. > Will revert this commit until we find a proper solution. Ganbold > > > --- > > sys/dev/extres/phy/phy.c | 7 +++++++ > > sys/dev/extres/phy/phy.h | 1 + > > 2 files changed, 8 insertions(+) > > > > diff --git a/sys/dev/extres/phy/phy.c b/sys/dev/extres/phy/phy.c > > index 0ed633ffbe41..e95cfdfbd4b3 100644 > > --- a/sys/dev/extres/phy/phy.c > > +++ b/sys/dev/extres/phy/phy.c > > @@ -210,6 +210,13 @@ intptr_t phynode_get_id(struct phynode *phynode) > > return (phynode->id); > > } > > > > +void > > +phynode_set_id(struct phynode *phynode, intptr_t id) > > +{ > > + > > + phynode->id =3D id; > > +} > > + > > #ifdef FDT > > phandle_t > > phynode_get_ofw_node(struct phynode *phynode) > > diff --git a/sys/dev/extres/phy/phy.h b/sys/dev/extres/phy/phy.h > > index b0e5249e4246..34ba59447257 100644 > > --- a/sys/dev/extres/phy/phy.h > > +++ b/sys/dev/extres/phy/phy.h > > @@ -65,6 +65,7 @@ struct phynode *phynode_register(struct phynode > *phynode); > > void *phynode_get_softc(struct phynode *phynode); > > device_t phynode_get_device(struct phynode *phynode); > > intptr_t phynode_get_id(struct phynode *phynode); > > +void phynode_set_id(struct phynode *phynode, intptr_t id); > > int phynode_enable(struct phynode *phynode); > > int phynode_disable(struct phynode *phynode); > > int phynode_status(struct phynode *phynode, int *status); > > > -- > Emmanuel Vadot > --000000000000604e3305f02fceff Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Dec 19, 2022 at 10:18 PM Emma= nuel Vadot <manu@bidouilliste.c= om> wrote:
https://= cgit.FreeBSD.org/src/commit/?id=3D6692670f58f9069e59bc0c958fdaefb9bea5f726<= /a>
>
> commit 6692670f58f9069e59bc0c958fdaefb9bea5f726
> Author:=C2=A0 =C2=A0 =C2=A0S=C3=B8ren Schmidt <sos@FreeBSD.org><= br> > AuthorDate: 2022-12-19 12:56:51 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Ganbold Tsagaankhuu <ganbold@FreeBSD.org= >
> CommitDate: 2022-12-19 13:08:42 +0000
>
>=C2=A0 =C2=A0 =C2=A0Enable setting the phy id.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0It is needed for the RK356X combo phy.

=C2=A0How so ?

=C2=A0The id must be set in the phynode creation with phynode_create so I don't understand why you need this.

Will revert this commit until we find a proper solution.

Ganbold

=C2=A0

> ---
>=C2=A0 sys/dev/extres/phy/phy.c | 7 +++++++
>=C2=A0 sys/dev/extres/phy/phy.h | 1 +
>=C2=A0 2 files changed, 8 insertions(+)
>
> diff --git a/sys/dev/extres/phy/phy.c b/sys/dev/extres/phy/phy.c
> index 0ed633ffbe41..e95cfdfbd4b3 100644
> --- a/sys/dev/extres/phy/phy.c
> +++ b/sys/dev/extres/phy/phy.c
> @@ -210,6 +210,13 @@ intptr_t phynode_get_id(struct phynode *phynode)<= br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0return (phynode->id);
>=C2=A0 }
>=C2=A0
> +void
> +phynode_set_id(struct phynode *phynode, intptr_t id)
> +{
> +
> +=C2=A0 =C2=A0 =C2=A0phynode->id =3D id;
> +}
> +
>=C2=A0 #ifdef FDT
>=C2=A0 phandle_t
>=C2=A0 phynode_get_ofw_node(struct phynode *phynode)
> diff --git a/sys/dev/extres/phy/phy.h b/sys/dev/extres/phy/phy.h
> index b0e5249e4246..34ba59447257 100644
> --- a/sys/dev/extres/phy/phy.h
> +++ b/sys/dev/extres/phy/phy.h
> @@ -65,6 +65,7 @@ struct phynode *phynode_register(struct phynode *phy= node);
>=C2=A0 void *phynode_get_softc(struct phynode *phynode);
>=C2=A0 device_t phynode_get_device(struct phynode *phynode);
>=C2=A0 intptr_t phynode_get_id(struct phynode *phynode);
> +void phynode_set_id(struct phynode *phynode, intptr_t id);
>=C2=A0 int phynode_enable(struct phynode *phynode);
>=C2=A0 int phynode_disable(struct phynode *phynode);
>=C2=A0 int phynode_status(struct phynode *phynode, int *status);


--
Emmanuel Vadot <manu@bidouilliste.com> <manu@FreeBSD.org>
--000000000000604e3305f02fceff--