[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181114195144.GA7982@localhost>
Date: Wed, 14 Nov 2018 20:51:44 +0100
From: Johan Hovold <johan@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org
Subject: [GIT PULL] GNSS fixes for v4.20-rc3 (take 2)
Hi Greg,
Please ignore my previous pull request for GNSS fixes and consider this one
instead.
I've now asked Stephen to include the GNSS tree in linux-next, and he
immediately spotted the missing Sign-offs. I was too focused on how best to
split the gnss and serdev patches and handle their dependency that I even
forgot to post the GNSS patches to the list after setting up the new tree
(hence the diff below).
Hopefully back in my usual routine after this.
Johan
The following changes since commit ccda4af0f4b92f7b4c308d3acc262f4a7e3affad:
Linux 4.20-rc2 (2018-11-11 17:12:31 -0600)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss.git tags/gnss-4.20-rc3
for you to fetch changes up to 1decef370456870bf448a565be95db636428e106:
gnss: sirf: fix synchronous write timeout (2018-11-14 20:37:41 +0100)
----------------------------------------------------------------
GNSS fixes for v4.20-rc3
The two serdev drivers were using the wrong timeout argument when
expecting the serdev_device_write() helper to wait indefinitely,
something which could result in incomplete writes when the controller
write buffer was getting full.
Signed-off-by: Johan Hovold <johan@...nel.org>
----------------------------------------------------------------
Johan Hovold (2):
gnss: serial: fix synchronous write timeout
gnss: sirf: fix synchronous write timeout
drivers/gnss/serial.c | 3 ++-
drivers/gnss/sirf.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gnss/serial.c b/drivers/gnss/serial.c
index b01ba4438501..31e891f00175 100644
--- a/drivers/gnss/serial.c
+++ b/drivers/gnss/serial.c
@@ -13,6 +13,7 @@
#include <linux/of.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
+#include <linux/sched.h>
#include <linux/serdev.h>
#include <linux/slab.h>
@@ -63,7 +64,7 @@ static int gnss_serial_write_raw(struct gnss_device *gdev,
int ret;
/* write is only buffered synchronously */
- ret = serdev_device_write(serdev, buf, count, 0);
+ ret = serdev_device_write(serdev, buf, count, MAX_SCHEDULE_TIMEOUT);
if (ret < 0)
return ret;
diff --git a/drivers/gnss/sirf.c b/drivers/gnss/sirf.c
index 79cb98950013..71d014edd167 100644
--- a/drivers/gnss/sirf.c
+++ b/drivers/gnss/sirf.c
@@ -16,6 +16,7 @@
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
+#include <linux/sched.h>
#include <linux/serdev.h>
#include <linux/slab.h>
#include <linux/wait.h>
@@ -83,7 +84,7 @@ static int sirf_write_raw(struct gnss_device *gdev, const unsigned char *buf,
int ret;
/* write is only buffered synchronously */
- ret = serdev_device_write(serdev, buf, count, 0);
+ ret = serdev_device_write(serdev, buf, count, MAX_SCHEDULE_TIMEOUT);
if (ret < 0)
return ret;
Powered by blists - more mailing lists