aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_main.c
diff options
context:
space:
mode:
authorAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>2019-02-19 18:04:13 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-04-18 11:38:47 -0400
commitf9867df6d96593fe678a138230379cda78403429 (patch)
treec1c6136d1d91b0bcdded6e4fc63804986d51b776 /drivers/net/ethernet/intel/ice/ice_main.c
parent94c4441b5a80f38d203432a4389d2dd349403ae5 (diff)
ice: Fix incorrect use of abbreviations
Capitalize abbreviations and spell out some that aren't obvious. Reviewed-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_main.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_main.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 033910b63cf7..b47a58913103 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -113,14 +113,14 @@ static void ice_check_for_hang_subtask(struct ice_pf *pf)
113} 113}
114 114
115/** 115/**
116 * ice_add_mac_to_sync_list - creates list of mac addresses to be synced 116 * ice_add_mac_to_sync_list - creates list of MAC addresses to be synced
117 * @netdev: the net device on which the sync is happening 117 * @netdev: the net device on which the sync is happening
118 * @addr: mac address to sync 118 * @addr: MAC address to sync
119 * 119 *
120 * This is a callback function which is called by the in kernel device sync 120 * This is a callback function which is called by the in kernel device sync
121 * functions (like __dev_uc_sync, __dev_mc_sync, etc). This function only 121 * functions (like __dev_uc_sync, __dev_mc_sync, etc). This function only
122 * populates the tmp_sync_list, which is later used by ice_add_mac to add the 122 * populates the tmp_sync_list, which is later used by ice_add_mac to add the
123 * mac filters from the hardware. 123 * MAC filters from the hardware.
124 */ 124 */
125static int ice_add_mac_to_sync_list(struct net_device *netdev, const u8 *addr) 125static int ice_add_mac_to_sync_list(struct net_device *netdev, const u8 *addr)
126{ 126{
@@ -134,14 +134,14 @@ static int ice_add_mac_to_sync_list(struct net_device *netdev, const u8 *addr)
134} 134}
135 135
136/** 136/**
137 * ice_add_mac_to_unsync_list - creates list of mac addresses to be unsynced 137 * ice_add_mac_to_unsync_list - creates list of MAC addresses to be unsynced
138 * @netdev: the net device on which the unsync is happening 138 * @netdev: the net device on which the unsync is happening
139 * @addr: mac address to unsync 139 * @addr: MAC address to unsync
140 * 140 *
141 * This is a callback function which is called by the in kernel device unsync 141 * This is a callback function which is called by the in kernel device unsync
142 * functions (like __dev_uc_unsync, __dev_mc_unsync, etc). This function only 142 * functions (like __dev_uc_unsync, __dev_mc_unsync, etc). This function only
143 * populates the tmp_unsync_list, which is later used by ice_remove_mac to 143 * populates the tmp_unsync_list, which is later used by ice_remove_mac to
144 * delete the mac filters from the hardware. 144 * delete the MAC filters from the hardware.
145 */ 145 */
146static int ice_add_mac_to_unsync_list(struct net_device *netdev, const u8 *addr) 146static int ice_add_mac_to_unsync_list(struct net_device *netdev, const u8 *addr)
147{ 147{
@@ -245,7 +245,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
245 netif_addr_unlock_bh(netdev); 245 netif_addr_unlock_bh(netdev);
246 } 246 }
247 247
248 /* Remove mac addresses in the unsync list */ 248 /* Remove MAC addresses in the unsync list */
249 status = ice_remove_mac(hw, &vsi->tmp_unsync_list); 249 status = ice_remove_mac(hw, &vsi->tmp_unsync_list);
250 ice_free_fltr_list(dev, &vsi->tmp_unsync_list); 250 ice_free_fltr_list(dev, &vsi->tmp_unsync_list);
251 if (status) { 251 if (status) {
@@ -257,7 +257,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
257 } 257 }
258 } 258 }
259 259
260 /* Add mac addresses in the sync list */ 260 /* Add MAC addresses in the sync list */
261 status = ice_add_mac(hw, &vsi->tmp_sync_list); 261 status = ice_add_mac(hw, &vsi->tmp_sync_list);
262 ice_free_fltr_list(dev, &vsi->tmp_sync_list); 262 ice_free_fltr_list(dev, &vsi->tmp_sync_list);
263 /* If filter is added successfully or already exists, do not go into 263 /* If filter is added successfully or already exists, do not go into
@@ -266,7 +266,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
266 */ 266 */
267 if (status && status != ICE_ERR_ALREADY_EXISTS) { 267 if (status && status != ICE_ERR_ALREADY_EXISTS) {
268 netdev_err(netdev, "Failed to add MAC filters\n"); 268 netdev_err(netdev, "Failed to add MAC filters\n");
269 /* If there is no more space for new umac filters, vsi 269 /* If there is no more space for new umac filters, VSI
270 * should go into promiscuous mode. There should be some 270 * should go into promiscuous mode. There should be some
271 * space reserved for promiscuous filters. 271 * space reserved for promiscuous filters.
272 */ 272 */
@@ -317,7 +317,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
317 test_bit(ICE_VSI_FLAG_PROMISC_CHANGED, vsi->flags)) { 317 test_bit(ICE_VSI_FLAG_PROMISC_CHANGED, vsi->flags)) {
318 clear_bit(ICE_VSI_FLAG_PROMISC_CHANGED, vsi->flags); 318 clear_bit(ICE_VSI_FLAG_PROMISC_CHANGED, vsi->flags);
319 if (vsi->current_netdev_flags & IFF_PROMISC) { 319 if (vsi->current_netdev_flags & IFF_PROMISC) {
320 /* Apply TX filter rule to get traffic from VMs */ 320 /* Apply Tx filter rule to get traffic from VMs */
321 status = ice_cfg_dflt_vsi(hw, vsi->idx, true, 321 status = ice_cfg_dflt_vsi(hw, vsi->idx, true,
322 ICE_FLTR_TX); 322 ICE_FLTR_TX);
323 if (status) { 323 if (status) {
@@ -327,7 +327,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
327 err = -EIO; 327 err = -EIO;
328 goto out_promisc; 328 goto out_promisc;
329 } 329 }
330 /* Apply RX filter rule to get traffic from wire */ 330 /* Apply Rx filter rule to get traffic from wire */
331 status = ice_cfg_dflt_vsi(hw, vsi->idx, true, 331 status = ice_cfg_dflt_vsi(hw, vsi->idx, true,
332 ICE_FLTR_RX); 332 ICE_FLTR_RX);
333 if (status) { 333 if (status) {
@@ -338,7 +338,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
338 goto out_promisc; 338 goto out_promisc;
339 } 339 }
340 } else { 340 } else {
341 /* Clear TX filter rule to stop traffic from VMs */ 341 /* Clear Tx filter rule to stop traffic from VMs */
342 status = ice_cfg_dflt_vsi(hw, vsi->idx, false, 342 status = ice_cfg_dflt_vsi(hw, vsi->idx, false,
343 ICE_FLTR_TX); 343 ICE_FLTR_TX);
344 if (status) { 344 if (status) {
@@ -348,7 +348,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
348 err = -EIO; 348 err = -EIO;
349 goto out_promisc; 349 goto out_promisc;
350 } 350 }
351 /* Clear RX filter to remove traffic from wire */ 351 /* Clear Rx filter to remove traffic from wire */
352 status = ice_cfg_dflt_vsi(hw, vsi->idx, false, 352 status = ice_cfg_dflt_vsi(hw, vsi->idx, false,
353 ICE_FLTR_RX); 353 ICE_FLTR_RX);
354 if (status) { 354 if (status) {
@@ -608,9 +608,9 @@ void ice_print_link_msg(struct ice_vsi *vsi, bool isup)
608} 608}
609 609
610/** 610/**
611 * ice_vsi_link_event - update the vsi's netdev 611 * ice_vsi_link_event - update the VSI's netdev
612 * @vsi: the vsi on which the link event occurred 612 * @vsi: the VSI on which the link event occurred
613 * @link_up: whether or not the vsi needs to be set up or down 613 * @link_up: whether or not the VSI needs to be set up or down
614 */ 614 */
615static void ice_vsi_link_event(struct ice_vsi *vsi, bool link_up) 615static void ice_vsi_link_event(struct ice_vsi *vsi, bool link_up)
616{ 616{
@@ -1236,7 +1236,7 @@ static void ice_service_task(struct work_struct *work)
1236 1236
1237/** 1237/**
1238 * ice_set_ctrlq_len - helper function to set controlq length 1238 * ice_set_ctrlq_len - helper function to set controlq length
1239 * @hw: pointer to the hw instance 1239 * @hw: pointer to the HW instance
1240 */ 1240 */
1241static void ice_set_ctrlq_len(struct ice_hw *hw) 1241static void ice_set_ctrlq_len(struct ice_hw *hw)
1242{ 1242{
@@ -1796,12 +1796,12 @@ ice_pf_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi)
1796} 1796}
1797 1797
1798/** 1798/**
1799 * ice_vlan_rx_add_vid - Add a vlan id filter to HW offload 1799 * ice_vlan_rx_add_vid - Add a VLAN ID filter to HW offload
1800 * @netdev: network interface to be adjusted 1800 * @netdev: network interface to be adjusted
1801 * @proto: unused protocol 1801 * @proto: unused protocol
1802 * @vid: vlan id to be added 1802 * @vid: VLAN ID to be added
1803 * 1803 *
1804 * net_device_ops implementation for adding vlan ids 1804 * net_device_ops implementation for adding VLAN IDs
1805 */ 1805 */
1806static int 1806static int
1807ice_vlan_rx_add_vid(struct net_device *netdev, __always_unused __be16 proto, 1807ice_vlan_rx_add_vid(struct net_device *netdev, __always_unused __be16 proto,
@@ -1827,7 +1827,7 @@ ice_vlan_rx_add_vid(struct net_device *netdev, __always_unused __be16 proto,
1827 return ret; 1827 return ret;
1828 } 1828 }
1829 1829
1830 /* Add all VLAN ids including 0 to the switch filter. VLAN id 0 is 1830 /* Add all VLAN IDs including 0 to the switch filter. VLAN ID 0 is
1831 * needed to continue allowing all untagged packets since VLAN prune 1831 * needed to continue allowing all untagged packets since VLAN prune
1832 * list is applied to all packets by the switch 1832 * list is applied to all packets by the switch
1833 */ 1833 */
@@ -1841,12 +1841,12 @@ ice_vlan_rx_add_vid(struct net_device *netdev, __always_unused __be16 proto,
1841} 1841}
1842 1842
1843/** 1843/**
1844 * ice_vlan_rx_kill_vid - Remove a vlan id filter from HW offload 1844 * ice_vlan_rx_kill_vid - Remove a VLAN ID filter from HW offload
1845 * @netdev: network interface to be adjusted 1845 * @netdev: network interface to be adjusted
1846 * @proto: unused protocol 1846 * @proto: unused protocol
1847 * @vid: vlan id to be removed 1847 * @vid: VLAN ID to be removed
1848 * 1848 *
1849 * net_device_ops implementation for removing vlan ids 1849 * net_device_ops implementation for removing VLAN IDs
1850 */ 1850 */
1851static int 1851static int
1852ice_vlan_rx_kill_vid(struct net_device *netdev, __always_unused __be16 proto, 1852ice_vlan_rx_kill_vid(struct net_device *netdev, __always_unused __be16 proto,
@@ -2622,7 +2622,7 @@ static void __exit ice_module_exit(void)
2622module_exit(ice_module_exit); 2622module_exit(ice_module_exit);
2623 2623
2624/** 2624/**
2625 * ice_set_mac_address - NDO callback to set mac address 2625 * ice_set_mac_address - NDO callback to set MAC address
2626 * @netdev: network interface device structure 2626 * @netdev: network interface device structure
2627 * @pi: pointer to an address structure 2627 * @pi: pointer to an address structure
2628 * 2628 *
@@ -2659,14 +2659,14 @@ static int ice_set_mac_address(struct net_device *netdev, void *pi)
2659 return -EBUSY; 2659 return -EBUSY;
2660 } 2660 }
2661 2661
2662 /* When we change the mac address we also have to change the mac address 2662 /* When we change the MAC address we also have to change the MAC address
2663 * based filter rules that were created previously for the old mac 2663 * based filter rules that were created previously for the old MAC
2664 * address. So first, we remove the old filter rule using ice_remove_mac 2664 * address. So first, we remove the old filter rule using ice_remove_mac
2665 * and then create a new filter rule using ice_add_mac. Note that for 2665 * and then create a new filter rule using ice_add_mac. Note that for
2666 * both these operations, we first need to form a "list" of mac 2666 * both these operations, we first need to form a "list" of MAC
2667 * addresses (even though in this case, we have only 1 mac address to be 2667 * addresses (even though in this case, we have only 1 MAC address to be
2668 * added/removed) and this done using ice_add_mac_to_list. Depending on 2668 * added/removed) and this done using ice_add_mac_to_list. Depending on
2669 * the ensuing operation this "list" of mac addresses is either to be 2669 * the ensuing operation this "list" of MAC addresses is either to be
2670 * added or removed from the filter. 2670 * added or removed from the filter.
2671 */ 2671 */
2672 err = ice_add_mac_to_list(vsi, &r_mac_list, netdev->dev_addr); 2672 err = ice_add_mac_to_list(vsi, &r_mac_list, netdev->dev_addr);
@@ -2704,12 +2704,12 @@ free_lists:
2704 return err; 2704 return err;
2705 } 2705 }
2706 2706
2707 /* change the netdev's mac address */ 2707 /* change the netdev's MAC address */
2708 memcpy(netdev->dev_addr, mac, netdev->addr_len); 2708 memcpy(netdev->dev_addr, mac, netdev->addr_len);
2709 netdev_dbg(vsi->netdev, "updated mac address to %pM\n", 2709 netdev_dbg(vsi->netdev, "updated mac address to %pM\n",
2710 netdev->dev_addr); 2710 netdev->dev_addr);
2711 2711
2712 /* write new mac address to the firmware */ 2712 /* write new MAC address to the firmware */
2713 flags = ICE_AQC_MAN_MAC_UPDATE_LAA_WOL; 2713 flags = ICE_AQC_MAN_MAC_UPDATE_LAA_WOL;
2714 status = ice_aq_manage_mac_write(hw, mac, flags, NULL); 2714 status = ice_aq_manage_mac_write(hw, mac, flags, NULL);
2715 if (status) { 2715 if (status) {
@@ -2751,7 +2751,7 @@ static void ice_set_rx_mode(struct net_device *netdev)
2751 * @tb: pointer to array of nladdr (unused) 2751 * @tb: pointer to array of nladdr (unused)
2752 * @dev: the net device pointer 2752 * @dev: the net device pointer
2753 * @addr: the MAC address entry being added 2753 * @addr: the MAC address entry being added
2754 * @vid: VLAN id 2754 * @vid: VLAN ID
2755 * @flags: instructions from stack about fdb operation 2755 * @flags: instructions from stack about fdb operation
2756 * @extack: netlink extended ack 2756 * @extack: netlink extended ack
2757 */ 2757 */
@@ -2791,7 +2791,7 @@ ice_fdb_add(struct ndmsg *ndm, struct nlattr __always_unused *tb[],
2791 * @tb: pointer to array of nladdr (unused) 2791 * @tb: pointer to array of nladdr (unused)
2792 * @dev: the net device pointer 2792 * @dev: the net device pointer
2793 * @addr: the MAC address entry being added 2793 * @addr: the MAC address entry being added
2794 * @vid: VLAN id 2794 * @vid: VLAN ID
2795 */ 2795 */
2796static int 2796static int
2797ice_fdb_del(struct ndmsg *ndm, __always_unused struct nlattr *tb[], 2797ice_fdb_del(struct ndmsg *ndm, __always_unused struct nlattr *tb[],
@@ -2850,8 +2850,8 @@ ice_set_features(struct net_device *netdev, netdev_features_t features)
2850} 2850}
2851 2851
2852/** 2852/**
2853 * ice_vsi_vlan_setup - Setup vlan offload properties on a VSI 2853 * ice_vsi_vlan_setup - Setup VLAN offload properties on a VSI
2854 * @vsi: VSI to setup vlan properties for 2854 * @vsi: VSI to setup VLAN properties for
2855 */ 2855 */
2856static int ice_vsi_vlan_setup(struct ice_vsi *vsi) 2856static int ice_vsi_vlan_setup(struct ice_vsi *vsi)
2857{ 2857{
@@ -3986,7 +3986,7 @@ int ice_get_rss(struct ice_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size)
3986/** 3986/**
3987 * ice_bridge_getlink - Get the hardware bridge mode 3987 * ice_bridge_getlink - Get the hardware bridge mode
3988 * @skb: skb buff 3988 * @skb: skb buff
3989 * @pid: process id 3989 * @pid: process ID
3990 * @seq: RTNL message seq 3990 * @seq: RTNL message seq
3991 * @dev: the netdev being configured 3991 * @dev: the netdev being configured
3992 * @filter_mask: filter mask passed in 3992 * @filter_mask: filter mask passed in