Commit 7544abd9 authored by David S. Miller's avatar David S. Miller

Merge branch 'Minor-improvements-to-b53-dmesg-output'

Paul Barker says:

====================
Minor improvements to b53 dmesg output

These changes were made while debugging the b53 driver for use on a
custom board. They've been runtime tested on a patched 4.14.y kernel
which supports this board as well as build tested with 5.9-rc3. The
changes are straightforward enough that I think this testing is
sufficient but let me know if further testing is required.

Unfortunately I don't have a board to hand which boots with a more
recent kernel and has a switch supported by the b53 driver. I'd still
like to upstream these patches if possible though.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 22b330b6 434d2312
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/gpio.h> #include <linux/gpio.h>
...@@ -767,9 +765,12 @@ static int b53_switch_reset(struct b53_device *dev) ...@@ -767,9 +765,12 @@ static int b53_switch_reset(struct b53_device *dev)
usleep_range(1000, 2000); usleep_range(1000, 2000);
} while (timeout-- > 0); } while (timeout-- > 0);
if (timeout == 0) if (timeout == 0) {
dev_err(dev->dev,
"Timeout waiting for SW_RST to clear!\n");
return -ETIMEDOUT; return -ETIMEDOUT;
} }
}
b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, &mgmt); b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, &mgmt);
...@@ -2620,7 +2621,8 @@ int b53_switch_detect(struct b53_device *dev) ...@@ -2620,7 +2621,8 @@ int b53_switch_detect(struct b53_device *dev)
dev->chip_id = id32; dev->chip_id = id32;
break; break;
default: default:
pr_err("unsupported switch detected (BCM53%02x/BCM%x)\n", dev_err(dev->dev,
"unsupported switch detected (BCM53%02x/BCM%x)\n",
id8, id32); id8, id32);
return -ENODEV; return -ENODEV;
} }
...@@ -2651,7 +2653,8 @@ int b53_switch_register(struct b53_device *dev) ...@@ -2651,7 +2653,8 @@ int b53_switch_register(struct b53_device *dev)
if (ret) if (ret)
return ret; return ret;
pr_info("found switch: %s, rev %i\n", dev->name, dev->core_rev); dev_info(dev->dev, "found switch: %s, rev %i\n",
dev->name, dev->core_rev);
return dsa_register_switch(dev->ds); return dsa_register_switch(dev->ds);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment