linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Bartosz Golaszewski'" <bartosz.golaszewski@linaro.org>
Cc: <andriy.shevchenko@linux.intel.com>, <andy@kernel.org>,
	<brgl@kernel.org>, <broonie@kernel.org>,
	<ckeepax@opensource.cirrus.com>, <dakr@kernel.org>,
	<david.rhodes@cirrus.com>, <djrscally@gmail.com>,
	<gregkh@linuxfoundation.org>, <heikki.krogerus@linux.intel.com>,
	<krzk@kernel.org>, <linus.walleij@linaro.org>,
	<linux-acpi@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-sound@vger.kernel.org>,
	<linux-spi@vger.kernel.org>, <mstrozek@opensource.cirrus.com>,
	<p.zabel@pengutronix.de>, <patches@opensource.cirrus.com>,
	<rafael@kernel.org>, <rf@opensource.cirrus.com>,
	<sakari.ailus@linux.intel.com>
Subject: Re: [PATCH v7 3/9] software node: allow referencing firmware nodes
Date: Tue, 23 Dec 2025 15:39:12 +0800	[thread overview]
Message-ID: <02fd01dc73df$3b641bf0$b22c53d0$@trustnetic.com> (raw)

Hi Bartosz Golaszewski,

> diff --git a/include/linux/property.h b/include/linux/property.h
> index 50b26589dd70d1..272bfbdea7bf4a 100644
> --- a/include/linux/property.h
> +++ b/include/linux/property.h
> @@ -355,19 +355,26 @@ struct software_node;
>  
>  /**
>   * struct software_node_ref_args - Reference property with additional arguments
> - * @node: Reference to a software node
> + * @swnode: Reference to a software node
> + * @fwnode: Alternative reference to a firmware node handle
>   * @nargs: Number of elements in @args array
>   * @args: Integer arguments
>   */
>  struct software_node_ref_args {
> -	const struct software_node *node;
> +	const struct software_node *swnode;
> +	struct fwnode_handle *fwnode;
>  	unsigned int nargs;
>  	u64 args[NR_FWNODE_REFERENCE_ARGS];
>  };
>  
>  #define SOFTWARE_NODE_REFERENCE(_ref_, ...)			\
>  (const struct software_node_ref_args) {				\
> -	.node = _ref_,						\
> +	.swnode = _Generic(_ref_,				\
> +			   const struct software_node *: _ref_,	\
> +			   default: NULL),			\
> +	.fwnode = _Generic(_ref_,				\
> +			   struct fwnode_handle *: _ref_,	\
> +			   default: NULL),			\
>  	.nargs = COUNT_ARGS(__VA_ARGS__),			\
>  	.args = { __VA_ARGS__ },				\
>  }

This change seems incompatible with my driver txgbe, since the software nodes
are registered in " struct software_node * " but not " const struct software_node * ".

So when I pulled the net-next-6.19-rc1 that merged this patch, to probe my driver.
The error logs shows:
 
[    5.243396] txgbe 0000:10:00.0 (unnamed net_device) (uninitialized): unable to attach SFP bus: -EINVAL
[    5.243399] txgbe 0000:10:00.0: failed to init phylink
[    5.576008] txgbe 0000:10:00.0: probe with driver txgbe failed with error -22
[    6.109548] txgbe 0000:10:00.1 (unnamed net_device) (uninitialized): unable to attach SFP bus: -EINVAL
[    6.109551] txgbe 0000:10:00.1: failed to init phylink
[    6.442044] txgbe 0000:10:00.1: probe with driver txgbe failed with error -22
 


             reply	other threads:[~2025-12-23  7:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23  7:39 Jiawen Wu [this message]
2025-12-23  8:09 ` [PATCH v7 3/9] software node: allow referencing firmware nodes Bartosz Golaszewski
2025-12-23  8:44   ` Jiawen Wu
2025-12-23  9:36     ` Bartosz Golaszewski
2025-12-23  9:48       ` Jiawen Wu
2025-12-23 10:41         ` Danilo Krummrich
2025-12-24  1:59           ` Jiawen Wu
  -- strict thread matches above, loose matches on Subject: below --
2025-11-20 13:23 [PATCH v7 0/9] reset: rework reset-gpios handling Bartosz Golaszewski
2025-11-20 13:23 ` [PATCH v7 3/9] software node: allow referencing firmware nodes Bartosz Golaszewski
2025-11-20 13:27   ` Charles Keepax

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='02fd01dc73df$3b641bf0$b22c53d0$@trustnetic.com' \
    --to=jiawenwu@trustnetic.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@kernel.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=dakr@kernel.org \
    --cc=david.rhodes@cirrus.com \
    --cc=djrscally@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=krzk@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mstrozek@opensource.cirrus.com \
    --cc=p.zabel@pengutronix.de \
    --cc=patches@opensource.cirrus.com \
    --cc=rafael@kernel.org \
    --cc=rf@opensource.cirrus.com \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).