nfp: remove ndo_get_port_parent_id implementation
authorJiri Pirko <jiri@mellanox.com>
Wed, 3 Apr 2019 12:24:24 +0000 (14:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Apr 2019 00:42:36 +0000 (17:42 -0700)
Remove implementation of get_port_parent_id ndo and rely on core calling
into devlink for the information directly.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
drivers/net/ethernet/netronome/nfp/nfp_port.c

index 961cd5e7bf2b82ccdc5da0bd0789dcdfc61a04a8..bde9695b9f8ac96b909295fad9145be6e2d2082d 100644 (file)
@@ -3533,7 +3533,6 @@ const struct net_device_ops nfp_net_netdev_ops = {
        .ndo_udp_tunnel_add     = nfp_net_add_vxlan_port,
        .ndo_udp_tunnel_del     = nfp_net_del_vxlan_port,
        .ndo_bpf                = nfp_net_xdp,
-       .ndo_get_port_parent_id = nfp_port_get_port_parent_id,
        .ndo_get_devlink_port   = nfp_devlink_get_devlink_port,
 };
 
index bf621674f5830617a3ac6104f05106d6571d31e9..c3ad083d36c64feb40d219cca84258b07901fe15 100644 (file)
@@ -272,7 +272,6 @@ const struct net_device_ops nfp_repr_netdev_ops = {
        .ndo_fix_features       = nfp_repr_fix_features,
        .ndo_set_features       = nfp_port_set_features,
        .ndo_set_mac_address    = eth_mac_addr,
-       .ndo_get_port_parent_id = nfp_port_get_port_parent_id,
        .ndo_get_devlink_port   = nfp_devlink_get_devlink_port,
 };
 
index 93c5bfc0510b59975c72411e3e5d09b068a6984b..fcd16877e6e091943fe30c269c761b96a7952d66 100644 (file)
@@ -30,22 +30,6 @@ struct nfp_port *nfp_port_from_netdev(struct net_device *netdev)
        return NULL;
 }
 
-int nfp_port_get_port_parent_id(struct net_device *netdev,
-                               struct netdev_phys_item_id *ppid)
-{
-       struct nfp_port *port;
-       const u8 *serial;
-
-       port = nfp_port_from_netdev(netdev);
-       if (!port)
-               return -EOPNOTSUPP;
-
-       ppid->id_len = nfp_cpp_serial(port->app->cpp, &serial);
-       memcpy(&ppid->id, serial, ppid->id_len);
-
-       return 0;
-}
-
 int nfp_port_setup_tc(struct net_device *netdev, enum tc_setup_type type,
                      void *type_data)
 {