History

net/mlx5: Refactor queries to speed fields in Port Type and Speed register

This patch fascicles queries to speed related fields in Port Type and Speed register (PTYS) into a single API. I addition, this patch refactors functions which serves only Ethernet driver: remove the protocol type as an input parameter, move code from 'core' directory into 'en' directory and add 'eth' prefix to the function's name. The patch also encapsulates functions that are not used outside the Ethernet driver removes redundant include files.

Aya Levin committed 7 years ago

Commit bc4e12f1 parent cd7e4186 files · +91 −142Browse files

Showing the changes to include/linux (1 of 6 files). Show all

Unified · Split

include/linux/mlx5/port.h+0−11
@@ -110,27 +110,16 @@ enum mlx5e_connector_type { · 109 unmodified lines
110110 int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps);
111111 int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys,
112112 int ptys_size, int proto_mask, u8 local_port);
113−int mlx5_query_port_proto_cap(struct mlx5_core_dev *dev,
114− u32 *proto_cap, int proto_mask);
115−int mlx5_query_port_proto_admin(struct mlx5_core_dev *dev,
116− u32 *proto_admin, int proto_mask);
117113 int mlx5_query_port_link_width_oper(struct mlx5_core_dev *dev,
118114 u8 *link_width_oper, u8 local_port);
119115 int mlx5_query_port_ib_proto_oper(struct mlx5_core_dev *dev,
120116 u8 *proto_oper, u8 local_port);
121−int mlx5_query_port_eth_proto_oper(struct mlx5_core_dev *dev,
122− u32 *proto_oper, u8 local_port);
123−int mlx5_set_port_ptys(struct mlx5_core_dev *dev, bool an_disable,
124− u32 proto_admin, int proto_mask);
125117 void mlx5_toggle_port_link(struct mlx5_core_dev *dev);
126118 int mlx5_set_port_admin_status(struct mlx5_core_dev *dev,
127119 enum mlx5_port_status status);
128120 int mlx5_query_port_admin_status(struct mlx5_core_dev *dev,
129121 enum mlx5_port_status *status);
130122 int mlx5_set_port_beacon(struct mlx5_core_dev *dev, u16 beacon_duration);
131−void mlx5_query_port_autoneg(struct mlx5_core_dev *dev, int proto_mask,
132− u8 *an_status,
133− u8 *an_disable_cap, u8 *an_disable_admin);
134123
135124 int mlx5_set_port_mtu(struct mlx5_core_dev *dev, u16 mtu, u8 port);
136125 void mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, u16 *max_mtu, u8 port);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t