]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mod_devicetable: fix PHY module format
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 19 Dec 2019 23:24:47 +0000 (23:24 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 04:45:21 +0000 (23:45 -0500)
commit7af5f5b5141e0811b6b1b718cee8daf936bff629
treeee570a766f4db382326c3b948e10bf27cf2cbfdd
parent9658c9765c1a6be7718e13b0bb27a4cb287c4cb0
mod_devicetable: fix PHY module format

BugLink: https://bugs.launchpad.net/bugs/1859712
[ Upstream commit d2ed49cf6c13e379c5819aa5ac20e1f9674ebc89 ]

When a PHY is probed, if the top bit is set, we end up requesting a
module with the string "mdio:-10101110000000100101000101010001" -
the top bit is printed to a signed -1 value. This leads to the module
not being loaded.

Fix the module format string and the macro generating the values for
it to ensure that we only print unsigned types and the top bit is
always 0/1. We correctly end up with
"mdio:10101110000000100101000101010001".

Fixes: 8626d3b43280 ("phylib: Support phy module autoloading")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/linux/mod_devicetable.h