Message ID | 20190731174252.18041-4-andrew.smirnov@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | Ziirave_wdt driver fixes | expand |
On Wed, Jul 31, 2019 at 10:42:50AM -0700, Andrey Smirnov wrote: > Add more error logging to ziirave_firm_upload() for diagnostics. > > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> > Cc: Chris Healy <cphealy@gmail.com> > Cc: Guenter Roeck <linux@roeck-us.net> > Cc: Rick Ramstetter <rick@anteaterllc.com> > Cc: linux-watchdog@vger.kernel.org > Cc: linux-kernel@vger.kernel.org Reviewed-by: Guenter Roeck <linux@roeck-us.net> > --- > drivers/watchdog/ziirave_wdt.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/watchdog/ziirave_wdt.c b/drivers/watchdog/ziirave_wdt.c > index 8c71341a9c1c..89ce6982ba53 100644 > --- a/drivers/watchdog/ziirave_wdt.c > +++ b/drivers/watchdog/ziirave_wdt.c > @@ -335,14 +335,18 @@ static int ziirave_firm_upload(struct watchdog_device *wdd, > > ret = ziirave_firm_write_byte(wdd, ZIIRAVE_CMD_JUMP_TO_BOOTLOADER, 1, > false); > - if (ret) > + if (ret) { > + dev_err(&client->dev, "Failed to jump to bootloader\n"); > return ret; > + } > > msleep(500); > > ret = ziirave_firm_write_byte(wdd, ZIIRAVE_CMD_DOWNLOAD_START, 1, true); > - if (ret) > + if (ret) { > + dev_err(&client->dev, "Failed to start download\n"); > return ret; > + } > > msleep(500); > > -- > 2.21.0 >
diff --git a/drivers/watchdog/ziirave_wdt.c b/drivers/watchdog/ziirave_wdt.c index 8c71341a9c1c..89ce6982ba53 100644 --- a/drivers/watchdog/ziirave_wdt.c +++ b/drivers/watchdog/ziirave_wdt.c @@ -335,14 +335,18 @@ static int ziirave_firm_upload(struct watchdog_device *wdd, ret = ziirave_firm_write_byte(wdd, ZIIRAVE_CMD_JUMP_TO_BOOTLOADER, 1, false); - if (ret) + if (ret) { + dev_err(&client->dev, "Failed to jump to bootloader\n"); return ret; + } msleep(500); ret = ziirave_firm_write_byte(wdd, ZIIRAVE_CMD_DOWNLOAD_START, 1, true); - if (ret) + if (ret) { + dev_err(&client->dev, "Failed to start download\n"); return ret; + } msleep(500);
Add more error logging to ziirave_firm_upload() for diagnostics. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Chris Healy <cphealy@gmail.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Rick Ramstetter <rick@anteaterllc.com> Cc: linux-watchdog@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/watchdog/ziirave_wdt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)