lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <02fd01dc73df$3b641bf0$b22c53d0$@trustnetic.com>
Date: Tue, 23 Dec 2025 15:39:12 +0800
From: Jiawen Wu <jiawenwu@...stnetic.com>
To: "'Bartosz Golaszewski'" <bartosz.golaszewski@...aro.org>
Cc: <andriy.shevchenko@...ux.intel.com>,
	<andy@...nel.org>,
	<brgl@...nel.org>,
	<broonie@...nel.org>,
	<ckeepax@...nsource.cirrus.com>,
	<dakr@...nel.org>,
	<david.rhodes@...rus.com>,
	<djrscally@...il.com>,
	<gregkh@...uxfoundation.org>,
	<heikki.krogerus@...ux.intel.com>,
	<krzk@...nel.org>,
	<linus.walleij@...aro.org>,
	<linux-acpi@...r.kernel.org>,
	<linux-gpio@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>,
	<linux-sound@...r.kernel.org>,
	<linux-spi@...r.kernel.org>,
	<mstrozek@...nsource.cirrus.com>,
	<p.zabel@...gutronix.de>,
	<patches@...nsource.cirrus.com>,
	<rafael@...nel.org>,
	<rf@...nsource.cirrus.com>,
	<sakari.ailus@...ux.intel.com>
Subject: Re: [PATCH v7 3/9] software node: allow referencing firmware nodes

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
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ