Browse Source

switchdev: remove "ABORT" transaction phase

No longer used by drivers, as transaction queue with item destructors
takes care of abort phase internally in switchdev code. So kill it.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko 10 years ago
parent
commit
9f6467cf22
2 changed files with 2 additions and 9 deletions
  1. 0 1
      include/net/switchdev.h
  2. 2 8
      net/switchdev/switchdev.c

+ 0 - 1
include/net/switchdev.h

@@ -19,7 +19,6 @@
 
 enum switchdev_trans_ph {
 	SWITCHDEV_TRANS_PREPARE,
-	SWITCHDEV_TRANS_ABORT,
 	SWITCHDEV_TRANS_COMMIT,
 };
 

+ 2 - 8
net/switchdev/switchdev.c

@@ -248,11 +248,8 @@ int switchdev_port_attr_set(struct net_device *dev, struct switchdev_attr *attr)
 		 * released.
 		 */
 
-		if (err != -EOPNOTSUPP) {
-			trans.ph = SWITCHDEV_TRANS_ABORT;
-			__switchdev_port_attr_set(dev, attr, &trans);
+		if (err != -EOPNOTSUPP)
 			switchdev_trans_items_destroy(&trans);
-		}
 
 		return err;
 	}
@@ -334,11 +331,8 @@ int switchdev_port_obj_add(struct net_device *dev, struct switchdev_obj *obj)
 		 * released.
 		 */
 
-		if (err != -EOPNOTSUPP) {
-			trans.ph = SWITCHDEV_TRANS_ABORT;
-			__switchdev_port_obj_add(dev, obj, &trans);
+		if (err != -EOPNOTSUPP)
 			switchdev_trans_items_destroy(&trans);
-		}
 
 		return err;
 	}