diff options
author | Camelia Groza <camelia.groza@nxp.com> | 2019-01-17 14:22:36 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-31 08:15:33 +0100 |
commit | 850d84830a6716b190ab44bcbcee15b34a41cc80 (patch) | |
tree | 9eed82cc4f4ca5957372c6fbf9c6ddcd28632ef1 /include | |
parent | 3bd1595be7b0f07b0c33840eded0eb4db3f400a2 (diff) |
net: phy: phy driver features are mandatory
[ Upstream commit 3e64cf7a435ed0500e3adaa8aada2272d3ae8abc ]
Since phy driver features became a link_mode bitmap, phy drivers that
don't have a list of features configured will cause the kernel to crash
when probed.
Prevent the phy driver from registering if the features field is missing.
Fixes: 719655a14971 ("net: phy: Replace phy driver features u32 with link_mode bitmap")
Reported-by: Scott Wood <oss@buserror.net>
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/phy.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 306630d13523..f5d4235e3844 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -502,8 +502,8 @@ struct phy_device { * only works for PHYs with IDs which match this field * name: The friendly name of this PHY type * phy_id_mask: Defines the important bits of the phy_id - * features: A list of features (speed, duplex, etc) supported - * by this PHY + * features: A mandatory list of features (speed, duplex, etc) + * supported by this PHY * flags: A bitfield defining certain other features this PHY * supports (like interrupts) * |