staging: unisys: Change enable/disable to wait forever
authorNeil Horman <nhorman@redhat.com>
Tue, 21 Jul 2015 13:55:43 +0000 (09:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2015 04:20:24 +0000 (21:20 -0700)
I don't see why the server should stop responding, or that we should just
give up if it does.  Wait forever when enabling/disabling the visornic

Signed-off-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visornic/visornic_main.c

index 316f9ac716004e4f6df41ac516797c3400475f9b..12318365ec7fc9ef51354727abd84cd200343c67 100644 (file)
@@ -28,7 +28,7 @@
 #include "visorbus.h"
 #include "iochannel.h"
 
-#define VISORNIC_INFINITE_RESPONSE_WAIT 0
+#define VISORNIC_INFINITE_RSP_WAIT 0
 #define VISORNICSOPENMAX 32
 #define MAXDEVICES     16384
 
@@ -549,7 +549,7 @@ visornic_disable_with_timeout(struct net_device *netdev, const int timeout)
         * when it gets a disable.
         */
        spin_lock_irqsave(&devdata->priv_lock, flags);
-       while ((timeout == VISORNIC_INFINITE_RESPONSE_WAIT) ||
+       while ((timeout == VISORNIC_INFINITE_RSP_WAIT) ||
               (wait < timeout)) {
                if (devdata->enab_dis_acked)
                        break;
@@ -686,7 +686,7 @@ visornic_enable_with_timeout(struct net_device *netdev, const int timeout)
        send_enbdis(netdev, 1, devdata);
 
        spin_lock_irqsave(&devdata->priv_lock, flags);
-       while ((timeout == VISORNIC_INFINITE_RESPONSE_WAIT) ||
+       while ((timeout == VISORNIC_INFINITE_RSP_WAIT) ||
               (wait < timeout)) {
                if (devdata->enab_dis_acked)
                        break;
@@ -731,11 +731,13 @@ visornic_timeout_reset(struct work_struct *work)
        netdev = devdata->netdev;
 
        netif_stop_queue(netdev);
-       response = visornic_disable_with_timeout(netdev, 100);
+       response = visornic_disable_with_timeout(netdev,
+                                                VISORNIC_INFINITE_RSP_WAIT);
        if (response)
                goto call_serverdown;
 
-       response = visornic_enable_with_timeout(netdev, 100);
+       response = visornic_enable_with_timeout(netdev,
+                                               VISORNIC_INFINITE_RSP_WAIT);
        if (response)
                goto call_serverdown;
        netif_wake_queue(netdev);
@@ -756,7 +758,7 @@ call_serverdown:
 static int
 visornic_open(struct net_device *netdev)
 {
-       visornic_enable_with_timeout(netdev, VISORNIC_INFINITE_RESPONSE_WAIT);
+       visornic_enable_with_timeout(netdev, VISORNIC_INFINITE_RSP_WAIT);
 
        /* start the interface's transmit queue, allowing it to accept
         * packets for transmission
@@ -777,7 +779,7 @@ static int
 visornic_close(struct net_device *netdev)
 {
        netif_stop_queue(netdev);
-       visornic_disable_with_timeout(netdev, VISORNIC_INFINITE_RESPONSE_WAIT);
+       visornic_disable_with_timeout(netdev, VISORNIC_INFINITE_RSP_WAIT);
 
        return 0;
 }