Commit b172679b authored by Aditya Sarwade's avatar Aditya Sarwade Committed by Doug Ledford

RDMA/vmw_pvrdma: Activate device on ethernet link up

Restore device state when ethernet link changes to active.
Acked-by: default avatarGeorge Zhang <georgezhang@vmware.com>
Acked-by: default avatarJorgen Hansen <jhansen@vmware.com>
Acked-by: default avatarBryan Tan <bryantan@vmware.com>
Signed-off-by: default avatarAditya Sarwade <asarwade@vmware.com>
Signed-off-by: default avatarAdit Ranadive <aditr@vmware.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent e51c2fb0
...@@ -132,7 +132,7 @@ enum pvrdma_pci_resource { ...@@ -132,7 +132,7 @@ enum pvrdma_pci_resource {
enum pvrdma_device_ctl { enum pvrdma_device_ctl {
PVRDMA_DEVICE_CTL_ACTIVATE, /* Activate device. */ PVRDMA_DEVICE_CTL_ACTIVATE, /* Activate device. */
PVRDMA_DEVICE_CTL_QUIESCE, /* Quiesce device. */ PVRDMA_DEVICE_CTL_UNQUIESCE, /* Unquiesce device. */
PVRDMA_DEVICE_CTL_RESET, /* Reset device. */ PVRDMA_DEVICE_CTL_RESET, /* Reset device. */
}; };
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
#include "pvrdma.h" #include "pvrdma.h"
#define DRV_NAME "vmw_pvrdma" #define DRV_NAME "vmw_pvrdma"
#define DRV_VERSION "1.0.0.0-k" #define DRV_VERSION "1.0.1.0-k"
static DEFINE_MUTEX(pvrdma_device_list_lock); static DEFINE_MUTEX(pvrdma_device_list_lock);
static LIST_HEAD(pvrdma_device_list); static LIST_HEAD(pvrdma_device_list);
...@@ -660,7 +660,16 @@ static void pvrdma_netdevice_event_handle(struct pvrdma_dev *dev, ...@@ -660,7 +660,16 @@ static void pvrdma_netdevice_event_handle(struct pvrdma_dev *dev,
pvrdma_dispatch_event(dev, 1, IB_EVENT_PORT_ERR); pvrdma_dispatch_event(dev, 1, IB_EVENT_PORT_ERR);
break; break;
case NETDEV_UP: case NETDEV_UP:
pvrdma_dispatch_event(dev, 1, IB_EVENT_PORT_ACTIVE); pvrdma_write_reg(dev, PVRDMA_REG_CTL,
PVRDMA_DEVICE_CTL_UNQUIESCE);
mb();
if (pvrdma_read_reg(dev, PVRDMA_REG_ERR))
dev_err(&dev->pdev->dev,
"failed to activate device during link up\n");
else
pvrdma_dispatch_event(dev, 1, IB_EVENT_PORT_ACTIVE);
break; break;
default: default:
dev_dbg(&dev->pdev->dev, "ignore netdevice event %ld on %s\n", dev_dbg(&dev->pdev->dev, "ignore netdevice event %ld on %s\n",
......
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