aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>2018-10-26 14:44:46 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-11-20 14:39:04 -0500
commitdf17b7e02f0fa3a13c5aac26c317447d72612e1c (patch)
treedb9599849635954ddeb1f1cea9b250180973a32f /drivers/net
parent2c5492de8770b72cb9c97c91fbcbb90c16470819 (diff)
ice: Cosmetic formatting changes
1. Fix several cases of double spacing 2. Fix typos 3. Capitalize abbreviations 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')
-rw-r--r--drivers/net/ethernet/intel/ice/ice.h10
-rw-r--r--drivers/net/ethernet/intel/ice/ice_adminq_cmd.h16
-rw-r--r--drivers/net/ethernet/intel/ice/ice_controlq.c4
-rw-r--r--drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h79
-rw-r--r--drivers/net/ethernet/intel/ice/ice_lib.c8
-rw-r--r--drivers/net/ethernet/intel/ice/ice_main.c14
-rw-r--r--drivers/net/ethernet/intel/ice/ice_sriov.c2
-rw-r--r--drivers/net/ethernet/intel/ice/ice_switch.c4
-rw-r--r--drivers/net/ethernet/intel/ice/ice_txrx.c12
-rw-r--r--drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c16
-rw-r--r--drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h2
11 files changed, 83 insertions, 84 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 7d8575d11786..60b2e0c9faf5 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -150,10 +150,10 @@ enum ice_state {
150 __ICE_RESET_FAILED, /* set by reset/rebuild */ 150 __ICE_RESET_FAILED, /* set by reset/rebuild */
151 /* When checking for the PF to be in a nominal operating state, the 151 /* When checking for the PF to be in a nominal operating state, the
152 * bits that are grouped at the beginning of the list need to be 152 * bits that are grouped at the beginning of the list need to be
153 * checked. Bits occurring before __ICE_STATE_NOMINAL_CHECK_BITS will 153 * checked. Bits occurring before __ICE_STATE_NOMINAL_CHECK_BITS will
154 * be checked. If you need to add a bit into consideration for nominal 154 * be checked. If you need to add a bit into consideration for nominal
155 * operating state, it must be added before 155 * operating state, it must be added before
156 * __ICE_STATE_NOMINAL_CHECK_BITS. Do not move this entry's position 156 * __ICE_STATE_NOMINAL_CHECK_BITS. Do not move this entry's position
157 * without appropriate consideration. 157 * without appropriate consideration.
158 */ 158 */
159 __ICE_STATE_NOMINAL_CHECK_BITS, 159 __ICE_STATE_NOMINAL_CHECK_BITS,
@@ -201,8 +201,8 @@ struct ice_vsi {
201 int sw_base_vector; /* Irq base for OS reserved vectors */ 201 int sw_base_vector; /* Irq base for OS reserved vectors */
202 int hw_base_vector; /* HW (absolute) index of a vector */ 202 int hw_base_vector; /* HW (absolute) index of a vector */
203 enum ice_vsi_type type; 203 enum ice_vsi_type type;
204 u16 vsi_num; /* HW (absolute) index of this VSI */ 204 u16 vsi_num; /* HW (absolute) index of this VSI */
205 u16 idx; /* software index in pf->vsi[] */ 205 u16 idx; /* software index in pf->vsi[] */
206 206
207 /* Interrupt thresholds */ 207 /* Interrupt thresholds */
208 u16 work_lmt; 208 u16 work_lmt;
diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
index 4078070881ce..fcdcd80b18e7 100644
--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
@@ -5,7 +5,7 @@
5#define _ICE_ADMINQ_CMD_H_ 5#define _ICE_ADMINQ_CMD_H_
6 6
7/* This header file defines the Admin Queue commands, error codes and 7/* This header file defines the Admin Queue commands, error codes and
8 * descriptor format. It is shared between Firmware and Software. 8 * descriptor format. It is shared between Firmware and Software.
9 */ 9 */
10 10
11#define ICE_MAX_VSI 768 11#define ICE_MAX_VSI 768
@@ -463,7 +463,7 @@ struct ice_aqc_sw_rules {
463}; 463};
464 464
465/* Add/Update/Get/Remove lookup Rx/Tx command/response entry 465/* Add/Update/Get/Remove lookup Rx/Tx command/response entry
466 * This structures describes the lookup rules and associated actions. "index" 466 * This structures describes the lookup rules and associated actions. "index"
467 * is returned as part of a response to a successful Add command, and can be 467 * is returned as part of a response to a successful Add command, and can be
468 * used to identify the rule for Update/Get/Remove commands. 468 * used to identify the rule for Update/Get/Remove commands.
469 */ 469 */
@@ -1111,7 +1111,7 @@ struct ice_aqc_get_set_rss_keys {
1111}; 1111};
1112 1112
1113/* Get/Set RSS LUT (indirect 0x0B05/0x0B03) */ 1113/* Get/Set RSS LUT (indirect 0x0B05/0x0B03) */
1114struct ice_aqc_get_set_rss_lut { 1114struct ice_aqc_get_set_rss_lut {
1115#define ICE_AQC_GSET_RSS_LUT_VSI_VALID BIT(15) 1115#define ICE_AQC_GSET_RSS_LUT_VSI_VALID BIT(15)
1116#define ICE_AQC_GSET_RSS_LUT_VSI_ID_S 0 1116#define ICE_AQC_GSET_RSS_LUT_VSI_ID_S 0
1117#define ICE_AQC_GSET_RSS_LUT_VSI_ID_M (0x1FF << ICE_AQC_GSET_RSS_LUT_VSI_ID_S) 1117#define ICE_AQC_GSET_RSS_LUT_VSI_ID_M (0x1FF << ICE_AQC_GSET_RSS_LUT_VSI_ID_S)
@@ -1315,10 +1315,10 @@ struct ice_aqc_get_clear_fw_log {
1315 * @params: command-specific parameters 1315 * @params: command-specific parameters
1316 * 1316 *
1317 * Descriptor format for commands the driver posts on the Admin Transmit Queue 1317 * Descriptor format for commands the driver posts on the Admin Transmit Queue
1318 * (ATQ). The firmware writes back onto the command descriptor and returns 1318 * (ATQ). The firmware writes back onto the command descriptor and returns
1319 * the result of the command. Asynchronous events that are not an immediate 1319 * the result of the command. Asynchronous events that are not an immediate
1320 * result of the command are written to the Admin Receive Queue (ARQ) using 1320 * result of the command are written to the Admin Receive Queue (ARQ) using
1321 * the same descriptor format. Descriptors are in little-endian notation with 1321 * the same descriptor format. Descriptors are in little-endian notation with
1322 * 32-bit words. 1322 * 32-bit words.
1323 */ 1323 */
1324struct ice_aq_desc { 1324struct ice_aq_desc {
@@ -1380,10 +1380,10 @@ struct ice_aq_desc {
1380 1380
1381/* error codes */ 1381/* error codes */
1382enum ice_aq_err { 1382enum ice_aq_err {
1383 ICE_AQ_RC_OK = 0, /* success */ 1383 ICE_AQ_RC_OK = 0, /* Success */
1384 ICE_AQ_RC_ENOMEM = 9, /* Out of memory */ 1384 ICE_AQ_RC_ENOMEM = 9, /* Out of memory */
1385 ICE_AQ_RC_EBUSY = 12, /* Device or resource busy */ 1385 ICE_AQ_RC_EBUSY = 12, /* Device or resource busy */
1386 ICE_AQ_RC_EEXIST = 13, /* object already exists */ 1386 ICE_AQ_RC_EEXIST = 13, /* Object already exists */
1387 ICE_AQ_RC_ENOSPC = 16, /* No space left or allocation failure */ 1387 ICE_AQ_RC_ENOSPC = 16, /* No space left or allocation failure */
1388}; 1388};
1389 1389
diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c b/drivers/net/ethernet/intel/ice/ice_controlq.c
index b920403c6616..1831771a7969 100644
--- a/drivers/net/ethernet/intel/ice/ice_controlq.c
+++ b/drivers/net/ethernet/intel/ice/ice_controlq.c
@@ -775,7 +775,7 @@ static bool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq)
775 * @buf_size: size of buffer for indirect commands (or 0 for direct commands) 775 * @buf_size: size of buffer for indirect commands (or 0 for direct commands)
776 * @cd: pointer to command details structure 776 * @cd: pointer to command details structure
777 * 777 *
778 * This is the main send command routine for the ATQ. It runs the q, 778 * This is the main send command routine for the ATQ. It runs the queue,
779 * cleans the queue, etc. 779 * cleans the queue, etc.
780 */ 780 */
781enum ice_status 781enum ice_status
@@ -969,7 +969,7 @@ void ice_fill_dflt_direct_cmd_desc(struct ice_aq_desc *desc, u16 opcode)
969 * @pending: number of events that could be left to process 969 * @pending: number of events that could be left to process
970 * 970 *
971 * This function cleans one Admin Receive Queue element and returns 971 * This function cleans one Admin Receive Queue element and returns
972 * the contents through e. It can also return how many events are 972 * the contents through e. It can also return how many events are
973 * left to process through 'pending'. 973 * left to process through 'pending'.
974 */ 974 */
975enum ice_status 975enum ice_status
diff --git a/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h b/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h
index 7d2a66739e3f..bb51dd7defb5 100644
--- a/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h
+++ b/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h
@@ -6,11 +6,11 @@
6 6
7union ice_32byte_rx_desc { 7union ice_32byte_rx_desc {
8 struct { 8 struct {
9 __le64 pkt_addr; /* Packet buffer address */ 9 __le64 pkt_addr; /* Packet buffer address */
10 __le64 hdr_addr; /* Header buffer address */ 10 __le64 hdr_addr; /* Header buffer address */
11 /* bit 0 of hdr_addr is DD bit */ 11 /* bit 0 of hdr_addr is DD bit */
12 __le64 rsvd1; 12 __le64 rsvd1;
13 __le64 rsvd2; 13 __le64 rsvd2;
14 } read; 14 } read;
15 struct { 15 struct {
16 struct { 16 struct {
@@ -105,11 +105,11 @@ enum ice_rx_ptype_payload_layer {
105 */ 105 */
106union ice_32b_rx_flex_desc { 106union ice_32b_rx_flex_desc {
107 struct { 107 struct {
108 __le64 pkt_addr; /* Packet buffer address */ 108 __le64 pkt_addr; /* Packet buffer address */
109 __le64 hdr_addr; /* Header buffer address */ 109 __le64 hdr_addr; /* Header buffer address */
110 /* bit 0 of hdr_addr is DD bit */ 110 /* bit 0 of hdr_addr is DD bit */
111 __le64 rsvd1; 111 __le64 rsvd1;
112 __le64 rsvd2; 112 __le64 rsvd2;
113 } read; 113 } read;
114 struct { 114 struct {
115 /* Qword 0 */ 115 /* Qword 0 */
@@ -256,6 +256,9 @@ enum ice_rx_flex_desc_status_error_0_bits {
256 256
257#define ICE_RXQ_CTX_SIZE_DWORDS 8 257#define ICE_RXQ_CTX_SIZE_DWORDS 8
258#define ICE_RXQ_CTX_SZ (ICE_RXQ_CTX_SIZE_DWORDS * sizeof(u32)) 258#define ICE_RXQ_CTX_SZ (ICE_RXQ_CTX_SIZE_DWORDS * sizeof(u32))
259#define ICE_TX_CMPLTNQ_CTX_SIZE_DWORDS 22
260#define ICE_TX_DRBELL_Q_CTX_SIZE_DWORDS 5
261#define GLTCLAN_CQ_CNTX(i, CQ) (GLTCLAN_CQ_CNTX0(CQ) + ((i) * 0x0800))
259 262
260/* RLAN Rx queue context data 263/* RLAN Rx queue context data
261 * 264 *
@@ -274,18 +277,18 @@ struct ice_rlan_ctx {
274 u16 dbuf; /* bigger than needed, see above for reason */ 277 u16 dbuf; /* bigger than needed, see above for reason */
275#define ICE_RLAN_CTX_HBUF_S 6 278#define ICE_RLAN_CTX_HBUF_S 6
276 u16 hbuf; /* bigger than needed, see above for reason */ 279 u16 hbuf; /* bigger than needed, see above for reason */
277 u8 dtype; 280 u8 dtype;
278 u8 dsize; 281 u8 dsize;
279 u8 crcstrip; 282 u8 crcstrip;
280 u8 l2tsel; 283 u8 l2tsel;
281 u8 hsplit_0; 284 u8 hsplit_0;
282 u8 hsplit_1; 285 u8 hsplit_1;
283 u8 showiv; 286 u8 showiv;
284 u32 rxmax; /* bigger than needed, see above for reason */ 287 u32 rxmax; /* bigger than needed, see above for reason */
285 u8 tphrdesc_ena; 288 u8 tphrdesc_ena;
286 u8 tphwdesc_ena; 289 u8 tphwdesc_ena;
287 u8 tphdata_ena; 290 u8 tphdata_ena;
288 u8 tphhead_ena; 291 u8 tphhead_ena;
289 u16 lrxqthresh; /* bigger than needed, see above for reason */ 292 u16 lrxqthresh; /* bigger than needed, see above for reason */
290}; 293};
291 294
@@ -413,35 +416,35 @@ enum ice_tx_ctx_desc_cmd_bits {
413struct ice_tlan_ctx { 416struct ice_tlan_ctx {
414#define ICE_TLAN_CTX_BASE_S 7 417#define ICE_TLAN_CTX_BASE_S 7
415 u64 base; /* base is defined in 128-byte units */ 418 u64 base; /* base is defined in 128-byte units */
416 u8 port_num; 419 u8 port_num;
417 u16 cgd_num; /* bigger than needed, see above for reason */ 420 u16 cgd_num; /* bigger than needed, see above for reason */
418 u8 pf_num; 421 u8 pf_num;
419 u16 vmvf_num; 422 u16 vmvf_num;
420 u8 vmvf_type; 423 u8 vmvf_type;
421#define ICE_TLAN_CTX_VMVF_TYPE_VF 0 424#define ICE_TLAN_CTX_VMVF_TYPE_VF 0
422#define ICE_TLAN_CTX_VMVF_TYPE_VMQ 1 425#define ICE_TLAN_CTX_VMVF_TYPE_VMQ 1
423#define ICE_TLAN_CTX_VMVF_TYPE_PF 2 426#define ICE_TLAN_CTX_VMVF_TYPE_PF 2
424 u16 src_vsi; 427 u16 src_vsi;
425 u8 tsyn_ena; 428 u8 tsyn_ena;
426 u8 alt_vlan; 429 u8 alt_vlan;
427 u16 cpuid; /* bigger than needed, see above for reason */ 430 u16 cpuid; /* bigger than needed, see above for reason */
428 u8 wb_mode; 431 u8 wb_mode;
429 u8 tphrd_desc; 432 u8 tphrd_desc;
430 u8 tphrd; 433 u8 tphrd;
431 u8 tphwr_desc; 434 u8 tphwr_desc;
432 u16 cmpq_id; 435 u16 cmpq_id;
433 u16 qnum_in_func; 436 u16 qnum_in_func;
434 u8 itr_notification_mode; 437 u8 itr_notification_mode;
435 u8 adjust_prof_id; 438 u8 adjust_prof_id;
436 u32 qlen; /* bigger than needed, see above for reason */ 439 u32 qlen; /* bigger than needed, see above for reason */
437 u8 quanta_prof_idx; 440 u8 quanta_prof_idx;
438 u8 tso_ena; 441 u8 tso_ena;
439 u16 tso_qnum; 442 u16 tso_qnum;
440 u8 legacy_int; 443 u8 legacy_int;
441 u8 drop_ena; 444 u8 drop_ena;
442 u8 cache_prof_idx; 445 u8 cache_prof_idx;
443 u8 pkt_shaper_prof_idx; 446 u8 pkt_shaper_prof_idx;
444 u8 int_q_state; /* width not needed - internal do not write */ 447 u8 int_q_state; /* width not needed - internal do not write */
445}; 448};
446 449
447/* macro to make the table lines short */ 450/* macro to make the table lines short */
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index a5961a8fe73c..534221d80200 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -1012,7 +1012,7 @@ void ice_vsi_free_q_vectors(struct ice_vsi *vsi)
1012 * @vsi: the VSI being configured 1012 * @vsi: the VSI being configured
1013 * @v_idx: index of the vector in the VSI struct 1013 * @v_idx: index of the vector in the VSI struct
1014 * 1014 *
1015 * We allocate one q_vector. If allocation fails we return -ENOMEM. 1015 * We allocate one q_vector. If allocation fails we return -ENOMEM.
1016 */ 1016 */
1017static int ice_vsi_alloc_q_vector(struct ice_vsi *vsi, int v_idx) 1017static int ice_vsi_alloc_q_vector(struct ice_vsi *vsi, int v_idx)
1018{ 1018{
@@ -1051,7 +1051,7 @@ out:
1051 * ice_vsi_alloc_q_vectors - Allocate memory for interrupt vectors 1051 * ice_vsi_alloc_q_vectors - Allocate memory for interrupt vectors
1052 * @vsi: the VSI being configured 1052 * @vsi: the VSI being configured
1053 * 1053 *
1054 * We allocate one q_vector per queue interrupt. If allocation fails we 1054 * We allocate one q_vector per queue interrupt. If allocation fails we
1055 * return -ENOMEM. 1055 * return -ENOMEM.
1056 */ 1056 */
1057static int ice_vsi_alloc_q_vectors(struct ice_vsi *vsi) 1057static int ice_vsi_alloc_q_vectors(struct ice_vsi *vsi)
@@ -2136,9 +2136,7 @@ ice_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi,
2136 pf->q_left_rx -= vsi->alloc_rxq; 2136 pf->q_left_rx -= vsi->alloc_rxq;
2137 break; 2137 break;
2138 default: 2138 default:
2139 /* if VSI type is not recognized, clean up the resources and 2139 /* clean up the resources and exit */
2140 * exit
2141 */
2142 goto unroll_vsi_init; 2140 goto unroll_vsi_init;
2143 } 2141 }
2144 2142
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 54ded5d9ab4f..9f85d6534520 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -408,7 +408,7 @@ static void ice_reset_subtask(struct ice_pf *pf)
408 /* When a CORER/GLOBR/EMPR is about to happen, the hardware triggers an 408 /* When a CORER/GLOBR/EMPR is about to happen, the hardware triggers an
409 * OICR interrupt. The OICR handler (ice_misc_intr) determines what type 409 * OICR interrupt. The OICR handler (ice_misc_intr) determines what type
410 * of reset is pending and sets bits in pf->state indicating the reset 410 * of reset is pending and sets bits in pf->state indicating the reset
411 * type and __ICE_RESET_OICR_RECV. So, if the latter bit is set 411 * type and __ICE_RESET_OICR_RECV. So, if the latter bit is set
412 * prepare for pending reset if not already (for PF software-initiated 412 * prepare for pending reset if not already (for PF software-initiated
413 * global resets the software should already be prepared for it as 413 * global resets the software should already be prepared for it as
414 * indicated by __ICE_PREPARED_FOR_RESET; for global resets initiated 414 * indicated by __ICE_PREPARED_FOR_RESET; for global resets initiated
@@ -1382,7 +1382,7 @@ static void ice_free_irq_msix_misc(struct ice_pf *pf)
1382 * @pf: board private structure 1382 * @pf: board private structure
1383 * 1383 *
1384 * This sets up the handler for MSIX 0, which is used to manage the 1384 * This sets up the handler for MSIX 0, which is used to manage the
1385 * non-queue interrupts, e.g. AdminQ and errors. This is not used 1385 * non-queue interrupts, e.g. AdminQ and errors. This is not used
1386 * when in MSI or Legacy interrupt mode. 1386 * when in MSI or Legacy interrupt mode.
1387 */ 1387 */
1388static int ice_req_irq_msix_misc(struct ice_pf *pf) 1388static int ice_req_irq_msix_misc(struct ice_pf *pf)
@@ -3674,7 +3674,7 @@ ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,
3674 */ 3674 */
3675 status = ice_update_sw_rule_bridge_mode(hw); 3675 status = ice_update_sw_rule_bridge_mode(hw);
3676 if (status) { 3676 if (status) {
3677 netdev_err(dev, "update SW_RULE for bridge mode failed, = %d err %d aq_err %d\n", 3677 netdev_err(dev, "switch rule update failed, mode = %d err %d aq_err %d\n",
3678 mode, status, hw->adminq.sq_last_status); 3678 mode, status, hw->adminq.sq_last_status);
3679 /* revert hw->evb_veb */ 3679 /* revert hw->evb_veb */
3680 hw->evb_veb = (pf_sw->bridge_mode == BRIDGE_MODE_VEB); 3680 hw->evb_veb = (pf_sw->bridge_mode == BRIDGE_MODE_VEB);
@@ -3785,7 +3785,7 @@ static void ice_tx_timeout(struct net_device *netdev)
3785 * @netdev: network interface device structure 3785 * @netdev: network interface device structure
3786 * 3786 *
3787 * The open entry point is called when a network interface is made 3787 * The open entry point is called when a network interface is made
3788 * active by the system (IFF_UP). At this point all resources needed 3788 * active by the system (IFF_UP). At this point all resources needed
3789 * for transmit and receive operations are allocated, the interrupt 3789 * for transmit and receive operations are allocated, the interrupt
3790 * handler is registered with the OS, the netdev watchdog is enabled, 3790 * handler is registered with the OS, the netdev watchdog is enabled,
3791 * and the stack is notified that the interface is ready. 3791 * and the stack is notified that the interface is ready.
@@ -3818,7 +3818,7 @@ static int ice_open(struct net_device *netdev)
3818 * @netdev: network interface device structure 3818 * @netdev: network interface device structure
3819 * 3819 *
3820 * The stop entry point is called when an interface is de-activated by the OS, 3820 * The stop entry point is called when an interface is de-activated by the OS,
3821 * and the netdevice enters the DOWN state. The hardware is still under the 3821 * and the netdevice enters the DOWN state. The hardware is still under the
3822 * driver's control, but the netdev interface is disabled. 3822 * driver's control, but the netdev interface is disabled.
3823 * 3823 *
3824 * Returns success only - not allowed to fail 3824 * Returns success only - not allowed to fail
@@ -3847,14 +3847,14 @@ ice_features_check(struct sk_buff *skb,
3847 size_t len; 3847 size_t len;
3848 3848
3849 /* No point in doing any of this if neither checksum nor GSO are 3849 /* No point in doing any of this if neither checksum nor GSO are
3850 * being requested for this frame. We can rule out both by just 3850 * being requested for this frame. We can rule out both by just
3851 * checking for CHECKSUM_PARTIAL 3851 * checking for CHECKSUM_PARTIAL
3852 */ 3852 */
3853 if (skb->ip_summed != CHECKSUM_PARTIAL) 3853 if (skb->ip_summed != CHECKSUM_PARTIAL)
3854 return features; 3854 return features;
3855 3855
3856 /* We cannot support GSO if the MSS is going to be less than 3856 /* We cannot support GSO if the MSS is going to be less than
3857 * 64 bytes. If it is then we need to drop support for GSO. 3857 * 64 bytes. If it is then we need to drop support for GSO.
3858 */ 3858 */
3859 if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_size < 64)) 3859 if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_size < 64))
3860 features &= ~NETIF_F_GSO_MASK; 3860 features &= ~NETIF_F_GSO_MASK;
diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c b/drivers/net/ethernet/intel/ice/ice_sriov.c
index 027eba4e13f8..533b989a23e1 100644
--- a/drivers/net/ethernet/intel/ice/ice_sriov.c
+++ b/drivers/net/ethernet/intel/ice/ice_sriov.c
@@ -46,7 +46,7 @@ ice_aq_send_msg_to_vf(struct ice_hw *hw, u16 vfid, u32 v_opcode, u32 v_retval,
46 * @link_speed: variable containing the link_speed to be converted 46 * @link_speed: variable containing the link_speed to be converted
47 * 47 *
48 * Convert link speed supported by HW to link speed supported by virtchnl. 48 * Convert link speed supported by HW to link speed supported by virtchnl.
49 * If adv_link_support is true, then return link speed in Mbps. Else return 49 * If adv_link_support is true, then return link speed in Mbps. Else return
50 * link speed as a VIRTCHNL_LINK_SPEED_* casted to a u32. Note that the caller 50 * link speed as a VIRTCHNL_LINK_SPEED_* casted to a u32. Note that the caller
51 * needs to cast back to an enum virtchnl_link_speed in the case where 51 * needs to cast back to an enum virtchnl_link_speed in the case where
52 * adv_link_support is false, but when adv_link_support is true the caller can 52 * adv_link_support is false, but when adv_link_support is true the caller can
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index af55c74c2378..286a1a7afdc2 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -129,7 +129,7 @@ enum ice_status ice_init_def_sw_recp(struct ice_hw *hw)
129 * 129 *
130 * NOTE: *req_desc is both an input/output parameter. 130 * NOTE: *req_desc is both an input/output parameter.
131 * The caller of this function first calls this function with *request_desc set 131 * The caller of this function first calls this function with *request_desc set
132 * to 0. If the response from f/w has *req_desc set to 0, all the switch 132 * to 0. If the response from f/w has *req_desc set to 0, all the switch
133 * configuration information has been returned; if non-zero (meaning not all 133 * configuration information has been returned; if non-zero (meaning not all
134 * the information was returned), the caller should call this function again 134 * the information was returned), the caller should call this function again
135 * with *req_desc set to the previous value returned by f/w to get the 135 * with *req_desc set to the previous value returned by f/w to get the
@@ -1863,7 +1863,7 @@ ice_add_vlan_internal(struct ice_hw *hw, struct ice_fltr_list_entry *f_entry)
1863 tmp_fltr.fwd_id.vsi_list_id = vsi_list_id; 1863 tmp_fltr.fwd_id.vsi_list_id = vsi_list_id;
1864 tmp_fltr.fltr_act = ICE_FWD_TO_VSI_LIST; 1864 tmp_fltr.fltr_act = ICE_FWD_TO_VSI_LIST;
1865 /* Update the previous switch rule to a new VSI list which 1865 /* Update the previous switch rule to a new VSI list which
1866 * includes current VSI thats requested 1866 * includes current VSI that is requested
1867 */ 1867 */
1868 status = ice_update_pkt_fwd_rule(hw, &tmp_fltr); 1868 status = ice_update_pkt_fwd_rule(hw, &tmp_fltr);
1869 if (status) 1869 if (status)
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index 99954089a7fb..939510b7e8f3 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -377,7 +377,7 @@ static void ice_release_rx_desc(struct ice_ring *rx_ring, u32 val)
377 rx_ring->next_to_alloc = val; 377 rx_ring->next_to_alloc = val;
378 378
379 /* Force memory writes to complete before letting h/w 379 /* Force memory writes to complete before letting h/w
380 * know there are new descriptors to fetch. (Only 380 * know there are new descriptors to fetch. (Only
381 * applicable for weak-ordered memory model archs, 381 * applicable for weak-ordered memory model archs,
382 * such as IA-64). 382 * such as IA-64).
383 */ 383 */
@@ -686,7 +686,7 @@ static struct sk_buff *ice_fetch_rx_buf(struct ice_ring *rx_ring,
686 * ice_pull_tail - ice specific version of skb_pull_tail 686 * ice_pull_tail - ice specific version of skb_pull_tail
687 * @skb: pointer to current skb being adjusted 687 * @skb: pointer to current skb being adjusted
688 * 688 *
689 * This function is an ice specific version of __pskb_pull_tail. The 689 * This function is an ice specific version of __pskb_pull_tail. The
690 * main difference between this version and the original function is that 690 * main difference between this version and the original function is that
691 * this function can make several assumptions about the state of things 691 * this function can make several assumptions about the state of things
692 * that allow for significant optimizations versus the standard function. 692 * that allow for significant optimizations versus the standard function.
@@ -768,7 +768,7 @@ static bool ice_test_staterr(union ice_32b_rx_flex_desc *rx_desc,
768 * @rx_desc: Rx descriptor for current buffer 768 * @rx_desc: Rx descriptor for current buffer
769 * @skb: Current socket buffer containing buffer in progress 769 * @skb: Current socket buffer containing buffer in progress
770 * 770 *
771 * This function updates next to clean. If the buffer is an EOP buffer 771 * This function updates next to clean. If the buffer is an EOP buffer
772 * this function exits returning false, otherwise it will place the 772 * this function exits returning false, otherwise it will place the
773 * sk_buff in the next buffer to be chained and return true indicating 773 * sk_buff in the next buffer to be chained and return true indicating
774 * that this is in fact a non-EOP buffer. 774 * that this is in fact a non-EOP buffer.
@@ -950,7 +950,7 @@ static void ice_receive_skb(struct ice_ring *rx_ring, struct sk_buff *skb,
950 * @budget: Total limit on number of packets to process 950 * @budget: Total limit on number of packets to process
951 * 951 *
952 * This function provides a "bounce buffer" approach to Rx interrupt 952 * This function provides a "bounce buffer" approach to Rx interrupt
953 * processing. The advantage to this is that on systems that have 953 * processing. The advantage to this is that on systems that have
954 * expensive overhead for IOMMU access this provides a means of avoiding 954 * expensive overhead for IOMMU access this provides a means of avoiding
955 * it by maintaining the mapping of the page to the system. 955 * it by maintaining the mapping of the page to the system.
956 * 956 *
@@ -1553,7 +1553,7 @@ int ice_tso(struct ice_tx_buf *first, struct ice_tx_offload_params *off)
1553 * Finally, we add one to round up. Because 256 isn't an exact multiple of 1553 * Finally, we add one to round up. Because 256 isn't an exact multiple of
1554 * 3, we'll underestimate near each multiple of 12K. This is actually more 1554 * 3, we'll underestimate near each multiple of 12K. This is actually more
1555 * accurate as we have 4K - 1 of wiggle room that we can fit into the last 1555 * accurate as we have 4K - 1 of wiggle room that we can fit into the last
1556 * segment. For our purposes this is accurate out to 1M which is orders of 1556 * segment. For our purposes this is accurate out to 1M which is orders of
1557 * magnitude greater than our largest possible GSO size. 1557 * magnitude greater than our largest possible GSO size.
1558 * 1558 *
1559 * This would then be implemented as: 1559 * This would then be implemented as:
@@ -1621,7 +1621,7 @@ static bool __ice_chk_linearize(struct sk_buff *skb)
1621 nr_frags -= ICE_MAX_BUF_TXD - 2; 1621 nr_frags -= ICE_MAX_BUF_TXD - 2;
1622 frag = &skb_shinfo(skb)->frags[0]; 1622 frag = &skb_shinfo(skb)->frags[0];
1623 1623
1624 /* Initialize size to the negative value of gso_size minus 1. We 1624 /* Initialize size to the negative value of gso_size minus 1. We
1625 * use this as the worst case scenerio in which the frag ahead 1625 * use this as the worst case scenerio in which the frag ahead
1626 * of us only provides one byte which is why we are limited to 6 1626 * of us only provides one byte which is why we are limited to 6
1627 * descriptors for a single transmit as the header and previous 1627 * descriptors for a single transmit as the header and previous
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index 20b94dee0036..05ff4f910649 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -156,8 +156,6 @@ static void ice_free_vf_res(struct ice_vf *vf)
156 clear_bit(ICE_VF_STATE_UC_PROMISC, vf->vf_states); 156 clear_bit(ICE_VF_STATE_UC_PROMISC, vf->vf_states);
157} 157}
158 158
159/***********************enable_vf routines*****************************/
160
161/** 159/**
162 * ice_dis_vf_mappings 160 * ice_dis_vf_mappings
163 * @vf: pointer to the VF structure 161 * @vf: pointer to the VF structure
@@ -454,7 +452,7 @@ static int ice_alloc_vsi_res(struct ice_vf *vf)
454 452
455 /* Clear this bit after VF initialization since we shouldn't reclaim 453 /* Clear this bit after VF initialization since we shouldn't reclaim
456 * and reassign interrupts for synchronous or asynchronous VFR events. 454 * and reassign interrupts for synchronous or asynchronous VFR events.
457 * We don't want to reconfigure interrupts since AVF driver doesn't 455 * We dont want to reconfigure interrupts since AVF driver doesn't
458 * expect vector assignment to be changed unless there is a request for 456 * expect vector assignment to be changed unless there is a request for
459 * more vectors. 457 * more vectors.
460 */ 458 */
@@ -1105,7 +1103,7 @@ int ice_sriov_configure(struct pci_dev *pdev, int num_vfs)
1105 * ice_process_vflr_event - Free VF resources via IRQ calls 1103 * ice_process_vflr_event - Free VF resources via IRQ calls
1106 * @pf: pointer to the PF structure 1104 * @pf: pointer to the PF structure
1107 * 1105 *
1108 * called from the VLFR IRQ handler to 1106 * called from the VFLR IRQ handler to
1109 * free up VF resources and state variables 1107 * free up VF resources and state variables
1110 */ 1108 */
1111void ice_process_vflr_event(struct ice_pf *pf) 1109void ice_process_vflr_event(struct ice_pf *pf)
@@ -1764,7 +1762,7 @@ static int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8 *msg)
1764 /* copy Tx queue info from VF into VSI */ 1762 /* copy Tx queue info from VF into VSI */
1765 vsi->tx_rings[i]->dma = qpi->txq.dma_ring_addr; 1763 vsi->tx_rings[i]->dma = qpi->txq.dma_ring_addr;
1766 vsi->tx_rings[i]->count = qpi->txq.ring_len; 1764 vsi->tx_rings[i]->count = qpi->txq.ring_len;
1767 /* copy Rx queue info from VF into vsi */ 1765 /* copy Rx queue info from VF into VSI */
1768 vsi->rx_rings[i]->dma = qpi->rxq.dma_ring_addr; 1766 vsi->rx_rings[i]->dma = qpi->rxq.dma_ring_addr;
1769 vsi->rx_rings[i]->count = qpi->rxq.ring_len; 1767 vsi->rx_rings[i]->count = qpi->rxq.ring_len;
1770 if (qpi->rxq.databuffer_size > ((16 * 1024) - 128)) { 1768 if (qpi->rxq.databuffer_size > ((16 * 1024) - 128)) {
@@ -1830,7 +1828,7 @@ static bool ice_can_vf_change_mac(struct ice_vf *vf)
1830 * @msg: pointer to the msg buffer 1828 * @msg: pointer to the msg buffer
1831 * @set: true if mac filters are being set, false otherwise 1829 * @set: true if mac filters are being set, false otherwise
1832 * 1830 *
1833 * add guest mac address filter 1831 * add guest MAC address filter
1834 */ 1832 */
1835static int 1833static int
1836ice_vc_handle_mac_addr_msg(struct ice_vf *vf, u8 *msg, bool set) 1834ice_vc_handle_mac_addr_msg(struct ice_vf *vf, u8 *msg, bool set)
@@ -1968,9 +1966,9 @@ static int ice_vc_del_mac_addr_msg(struct ice_vf *vf, u8 *msg)
1968 * @msg: pointer to the msg buffer 1966 * @msg: pointer to the msg buffer
1969 * 1967 *
1970 * VFs get a default number of queues but can use this message to request a 1968 * VFs get a default number of queues but can use this message to request a
1971 * different number. If the request is successful, PF will reset the VF and 1969 * different number. If the request is successful, PF will reset the VF and
1972 * return 0. If unsuccessful, PF will send message informing VF of number of 1970 * return 0. If unsuccessful, PF will send message informing VF of number of
1973 * available queue pairs via virtchnl message response to VF. 1971 * available queue pairs via virtchnl message response to vf.
1974 */ 1972 */
1975static int ice_vc_request_qs_msg(struct ice_vf *vf, u8 *msg) 1973static int ice_vc_request_qs_msg(struct ice_vf *vf, u8 *msg)
1976{ 1974{
@@ -1991,7 +1989,7 @@ static int ice_vc_request_qs_msg(struct ice_vf *vf, u8 *msg)
1991 tx_rx_queue_left = min_t(int, pf->q_left_tx, pf->q_left_rx); 1989 tx_rx_queue_left = min_t(int, pf->q_left_tx, pf->q_left_rx);
1992 if (req_queues <= 0) { 1990 if (req_queues <= 0) {
1993 dev_err(&pf->pdev->dev, 1991 dev_err(&pf->pdev->dev,
1994 "VF %d tried to request %d queues. Ignoring.\n", 1992 "VF %d tried to request %d queues. Ignoring.\n",
1995 vf->vf_id, req_queues); 1993 vf->vf_id, req_queues);
1996 } else if (req_queues > ICE_MAX_QS_PER_VF) { 1994 } else if (req_queues > ICE_MAX_QS_PER_VF) {
1997 dev_err(&pf->pdev->dev, 1995 dev_err(&pf->pdev->dev,
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
index 10131e0180f9..01470a8ee03a 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
@@ -70,7 +70,7 @@ struct ice_vf {
70 u8 spoofchk; 70 u8 spoofchk;
71 u16 num_mac; 71 u16 num_mac;
72 u16 num_vlan; 72 u16 num_vlan;
73 u8 num_req_qs; /* num of queue pairs requested by VF */ 73 u8 num_req_qs; /* num of queue pairs requested by VF */
74}; 74};
75 75
76#ifdef CONFIG_PCI_IOV 76#ifdef CONFIG_PCI_IOV