Revert "ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context"
authorDavid S. Miller <davem@davemloft.net>
Sat, 29 Oct 2016 21:18:17 +0000 (17:18 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Oct 2016 21:18:17 +0000 (17:18 -0400)
This reverts commit 8d7533e5aaad1c94386a8101a36b0617987966b7.

It introduced kbuild failures, new version coming.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/ibm/ibmvnic.h

index 0459d19a5f163f49e1a7b0ea1a95778cf4b54832..213162df1a9bf3220207d10635c1f52087eceb3c 100644 (file)
@@ -3232,27 +3232,6 @@ static void ibmvnic_free_inflight(struct ibmvnic_adapter *adapter)
        spin_unlock_irqrestore(&adapter->inflight_lock, flags);
 }
 
-static void ibmvnic_xport_event(struct work_struct *work)
-{
-       struct ibmvnic_adapter *adapter = container_of(work,
-                                                      struct ibmvnic_adapter,
-                                                      ibmvnic_xport);
-       struct device *dev = &adapter->vdev->dev;
-       int rc;
-
-       ibmvnic_free_inflight(adapter);
-       release_sub_crqs(adapter);
-       if (adapter->migrated) {
-               rc = ibmvnic_reenable_crq_queue(adapter);
-               if (rc)
-                       dev_err(dev, "Error after enable rc=%ld\n", rc);
-               adapter->migrated = false;
-               rc = ibmvnic_send_crq_init(adapter);
-               if (rc)
-                       dev_err(dev, "Error sending init rc=%ld\n", rc);
-       }
-}
-
 static void ibmvnic_handle_crq(union ibmvnic_crq *crq,
                               struct ibmvnic_adapter *adapter)
 {
@@ -3288,7 +3267,15 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq,
                if (gen_crq->cmd == IBMVNIC_PARTITION_MIGRATED) {
                        dev_info(dev, "Re-enabling adapter\n");
                        adapter->migrated = true;
-                       schedule_work(&adapter->ibmvnic_xport);
+                       ibmvnic_free_inflight(adapter);
+                       release_sub_crqs(adapter);
+                       rc = ibmvnic_reenable_crq_queue(adapter);
+                       if (rc)
+                               dev_err(dev, "Error after enable rc=%ld\n", rc);
+                       adapter->migrated = false;
+                       rc = ibmvnic_send_crq_init(adapter);
+                       if (rc)
+                               dev_err(dev, "Error sending init rc=%ld\n", rc);
                } else if (gen_crq->cmd == IBMVNIC_DEVICE_FAILOVER) {
                        dev_info(dev, "Backing device failover detected\n");
                        netif_carrier_off(netdev);
@@ -3297,7 +3284,8 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq,
                        /* The adapter lost the connection */
                        dev_err(dev, "Virtual Adapter failed (rc=%d)\n",
                                gen_crq->cmd);
-                       schedule_work(&adapter->ibmvnic_xport);
+                       ibmvnic_free_inflight(adapter);
+                       release_sub_crqs(adapter);
                }
                return;
        case IBMVNIC_CRQ_CMD_RSP:
@@ -3738,7 +3726,6 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
        SET_NETDEV_DEV(netdev, &dev->dev);
 
        INIT_WORK(&adapter->vnic_crq_init, handle_crq_init_rsp);
-       INIT_WORK(&adapter->ibmvnic_xport, ibmvnic_xport_event);
 
        spin_lock_init(&adapter->stats_lock);
 
index dd775d951b739eed4cd27985c055cacef0e56b6b..878e2c059f5c8dea12d5525f91d181f5cffcb6ac 100644 (file)
@@ -1048,6 +1048,5 @@ struct ibmvnic_adapter {
        u8 map_id;
 
        struct work_struct vnic_crq_init;
-       struct work_struct ibmvnic_xport;
        bool failover;
 };