summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium/liquidio
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2018-07-02 20:13:15 +0200
committerDavid S. Miller <davem@davemloft.net>2018-07-06 11:06:59 +0900
commit7481a8576ad87ac92526a931c0cd5733db7c1250 (patch)
treeadcc4e72c180cda124ddfbf7330cc01d04923646 /drivers/net/ethernet/cavium/liquidio
parent38cd58ed9c4e389799b507bcffe02a7a7a180b33 (diff)
downloadblackbird-op-linux-7481a8576ad87ac92526a931c0cd5733db7c1250.tar.gz
blackbird-op-linux-7481a8576ad87ac92526a931c0cd5733db7c1250.zip
liquidio: make timeout HZ independent and readable
schedule_timeout_* takes a timeout in jiffies but the code currently is passing in a constant which makes this timeout HZ dependent. So define a constant with (hopefully) meaningful name and pass it through msecs_to_jiffies() to fix the HZ dependency. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> commit f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters") Acked-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/lio_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 8a815bb57177..7e8454d3b1ad 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -91,6 +91,9 @@ static int octeon_console_debug_enabled(u32 console)
*/
#define LIO_SYNC_OCTEON_TIME_INTERVAL_MS 60000
+/* time to wait for possible in-flight requests in milliseconds */
+#define WAIT_INFLIGHT_REQUEST msecs_to_jiffies(1000)
+
struct lio_trusted_vf_ctx {
struct completion complete;
int status;
@@ -259,7 +262,7 @@ static inline void pcierror_quiesce_device(struct octeon_device *oct)
force_io_queues_off(oct);
/* To allow for in-flight requests */
- schedule_timeout_uninterruptible(100);
+ schedule_timeout_uninterruptible(WAIT_INFLIGHT_REQUEST);
if (wait_for_pending_requests(oct))
dev_err(&oct->pci_dev->dev, "There were pending requests\n");
OpenPOWER on IntegriCloud