diff options
author | Matthew Vick <matthew.vick@intel.com> | 2015-01-30 21:23:05 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-03-03 04:07:23 -0500 |
commit | eca3204765d1f5438d9ace9b7186030b4c2d5b03 (patch) | |
tree | 655e71a05bfa7a9b83a41d19769ce2a8620bcd69 /drivers/net/ethernet | |
parent | 5bf33dc687e8bf2dfc033930ad06437efeea01d9 (diff) |
fm10k: Resolve various spelling errors and checkpatch warnings
Fix a few silly typos in the code and checkpatch warnings in support of
general code cleanliness.
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_common.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_main.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 20 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 23 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_tlv.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_type.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 14 |
11 files changed, 40 insertions, 42 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_common.c b/drivers/net/ethernet/intel/fm10k/fm10k_common.c index bf19dccd4288..6cfae6ac04ea 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_common.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_common.c | |||
@@ -398,7 +398,7 @@ static void fm10k_update_hw_stats_rx_q(struct fm10k_hw *hw, | |||
398 | /* Retrieve RX Owner Data */ | 398 | /* Retrieve RX Owner Data */ |
399 | id_rx = fm10k_read_reg(hw, FM10K_RXQCTL(idx)); | 399 | id_rx = fm10k_read_reg(hw, FM10K_RXQCTL(idx)); |
400 | 400 | ||
401 | /* Process RX Ring*/ | 401 | /* Process RX Ring */ |
402 | do { | 402 | do { |
403 | rx_drops = fm10k_read_hw_stats_32b(hw, FM10K_QPRDC(idx), | 403 | rx_drops = fm10k_read_hw_stats_32b(hw, FM10K_QPRDC(idx), |
404 | &q->rx_drops); | 404 | &q->rx_drops); |
@@ -466,7 +466,6 @@ void fm10k_update_hw_stats_q(struct fm10k_hw *hw, struct fm10k_hw_stats_q *q, | |||
466 | * Function invalidates the index values for the queues so any updates that | 466 | * Function invalidates the index values for the queues so any updates that |
467 | * may have happened are ignored and the base for the queue stats is reset. | 467 | * may have happened are ignored and the base for the queue stats is reset. |
468 | **/ | 468 | **/ |
469 | |||
470 | void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, u32 idx, u32 count) | 469 | void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, u32 idx, u32 count) |
471 | { | 470 | { |
472 | u32 i; | 471 | u32 i; |
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c index 651f53bc7376..33b6106c764b 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | |||
@@ -1019,7 +1019,7 @@ static int fm10k_set_channels(struct net_device *dev, | |||
1019 | } | 1019 | } |
1020 | 1020 | ||
1021 | static int fm10k_get_ts_info(struct net_device *dev, | 1021 | static int fm10k_get_ts_info(struct net_device *dev, |
1022 | struct ethtool_ts_info *info) | 1022 | struct ethtool_ts_info *info) |
1023 | { | 1023 | { |
1024 | struct fm10k_intfc *interface = netdev_priv(dev); | 1024 | struct fm10k_intfc *interface = netdev_priv(dev); |
1025 | 1025 | ||
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c index 060190864238..a02308f5048f 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c | |||
@@ -275,7 +275,7 @@ s32 fm10k_iov_update_pvid(struct fm10k_intfc *interface, u16 glort, u16 pvid) | |||
275 | if (vf_idx >= iov_data->num_vfs) | 275 | if (vf_idx >= iov_data->num_vfs) |
276 | return FM10K_ERR_PARAM; | 276 | return FM10K_ERR_PARAM; |
277 | 277 | ||
278 | /* determine if an update has occured and if so notify the VF */ | 278 | /* determine if an update has occurred and if so notify the VF */ |
279 | vf_info = &iov_data->vf_info[vf_idx]; | 279 | vf_info = &iov_data->vf_info[vf_idx]; |
280 | if (vf_info->sw_vid != pvid) { | 280 | if (vf_info->sw_vid != pvid) { |
281 | vf_info->sw_vid = pvid; | 281 | vf_info->sw_vid = pvid; |
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c index 0cb6971bfbf8..c325bc0c8338 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c | |||
@@ -949,10 +949,10 @@ static int __fm10k_maybe_stop_tx(struct fm10k_ring *tx_ring, u16 size) | |||
949 | { | 949 | { |
950 | netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index); | 950 | netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index); |
951 | 951 | ||
952 | /* Memory barrier before checking head and tail */ | ||
952 | smp_mb(); | 953 | smp_mb(); |
953 | 954 | ||
954 | /* We need to check again in a case another CPU has just | 955 | /* Check again in a case another CPU has just made room available */ |
955 | * made room available. */ | ||
956 | if (likely(fm10k_desc_unused(tx_ring) < size)) | 956 | if (likely(fm10k_desc_unused(tx_ring) < size)) |
957 | return -EBUSY; | 957 | return -EBUSY; |
958 | 958 | ||
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c index 9f5457c9e627..14ee696e9830 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | |||
@@ -72,7 +72,7 @@ static bool fm10k_fifo_empty(struct fm10k_mbx_fifo *fifo) | |||
72 | * @fifo: pointer to FIFO | 72 | * @fifo: pointer to FIFO |
73 | * @offset: offset to add to head | 73 | * @offset: offset to add to head |
74 | * | 74 | * |
75 | * This function returns the indicies into the fifo based on head + offset | 75 | * This function returns the indices into the fifo based on head + offset |
76 | **/ | 76 | **/ |
77 | static u16 fm10k_fifo_head_offset(struct fm10k_mbx_fifo *fifo, u16 offset) | 77 | static u16 fm10k_fifo_head_offset(struct fm10k_mbx_fifo *fifo, u16 offset) |
78 | { | 78 | { |
@@ -84,7 +84,7 @@ static u16 fm10k_fifo_head_offset(struct fm10k_mbx_fifo *fifo, u16 offset) | |||
84 | * @fifo: pointer to FIFO | 84 | * @fifo: pointer to FIFO |
85 | * @offset: offset to add to tail | 85 | * @offset: offset to add to tail |
86 | * | 86 | * |
87 | * This function returns the indicies into the fifo based on tail + offset | 87 | * This function returns the indices into the fifo based on tail + offset |
88 | **/ | 88 | **/ |
89 | static u16 fm10k_fifo_tail_offset(struct fm10k_mbx_fifo *fifo, u16 offset) | 89 | static u16 fm10k_fifo_tail_offset(struct fm10k_mbx_fifo *fifo, u16 offset) |
90 | { | 90 | { |
@@ -326,7 +326,7 @@ static u16 fm10k_mbx_validate_msg_size(struct fm10k_mbx_info *mbx, u16 len) | |||
326 | * fm10k_mbx_write_copy - pulls data off of Tx FIFO and places it in mbmem | 326 | * fm10k_mbx_write_copy - pulls data off of Tx FIFO and places it in mbmem |
327 | * @mbx: pointer to mailbox | 327 | * @mbx: pointer to mailbox |
328 | * | 328 | * |
329 | * This function will take a seciton of the Rx FIFO and copy it into the | 329 | * This function will take a section of the Rx FIFO and copy it into the |
330 | mbx->tail--; | 330 | mbx->tail--; |
331 | * mailbox memory. The offset in mbmem is based on the lower bits of the | 331 | * mailbox memory. The offset in mbmem is based on the lower bits of the |
332 | * tail and len determines the length to copy. | 332 | * tail and len determines the length to copy. |
@@ -418,7 +418,7 @@ static void fm10k_mbx_pull_head(struct fm10k_hw *hw, | |||
418 | * @hw: pointer to hardware structure | 418 | * @hw: pointer to hardware structure |
419 | * @mbx: pointer to mailbox | 419 | * @mbx: pointer to mailbox |
420 | * | 420 | * |
421 | * This function will take a seciton of the mailbox memory and copy it | 421 | * This function will take a section of the mailbox memory and copy it |
422 | * into the Rx FIFO. The offset is based on the lower bits of the | 422 | * into the Rx FIFO. The offset is based on the lower bits of the |
423 | * head and len determines the length to copy. | 423 | * head and len determines the length to copy. |
424 | **/ | 424 | **/ |
@@ -464,7 +464,7 @@ static void fm10k_mbx_read_copy(struct fm10k_hw *hw, | |||
464 | * @tail: tail index of message | 464 | * @tail: tail index of message |
465 | * | 465 | * |
466 | * This function will first validate the tail index and size for the | 466 | * This function will first validate the tail index and size for the |
467 | * incoming message. It then updates the acknowlegment number and | 467 | * incoming message. It then updates the acknowledgment number and |
468 | * copies the data into the FIFO. It will return the number of messages | 468 | * copies the data into the FIFO. It will return the number of messages |
469 | * dequeued on success and a negative value on error. | 469 | * dequeued on success and a negative value on error. |
470 | **/ | 470 | **/ |
@@ -761,7 +761,7 @@ static s32 fm10k_mbx_enqueue_tx(struct fm10k_hw *hw, | |||
761 | err = fm10k_fifo_enqueue(&mbx->tx, msg); | 761 | err = fm10k_fifo_enqueue(&mbx->tx, msg); |
762 | } | 762 | } |
763 | 763 | ||
764 | /* if we failed trhead the error */ | 764 | /* if we failed treat the error */ |
765 | if (err) { | 765 | if (err) { |
766 | mbx->timeout = 0; | 766 | mbx->timeout = 0; |
767 | mbx->tx_busy++; | 767 | mbx->tx_busy++; |
@@ -815,7 +815,7 @@ static void fm10k_mbx_write(struct fm10k_hw *hw, struct fm10k_mbx_info *mbx) | |||
815 | { | 815 | { |
816 | u32 mbmem = mbx->mbmem_reg; | 816 | u32 mbmem = mbx->mbmem_reg; |
817 | 817 | ||
818 | /* write new msg header to notify recepient of change */ | 818 | /* write new msg header to notify recipient of change */ |
819 | fm10k_write_reg(hw, mbmem, mbx->mbx_hdr); | 819 | fm10k_write_reg(hw, mbmem, mbx->mbx_hdr); |
820 | 820 | ||
821 | /* write mailbox to sent interrupt */ | 821 | /* write mailbox to sent interrupt */ |
@@ -1251,7 +1251,7 @@ static s32 fm10k_mbx_process_error(struct fm10k_hw *hw, | |||
1251 | /* we will need to pull all of the fields for verification */ | 1251 | /* we will need to pull all of the fields for verification */ |
1252 | head = FM10K_MSG_HDR_FIELD_GET(*hdr, HEAD); | 1252 | head = FM10K_MSG_HDR_FIELD_GET(*hdr, HEAD); |
1253 | 1253 | ||
1254 | /* we only have lower 10 bits of error number os add upper bits */ | 1254 | /* we only have lower 10 bits of error number so add upper bits */ |
1255 | err_no = FM10K_MSG_HDR_FIELD_GET(*hdr, ERR_NO); | 1255 | err_no = FM10K_MSG_HDR_FIELD_GET(*hdr, ERR_NO); |
1256 | err_no |= ~FM10K_MSG_HDR_MASK(ERR_NO); | 1256 | err_no |= ~FM10K_MSG_HDR_MASK(ERR_NO); |
1257 | 1257 | ||
@@ -1548,7 +1548,7 @@ s32 fm10k_pfvf_mbx_init(struct fm10k_hw *hw, struct fm10k_mbx_info *mbx, | |||
1548 | mbx->timeout = 0; | 1548 | mbx->timeout = 0; |
1549 | mbx->udelay = FM10K_MBX_INIT_DELAY; | 1549 | mbx->udelay = FM10K_MBX_INIT_DELAY; |
1550 | 1550 | ||
1551 | /* initalize tail and head */ | 1551 | /* initialize tail and head */ |
1552 | mbx->tail = 1; | 1552 | mbx->tail = 1; |
1553 | mbx->head = 1; | 1553 | mbx->head = 1; |
1554 | 1554 | ||
@@ -1627,7 +1627,7 @@ static void fm10k_sm_mbx_connect_reset(struct fm10k_mbx_info *mbx) | |||
1627 | mbx->local = FM10K_SM_MBX_VERSION; | 1627 | mbx->local = FM10K_SM_MBX_VERSION; |
1628 | mbx->remote = 0; | 1628 | mbx->remote = 0; |
1629 | 1629 | ||
1630 | /* initalize tail and head */ | 1630 | /* initialize tail and head */ |
1631 | mbx->tail = 1; | 1631 | mbx->tail = 1; |
1632 | mbx->head = 1; | 1632 | mbx->head = 1; |
1633 | 1633 | ||
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c index 2a9b467d1042..d5b303dad95e 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | |||
@@ -356,7 +356,7 @@ static void fm10k_free_all_rx_resources(struct fm10k_intfc *interface) | |||
356 | * fm10k_request_glort_range - Request GLORTs for use in configuring rules | 356 | * fm10k_request_glort_range - Request GLORTs for use in configuring rules |
357 | * @interface: board private structure | 357 | * @interface: board private structure |
358 | * | 358 | * |
359 | * This function allocates a range of glorts for this inteface to use. | 359 | * This function allocates a range of glorts for this interface to use. |
360 | **/ | 360 | **/ |
361 | static void fm10k_request_glort_range(struct fm10k_intfc *interface) | 361 | static void fm10k_request_glort_range(struct fm10k_intfc *interface) |
362 | { | 362 | { |
@@ -781,7 +781,7 @@ static int fm10k_update_vid(struct net_device *netdev, u16 vid, bool set) | |||
781 | 781 | ||
782 | fm10k_mbx_lock(interface); | 782 | fm10k_mbx_lock(interface); |
783 | 783 | ||
784 | /* only need to update the VLAN if not in promiscous mode */ | 784 | /* only need to update the VLAN if not in promiscuous mode */ |
785 | if (!(netdev->flags & IFF_PROMISC)) { | 785 | if (!(netdev->flags & IFF_PROMISC)) { |
786 | err = hw->mac.ops.update_vlan(hw, vid, 0, set); | 786 | err = hw->mac.ops.update_vlan(hw, vid, 0, set); |
787 | if (err) | 787 | if (err) |
@@ -970,7 +970,7 @@ static void fm10k_set_rx_mode(struct net_device *dev) | |||
970 | 970 | ||
971 | fm10k_mbx_lock(interface); | 971 | fm10k_mbx_lock(interface); |
972 | 972 | ||
973 | /* syncronize all of the addresses */ | 973 | /* synchronize all of the addresses */ |
974 | if (xcast_mode != FM10K_XCAST_MODE_PROMISC) { | 974 | if (xcast_mode != FM10K_XCAST_MODE_PROMISC) { |
975 | __dev_uc_sync(dev, fm10k_uc_sync, fm10k_uc_unsync); | 975 | __dev_uc_sync(dev, fm10k_uc_sync, fm10k_uc_unsync); |
976 | if (xcast_mode != FM10K_XCAST_MODE_ALLMULTI) | 976 | if (xcast_mode != FM10K_XCAST_MODE_ALLMULTI) |
@@ -1051,7 +1051,7 @@ void fm10k_restore_rx_state(struct fm10k_intfc *interface) | |||
1051 | vid, true, 0); | 1051 | vid, true, 0); |
1052 | } | 1052 | } |
1053 | 1053 | ||
1054 | /* syncronize all of the addresses */ | 1054 | /* synchronize all of the addresses */ |
1055 | if (xcast_mode != FM10K_XCAST_MODE_PROMISC) { | 1055 | if (xcast_mode != FM10K_XCAST_MODE_PROMISC) { |
1056 | __dev_uc_sync(netdev, fm10k_uc_sync, fm10k_uc_unsync); | 1056 | __dev_uc_sync(netdev, fm10k_uc_sync, fm10k_uc_unsync); |
1057 | if (xcast_mode != FM10K_XCAST_MODE_ALLMULTI) | 1057 | if (xcast_mode != FM10K_XCAST_MODE_ALLMULTI) |
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c index 4f5892cc32d7..8978d55a1c51 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c | |||
@@ -648,7 +648,7 @@ static void fm10k_configure_rx_ring(struct fm10k_intfc *interface, | |||
648 | /* Configure the Rx buffer size for one buff without split */ | 648 | /* Configure the Rx buffer size for one buff without split */ |
649 | srrctl |= FM10K_RX_BUFSZ >> FM10K_SRRCTL_BSIZEPKT_SHIFT; | 649 | srrctl |= FM10K_RX_BUFSZ >> FM10K_SRRCTL_BSIZEPKT_SHIFT; |
650 | 650 | ||
651 | /* Configure the Rx ring to supress loopback packets */ | 651 | /* Configure the Rx ring to suppress loopback packets */ |
652 | srrctl |= FM10K_SRRCTL_LOOPBACK_SUPPRESS; | 652 | srrctl |= FM10K_SRRCTL_LOOPBACK_SUPPRESS; |
653 | fm10k_write_reg(hw, FM10K_SRRCTL(reg_idx), srrctl); | 653 | fm10k_write_reg(hw, FM10K_SRRCTL(reg_idx), srrctl); |
654 | 654 | ||
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c index 7e4711958e46..159cd8463800 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c | |||
@@ -234,8 +234,7 @@ static s32 fm10k_update_vlan_pf(struct fm10k_hw *hw, u32 vid, u8 vsi, bool set) | |||
234 | vid = (vid << 17) >> 17; | 234 | vid = (vid << 17) >> 17; |
235 | 235 | ||
236 | /* verify the reserved 0 fields are 0 */ | 236 | /* verify the reserved 0 fields are 0 */ |
237 | if (len >= FM10K_VLAN_TABLE_VID_MAX || | 237 | if (len >= FM10K_VLAN_TABLE_VID_MAX || vid >= FM10K_VLAN_TABLE_VID_MAX) |
238 | vid >= FM10K_VLAN_TABLE_VID_MAX) | ||
239 | return FM10K_ERR_PARAM; | 238 | return FM10K_ERR_PARAM; |
240 | 239 | ||
241 | /* Loop through the table updating all required VLANs */ | 240 | /* Loop through the table updating all required VLANs */ |
@@ -312,7 +311,7 @@ bool fm10k_glort_valid_pf(struct fm10k_hw *hw, u16 glort) | |||
312 | } | 311 | } |
313 | 312 | ||
314 | /** | 313 | /** |
315 | * fm10k_update_uc_addr_pf - Update device unicast addresss | 314 | * fm10k_update_xc_addr_pf - Update device addresses |
316 | * @hw: pointer to the HW structure | 315 | * @hw: pointer to the HW structure |
317 | * @glort: base resource tag for this request | 316 | * @glort: base resource tag for this request |
318 | * @mac: MAC address to add/remove from table | 317 | * @mac: MAC address to add/remove from table |
@@ -356,7 +355,7 @@ static s32 fm10k_update_xc_addr_pf(struct fm10k_hw *hw, u16 glort, | |||
356 | } | 355 | } |
357 | 356 | ||
358 | /** | 357 | /** |
359 | * fm10k_update_uc_addr_pf - Update device unicast addresss | 358 | * fm10k_update_uc_addr_pf - Update device unicast addresses |
360 | * @hw: pointer to the HW structure | 359 | * @hw: pointer to the HW structure |
361 | * @glort: base resource tag for this request | 360 | * @glort: base resource tag for this request |
362 | * @mac: MAC address to add/remove from table | 361 | * @mac: MAC address to add/remove from table |
@@ -454,7 +453,7 @@ static void fm10k_update_int_moderator_pf(struct fm10k_hw *hw) | |||
454 | break; | 453 | break; |
455 | } | 454 | } |
456 | 455 | ||
457 | /* always reset VFITR2[0] to point to last enabled PF vector*/ | 456 | /* always reset VFITR2[0] to point to last enabled PF vector */ |
458 | fm10k_write_reg(hw, FM10K_ITR2(FM10K_ITR_REG_COUNT_PF), i); | 457 | fm10k_write_reg(hw, FM10K_ITR2(FM10K_ITR_REG_COUNT_PF), i); |
459 | 458 | ||
460 | /* reset ITR2[0] to point to last enabled PF vector */ | 459 | /* reset ITR2[0] to point to last enabled PF vector */ |
@@ -812,7 +811,7 @@ static s32 fm10k_iov_assign_int_moderator_pf(struct fm10k_hw *hw, u16 vf_idx) | |||
812 | if (vf_idx >= hw->iov.num_vfs) | 811 | if (vf_idx >= hw->iov.num_vfs) |
813 | return FM10K_ERR_PARAM; | 812 | return FM10K_ERR_PARAM; |
814 | 813 | ||
815 | /* determine vector offset and count*/ | 814 | /* determine vector offset and count */ |
816 | vf_v_idx = fm10k_vf_vector_index(hw, vf_idx); | 815 | vf_v_idx = fm10k_vf_vector_index(hw, vf_idx); |
817 | vf_v_limit = vf_v_idx + fm10k_vectors_per_pool(hw); | 816 | vf_v_limit = vf_v_idx + fm10k_vectors_per_pool(hw); |
818 | 817 | ||
@@ -951,7 +950,7 @@ static s32 fm10k_iov_reset_resources_pf(struct fm10k_hw *hw, | |||
951 | if (vf_info->mbx.ops.disconnect) | 950 | if (vf_info->mbx.ops.disconnect) |
952 | vf_info->mbx.ops.disconnect(hw, &vf_info->mbx); | 951 | vf_info->mbx.ops.disconnect(hw, &vf_info->mbx); |
953 | 952 | ||
954 | /* determine vector offset and count*/ | 953 | /* determine vector offset and count */ |
955 | vf_v_idx = fm10k_vf_vector_index(hw, vf_idx); | 954 | vf_v_idx = fm10k_vf_vector_index(hw, vf_idx); |
956 | vf_v_limit = vf_v_idx + fm10k_vectors_per_pool(hw); | 955 | vf_v_limit = vf_v_idx + fm10k_vectors_per_pool(hw); |
957 | 956 | ||
@@ -1035,7 +1034,7 @@ static s32 fm10k_iov_reset_resources_pf(struct fm10k_hw *hw, | |||
1035 | ((u32)vf_info->mac[2]); | 1034 | ((u32)vf_info->mac[2]); |
1036 | } | 1035 | } |
1037 | 1036 | ||
1038 | /* map queue pairs back to VF from last to first*/ | 1037 | /* map queue pairs back to VF from last to first */ |
1039 | for (i = queues_per_pool; i--;) { | 1038 | for (i = queues_per_pool; i--;) { |
1040 | fm10k_write_reg(hw, FM10K_TDBAL(vf_q_idx + i), tdbal); | 1039 | fm10k_write_reg(hw, FM10K_TDBAL(vf_q_idx + i), tdbal); |
1041 | fm10k_write_reg(hw, FM10K_TDBAH(vf_q_idx + i), tdbah); | 1040 | fm10k_write_reg(hw, FM10K_TDBAH(vf_q_idx + i), tdbah); |
@@ -1141,7 +1140,7 @@ static s32 fm10k_iov_report_timestamp_pf(struct fm10k_hw *hw, | |||
1141 | * | 1140 | * |
1142 | * This function is a default handler for MSI-X requests from the VF. The | 1141 | * This function is a default handler for MSI-X requests from the VF. The |
1143 | * assumption is that in this case it is acceptable to just directly | 1142 | * assumption is that in this case it is acceptable to just directly |
1144 | * hand off the message form the VF to the underlying shared code. | 1143 | * hand off the message from the VF to the underlying shared code. |
1145 | **/ | 1144 | **/ |
1146 | s32 fm10k_iov_msg_msix_pf(struct fm10k_hw *hw, u32 **results, | 1145 | s32 fm10k_iov_msg_msix_pf(struct fm10k_hw *hw, u32 **results, |
1147 | struct fm10k_mbx_info *mbx) | 1146 | struct fm10k_mbx_info *mbx) |
@@ -1160,7 +1159,7 @@ s32 fm10k_iov_msg_msix_pf(struct fm10k_hw *hw, u32 **results, | |||
1160 | * | 1159 | * |
1161 | * This function is a default handler for MAC/VLAN requests from the VF. | 1160 | * This function is a default handler for MAC/VLAN requests from the VF. |
1162 | * The assumption is that in this case it is acceptable to just directly | 1161 | * The assumption is that in this case it is acceptable to just directly |
1163 | * hand off the message form the VF to the underlying shared code. | 1162 | * hand off the message from the VF to the underlying shared code. |
1164 | **/ | 1163 | **/ |
1165 | s32 fm10k_iov_msg_mac_vlan_pf(struct fm10k_hw *hw, u32 **results, | 1164 | s32 fm10k_iov_msg_mac_vlan_pf(struct fm10k_hw *hw, u32 **results, |
1166 | struct fm10k_mbx_info *mbx) | 1165 | struct fm10k_mbx_info *mbx) |
@@ -1404,7 +1403,7 @@ static void fm10k_update_hw_stats_pf(struct fm10k_hw *hw, | |||
1404 | &stats->vlan_drop); | 1403 | &stats->vlan_drop); |
1405 | loopback_drop = fm10k_read_hw_stats_32b(hw, | 1404 | loopback_drop = fm10k_read_hw_stats_32b(hw, |
1406 | FM10K_STATS_LOOPBACK_DROP, | 1405 | FM10K_STATS_LOOPBACK_DROP, |
1407 | &stats->loopback_drop); | 1406 | &stats->loopback_drop); |
1408 | nodesc_drop = fm10k_read_hw_stats_32b(hw, | 1407 | nodesc_drop = fm10k_read_hw_stats_32b(hw, |
1409 | FM10K_STATS_NODESC_DROP, | 1408 | FM10K_STATS_NODESC_DROP, |
1410 | &stats->nodesc_drop); | 1409 | &stats->nodesc_drop); |
@@ -1573,7 +1572,7 @@ static s32 fm10k_get_host_state_pf(struct fm10k_hw *hw, bool *switch_ready) | |||
1573 | s32 ret_val = 0; | 1572 | s32 ret_val = 0; |
1574 | u32 dma_ctrl2; | 1573 | u32 dma_ctrl2; |
1575 | 1574 | ||
1576 | /* verify the switch is ready for interraction */ | 1575 | /* verify the switch is ready for interaction */ |
1577 | dma_ctrl2 = fm10k_read_reg(hw, FM10K_DMA_CTRL2); | 1576 | dma_ctrl2 = fm10k_read_reg(hw, FM10K_DMA_CTRL2); |
1578 | if (!(dma_ctrl2 & FM10K_DMA_CTRL2_SWITCH_READY)) | 1577 | if (!(dma_ctrl2 & FM10K_DMA_CTRL2_SWITCH_READY)) |
1579 | goto out; | 1578 | goto out; |
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_tlv.c b/drivers/net/ethernet/intel/fm10k/fm10k_tlv.c index fd0a05f011a8..9b29d7b0377a 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_tlv.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_tlv.c | |||
@@ -710,7 +710,7 @@ void fm10k_tlv_msg_test_create(u32 *msg, u32 attr_flags) | |||
710 | /** | 710 | /** |
711 | * fm10k_tlv_msg_test - Validate all results on test message receive | 711 | * fm10k_tlv_msg_test - Validate all results on test message receive |
712 | * @hw: Pointer to hardware structure | 712 | * @hw: Pointer to hardware structure |
713 | * @results: Pointer array to attributes in the mesage | 713 | * @results: Pointer array to attributes in the message |
714 | * @mbx: Pointer to mailbox information structure | 714 | * @mbx: Pointer to mailbox information structure |
715 | * | 715 | * |
716 | * This function does a check to verify all attributes match what the test | 716 | * This function does a check to verify all attributes match what the test |
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_type.h b/drivers/net/ethernet/intel/fm10k/fm10k_type.h index abb8a03824ac..4af96686c584 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_type.h +++ b/drivers/net/ethernet/intel/fm10k/fm10k_type.h | |||
@@ -596,7 +596,7 @@ struct fm10k_vf_info { | |||
596 | u16 sw_vid; /* Switch API assigned VLAN */ | 596 | u16 sw_vid; /* Switch API assigned VLAN */ |
597 | u16 pf_vid; /* PF assigned Default VLAN */ | 597 | u16 pf_vid; /* PF assigned Default VLAN */ |
598 | u8 mac[ETH_ALEN]; /* PF Default MAC address */ | 598 | u8 mac[ETH_ALEN]; /* PF Default MAC address */ |
599 | u8 vsi; /* VSI idenfifier */ | 599 | u8 vsi; /* VSI identifier */ |
600 | u8 vf_idx; /* which VF this is */ | 600 | u8 vf_idx; /* which VF this is */ |
601 | u8 vf_flags; /* flags indicating what modes | 601 | u8 vf_flags; /* flags indicating what modes |
602 | * are supported for the port | 602 | * are supported for the port |
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c index f0aa0f97b4a9..17219678439a 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c | |||
@@ -37,7 +37,7 @@ static s32 fm10k_stop_hw_vf(struct fm10k_hw *hw) | |||
37 | if (err) | 37 | if (err) |
38 | return err; | 38 | return err; |
39 | 39 | ||
40 | /* If permenant address is set then we need to restore it */ | 40 | /* If permanent address is set then we need to restore it */ |
41 | if (is_valid_ether_addr(perm_addr)) { | 41 | if (is_valid_ether_addr(perm_addr)) { |
42 | bal = (((u32)perm_addr[3]) << 24) | | 42 | bal = (((u32)perm_addr[3]) << 24) | |
43 | (((u32)perm_addr[4]) << 16) | | 43 | (((u32)perm_addr[4]) << 16) | |
@@ -65,7 +65,7 @@ static s32 fm10k_stop_hw_vf(struct fm10k_hw *hw) | |||
65 | * fm10k_reset_hw_vf - VF hardware reset | 65 | * fm10k_reset_hw_vf - VF hardware reset |
66 | * @hw: pointer to hardware structure | 66 | * @hw: pointer to hardware structure |
67 | * | 67 | * |
68 | * This function should return the hardare to a state similar to the | 68 | * This function should return the hardware to a state similar to the |
69 | * one it is in after just being initialized. | 69 | * one it is in after just being initialized. |
70 | **/ | 70 | **/ |
71 | static s32 fm10k_reset_hw_vf(struct fm10k_hw *hw) | 71 | static s32 fm10k_reset_hw_vf(struct fm10k_hw *hw) |
@@ -252,7 +252,7 @@ static s32 fm10k_read_mac_addr_vf(struct fm10k_hw *hw) | |||
252 | } | 252 | } |
253 | 253 | ||
254 | /** | 254 | /** |
255 | * fm10k_update_uc_addr_vf - Update device unicast address | 255 | * fm10k_update_uc_addr_vf - Update device unicast addresses |
256 | * @hw: pointer to the HW structure | 256 | * @hw: pointer to the HW structure |
257 | * @glort: unused | 257 | * @glort: unused |
258 | * @mac: MAC address to add/remove from table | 258 | * @mac: MAC address to add/remove from table |
@@ -282,7 +282,7 @@ static s32 fm10k_update_uc_addr_vf(struct fm10k_hw *hw, u16 glort, | |||
282 | memcmp(hw->mac.perm_addr, mac, ETH_ALEN)) | 282 | memcmp(hw->mac.perm_addr, mac, ETH_ALEN)) |
283 | return FM10K_ERR_PARAM; | 283 | return FM10K_ERR_PARAM; |
284 | 284 | ||
285 | /* add bit to notify us if this is a set of clear operation */ | 285 | /* add bit to notify us if this is a set or clear operation */ |
286 | if (!add) | 286 | if (!add) |
287 | vid |= FM10K_VLAN_CLEAR; | 287 | vid |= FM10K_VLAN_CLEAR; |
288 | 288 | ||
@@ -295,7 +295,7 @@ static s32 fm10k_update_uc_addr_vf(struct fm10k_hw *hw, u16 glort, | |||
295 | } | 295 | } |
296 | 296 | ||
297 | /** | 297 | /** |
298 | * fm10k_update_mc_addr_vf - Update device multicast address | 298 | * fm10k_update_mc_addr_vf - Update device multicast addresses |
299 | * @hw: pointer to the HW structure | 299 | * @hw: pointer to the HW structure |
300 | * @glort: unused | 300 | * @glort: unused |
301 | * @mac: MAC address to add/remove from table | 301 | * @mac: MAC address to add/remove from table |
@@ -319,7 +319,7 @@ static s32 fm10k_update_mc_addr_vf(struct fm10k_hw *hw, u16 glort, | |||
319 | if (!is_multicast_ether_addr(mac)) | 319 | if (!is_multicast_ether_addr(mac)) |
320 | return FM10K_ERR_PARAM; | 320 | return FM10K_ERR_PARAM; |
321 | 321 | ||
322 | /* add bit to notify us if this is a set of clear operation */ | 322 | /* add bit to notify us if this is a set or clear operation */ |
323 | if (!add) | 323 | if (!add) |
324 | vid |= FM10K_VLAN_CLEAR; | 324 | vid |= FM10K_VLAN_CLEAR; |
325 | 325 | ||
@@ -515,7 +515,7 @@ static s32 fm10k_adjust_systime_vf(struct fm10k_hw *hw, s32 ppb) | |||
515 | * @hw: pointer to the hardware structure | 515 | * @hw: pointer to the hardware structure |
516 | * | 516 | * |
517 | * Function reads the content of 2 registers, combined to represent a 64 bit | 517 | * Function reads the content of 2 registers, combined to represent a 64 bit |
518 | * value measured in nanosecods. In order to guarantee the value is accurate | 518 | * value measured in nanoseconds. In order to guarantee the value is accurate |
519 | * we check the 32 most significant bits both before and after reading the | 519 | * we check the 32 most significant bits both before and after reading the |
520 | * 32 least significant bits to verify they didn't change as we were reading | 520 | * 32 least significant bits to verify they didn't change as we were reading |
521 | * the registers. | 521 | * the registers. |